Add support for saving and restoring AFS acls using the
pioctl interface of (Open)AFS. This is mostly a proof of
concept its no where ready for production and may put
a enormous load on your AFS cell so please use it only
for testing. It also only solves part of the AFS backup
problem as we only save and restore acls on directories
on an AFS filesystem but not the actual cell configuration
etc. For that we advice you to use the native tooling
using some script or the bpipe plugin.
Delay allocation to last minute when we are mostly sure we can
save a real xattr and we only need to get the actual value of it.
This way we don't have to free data on strange code paths. Also
made most functions have one exit point so things are more clean.
As it seems we could speedup the insert of the batch mode
somewhat by using multi-row insert statements. This implements
a very simple routine which batch up 32 inserts into one
query before pushing it to the database. The 32 is arbitrary
and just a test value for now we can always bump or lower it.
Fix bug #1874 crash with xattr support on a BTRFS filesystem
Add some extra safeguards that structure are always initialized
the way we think they should be and a special code path doesn't
give freeing failures on non allocated memory.
On lookup of a hostname we could get back both IPv4 and IPV6 addresses
for a given host. But we may only support IPV4 on the local host
and as such trying to create an IPV6 socket will fail. If we check
the return code of the socket call for EAFNOSUPPORT we catch such
an error and can continue trying to create a socket type that is
supported.
We initialize all tls stuff in the check_resources function except
for the tls stuff for storages which we initialize in the
check_catalog function because we walk the storages there already.
This might be an optimization but it doesn't make sense its better
to check the whole resources stuff in the check_resources function
as the name seems to imply that is what is done there.
Support the new POSIX getaddrinfo interface which replaces
the dated gethostbyname interface which is obsoleted in
the POSIX 1003.1 standard. When getaddrinfo is supported
by the OS its the prefered interface as gethostbyname is
not thread-safe and we don't support the gethostbyname_r
thread-safe version of gethostbyname.
The bnet code is changed to support the absolute mimimum set
of the getaddrinfo interface replacing only the core functions
normally performed by gethostbyname. We could add more generic
support for the getaddrinfo function but have not for now.
bstmp is changed to use the full getaddrinfo functionality
so it now can also connect to ipv6 mailhost when getaddrinfo
is used.
Also all sprintf calls in bsmtp are replaced with snprintf calls.
Fix mysql config for older versions of mysql+config.
On older versions of mysql_config the newly used
flags are not supported. So we test if the new flag
is supported and otherwise fallback to a kludge with
some sed strings to get the info we want from the
older mysql_config options.
Eric Bollengier [Thu, 12 Apr 2012 12:01:14 +0000 (14:01 +0200)]
Fix #4062 on make_catalog_backup.pl script when user/password are empty
The make_catalog_backup.pl sets PGUSER and PGPASSWORD env vars even if they
are not set in the bacula config. This leads to an error if postgresql is used
with IDENT authentification.
The following error message is printed:
---
pg_dump: [archiver (db)] connection to database "bacula" failed: FATAL: no
PostgreSQL user name specified in startup packet
Fix bug #1853: bacula-sd dead but pid file exists.
We scanned using a %d pattern into a bool value. On some
platforms (SPARC) this gives a severe SIGBUS e.g. bus error
as the sizeof(bool) on 64 bits is 1 byte and the %d uses an
integer value which is 4 bytes. Its obvious now we know this
problem that its an problem on other platforms too but it
seems only on SPARC it triggers a hardware error by the CPU.
The workaround is to use a temporary variable and set the
bool to either true or false based on the integer value.
Fix bug #1848 bsock.c:335 Socket has errors=1 on call to client
Removed the unneeded bnet_sig(dir, BNET_EOD) as the calling
function changer_cmd in dircmd.c already sets the BNET_EOD on
returning. So the autochanger_cmd function doesn't need to do
it.
The second Include {} block is using the Accurate=A option from the first Include{}. With this
fix, the Accurate/BaseJob/Verify options are set to default between two Include{}.
We still have the same kind of problem for the "flags" that contains most options.
Something like the following configuration won't work as expected:
FileSet {
Name = X
Include {
Options { Portable = no }
File = /tmp
}