With the argument specified as unsigned char *, Cython emits
code in the Python wrapper to convert string-like objects to
unsigned char* (essentially PyBytes_AS_STRING).
Because the len(data) call is performed on a cdef'd string-ish type,
Cython emits a strlen() call, on the result of PyBytes_AS_STRING.
This is not correct, since embedded null bytes are entirely possible.
Incidentally, the code generated by Cython was also not correct,
since the Clang Static Analyzer found a path of execution where
passing arguments in a weird way from Python resulted in strlen(NULL).
Formulated like this, Cython emits essentially:
c_buzhash(
PyBytes_AS_STRING(data),
PyObject_Length(data),
...
)
which is correct.
note: signal processing can be arbitrarily delayed;
Python processes signals as soon as the code returns into the interpreter
loop, which doesn't happen unless libfuse returns control, i.e.
some request has been sent to the file system.
if we always give stdout to extract_item(), it gets into the stdout-
processing branch which only emits data from items that have chunks
and does nothing for items which don't.
warning: this decimal constant is unsigned only in ISO C90
Raised by GCC 4.9.2 on PowerPC.
The warning is bogus here due to the immediate explicit cast; newer
versions don't emit it.
rename authenticated to authenticated-blake2, consistent with the other
blake2 key modes
add authenticated mode that fills the blank and is consistent with the
other "unqualified" key modes
This should allow us to make sure older borg versions can be cleanly
prevented from doing operations that are no longer safe because of
repository format evolution. This allows more fine grained control than
just incrementing the manifest version. So for example a change that
still allows new archives to be created but would corrupt the repository
when an old version tries to delete an archive or check the repository
would add the new feature to the check and delete set but leave it out
of the write set.
This is somewhat inspired by ext{2,3,4} which uses sets for
compat (everything except fsck), ro-compat (may only be accessed
read-only by older versions) and features (refuse all access).