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
}
Eric Bollengier [Fri, 10 Feb 2012 16:32:10 +0000 (17:32 +0100)]
Remove bad optimization from Accurate code
By returning "already seen", we didn't reply to the original question:
has the file changed (must be backed up)?
If your fileset contains two Include {} sections the second Include may ask for
the same files than the first Include, and depending on Exclude, Wild, etc..
the answer may be "Already Seen" even if the file needs to be saved. From what
I can see, Wild/Exclude are called after the accurate check.