diff -Nru burp-1.3.0+20120214git/.gitignore burp-1.3.10/.gitignore --- burp-1.3.0+20120214git/.gitignore 1970-01-01 00:00:00.000000000 +0000 +++ burp-1.3.10/.gitignore 2012-07-27 00:36:21.000000000 +0000 @@ -0,0 +1,12 @@ +*.o +*~ +*.swp +*.swo +Makefile +autoconf/Make.common +config.log +config.out +config.status +libtool +src/bedup +src/burp diff -Nru burp-1.3.0+20120214git/CHANGELOG burp-1.3.10/CHANGELOG --- burp-1.3.0+20120214git/CHANGELOG 2012-02-13 13:13:37.000000000 +0000 +++ burp-1.3.10/CHANGELOG 2012-07-27 19:32:02.000000000 +0000 @@ -1,3 +1,121 @@ +2012-07-28 Changes in burp-1.3.10: + * Added Tony Cheneau's IPv6 fixes. + * Fixed bug to do with directory_tree=1 that would stop resume working. + * Stop status monitor exiting on terminal resize. + * Small man page corrections about overwriting existing files. + * Don't use mingw64's utime() to set Windows file times, because it doesn't + work on read-only files. + * Tweak to timer_script to let it run with slightly older versions of 'date', + plus the FreeBSD version of 'date'. + * "burp -a l" should say that a backup is finalising. + * Upgraded Windows to gcc-4.6.3. + * Upgraded Windows to zlib-1.2.7. + * Upgraded Windows to openssl-1.0.0j. + * Added pcre-8.31 to Windows. + * Added Gonéri Le Bouder's exclude_regex option. + * Add a gentle shutdown server option - send signal 12 to the main process. + * Make librsync errors in phase4 non-fatal. + * Check for errors on gzclose() and fclose(). + +2012-06-08 Changes in burp-1.3.8: + * Fix bug introduced in the new storage directory structure stuff that had + the potential to corrupt backups. + * Force directory_tree = 0 for clients on less than version 1.3.6. + * Escape '-' symbols in man pages. + * Save received certs as temporary files and then rename them, to avoid + accidently truncating the current ones. + * If Windows VSS snapshot fails, do not continue. + * 32bit mingw64 has difficulty printf-ing multiple %llu items and sometimes + even segfaults, so split the counters into individual printfs. + +2012-05-28 Changes in burp-1.3.6: + * Store files in a directory structure like that of the original client. + * Fix 'ERROR: Please use absolute include/exclude paths' when setting paths + on the server side. + * Add configure test for uthash.h. If it doesn't exist, use the uthash.h + included with the burp source. + * Make top level excludes not be a fatal error. + * Make syslogging begin sooner. + * Unhide warning messages originally hidden by bacula when having errors + when setting things like file times. + * Fix bug where file times were not getting set on Windows directories. + * Remove openssl "can't open config file" warning when generating + certificates on Windows. + * Set IPTOS_THROUGHPUT bulk packet flag for linux backups. Windows/mingw64 + appears not to be able to do this. + +2012-04-27 Changes in burp-1.3.4: + * Bug fix for Windows backups where it had stopped using the Windows backup + API in 1.3.2. + * Automatically convert backslashes to forward slashes for includes/excludes + on Windows clients. + * Bug fix: pass the path to the CA conf file whenever running burp_ca (fixes + problems with the test scripts). + * Remove whitespace that was causing the burp_ca '--crl' option not to work. + * Have separate CA directories for the client and server. Make 'make install' + create the directory /etc/burp/CA-client. + * Make compile succeed when there is no libncurses library. + * Add 'client_can_force_backup' option, defaulted to on. Turning it off means + that only timed backups are allowed. Also add similar 'client_can_list', + 'client_can_restore' and 'client_can_verify' options. + * Remove getopt from burp_ca, allowing it to work on Macs. + * Make an unknown exclude_fs a non-fatal error. + * Add ability to trigger a backup on the server side by placing a file called + 'backup' in the client's storage directory. + * Fix bug where block device nodes were not backed up. Add 'read_blockdev' + and 'read_all_blockdevs' options that work the same as the equivalent + fifo options. + * Add 'notify_success_changes_only' option, which means that success + notifications only get sent if there were new or changed files. + * Added Ruben Kerkhof's fixes to make run_script() work on OSX. + * For each file, store the compression setting in the manifest. + * Stop clients connecting twice when a timed backup is rejected. + +2012-03-31 Changes in burp-1.3.2: + * Add options for the client to automatically generate a certificate signing + request, have the server sign and return it, and have the client use the + new certificate. Remove old default SSL certificates because they should + no longer be needed. + See docs/burp_ca.txt for more information. + * Add ability for conf files to point to more conf files to read. + * Fix status server segfault when deleting files from clientconfdir. + * Allow directories in clientconfdir. + * Add the ability for the server to set the client include/excludes. + * Simulate browsing backups with the use of "-a l/L -d path". + * Add ability to set up a restore on the server side. + * Add ability to specify child processes separately to status child process + with new max_status_children option. + * Status monitor - make keypresses more responsive. + * Fix bug where old clients that didn't leave an incexc file on the server + meant that resume would not start. + * Add 'include_ext' option, which excludes all files unless their names end + in the given extension. + * Fall back to using the client or server name if ssl_peer_cn is unset on the + server or client. + * Don't try to chuser/chgrp in the child if the user/group settings are the + same as the parent (fixes bug where setting user/group in the server + wouldn't work, because it would try to chuser/chgrp twice). + * Windows installer: add comment about poll interval '0' means that the + scheduled job isn't installed. + * Windows installer: don't install the scheduled task when doing an upgrade. + * Unlock the client directory after server_script_post has run instead of + before. + * Fix bug where the wrong arg count was being given to the server post + script. + * Make sure status snapshot exits when there are no backup clients. + * Ability to dump logs and paths in backups using '-a S' (useful for making + a gui that browses backup contents). + * Bug fixes to ssl_extra_checks_script. + * Bug fix: initialise network_timeout properly. + * Fix typos in docs/burp_ca.txt. + * Add 'LANG=C' to the timer script, so that timer_arg days are always + expected in English. + * Add config file option to turn syslog logging on/off. + * Bug fix for 'compression = gzip[0-9]'. + * Pass the server version to the client. + +2012-02-27 Changes in burp-1.3.1: + * EFS support on Windows. * Move to using mingw-w64 for both 32bit and 64bit Windows builds. * Add 'exclude_fs =' option for Linux so that you can skip partitions types (for example, tmpfs) without generating warnings. @@ -8,6 +126,16 @@ * Add man pages for bedup and burp_ca. * Remove embedded uthash code. It will need to be installed as a dependency. For example, in Debian, you might run 'apt-get install uthash-dev'. + * Add Bas van den Dikkenberg's tweaks for getting burp into official Debian + and Ubuntu repositories. Burp is now in debian sid and ubuntu precise. + * Make the server tell the client what extra_comms features it supports, so + that, in future, old servers are more likely to work with new clients. + * Improve 'make clean'. + * Add option to strip off leading path components on restore. + * Fix segfault that was happening on the server when SSL_accept() failed. + * Move burp and bedup to /usr/sbin (you need to check that any cron jobs + are pointing there too). + * Moved list of things to do to https://github.com/grke/burp/issues 2012-01-27 Changes in burp-1.3.0: * Add a mechanism for automatically upgrading clients. diff -Nru burp-1.3.0+20120214git/CONTRIBUTORS burp-1.3.10/CONTRIBUTORS --- burp-1.3.0+20120214git/CONTRIBUTORS 2012-02-13 13:13:37.000000000 +0000 +++ burp-1.3.10/CONTRIBUTORS 2012-07-27 00:36:21.000000000 +0000 @@ -3,10 +3,14 @@ surname. Pascal Bleser +Gonéri Le Bouder +Tony Cheneau Michael Da Cova Bas van den Dikkenberg +Bartosz Fenski Jason Haar Graham Keeling (main author) +Ruben Kerkhof Patrick Koppen Wai Keong Phan Michael Roland diff -Nru burp-1.3.0+20120214git/DONATIONS burp-1.3.10/DONATIONS --- burp-1.3.0+20120214git/DONATIONS 1970-01-01 00:00:00.000000000 +0000 +++ burp-1.3.10/DONATIONS 2012-07-27 00:36:21.000000000 +0000 @@ -0,0 +1,27 @@ +Burp is open and free software. I work on it in my spare time. If you would +like this work to continue, please consider making a small donation. The +PayPal donation link can be found on the website http://burp.grke.net/ +If you want to donate but don't like PayPal, please email me at +keeling@spamcop.net and we can talk about alternatives. + +This is the list of donations received to date. Many thanks to all of you. + +Donations for 2012-06: + * £16.00 Talma J. + +Donations for 2012-05: + * £100.00 Tomppa + * £64.00 Baker J. + +Donations for 2012-04: + * £10.00 Calogero L. + * Server hosting from 6sync.com + +Donations for 2012-03: + * £5.00 Łukasz P. + +Donations up to 2012-01-29: + * £250.00 Robert L. + * £50.00 Sebastiano P. + * £10.00 Tim R. + * £10.00 Patryk D. diff -Nru burp-1.3.0+20120214git/Makefile.in burp-1.3.10/Makefile.in --- burp-1.3.0+20120214git/Makefile.in 2012-02-13 13:13:37.000000000 +0000 +++ burp-1.3.10/Makefile.in 2012-07-27 00:36:21.000000000 +0000 @@ -89,9 +89,11 @@ installdirs: $(MKDIR) $(DESTDIR)$(sbindir) $(MKDIR) $(DESTDIR)$(sysconfdir) + $(MKDIR) $(DESTDIR)$(sysconfdir)/CA-client $(MKDIR) $(DESTDIR)/var/run $(MKDIR) $(DESTDIR)/var/spool/burp @if [ ! -d $(DESTDIR)$(sysconfdir)/clientconfdir ] ; then $(MKDIR) $(DESTDIR)$(sysconfdir)/clientconfdir ; cp configs/server/clientconfdir/testclient $(DESTDIR)$(sysconfdir)/clientconfdir/testclient ; fi + @if [ ! -d $(DESTDIR)$(sysconfdir)/clientconfdir/incexc ] ; then $(MKDIR) $(DESTDIR)$(sysconfdir)/clientconfdir/incexc ; cp configs/server/clientconfdir/incexc $(DESTDIR)$(sysconfdir)/clientconfdir/incexc/example ; fi @if [ ! -d $(DESTDIR)$(sysconfdir)/autoupgrade/client ] ; then $(MKDIR) $(DESTDIR)$(sysconfdir)/autoupgrade/client ; fi @if [ ! -d $(DESTDIR)$(sysconfdir)/autoupgrade/server ] ; then $(MKDIR) $(DESTDIR)$(sysconfdir)/autoupgrade/server ; fi @if [ ! -d $(DESTDIR)$(sysconfdir)/autoupgrade/server/win32 ] ; then $(MKDIR) $(DESTDIR)$(sysconfdir)/autoupgrade/server/win32 ; fi @@ -112,16 +114,14 @@ @for I in $(all_subdirs); do (cd $$I && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done @if [ ! -f $(DESTDIR)$(sysconfdir)/burp-server.conf ] ; then cp configs/server/burp.conf $(DESTDIR)$(sysconfdir)/burp-server.conf ; fi @if [ ! -f $(DESTDIR)$(sysconfdir)/burp.conf ] ; then cp configs/client/burp.conf $(DESTDIR)$(sysconfdir)/burp.conf ; fi - @if [ ! -f $(DESTDIR)$(sysconfdir)/ssl_cert-server.pem ] ; then cp configs/certs/ssl_cert-server.pem $(DESTDIR)$(sysconfdir)/ssl_cert-server.pem ; fi - @if [ ! -f $(DESTDIR)$(sysconfdir)/ssl_cert-client.pem ] ; then cp configs/certs/ssl_cert-client.pem $(DESTDIR)$(sysconfdir)/ssl_cert-client.pem ; fi - @if [ ! -f $(DESTDIR)$(sysconfdir)/ssl_cert_ca.pem ] ; then cp configs/certs/ssl_cert_ca.pem $(DESTDIR)$(sysconfdir)/ssl_cert_ca.pem ; fi - @if [ ! -f $(DESTDIR)$(sysconfdir)/dhfile.pem ] ; then cp configs/certs/dhfile.pem $(DESTDIR)$(sysconfdir)/dhfile.pem ; fi @if [ ! -f $(DESTDIR)$(sysconfdir)/notify_script ] ; then cp configs/server/notify_script $(DESTDIR)$(sysconfdir)/notify_script && chmod 755 $(DESTDIR)$(sysconfdir)/notify_script ; fi @if [ ! -f $(DESTDIR)$(sysconfdir)/ssl_extra_checks_script ] ; then cp configs/server/ssl_extra_checks_script $(DESTDIR)$(sysconfdir)/ssl_extra_checks_script && chmod 755 $(DESTDIR)$(sysconfdir)/ssl_extra_checks_script ; fi @if [ ! -f $(DESTDIR)$(sysconfdir)/summary_script ] ; then cp configs/server/summary_script $(DESTDIR)$(sysconfdir)/summary_script && chmod 755 $(DESTDIR)$(sysconfdir)/summary_script ; fi @if [ ! -f $(DESTDIR)$(sysconfdir)/timer_script ] ; then cp configs/server/timer_script $(DESTDIR)$(sysconfdir)/timer_script && chmod 755 $(DESTDIR)$(sysconfdir)/timer_script ; fi @if [ ! -f $(DESTDIR)$(sysconfdir)/autoupgrade/server/win32/script ] ; then cp configs/server/autoupgrade/windows.script $(DESTDIR)$(sysconfdir)/autoupgrade/server/win32/script ; fi @if [ ! -f $(DESTDIR)$(sysconfdir)/autoupgrade/server/win64/script ] ; then cp configs/server/autoupgrade/windows.script $(DESTDIR)$(sysconfdir)/autoupgrade/server/win64/script ; fi + @if [ ! -f $(DESTDIR)$(sysconfdir)/CA.cnf ] ; then cp configs/certs/CA/CA.cnf $(DESTDIR)$(sysconfdir)/CA.cnf ; fi + cp configs/certs/CA/burp_ca $(DESTDIR)$(sbindir) && chmod 755 $(DESTDIR)$(sbindir)/burp_ca Makefile: Makefile.in cd $(topdir) \ @@ -133,12 +133,18 @@ clean: @for I in ${all_subdirs} test ; \ do (cd $$I; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1); done + @cd src/win32 && ${MAKE} $@ @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum - @$(RMF) config.log config.out - @$(RMF) examples/1 examples/2 examples/devices/1 examples/devices/2 - @$(RMF) -r autom4te.cache + @$(RMF) config.log config.out config.status libtool + @$(RMF) -r autoconf/autom4te.cache autoconf/Make.common @$(RMF) burp-cross-tools @$(RMF) burp-depkgs + @$(RMF) Makefile + @$(RMF) website/html/*.html + @$(RMF) website/html/*.html + @$(RMF) -r website/html/about + @$(RMF) -r website/html/faq + @$(RMF) -r website/html/txt @find . -name ".#*" -exec $(RMF) {} \; diff -Nru burp-1.3.0+20120214git/README burp-1.3.10/README --- burp-1.3.0+20120214git/README 2012-02-13 13:13:37.000000000 +0000 +++ burp-1.3.10/README 2012-07-27 00:36:21.000000000 +0000 @@ -33,7 +33,7 @@ it is yet time for a new backup. It is probably a good idea to change the numbers for each client, in order to spread the load a bit: MAILTO= -7,27,47 * * * * root /sbin/burp -a t +7,27,47 * * * * root /usr/sbin/burp -a t WINDOWS CLIENT diff -Nru burp-1.3.0+20120214git/TODO burp-1.3.10/TODO --- burp-1.3.0+20120214git/TODO 2012-02-13 13:13:37.000000000 +0000 +++ burp-1.3.10/TODO 2012-07-27 00:36:21.000000000 +0000 @@ -1,103 +1,2 @@ -(in no particular order) - -* Make SSL_shutdown() work properly. - -* Investigate HFS / resource forks and make support. I think this might - need somebody to buy me a Mac. - -* Add include/exclude wildcards. - -* Think about adding a utility to create certs, like easy-rsa from OpenVPN. - (burp_ca has been added - does more need to be done?) - -* Add acl/xattr support - (generic linux and freebsd support is done - do solaris next) - -* Improve the status monitor / counters. - - Estimates: - + Should include the final jiggling around time. - + Currently go a bit wonky during resume. - + Don't show up on restore/verify. - - Client knows no counters when resuming, because it didn't do the - phase1 scan. Have the server send it the counters. - - Can something be done to make key presses more responsive? - - When lots of clients are backing up, the live status monitor - truncates information. - - Have a way of browsing backup contents. - - Have a way of viewing logs. - - Make a web interface. - -* Do not compress manifests and logs when compression is turned off. - -* Allow random backups to be deleted safely when hardlinked_archive is on. - -* Delete old backups by time. - -* Delete old backups by space. - -* Add the option to turn an existing hardlinked_archive (not 'current') into - a non-hardlinked_archive, and vice versa. This could be useful for deleting - backups out of the middle of a chain instead of just the oldest. - -* Get metadata transfers to use librsync. - -* Have an option to let the client give the server the encryption password - and hence do server-side encryption. This would mean that network deltas - with encryption can be done. - -* Try to make backup_phase4_server more efficient. For example, a storage - server using a CIFS mounted disk appears very slow when I have a backup - containing 1,500,000 small files with very few changes. - (This may have been exacerbated by working dir recovery 'merge'. With - 'resume', it may be fairly improved). - -* Investigate Windows 'bare metal restore'. - -* Think about having a 'friendly' way of doing restores, as I have known some - people to complain about having to type things on the command line. - -* Break the stupidly long find_files() function down into smaller pieces. - (partly done) - -* Maybe look at the timer script regularly. If the time is now out of the - defined range, interrupt the backup in such a way that it will pick up from - where it left off the next time round. - -* Make transfer_gzfile_in() and send_whole_file[_gz]() check checksums. - -* Windows non-VSS backups. - -* Investigate how to make massive files work better with librsync. - -* Add localisation/gettext. - -* Add localisation/gettext specifically to work around the Polish Windows XP - "schtasks.exe Co_minutę" problem. - -* Get EFS backup/restore working on Windows (FILE_ATTRIBUTE_ENCRYPTED, and - special open/read/close functions). - -* Add automatic tests to verify that acl/xattr backup/restore works properly. - Is probably a bit trickier than other tests, because it has to be different - on different systems. - -* Make sure behaviour is sensible when a client runs out of storage - directories. It is programmed to loop to the start, but it will currently - overwrite existing files (see section that calls incr_dpth() in - backup_phase2_server()). - -* Restore / verify email notifications. - -* Add the ability to specify things like includes/excludes on the server side. - Will probably work by downloading chunks of config to the client. - -* Add option to strip off leading path components on restore. - -* Add option to take a list of paths for restore. - -* Add option to set up a restore on the server side. - -* Add Bas van den Dikkenberg's patches for Debian. - -* In the test script, check whether the backup has finished before going on - to the next step (rather than waiting 10 seconds and then possibly failing). +The list of things to do is now at: +https://github.com/grke/burp/issues diff -Nru burp-1.3.0+20120214git/UPGRADING burp-1.3.10/UPGRADING --- burp-1.3.0+20120214git/UPGRADING 2012-02-13 13:13:37.000000000 +0000 +++ burp-1.3.10/UPGRADING 2012-07-27 00:36:21.000000000 +0000 @@ -1,4 +1,22 @@ Things to watch out for when upgrading. +1.3.3 +----- +If installing with 'make install' and you want to use the 'initialise manual +backup from server' feature, you will need to replace /etc/burp/timer_script +with configs/server/timer_script from the source, because 'make install' will +not overwrite the old version. + +1.3.2 +----- +The process of generating SSL certificates has been automated, so the old +default keys and certificates have been removed from new installs. +See docs/burp_ca.txt for more information. + +1.3.1 +----- +Due to Debian policy, burp and bedup will now be installed in /usr/sbin. +Therefore, you may need to update any cron jobs that were previously using +/sbin. 1.2.4 ----- diff -Nru burp-1.3.0+20120214git/autoconf/configure burp-1.3.10/autoconf/configure --- burp-1.3.0+20120214git/autoconf/configure 2012-02-13 13:13:38.000000000 +0000 +++ burp-1.3.10/autoconf/configure 2012-07-27 00:36:21.000000000 +0000 @@ -1,11 +1,9 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.67. +# Generated by GNU Autoconf 2.69. # # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -89,6 +87,7 @@ IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -133,6 +132,31 @@ # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh @@ -166,7 +190,8 @@ else exitcode=1; echo positional parameters were not saved. fi -test x\$exitcode = x0 || exit 1" +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && @@ -211,14 +236,25 @@ if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi if test x$as_have_required = xno; then : @@ -320,6 +356,14 @@ } # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take @@ -441,6 +485,10 @@ chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -475,16 +523,16 @@ # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -496,28 +544,8 @@ as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -966,6 +994,7 @@ with_included_gettext with_sbin_perm with_tcp_wrappers +enable_ipv6 with_openssl enable_largefile with_x @@ -1392,7 +1421,7 @@ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac @@ -1443,8 +1472,6 @@ if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1615,6 +1642,7 @@ --enable-includes enable installing of include files [default=no] --disable-nls do not use Native Language Support --disable-rpath do not hardcode runtime library paths + --enable-ipv6 Enable IPv6 support --disable-largefile omit support for large files --disable-afs disable afs support [default=auto] --disable-acl disable acl support [default=auto] @@ -1720,9 +1748,9 @@ if $ac_init_version; then cat <<\_ACEOF configure -generated by GNU Autoconf 2.67 +generated by GNU Autoconf 2.69 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1766,7 +1794,7 @@ ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile @@ -1804,7 +1832,7 @@ ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile @@ -1841,7 +1869,7 @@ ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp @@ -1873,7 +1901,7 @@ test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -1887,7 +1915,7 @@ # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link @@ -1901,7 +1929,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1919,7 +1947,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile @@ -1960,7 +1988,7 @@ ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run @@ -1973,7 +2001,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2028,7 +2056,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func @@ -2064,7 +2092,7 @@ ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_cpp @@ -2096,7 +2124,7 @@ test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -2110,7 +2138,7 @@ # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_link @@ -2124,7 +2152,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" @@ -2165,7 +2193,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type @@ -2177,10 +2205,10 @@ ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval "test \"\${$3+set}\"" = set; then : + if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -2243,7 +2271,7 @@ esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -2252,7 +2280,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel @@ -2273,7 +2301,8 @@ main () { static int test_array [1 - 2 * !(($2) >= 0)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2289,7 +2318,8 @@ main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2315,7 +2345,8 @@ main () { static int test_array [1 - 2 * !(($2) < 0)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2331,7 +2362,8 @@ main () { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2365,7 +2397,8 @@ main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2429,7 +2462,7 @@ rm -f conftest.val fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_compute_int @@ -2443,7 +2476,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 $as_echo_n "checking for $2.$3... " >&6; } -if eval "test \"\${$4+set}\"" = set; then : +if eval \${$4+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2487,7 +2520,7 @@ eval ac_res=\$$4 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_member @@ -2502,7 +2535,7 @@ as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 $as_echo_n "checking whether $as_decl_name is declared... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2533,7 +2566,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_decl @@ -2574,7 +2607,7 @@ ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_run @@ -2583,7 +2616,7 @@ running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.67. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2841,7 +2874,7 @@ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi done @@ -2984,7 +3017,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_TRUEPRG+set}" = set; then : +if ${ac_cv_path_TRUEPRG+:} false; then : $as_echo_n "(cached) " >&6 else case $TRUEPRG in @@ -2998,7 +3031,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_TRUEPRG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3030,7 +3063,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_FALSEPRG+set}" = set; then : +if ${ac_cv_path_FALSEPRG+:} false; then : $as_echo_n "(cached) " >&6 else case $FALSEPRG in @@ -3044,7 +3077,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_FALSEPRG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3093,7 +3126,7 @@ set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3105,7 +3138,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3133,7 +3166,7 @@ set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -3145,7 +3178,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3186,7 +3219,7 @@ set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3198,7 +3231,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3226,7 +3259,7 @@ set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3239,7 +3272,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -3285,7 +3318,7 @@ set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3297,7 +3330,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3329,7 +3362,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -3341,7 +3374,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3384,7 +3417,7 @@ test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -3499,7 +3532,7 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -3542,7 +3575,7 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -3601,7 +3634,7 @@ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi fi fi @@ -3612,7 +3645,7 @@ ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then : +if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -3653,7 +3686,7 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi @@ -3663,7 +3696,7 @@ ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : +if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -3700,7 +3733,7 @@ ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : +if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag @@ -3778,7 +3811,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : +if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no @@ -3787,8 +3820,7 @@ /* end confdefs.h. */ #include #include -#include -#include +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -3889,7 +3921,7 @@ set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then : +if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then @@ -3901,7 +3933,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3933,7 +3965,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : +if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then @@ -3945,7 +3977,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4011,7 +4043,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : +if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -4048,7 +4080,7 @@ ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then : +if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag @@ -4139,7 +4171,7 @@ fi set dummy $CC; ac_cc=`$as_echo "$2" | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\"" = set; then : +if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -4253,7 +4285,7 @@ CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : + if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -4369,7 +4401,7 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -4381,7 +4413,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : +if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then @@ -4395,7 +4427,7 @@ for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -4444,7 +4476,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : +if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 @@ -4461,7 +4493,7 @@ for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -4512,7 +4544,7 @@ if test $ac_cv_c_compiler_gnu = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5 $as_echo_n "checking whether $CC needs -traditional... " >&6; } -if test "${ac_cv_prog_gcc_traditional+set}" = set; then : +if ${ac_cv_prog_gcc_traditional+:} false; then : $as_echo_n "(cached) " >&6 else ac_pattern="Autoconf.*'x'" @@ -4581,7 +4613,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then : +if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -4601,7 +4633,7 @@ # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -4661,7 +4693,7 @@ set dummy mv; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MV+set}" = set; then : +if ${ac_cv_path_MV+:} false; then : $as_echo_n "(cached) " >&6 else case $MV in @@ -4675,7 +4707,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4702,7 +4734,7 @@ set dummy rm; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_REMOVE+set}" = set; then : +if ${ac_cv_path_REMOVE+:} false; then : $as_echo_n "(cached) " >&6 else case $REMOVE in @@ -4716,7 +4748,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_REMOVE="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4743,7 +4775,7 @@ set dummy cp; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_CP+set}" = set; then : +if ${ac_cv_path_CP+:} false; then : $as_echo_n "(cached) " >&6 else case $CP in @@ -4757,7 +4789,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4784,7 +4816,7 @@ set dummy sed; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_SED+set}" = set; then : +if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else case $SED in @@ -4798,7 +4830,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4825,7 +4857,7 @@ set dummy echo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_ECHO+set}" = set; then : +if ${ac_cv_path_ECHO+:} false; then : $as_echo_n "(cached) " >&6 else case $ECHO in @@ -4839,7 +4871,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4866,7 +4898,7 @@ set dummy cmp; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_CMP+set}" = set; then : +if ${ac_cv_path_CMP+:} false; then : $as_echo_n "(cached) " >&6 else case $CMP in @@ -4880,7 +4912,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4907,7 +4939,7 @@ set dummy tbl; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_TBL+set}" = set; then : +if ${ac_cv_path_TBL+:} false; then : $as_echo_n "(cached) " >&6 else case $TBL in @@ -4921,7 +4953,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_TBL="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4948,7 +4980,7 @@ set dummy ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_AR+set}" = set; then : +if ${ac_cv_path_AR+:} false; then : $as_echo_n "(cached) " >&6 else case $AR in @@ -4962,7 +4994,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4989,7 +5021,7 @@ set dummy openssl; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_OPENSSL+set}" = set; then : +if ${ac_cv_path_OPENSSL+:} false; then : $as_echo_n "(cached) " >&6 else case $OPENSSL in @@ -5003,7 +5035,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_OPENSSL="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5030,7 +5062,7 @@ set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKGCONFIG+set}" = set; then : +if ${ac_cv_path_PKGCONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKGCONFIG in @@ -5044,7 +5076,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5071,7 +5103,7 @@ set dummy pidof; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PIDOF+set}" = set; then : +if ${ac_cv_path_PIDOF+:} false; then : $as_echo_n "(cached) " >&6 else case $PIDOF in @@ -5085,7 +5117,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PIDOF="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5114,7 +5146,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then : +if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then @@ -5126,7 +5158,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5166,7 +5198,7 @@ set dummy $THE_AWK; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_AWK+set}" = set; then : +if ${ac_cv_path_AWK+:} false; then : $as_echo_n "(cached) " >&6 else case $AWK in @@ -5180,7 +5212,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5283,7 +5315,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then : +if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias @@ -5299,7 +5331,7 @@ $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -5317,7 +5349,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then : +if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then @@ -5332,7 +5364,7 @@ $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -5350,7 +5382,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } -if test "${ac_cv_path_SED+set}" = set; then : +if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ @@ -5370,7 +5402,7 @@ for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue + as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in @@ -5432,7 +5464,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } -if test "${ac_cv_path_FGREP+set}" = set; then : +if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 @@ -5449,7 +5481,7 @@ for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue + as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in @@ -5563,7 +5595,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi -if test "${lt_cv_path_LD+set}" = set; then : +if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then @@ -5603,7 +5635,7 @@ test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then : +if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. @@ -5630,7 +5662,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if test "${lt_cv_path_NM+set}" = set; then : +if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then @@ -5690,7 +5722,7 @@ set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DUMPBIN+set}" = set; then : +if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then @@ -5702,7 +5734,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5734,7 +5766,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then : +if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then @@ -5746,7 +5778,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5797,18 +5829,18 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } -if test "${lt_cv_nm_interface+set}" = set; then : +if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:5805: $ac_compile\"" >&5) + (eval echo "\"\$as_me:5837: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:5808: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:5840: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:5811: output\"" >&5) + (eval echo "\"\$as_me:5843: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -5832,7 +5864,7 @@ # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } -if test "${lt_cv_sys_max_cmd_len+set}" = set; then : +if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 @@ -6024,7 +6056,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } -if test "${lt_cv_ld_reload_flag+set}" = set; then : +if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' @@ -6060,7 +6092,7 @@ set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OBJDUMP+set}" = set; then : +if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then @@ -6072,7 +6104,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6100,7 +6132,7 @@ set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then @@ -6112,7 +6144,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6159,7 +6191,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } -if test "${lt_cv_deplibs_check_method+set}" = set; then : +if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' @@ -6375,7 +6407,7 @@ set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AR+set}" = set; then : +if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then @@ -6387,7 +6419,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="${ac_tool_prefix}ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6415,7 +6447,7 @@ set dummy ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : +if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then @@ -6427,7 +6459,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6480,7 +6512,7 @@ set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : +if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then @@ -6492,7 +6524,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6520,7 +6552,7 @@ set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then @@ -6532,7 +6564,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6579,7 +6611,7 @@ set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then : +if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then @@ -6591,7 +6623,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6619,7 +6651,7 @@ set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then @@ -6631,7 +6663,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6736,7 +6768,7 @@ # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then : +if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else @@ -7013,7 +7045,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 7016 "configure"' > conftest.$ac_ext + echo '#line 7048 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -7107,7 +7139,7 @@ CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if test "${lt_cv_cc_needs_belf+set}" = set; then : +if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c @@ -7183,7 +7215,7 @@ set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DSYMUTIL+set}" = set; then : +if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then @@ -7195,7 +7227,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7223,7 +7255,7 @@ set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then : +if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then @@ -7235,7 +7267,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7275,7 +7307,7 @@ set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_NMEDIT+set}" = set; then : +if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then @@ -7287,7 +7319,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7315,7 +7347,7 @@ set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then : +if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then @@ -7327,7 +7359,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7367,7 +7399,7 @@ set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_LIPO+set}" = set; then : +if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then @@ -7379,7 +7411,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7407,7 +7439,7 @@ set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then : +if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then @@ -7419,7 +7451,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7459,7 +7491,7 @@ set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL+set}" = set; then : +if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then @@ -7471,7 +7503,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7499,7 +7531,7 @@ set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then : +if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then @@ -7511,7 +7543,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7551,7 +7583,7 @@ set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL64+set}" = set; then : +if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then @@ -7563,7 +7595,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7591,7 +7623,7 @@ set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then : +if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then @@ -7603,7 +7635,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7666,7 +7698,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } -if test "${lt_cv_apple_cc_single_mod+set}" = set; then : +if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no @@ -7695,7 +7727,7 @@ $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if test "${lt_cv_ld_exported_symbols_list+set}" = set; then : +if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no @@ -7762,7 +7794,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -7893,7 +7925,7 @@ do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " -if test "x$ac_cv_header_dlfcn_h" = x""yes; then : +if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF @@ -7920,7 +7952,7 @@ set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then : +if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then @@ -7932,7 +7964,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7964,7 +7996,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : +if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then @@ -7976,7 +8008,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8042,7 +8074,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : +if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -8079,7 +8111,7 @@ ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then : +if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag @@ -8172,7 +8204,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then - if test "${ac_cv_prog_CXXCPP+set}" = set; then : + if ${ac_cv_prog_CXXCPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded @@ -8475,7 +8507,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } -if test "${lt_cv_objdir+set}" = set; then : +if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null @@ -8583,7 +8615,7 @@ if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : +if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in @@ -8649,7 +8681,7 @@ if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : +if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in @@ -8786,7 +8818,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : +if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no @@ -8802,11 +8834,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8805: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8837: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8809: \$? = $ac_status" >&5 + echo "$as_me:8841: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -9125,7 +9157,7 @@ if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works+set}" = set; then : +if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no @@ -9141,11 +9173,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9144: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9176: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:9148: \$? = $ac_status" >&5 + echo "$as_me:9180: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -9184,7 +9216,7 @@ wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works+set}" = set; then : +if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no @@ -9227,7 +9259,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then : +if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no @@ -9246,11 +9278,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9249: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9281: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:9253: \$? = $ac_status" >&5 + echo "$as_me:9285: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -9282,7 +9314,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then : +if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no @@ -9301,11 +9333,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9304: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9336: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:9308: \$? = $ac_status" >&5 + echo "$as_me:9340: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -11410,7 +11442,7 @@ # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : +if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -11444,7 +11476,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else @@ -11458,12 +11490,12 @@ *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = x""yes; then : +if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } -if test "${ac_cv_lib_dld_shl_load+set}" = set; then : +if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -11497,16 +11529,16 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : +if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = x""yes; then : +if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : +if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -11540,12 +11572,12 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } -if test "${ac_cv_lib_svld_dlopen+set}" = set; then : +if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -11579,12 +11611,12 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = x""yes; then : +if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } -if test "${ac_cv_lib_dld_dld_link+set}" = set; then : +if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -11618,7 +11650,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = x""yes; then : +if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi @@ -11659,7 +11691,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self+set}" = set; then : +if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -11668,7 +11700,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11671 "configure" +#line 11703 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11755,7 +11787,7 @@ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self_static+set}" = set; then : +if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -11764,7 +11796,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11767 "configure" +#line 11799 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12142,7 +12174,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi -if test "${lt_cv_path_LD+set}" = set; then : +if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then @@ -12182,7 +12214,7 @@ test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then : +if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. @@ -13704,7 +13736,7 @@ if test -n "$lt_prog_compiler_pic_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then : +if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_CXX=no @@ -13720,11 +13752,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13723: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13755: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13727: \$? = $ac_status" >&5 + echo "$as_me:13759: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -13760,7 +13792,7 @@ wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then : +if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=no @@ -13800,7 +13832,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then : +if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no @@ -13819,11 +13851,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13822: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13854: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13826: \$? = $ac_status" >&5 + echo "$as_me:13858: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -13852,7 +13884,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then : +if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no @@ -13871,11 +13903,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13874: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13906: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13878: \$? = $ac_status" >&5 + echo "$as_me:13910: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15267,7 +15299,7 @@ $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -15358,7 +15390,7 @@ set dummy msgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MSGFMT+set}" = set; then : +if ${ac_cv_path_MSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case "$MSGFMT" in @@ -15399,7 +15431,7 @@ set dummy gmsgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_GMSGFMT+set}" = set; then : +if ${ac_cv_path_GMSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case $GMSGFMT in @@ -15413,7 +15445,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -15470,7 +15502,7 @@ set dummy xgettext; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_XGETTEXT+set}" = set; then : +if ${ac_cv_path_XGETTEXT+:} false; then : $as_echo_n "(cached) " >&6 else case "$XGETTEXT" in @@ -15542,7 +15574,7 @@ set dummy msgmerge; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MSGMERGE+set}" = set; then : +if ${ac_cv_path_MSGMERGE+:} false; then : $as_echo_n "(cached) " >&6 else case "$MSGMERGE" in @@ -15682,7 +15714,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi -if test "${acl_cv_path_LD+set}" = set; then : +if ${acl_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then @@ -15719,7 +15751,7 @@ test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${acl_cv_prog_gnu_ld+set}" = set; then : +if ${acl_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. @@ -15739,7 +15771,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 $as_echo_n "checking for shared library run path origin... " >&6; } -if test "${acl_cv_rpath+set}" = set; then : +if ${acl_cv_rpath+:} false; then : $as_echo_n "(cached) " >&6 else @@ -16168,7 +16200,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 $as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; } -if test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; then : +if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_CPPFLAGS="$CPPFLAGS" @@ -16205,7 +16237,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5 $as_echo_n "checking for CFLocaleCopyCurrent... " >&6; } -if test "${gt_cv_func_CFLocaleCopyCurrent+set}" = set; then : +if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_CPPFLAGS="$CPPFLAGS" @@ -16277,7 +16309,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5 $as_echo_n "checking for GNU gettext in libc... " >&6; } -if test "${gt_cv_func_gnugettext1_libc+set}" = set; then : +if ${gt_cv_func_gnugettext1_libc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -16338,7 +16370,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 $as_echo_n "checking for iconv... " >&6; } -if test "${am_cv_func_iconv+set}" = set; then : +if ${am_cv_func_iconv+:} false; then : $as_echo_n "(cached) " >&6 else @@ -16791,7 +16823,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 $as_echo_n "checking for GNU gettext in libintl... " >&6; } -if test "${gt_cv_func_gnugettext1_libintl+set}" = set; then : +if ${gt_cv_func_gnugettext1_libintl+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_CPPFLAGS="$CPPFLAGS" @@ -17020,7 +17052,7 @@ if test x$sbindir = x'${exec_prefix}/sbin' ; then - sbindir=${exec_prefix}/sbin + sbindir=${exec_prefix}/usr/sbin fi sbindir=`eval echo ${sbindir}` @@ -17043,7 +17075,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MSGFMT+set}" = set; then : +if ${ac_cv_path_MSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case $MSGFMT in @@ -17057,7 +17089,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -17092,7 +17124,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library 2 or newer" >&5 $as_echo_n "checking whether we are using the GNU C Library 2 or newer... " >&6; } -if test "${ac_cv_gnu_library_2+set}" = set; then : +if ${ac_cv_gnu_library_2+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -17128,7 +17160,7 @@ set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then : +if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then @@ -17140,7 +17172,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -17168,7 +17200,7 @@ set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then @@ -17180,7 +17212,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -17218,7 +17250,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror in -lcposix" >&5 $as_echo_n "checking for strerror in -lcposix... " >&6; } -if test "${ac_cv_lib_cposix_strerror+set}" = set; then : +if ${ac_cv_lib_cposix_strerror+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -17252,7 +17284,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cposix_strerror" >&5 $as_echo "$ac_cv_lib_cposix_strerror" >&6; } -if test "x$ac_cv_lib_cposix_strerror" = x""yes; then : +if test "x$ac_cv_lib_cposix_strerror" = xyes; then : LIBS="$LIBS -lcposix" fi @@ -17260,7 +17292,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if test "${ac_cv_c_const+set}" = set; then : +if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -17269,11 +17301,11 @@ int main () { -/* FIXME: Include the comments suggested by Paul. */ + #ifndef __cplusplus - /* Ultrix mips cc rejects this. */ + /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; - const charset cs; + const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; @@ -17290,8 +17322,9 @@ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this. */ - char *t; + { /* SCO 3.2v4 cc rejects this sort of thing. */ + char tx; + char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; @@ -17307,10 +17340,10 @@ iptr p = 0; ++p; } - { /* AIX XL C 1.02.0.0 rejects this saying + { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; + struct s { int j; const int *ap[3]; } bx; + struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; @@ -17341,7 +17374,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed" >&5 $as_echo_n "checking for signed... " >&6; } -if test "${bh_cv_c_signed+set}" = set; then : +if ${bh_cv_c_signed+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -17372,7 +17405,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } -if test "${ac_cv_c_inline+set}" = set; then : +if ${ac_cv_c_inline+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no @@ -17413,7 +17446,7 @@ esac ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" -if test "x$ac_cv_type_off_t" = x""yes; then : +if test "x$ac_cv_type_off_t" = xyes; then : else @@ -17424,7 +17457,7 @@ fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = x""yes; then : +if test "x$ac_cv_type_size_t" = xyes; then : else @@ -17437,7 +17470,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long" >&5 $as_echo_n "checking for long long... " >&6; } -if test "${ac_cv_type_long_long+set}" = set; then : +if ${ac_cv_type_long_long+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -17471,7 +17504,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5 $as_echo_n "checking for long double... " >&6; } -if test "${gt_cv_c_long_double+set}" = set; then : +if ${gt_cv_c_long_double+:} false; then : $as_echo_n "(cached) " >&6 else if test "$GCC" = yes; then @@ -17512,7 +17545,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 $as_echo_n "checking for wchar_t... " >&6; } -if test "${gt_cv_c_wchar_t+set}" = set; then : +if ${gt_cv_c_wchar_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -17545,7 +17578,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5 $as_echo_n "checking for wint_t... " >&6; } -if test "${gt_cv_c_wint_t+set}" = set; then : +if ${gt_cv_c_wint_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -17578,7 +17611,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5 $as_echo_n "checking for inttypes.h... " >&6; } -if test "${gl_cv_header_inttypes_h+set}" = set; then : +if ${gl_cv_header_inttypes_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -17613,7 +17646,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5 $as_echo_n "checking for stdint.h... " >&6; } -if test "${gl_cv_header_stdint_h+set}" = set; then : +if ${gl_cv_header_stdint_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -17650,7 +17683,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5 $as_echo_n "checking for intmax_t... " >&6; } -if test "${gt_cv_c_intmax_t+set}" = set; then : +if ${gt_cv_c_intmax_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -17692,7 +17725,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf() supports POSIX/XSI format strings" >&5 $as_echo_n "checking whether printf() supports POSIX/XSI format strings... " >&6; } -if test "${gt_cv_func_printf_posix+set}" = set; then : +if ${gt_cv_func_printf_posix+:} false; then : $as_echo_n "(cached) " >&6 else @@ -17756,7 +17789,7 @@ # for constant arguments. Useless! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 $as_echo_n "checking for working alloca.h... " >&6; } -if test "${ac_cv_working_alloca_h+set}" = set; then : +if ${ac_cv_working_alloca_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -17789,7 +17822,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 $as_echo_n "checking for alloca... " >&6; } -if test "${ac_cv_func_alloca_works+set}" = set; then : +if ${ac_cv_func_alloca_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -17808,7 +17841,7 @@ #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ -char *alloca (); +void *alloca (size_t); # endif # endif # endif @@ -17852,7 +17885,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } -if test "${ac_cv_os_cray+set}" = set; then : +if ${ac_cv_os_cray+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -17893,7 +17926,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 $as_echo_n "checking stack direction for C alloca... " >&6; } -if test "${ac_cv_c_stack_direction+set}" = set; then : +if ${ac_cv_c_stack_direction+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -17903,23 +17936,20 @@ /* end confdefs.h. */ $ac_includes_default int -find_stack_direction () +find_stack_direction (int *addr, int depth) { - static char *addr = 0; - auto char dummy; - if (addr == 0) - { - addr = &dummy; - return find_stack_direction (); - } - else - return (&dummy > addr) ? 1 : -1; + int dir, dummy = 0; + if (! addr) + addr = &dummy; + *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; + dir = depth ? find_stack_direction (addr, depth - 1) : 0; + return dir + dummy; } int -main () +main (int argc, char **argv) { - return find_stack_direction () < 0; + return find_stack_direction (0, argc + !argv + 20) < 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : @@ -17968,7 +17998,7 @@ for ac_func in getpagesize do : ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" -if test "x$ac_cv_func_getpagesize" = x""yes; then : +if test "x$ac_cv_func_getpagesize" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETPAGESIZE 1 _ACEOF @@ -17978,7 +18008,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 $as_echo_n "checking for working mmap... " >&6; } -if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then : +if ${ac_cv_func_mmap_fixed_mapped+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -18145,7 +18175,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library 2.1 or newer" >&5 $as_echo_n "checking whether we are using the GNU C Library 2.1 or newer... " >&6; } -if test "${ac_cv_gnu_library_2_1+set}" = set; then : +if ${ac_cv_gnu_library_2_1+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -18180,7 +18210,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether integer division by zero raises SIGFPE" >&5 $as_echo_n "checking whether integer division by zero raises SIGFPE... " >&6; } -if test "${gt_cv_int_divbyzero_sigfpe+set}" = set; then : +if ${gt_cv_int_divbyzero_sigfpe+:} false; then : $as_echo_n "(cached) " >&6 else @@ -18261,7 +18291,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long" >&5 $as_echo_n "checking for unsigned long long... " >&6; } -if test "${ac_cv_type_unsigned_long_long+set}" = set; then : +if ${ac_cv_type_unsigned_long_long+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -18314,7 +18344,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5 $as_echo_n "checking for inttypes.h... " >&6; } -if test "${gt_cv_header_inttypes_h+set}" = set; then : +if ${gt_cv_header_inttypes_h+:} false; then : $as_echo_n "(cached) " >&6 else @@ -18353,7 +18383,7 @@ if test $gt_cv_header_inttypes_h = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5 $as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; } -if test "${gt_cv_inttypes_pri_broken+set}" = set; then : +if ${gt_cv_inttypes_pri_broken+:} false; then : $as_echo_n "(cached) " >&6 else @@ -18395,7 +18425,7 @@ for ac_header in stdint.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" -if test "x$ac_cv_header_stdint_h" = x""yes; then : +if test "x$ac_cv_header_stdint_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDINT_H 1 _ACEOF @@ -18493,7 +18523,7 @@ for ac_header in stdint.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" -if test "x$ac_cv_header_stdint_h" = x""yes; then : +if test "x$ac_cv_header_stdint_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDINT_H 1 _ACEOF @@ -18510,7 +18540,7 @@ ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" -if test "x$ac_cv_type_ptrdiff_t" = x""yes; then : +if test "x$ac_cv_type_ptrdiff_t" = xyes; then : else @@ -18552,7 +18582,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _snprintf is declared" >&5 $as_echo_n "checking whether _snprintf is declared... " >&6; } -if test "${ac_cv_have_decl__snprintf+set}" = set; then : +if ${ac_cv_have_decl__snprintf+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -18593,7 +18623,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _snwprintf is declared" >&5 $as_echo_n "checking whether _snwprintf is declared... " >&6; } -if test "${ac_cv_have_decl__snwprintf+set}" = set; then : +if ${ac_cv_have_decl__snwprintf+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -18635,7 +18665,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether feof_unlocked is declared" >&5 $as_echo_n "checking whether feof_unlocked is declared... " >&6; } -if test "${ac_cv_have_decl_feof_unlocked+set}" = set; then : +if ${ac_cv_have_decl_feof_unlocked+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -18676,7 +18706,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fgets_unlocked is declared" >&5 $as_echo_n "checking whether fgets_unlocked is declared... " >&6; } -if test "${ac_cv_have_decl_fgets_unlocked+set}" = set; then : +if ${ac_cv_have_decl_fgets_unlocked+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -18717,7 +18747,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getc_unlocked is declared" >&5 $as_echo_n "checking whether getc_unlocked is declared... " >&6; } -if test "${ac_cv_have_decl_getc_unlocked+set}" = set; then : +if ${ac_cv_have_decl_getc_unlocked+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -18812,7 +18842,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 $as_echo_n "checking for iconv... " >&6; } -if test "${am_cv_func_iconv+set}" = set; then : +if ${am_cv_func_iconv+:} false; then : $as_echo_n "(cached) " >&6 else @@ -18887,7 +18917,7 @@ if test "$am_cv_func_iconv" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 $as_echo_n "checking for iconv declaration... " >&6; } - if test "${am_cv_proto_iconv+set}" = set; then : + if ${am_cv_proto_iconv+:} false; then : $as_echo_n "(cached) " >&6 else @@ -18938,7 +18968,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } -if test "${am_cv_langinfo_codeset+set}" = set; then : +if ${am_cv_langinfo_codeset+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -18973,7 +19003,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 $as_echo_n "checking for LC_MESSAGES... " >&6; } -if test "${gt_cv_val_LC_MESSAGES+set}" = set; then : +if ${gt_cv_val_LC_MESSAGES+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -19015,7 +19045,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_INTLBISON+set}" = set; then : +if ${ac_cv_prog_INTLBISON+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$INTLBISON"; then @@ -19027,7 +19057,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_INTLBISON="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -19087,7 +19117,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 $as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; } -if test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; then : +if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_CPPFLAGS="$CPPFLAGS" @@ -19124,7 +19154,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5 $as_echo_n "checking for CFLocaleCopyCurrent... " >&6; } -if test "${gt_cv_func_CFLocaleCopyCurrent+set}" = set; then : +if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_CPPFLAGS="$CPPFLAGS" @@ -19215,7 +19245,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5 $as_echo_n "checking for GNU gettext in libc... " >&6; } -if test "${gt_cv_func_gnugettext1_libc+set}" = set; then : +if ${gt_cv_func_gnugettext1_libc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -19625,7 +19655,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 $as_echo_n "checking for GNU gettext in libintl... " >&6; } -if test "${gt_cv_func_gnugettext1_libintl+set}" = set; then : +if ${gt_cv_func_gnugettext1_libintl+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_CPPFLAGS="$CPPFLAGS" @@ -19869,13 +19899,13 @@ ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket" -if test "x$ac_cv_func_socket" = x""yes; then : +if test "x$ac_cv_func_socket" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: using libc's socket" >&5 $as_echo "using libc's socket" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lxnet" >&5 $as_echo_n "checking for socket in -lxnet... " >&6; } -if test "${ac_cv_lib_xnet_socket+set}" = set; then : +if ${ac_cv_lib_xnet_socket+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -19909,7 +19939,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xnet_socket" >&5 $as_echo "$ac_cv_lib_xnet_socket" >&6; } -if test "x$ac_cv_lib_xnet_socket" = x""yes; then : +if test "x$ac_cv_lib_xnet_socket" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBXNET 1 _ACEOF @@ -19920,7 +19950,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 $as_echo_n "checking for socket in -lsocket... " >&6; } -if test "${ac_cv_lib_socket_socket+set}" = set; then : +if ${ac_cv_lib_socket_socket+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -19954,7 +19984,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 $as_echo "$ac_cv_lib_socket_socket" >&6; } -if test "x$ac_cv_lib_socket_socket" = x""yes; then : +if test "x$ac_cv_lib_socket_socket" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBSOCKET 1 _ACEOF @@ -19965,7 +19995,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -linet" >&5 $as_echo_n "checking for socket in -linet... " >&6; } -if test "${ac_cv_lib_inet_socket+set}" = set; then : +if ${ac_cv_lib_inet_socket+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -19999,7 +20029,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_inet_socket" >&5 $as_echo "$ac_cv_lib_inet_socket" >&6; } -if test "x$ac_cv_lib_inet_socket" = x""yes; then : +if test "x$ac_cv_lib_inet_socket" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBINET 1 _ACEOF @@ -20022,7 +20052,7 @@ LIBS="$saved_LIBS -lwrap" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing nanosleep" >&5 $as_echo_n "checking for library containing nanosleep... " >&6; } -if test "${ac_cv_search_nanosleep+set}" = set; then : +if ${ac_cv_search_nanosleep+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -20056,11 +20086,11 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_nanosleep+set}" = set; then : + if ${ac_cv_search_nanosleep+:} false; then : break fi done -if test "${ac_cv_search_nanosleep+set}" = set; then : +if ${ac_cv_search_nanosleep+:} false; then : else ac_cv_search_nanosleep=no @@ -20161,6 +20191,69 @@ fi +# Check whether --enable-ipv6 was given. +if test "${enable_ipv6+set}" = set; then : + enableval=$enable_ipv6; want_v6=$enableval +else + want_v6=yes +fi + + +if test "x$want_v6" = "xno"; then + have_ipv6="no" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 support" >&5 +$as_echo_n "checking for IPv6 support... " >&6; } + have_ipv6="no" + if test "$cross_compiling" = yes; then : + have_ipv6=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + #include + #include + #include + +int +main () +{ + + + int fd; + struct sockaddr_in6 foo; + fd = socket(AF_INET6, SOCK_STREAM, 0); + return(fd >= 0 ? 0 : 1); + + + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + have_ipv6=yes +else + have_ipv6=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipv6" >&5 +$as_echo "$have_ipv6" >&6; } + + if test $have_ipv6 = yes ; then + +$as_echo "#define HAVE_IPV6 /**/" >>confdefs.h + + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL" >&5 $as_echo_n "checking for OpenSSL... " >&6; } @@ -20305,7 +20398,7 @@ if test "$support_crypto" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_PKEY_encrypt_old in -lssl" >&5 $as_echo_n "checking for EVP_PKEY_encrypt_old in -lssl... " >&6; } -if test "${ac_cv_lib_ssl_EVP_PKEY_encrypt_old+set}" = set; then : +if ${ac_cv_lib_ssl_EVP_PKEY_encrypt_old+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -20339,7 +20432,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_EVP_PKEY_encrypt_old" >&5 $as_echo "$ac_cv_lib_ssl_EVP_PKEY_encrypt_old" >&6; } -if test "x$ac_cv_lib_ssl_EVP_PKEY_encrypt_old" = x""yes; then : +if test "x$ac_cv_lib_ssl_EVP_PKEY_encrypt_old" = xyes; then : $as_echo "#define HAVE_OPENSSLv1 1" >>confdefs.h @@ -20382,9 +20475,9 @@ $as_echo "#define PROTOTYPES 1" >>confdefs.h -if test -z "$CFLAGS" -o "$CFLAGS" = "-g -O2"; then +if test -z "$CFLAGS" -o "$CFLAGS" = "-g -O0"; then if test -z "$CCOPTS"; then - CCOPTS='-g -O2 -Wall' + CCOPTS='-g -O0 -Wall' fi CFLAGS="$CCOPTS" fi @@ -20404,7 +20497,7 @@ set dummy ${ac_tool_prefix}getconf; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_GETCONF+set}" = set; then : +if ${ac_cv_prog_GETCONF+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$GETCONF"; then @@ -20416,7 +20509,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_GETCONF="${ac_tool_prefix}getconf" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -20444,7 +20537,7 @@ set dummy getconf; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_GETCONF+set}" = set; then : +if ${ac_cv_prog_ac_ct_GETCONF+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_GETCONF"; then @@ -20456,7 +20549,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_GETCONF="getconf" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -20493,7 +20586,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS value to request large file support" >&5 $as_echo_n "checking for CFLAGS value to request large file support... " >&6; } -if test "${ac_cv_sys_largefile_CFLAGS+set}" = set; then : +if ${ac_cv_sys_largefile_CFLAGS+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_CFLAGS=`($GETCONF LFS_CFLAGS) 2>/dev/null` || { @@ -20532,7 +20625,7 @@ $as_echo "$ac_cv_sys_largefile_CFLAGS" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDFLAGS value to request large file support" >&5 $as_echo_n "checking for LDFLAGS value to request large file support... " >&6; } -if test "${ac_cv_sys_largefile_LDFLAGS+set}" = set; then : +if ${ac_cv_sys_largefile_LDFLAGS+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_LDFLAGS=`($GETCONF LFS_LDFLAGS) 2>/dev/null` || { @@ -20544,7 +20637,7 @@ $as_echo "$ac_cv_sys_largefile_LDFLAGS" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBS value to request large file support" >&5 $as_echo_n "checking for LIBS value to request large file support... " >&6; } -if test "${ac_cv_sys_largefile_LIBS+set}" = set; then : +if ${ac_cv_sys_largefile_LIBS+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_LIBS=`($GETCONF LFS_LIBS) 2>/dev/null` || { @@ -20599,7 +20692,7 @@ esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS" >&5 $as_echo_n "checking for _FILE_OFFSET_BITS... " >&6; } -if test "${ac_cv_sys_file_offset_bits+set}" = set; then : +if ${ac_cv_sys_file_offset_bits+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_file_offset_bits=no @@ -20625,7 +20718,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE" >&5 $as_echo_n "checking for _LARGEFILE_SOURCE... " >&6; } -if test "${ac_cv_sys_largefile_source+set}" = set; then : +if ${ac_cv_sys_largefile_source+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_source=no @@ -20651,7 +20744,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES" >&5 $as_echo_n "checking for _LARGE_FILES... " >&6; } -if test "${ac_cv_sys_large_files+set}" = set; then : +if ${ac_cv_sys_large_files+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_large_files=no @@ -20693,8 +20786,8 @@ have_x=disabled else case $x_includes,$x_libraries in #( - *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #( - *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : + *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( + *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then : $as_echo_n "(cached) " >&6 else # One or both of the vars are not set, and there is no cached value. @@ -20971,7 +21064,7 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } -if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then : +if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -21005,14 +21098,14 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } -if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then : +if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; } -if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then : +if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -21046,7 +21139,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } -if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then : +if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" fi @@ -21065,14 +21158,14 @@ # The functions gethostbyname, getservbyname, and inet_addr are # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" -if test "x$ac_cv_func_gethostbyname" = x""yes; then : +if test "x$ac_cv_func_gethostbyname" = xyes; then : fi if test $ac_cv_func_gethostbyname = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; } -if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then : +if ${ac_cv_lib_nsl_gethostbyname+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -21106,14 +21199,14 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } -if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then : +if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" fi if test $ac_cv_lib_nsl_gethostbyname = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; } -if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then : +if ${ac_cv_lib_bsd_gethostbyname+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -21147,7 +21240,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; } -if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then : +if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" fi @@ -21162,14 +21255,14 @@ # must be given before -lnsl if both are needed. We assume that # if connect needs -lnsl, so does gethostbyname. ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" -if test "x$ac_cv_func_connect" = x""yes; then : +if test "x$ac_cv_func_connect" = xyes; then : fi if test $ac_cv_func_connect = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5 $as_echo_n "checking for connect in -lsocket... " >&6; } -if test "${ac_cv_lib_socket_connect+set}" = set; then : +if ${ac_cv_lib_socket_connect+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -21203,7 +21296,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5 $as_echo "$ac_cv_lib_socket_connect" >&6; } -if test "x$ac_cv_lib_socket_connect" = x""yes; then : +if test "x$ac_cv_lib_socket_connect" = xyes; then : X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" fi @@ -21211,14 +21304,14 @@ # Guillermo Gomez says -lposix is necessary on A/UX. ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove" -if test "x$ac_cv_func_remove" = x""yes; then : +if test "x$ac_cv_func_remove" = xyes; then : fi if test $ac_cv_func_remove = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5 $as_echo_n "checking for remove in -lposix... " >&6; } -if test "${ac_cv_lib_posix_remove+set}" = set; then : +if ${ac_cv_lib_posix_remove+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -21252,7 +21345,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5 $as_echo "$ac_cv_lib_posix_remove" >&6; } -if test "x$ac_cv_lib_posix_remove" = x""yes; then : +if test "x$ac_cv_lib_posix_remove" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" fi @@ -21260,14 +21353,14 @@ # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat" -if test "x$ac_cv_func_shmat" = x""yes; then : +if test "x$ac_cv_func_shmat" = xyes; then : fi if test $ac_cv_func_shmat = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5 $as_echo_n "checking for shmat in -lipc... " >&6; } -if test "${ac_cv_lib_ipc_shmat+set}" = set; then : +if ${ac_cv_lib_ipc_shmat+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -21301,7 +21394,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5 $as_echo "$ac_cv_lib_ipc_shmat" >&6; } -if test "x$ac_cv_lib_ipc_shmat" = x""yes; then : +if test "x$ac_cv_lib_ipc_shmat" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" fi @@ -21319,7 +21412,7 @@ # John Interrante, Karl Berry { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; } -if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then : +if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -21353,7 +21446,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; } -if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then : +if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then : X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" fi @@ -21407,7 +21500,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -21519,7 +21612,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5 $as_echo_n "checking whether sys/types.h defines makedev... " >&6; } -if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then : +if ${ac_cv_header_sys_types_h_makedev+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -21547,7 +21640,7 @@ if test $ac_cv_header_sys_types_h_makedev = no; then ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then : +if test "x$ac_cv_header_sys_mkdev_h" = xyes; then : $as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h @@ -21557,7 +21650,7 @@ if test $ac_cv_header_sys_mkdev_h = no; then ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then : +if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then : $as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h @@ -21572,7 +21665,7 @@ as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } -if eval "test \"\${$as_ac_Header+set}\"" = set; then : +if eval \${$as_ac_Header+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -21612,7 +21705,7 @@ if test $ac_header_dirent = dirent.h; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } -if test "${ac_cv_search_opendir+set}" = set; then : +if ${ac_cv_search_opendir+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -21646,11 +21739,11 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_opendir+set}" = set; then : + if ${ac_cv_search_opendir+:} false; then : break fi done -if test "${ac_cv_search_opendir+set}" = set; then : +if ${ac_cv_search_opendir+:} false; then : else ac_cv_search_opendir=no @@ -21669,7 +21762,7 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } -if test "${ac_cv_search_opendir+set}" = set; then : +if ${ac_cv_search_opendir+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -21703,11 +21796,11 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_opendir+set}" = set; then : + if ${ac_cv_search_opendir+:} false; then : break fi done -if test "${ac_cv_search_opendir+set}" = set; then : +if ${ac_cv_search_opendir+:} false; then : else ac_cv_search_opendir=no @@ -21727,7 +21820,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; } -if test "${ac_cv_header_stat_broken+set}" = set; then : +if ${ac_cv_header_stat_broken+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -21769,7 +21862,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } -if test "${ac_cv_header_sys_wait_h+set}" = set; then : +if ${ac_cv_header_sys_wait_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -21810,7 +21903,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } -if test "${ac_cv_header_time+set}" = set; then : +if ${ac_cv_header_time+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -21844,7 +21937,7 @@ fi ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" -if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then : +if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 @@ -21857,7 +21950,7 @@ ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" -if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then : +if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_STAT_ST_BLOCKS 1 @@ -21878,7 +21971,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } -if test "${ac_cv_struct_tm+set}" = set; then : +if ${ac_cv_struct_tm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -21915,7 +22008,7 @@ #include <$ac_cv_struct_tm> " -if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then : +if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_TM_TM_ZONE 1 @@ -21931,7 +22024,7 @@ else ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include " -if test "x$ac_cv_have_decl_tzname" = x""yes; then : +if test "x$ac_cv_have_decl_tzname" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -21943,7 +22036,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5 $as_echo_n "checking for tzname... " >&6; } -if test "${ac_cv_var_tzname+set}" = set; then : +if ${ac_cv_var_tzname+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -21981,7 +22074,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for utime.h" >&5 $as_echo_n "checking for utime.h... " >&6; } -if test "${ba_cv_header_utime_h+set}" = set; then : +if ${ba_cv_header_utime_h+:} false; then : $as_echo_n "(cached) " >&6 else @@ -22023,7 +22116,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t" >&5 $as_echo_n "checking for socklen_t... " >&6; } -if test "${ba_cv_header_socklen_t+set}" = set; then : +if ${ba_cv_header_socklen_t+:} false; then : $as_echo_n "(cached) " >&6 else @@ -22071,7 +22164,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ioctl_req_t" >&5 $as_echo_n "checking for ioctl_req_t... " >&6; } -if test "${ba_cv_header_ioctl_req_t+set}" = set; then : +if ${ba_cv_header_ioctl_req_t+:} false; then : $as_echo_n "(cached) " >&6 else @@ -22128,7 +22221,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5 $as_echo_n "checking for typeof... " >&6; } -if test "${ba_cv_have_typeof+set}" = set; then : +if ${ba_cv_have_typeof+:} false; then : $as_echo_n "(cached) " >&6 else @@ -22174,7 +22267,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if test "${ac_cv_c_const+set}" = set; then : +if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22183,11 +22276,11 @@ int main () { -/* FIXME: Include the comments suggested by Paul. */ + #ifndef __cplusplus - /* Ultrix mips cc rejects this. */ + /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; - const charset cs; + const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; @@ -22204,8 +22297,9 @@ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this. */ - char *t; + { /* SCO 3.2v4 cc rejects this sort of thing. */ + char tx; + char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; @@ -22221,10 +22315,10 @@ iptr p = 0; ++p; } - { /* AIX XL C 1.02.0.0 rejects this saying + { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; + struct s { int j; const int *ap[3]; } bx; + struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; @@ -22347,7 +22441,7 @@ $as_echo "$fstype" >&6; } ac_fn_c_check_header_mongrel "$LINENO" "sys/statvfs.h" "ac_cv_header_sys_statvfs_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_statvfs_h" = x""yes; then : +if test "x$ac_cv_header_sys_statvfs_h" = xyes; then : $as_echo "#define HAVE_SYS_STATVFS_H 1" >>confdefs.h @@ -22357,7 +22451,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 $as_echo_n "checking return type of signal handlers... " >&6; } -if test "${ac_cv_type_signal+set}" = set; then : +if ${ac_cv_type_signal+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22391,7 +22485,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for type of signal functions" >&5 $as_echo_n "checking for type of signal functions... " >&6; } - if test "${bash_cv_signal_vintage+set}" = set; then : + if ${bash_cv_signal_vintage+:} false; then : $as_echo_n "(cached) " >&6 else @@ -22484,7 +22578,7 @@ fi ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" -if test "x$ac_cv_type_mode_t" = x""yes; then : +if test "x$ac_cv_type_mode_t" = xyes; then : else @@ -22496,7 +22590,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 $as_echo_n "checking for uid_t in sys/types.h... " >&6; } -if test "${ac_cv_type_uid_t+set}" = set; then : +if ${ac_cv_type_uid_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22525,7 +22619,7 @@ fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = x""yes; then : +if test "x$ac_cv_type_size_t" = xyes; then : else @@ -22536,7 +22630,7 @@ fi ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" -if test "x$ac_cv_type_pid_t" = x""yes; then : +if test "x$ac_cv_type_pid_t" = xyes; then : else @@ -22547,7 +22641,7 @@ fi ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" -if test "x$ac_cv_type_off_t" = x""yes; then : +if test "x$ac_cv_type_off_t" = xyes; then : else @@ -22559,7 +22653,7 @@ ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default" -if test "x$ac_cv_type_intptr_t" = x""yes; then : +if test "x$ac_cv_type_intptr_t" = xyes; then : $as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h @@ -22572,7 +22666,8 @@ main () { static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -22594,7 +22689,7 @@ ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default" -if test "x$ac_cv_type_uintptr_t" = x""yes; then : +if test "x$ac_cv_type_uintptr_t" = xyes; then : $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h @@ -22608,7 +22703,8 @@ main () { static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -22629,7 +22725,7 @@ ac_fn_c_check_type "$LINENO" "ino_t" "ac_cv_type_ino_t" "$ac_includes_default" -if test "x$ac_cv_type_ino_t" = x""yes; then : +if test "x$ac_cv_type_ino_t" = xyes; then : else @@ -22640,7 +22736,7 @@ fi ac_fn_c_check_type "$LINENO" "dev_t" "ac_cv_type_dev_t" "$ac_includes_default" -if test "x$ac_cv_type_dev_t" = x""yes; then : +if test "x$ac_cv_type_dev_t" = xyes; then : else @@ -22651,7 +22747,7 @@ fi ac_fn_c_check_type "$LINENO" "daddr_t" "ac_cv_type_daddr_t" "$ac_includes_default" -if test "x$ac_cv_type_daddr_t" = x""yes; then : +if test "x$ac_cv_type_daddr_t" = xyes; then : else @@ -22662,7 +22758,7 @@ fi ac_fn_c_check_type "$LINENO" "major_t" "ac_cv_type_major_t" "$ac_includes_default" -if test "x$ac_cv_type_major_t" = x""yes; then : +if test "x$ac_cv_type_major_t" = xyes; then : else @@ -22673,7 +22769,7 @@ fi ac_fn_c_check_type "$LINENO" "minor_t" "ac_cv_type_minor_t" "$ac_includes_default" -if test "x$ac_cv_type_minor_t" = x""yes; then : +if test "x$ac_cv_type_minor_t" = xyes; then : else @@ -22684,7 +22780,7 @@ fi ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" -if test "x$ac_cv_type_ssize_t" = x""yes; then : +if test "x$ac_cv_type_ssize_t" = xyes; then : else @@ -22695,7 +22791,7 @@ fi ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" -if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then : +if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_STAT_ST_BLOCKS 1 @@ -22715,7 +22811,7 @@ ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default" -if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then : +if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_STAT_ST_RDEV 1 @@ -22729,7 +22825,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } -if test "${ac_cv_struct_tm+set}" = set; then : +if ${ac_cv_struct_tm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22764,7 +22860,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if test "${ac_cv_c_const+set}" = set; then : +if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22773,11 +22869,11 @@ int main () { -/* FIXME: Include the comments suggested by Paul. */ + #ifndef __cplusplus - /* Ultrix mips cc rejects this. */ + /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; - const charset cs; + const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; @@ -22794,8 +22890,9 @@ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this. */ - char *t; + { /* SCO 3.2v4 cc rejects this sort of thing. */ + char tx; + char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; @@ -22811,10 +22908,10 @@ iptr p = 0; ++p; } - { /* AIX XL C 1.02.0.0 rejects this saying + { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; + struct s { int j; const int *ap[3]; } bx; + struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; @@ -22849,7 +22946,7 @@ # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char" >&5 $as_echo_n "checking size of char... " >&6; } -if test "${ac_cv_sizeof_char+set}" = set; then : +if ${ac_cv_sizeof_char+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char))" "ac_cv_sizeof_char" "$ac_includes_default"; then : @@ -22859,7 +22956,7 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (char) -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_char=0 fi @@ -22882,7 +22979,7 @@ # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short int" >&5 $as_echo_n "checking size of short int... " >&6; } -if test "${ac_cv_sizeof_short_int+set}" = set; then : +if ${ac_cv_sizeof_short_int+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short int))" "ac_cv_sizeof_short_int" "$ac_includes_default"; then : @@ -22892,7 +22989,7 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (short int) -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_short_int=0 fi @@ -22915,7 +23012,7 @@ # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 $as_echo_n "checking size of int... " >&6; } -if test "${ac_cv_sizeof_int+set}" = set; then : +if ${ac_cv_sizeof_int+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : @@ -22925,7 +23022,7 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (int) -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_int=0 fi @@ -22948,7 +23045,7 @@ # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long int" >&5 $as_echo_n "checking size of long int... " >&6; } -if test "${ac_cv_sizeof_long_int+set}" = set; then : +if ${ac_cv_sizeof_long_int+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long int))" "ac_cv_sizeof_long_int" "$ac_includes_default"; then : @@ -22958,7 +23055,7 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long int) -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long_int=0 fi @@ -22981,7 +23078,7 @@ # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long int" >&5 $as_echo_n "checking size of long long int... " >&6; } -if test "${ac_cv_sizeof_long_long_int+set}" = set; then : +if ${ac_cv_sizeof_long_long_int+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long int))" "ac_cv_sizeof_long_long_int" "$ac_includes_default"; then : @@ -22991,7 +23088,7 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long long int) -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long_long_int=0 fi @@ -23014,7 +23111,7 @@ # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5 $as_echo_n "checking size of int *... " >&6; } -if test "${ac_cv_sizeof_int_p+set}" = set; then : +if ${ac_cv_sizeof_int_p+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p" "$ac_includes_default"; then : @@ -23024,7 +23121,7 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (int *) -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_int_p=0 fi @@ -23044,7 +23141,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int type" >&5 $as_echo_n "checking for u_int type... " >&6; } -if test "${ac_cv_have_u_int+set}" = set; then : +if ${ac_cv_have_u_int+:} false; then : $as_echo_n "(cached) " >&6 else @@ -23087,7 +23184,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t type" >&5 $as_echo_n "checking for intmax_t type... " >&6; } -if test "${ac_cv_have_intmax_t+set}" = set; then : +if ${ac_cv_have_intmax_t+:} false; then : $as_echo_n "(cached) " >&6 else @@ -23155,7 +23252,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_intmax_t type" >&5 $as_echo_n "checking for u_intmax_t type... " >&6; } -if test "${ac_cv_have_u_intmax_t+set}" = set; then : +if ${ac_cv_have_u_intmax_t+:} false; then : $as_echo_n "(cached) " >&6 else @@ -23223,7 +23320,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intXX_t types" >&5 $as_echo_n "checking for intXX_t types... " >&6; } -if test "${ac_cv_have_intxx_t+set}" = set; then : +if ${ac_cv_have_intxx_t+:} false; then : $as_echo_n "(cached) " >&6 else @@ -23266,7 +23363,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int64_t type" >&5 $as_echo_n "checking for int64_t type... " >&6; } -if test "${ac_cv_have_int64_t+set}" = set; then : +if ${ac_cv_have_int64_t+:} false; then : $as_echo_n "(cached) " >&6 else @@ -23309,7 +23406,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_intXX_t types" >&5 $as_echo_n "checking for u_intXX_t types... " >&6; } -if test "${ac_cv_have_u_intxx_t+set}" = set; then : +if ${ac_cv_have_u_intxx_t+:} false; then : $as_echo_n "(cached) " >&6 else @@ -23352,7 +23449,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int64_t types" >&5 $as_echo_n "checking for u_int64_t types... " >&6; } -if test "${ac_cv_have_u_int64_t+set}" = set; then : +if ${ac_cv_have_u_int64_t+:} false; then : $as_echo_n "(cached) " >&6 else @@ -23439,7 +23536,7 @@ if test -z "$have_u_intxx_t" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uintXX_t types" >&5 $as_echo_n "checking for uintXX_t types... " >&6; } -if test "${ac_cv_have_uintxx_t+set}" = set; then : +if ${ac_cv_have_uintxx_t+:} false; then : $as_echo_n "(cached) " >&6 else @@ -23592,7 +23689,7 @@ for ac_func in fchdir do : ac_fn_c_check_func "$LINENO" "fchdir" "ac_cv_func_fchdir" -if test "x$ac_cv_func_fchdir" = x""yes; then : +if test "x$ac_cv_func_fchdir" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_FCHDIR 1 _ACEOF @@ -23604,7 +23701,7 @@ for ac_func in strtoll do : ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll" -if test "x$ac_cv_func_strtoll" = x""yes; then : +if test "x$ac_cv_func_strtoll" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRTOLL 1 _ACEOF @@ -23616,7 +23713,7 @@ for ac_func in posix_fadvise do : ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise" -if test "x$ac_cv_func_posix_fadvise" = x""yes; then : +if test "x$ac_cv_func_posix_fadvise" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_POSIX_FADVISE 1 _ACEOF @@ -23627,7 +23724,7 @@ for ac_func in fdatasync do : ac_fn_c_check_func "$LINENO" "fdatasync" "ac_cv_func_fdatasync" -if test "x$ac_cv_func_fdatasync" = x""yes; then : +if test "x$ac_cv_func_fdatasync" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_FDATASYNC 1 _ACEOF @@ -23639,7 +23736,7 @@ for ac_func in chflags do : ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags" -if test "x$ac_cv_func_chflags" = x""yes; then : +if test "x$ac_cv_func_chflags" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_CHFLAGS 1 _ACEOF @@ -23663,7 +23760,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5 $as_echo_n "checking for va_copy... " >&6; } -if test "${ba_cv_va_copy+set}" = set; then : +if ${ba_cv_va_copy+:} false; then : $as_echo_n "(cached) " >&6 else @@ -23720,13 +23817,13 @@ # If resolver functions are not in libc check for -lnsl or -lresolv. ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r" -if test "x$ac_cv_func_gethostbyname_r" = x""yes; then : +if test "x$ac_cv_func_gethostbyname_r" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: using libc's resolver" >&5 $as_echo "using libc's resolver" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname_r in -lnsl" >&5 $as_echo_n "checking for gethostbyname_r in -lnsl... " >&6; } -if test "${ac_cv_lib_nsl_gethostbyname_r+set}" = set; then : +if ${ac_cv_lib_nsl_gethostbyname_r+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -23760,7 +23857,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname_r" >&5 $as_echo "$ac_cv_lib_nsl_gethostbyname_r" >&6; } -if test "x$ac_cv_lib_nsl_gethostbyname_r" = x""yes; then : +if test "x$ac_cv_lib_nsl_gethostbyname_r" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBNSL 1 _ACEOF @@ -23771,7 +23868,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname_r in -lresolv" >&5 $as_echo_n "checking for gethostbyname_r in -lresolv... " >&6; } -if test "${ac_cv_lib_resolv_gethostbyname_r+set}" = set; then : +if ${ac_cv_lib_resolv_gethostbyname_r+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -23805,7 +23902,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_gethostbyname_r" >&5 $as_echo "$ac_cv_lib_resolv_gethostbyname_r" >&6; } -if test "x$ac_cv_lib_resolv_gethostbyname_r" = x""yes; then : +if test "x$ac_cv_lib_resolv_gethostbyname_r" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBRESOLV 1 _ACEOF @@ -23820,7 +23917,7 @@ for ac_func in inet_pton do : ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton" -if test "x$ac_cv_func_inet_pton" = x""yes; then : +if test "x$ac_cv_func_inet_pton" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_INET_PTON 1 _ACEOF @@ -23832,7 +23929,7 @@ for ac_func in inet_ntop do : ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop" -if test "x$ac_cv_func_inet_ntop" = x""yes; then : +if test "x$ac_cv_func_inet_ntop" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_INET_NTOP 1 _ACEOF @@ -23844,7 +23941,7 @@ for ac_func in gethostbyname2 do : ac_fn_c_check_func "$LINENO" "gethostbyname2" "ac_cv_func_gethostbyname2" -if test "x$ac_cv_func_gethostbyname2" = x""yes; then : +if test "x$ac_cv_func_gethostbyname2" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETHOSTBYNAME2 1 _ACEOF @@ -23856,7 +23953,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr has a sa_len field" >&5 $as_echo_n "checking for struct sockaddr has a sa_len field... " >&6; } -if test "${ac_cv_struct_sockaddr_sa_len+set}" = set; then : +if ${ac_cv_struct_sockaddr_sa_len+:} false; then : $as_echo_n "(cached) " >&6 else @@ -23900,7 +23997,7 @@ for ac_func in strftime do : ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime" -if test "x$ac_cv_func_strftime" = x""yes; then : +if test "x$ac_cv_func_strftime" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRFTIME 1 _ACEOF @@ -23909,7 +24006,7 @@ # strftime is in -lintl on SCO UNIX. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5 $as_echo_n "checking for strftime in -lintl... " >&6; } -if test "${ac_cv_lib_intl_strftime+set}" = set; then : +if ${ac_cv_lib_intl_strftime+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -23943,7 +24040,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5 $as_echo "$ac_cv_lib_intl_strftime" >&6; } -if test "x$ac_cv_lib_intl_strftime" = x""yes; then : +if test "x$ac_cv_lib_intl_strftime" = xyes; then : $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h LIBS="-lintl $LIBS" @@ -23955,13 +24052,13 @@ for ac_func in vprintf do : ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf" -if test "x$ac_cv_func_vprintf" = x""yes; then : +if test "x$ac_cv_func_vprintf" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VPRINTF 1 _ACEOF ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt" -if test "x$ac_cv_func__doprnt" = x""yes; then : +if test "x$ac_cv_func__doprnt" = xyes; then : $as_echo "#define HAVE_DOPRNT 1" >>confdefs.h @@ -23975,7 +24072,7 @@ # for constant arguments. Useless! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 $as_echo_n "checking for working alloca.h... " >&6; } -if test "${ac_cv_working_alloca_h+set}" = set; then : +if ${ac_cv_working_alloca_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24008,7 +24105,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 $as_echo_n "checking for alloca... " >&6; } -if test "${ac_cv_func_alloca_works+set}" = set; then : +if ${ac_cv_func_alloca_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24027,7 +24124,7 @@ #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ -char *alloca (); +void *alloca (size_t); # endif # endif # endif @@ -24071,7 +24168,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } -if test "${ac_cv_os_cray+set}" = set; then : +if ${ac_cv_os_cray+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24112,7 +24209,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 $as_echo_n "checking stack direction for C alloca... " >&6; } -if test "${ac_cv_c_stack_direction+set}" = set; then : +if ${ac_cv_c_stack_direction+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -24122,23 +24219,20 @@ /* end confdefs.h. */ $ac_includes_default int -find_stack_direction () +find_stack_direction (int *addr, int depth) { - static char *addr = 0; - auto char dummy; - if (addr == 0) - { - addr = &dummy; - return find_stack_direction (); - } - else - return (&dummy > addr) ? 1 : -1; + int dir, dummy = 0; + if (! addr) + addr = &dummy; + *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; + dir = depth ? find_stack_direction (addr, depth - 1) : 0; + return dir + dummy; } int -main () +main (int argc, char **argv) { - return find_stack_direction () < 0; + return find_stack_direction (0, argc + !argv + 20) < 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : @@ -24164,7 +24258,7 @@ # -lseq on Dynix/PTX, -lgen on Unixware. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getmntent" >&5 $as_echo_n "checking for library containing getmntent... " >&6; } -if test "${ac_cv_search_getmntent+set}" = set; then : +if ${ac_cv_search_getmntent+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -24198,11 +24292,11 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_getmntent+set}" = set; then : + if ${ac_cv_search_getmntent+:} false; then : break fi done -if test "${ac_cv_search_getmntent+set}" = set; then : +if ${ac_cv_search_getmntent+:} false; then : else ac_cv_search_getmntent=no @@ -24227,7 +24321,7 @@ for ac_func in getmntinfo do : ac_fn_c_check_func "$LINENO" "getmntinfo" "ac_cv_func_getmntinfo" -if test "x$ac_cv_func_getmntinfo" = x""yes; then : +if test "x$ac_cv_func_getmntinfo" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETMNTINFO 1 _ACEOF @@ -24238,7 +24332,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether closedir returns void" >&5 $as_echo_n "checking whether closedir returns void... " >&6; } -if test "${ac_cv_func_closedir_void+set}" = set; then : +if ${ac_cv_func_closedir_void+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -24280,7 +24374,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 $as_echo_n "checking whether setpgrp takes no argument... " >&6; } -if test "${ac_cv_func_setpgrp_void+set}" = set; then : +if ${ac_cv_func_setpgrp_void+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -24321,7 +24415,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettext in -lintl" >&5 $as_echo_n "checking for gettext in -lintl... " >&6; } -if test "${ac_cv_lib_intl_gettext+set}" = set; then : +if ${ac_cv_lib_intl_gettext+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -24355,14 +24449,14 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_gettext" >&5 $as_echo "$ac_cv_lib_intl_gettext" >&6; } -if test "x$ac_cv_lib_intl_gettext" = x""yes; then : +if test "x$ac_cv_lib_intl_gettext" = xyes; then : LIBS="$LIBS -lintl" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpwnam in -lsun" >&5 $as_echo_n "checking for getpwnam in -lsun... " >&6; } -if test "${ac_cv_lib_sun_getpwnam+set}" = set; then : +if ${ac_cv_lib_sun_getpwnam+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -24396,7 +24490,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sun_getpwnam" >&5 $as_echo "$ac_cv_lib_sun_getpwnam" >&6; } -if test "x$ac_cv_lib_sun_getpwnam" = x""yes; then : +if test "x$ac_cv_lib_sun_getpwnam" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBSUN 1 _ACEOF @@ -24409,7 +24503,7 @@ for ac_header in zlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" -if test "x$ac_cv_header_zlib_h" = x""yes; then : +if test "x$ac_cv_header_zlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_ZLIB_H 1 _ACEOF @@ -24420,7 +24514,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for deflate in -lz" >&5 $as_echo_n "checking for deflate in -lz... " >&6; } -if test "${ac_cv_lib_z_deflate+set}" = set; then : +if ${ac_cv_lib_z_deflate+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -24454,7 +24548,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_deflate" >&5 $as_echo "$ac_cv_lib_z_deflate" >&6; } -if test "x$ac_cv_lib_z_deflate" = x""yes; then : +if test "x$ac_cv_lib_z_deflate" = xyes; then : ZLIBS="-lz" fi @@ -24474,7 +24568,7 @@ for ac_header in crypt.h do : ac_fn_c_check_header_mongrel "$LINENO" "crypt.h" "ac_cv_header_crypt_h" "$ac_includes_default" -if test "x$ac_cv_header_crypt_h" = x""yes; then : +if test "x$ac_cv_header_crypt_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_CRYPT_H 1 _ACEOF @@ -24485,7 +24579,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5 $as_echo_n "checking for crypt in -lcrypt... " >&6; } -if test "${ac_cv_lib_crypt_crypt+set}" = set; then : +if ${ac_cv_lib_crypt_crypt+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -24519,7 +24613,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5 $as_echo "$ac_cv_lib_crypt_crypt" >&6; } -if test "x$ac_cv_lib_crypt_crypt" = x""yes; then : +if test "x$ac_cv_lib_crypt_crypt" = xyes; then : CRYPT_LIBS="-lcrypt" fi @@ -24531,10 +24625,29 @@ fi +for ac_header in uthash.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "uthash.h" "ac_cv_header_uthash_h" "$ac_includes_default" +if test "x$ac_cv_header_uthash_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_UTHASH_H 1 +_ACEOF + have_uthash=yes +else + have_uthash=no +fi + +done + +if test $have_uthash = no ; then + echo "No uthash library. Will use own uthash/uthash.h" + cp ${srcdir}/uthash/uthash.h ${srcdir}/src +fi + for ac_header in librsync.h do : ac_fn_c_check_header_mongrel "$LINENO" "librsync.h" "ac_cv_header_librsync_h" "$ac_includes_default" -if test "x$ac_cv_header_librsync_h" = x""yes; then : +if test "x$ac_cv_header_librsync_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBRSYNC_H 1 _ACEOF @@ -24545,7 +24658,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rs_delta_begin in -lrsync" >&5 $as_echo_n "checking for rs_delta_begin in -lrsync... " >&6; } -if test "${ac_cv_lib_rsync_rs_delta_begin+set}" = set; then : +if ${ac_cv_lib_rsync_rs_delta_begin+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -24579,7 +24692,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rsync_rs_delta_begin" >&5 $as_echo "$ac_cv_lib_rsync_rs_delta_begin" >&6; } -if test "x$ac_cv_lib_rsync_rs_delta_begin" = x""yes; then : +if test "x$ac_cv_lib_rsync_rs_delta_begin" = xyes; then : RSYNC_LIBS="-lrsync" fi @@ -24599,7 +24712,7 @@ for ac_header in ncurses.h do : ac_fn_c_check_header_mongrel "$LINENO" "ncurses.h" "ac_cv_header_ncurses_h" "$ac_includes_default" -if test "x$ac_cv_header_ncurses_h" = x""yes; then : +if test "x$ac_cv_header_ncurses_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_NCURSES_H 1 _ACEOF @@ -24610,7 +24723,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for curs_set in -lncurses" >&5 $as_echo_n "checking for curs_set in -lncurses... " >&6; } -if test "${ac_cv_lib_ncurses_curs_set+set}" = set; then : +if ${ac_cv_lib_ncurses_curs_set+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -24644,7 +24757,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_curs_set" >&5 $as_echo "$ac_cv_lib_ncurses_curs_set" >&6; } -if test "x$ac_cv_lib_ncurses_curs_set" = x""yes; then : +if test "x$ac_cv_lib_ncurses_curs_set" = xyes; then : NCURSES_LIBS="-lncurses" fi @@ -24699,7 +24812,7 @@ for ac_header in afs/stds.h do : ac_fn_c_check_header_mongrel "$LINENO" "afs/stds.h" "ac_cv_header_afs_stds_h" "$ac_includes_default" -if test "x$ac_cv_header_afs_stds_h" = x""yes; then : +if test "x$ac_cv_header_afs_stds_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_AFS_STDS_H 1 _ACEOF @@ -24761,7 +24874,7 @@ have_extended_acl=no if test x$support_acl = xyes -o x$support_acl = xauto; then ac_fn_c_check_header_mongrel "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_acl_h" = x""yes; then : +if test "x$ac_cv_header_sys_acl_h" = xyes; then : $as_echo "#define HAVE_SYS_ACL_H 1" >>confdefs.h @@ -24769,7 +24882,7 @@ ac_fn_c_check_func "$LINENO" "acl_get_file" "ac_cv_func_acl_get_file" -if test "x$ac_cv_func_acl_get_file" = x""yes; then : +if test "x$ac_cv_func_acl_get_file" = xyes; then : have_acl=yes @@ -24777,7 +24890,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acl_get_file in -lacl" >&5 $as_echo_n "checking for acl_get_file in -lacl... " >&6; } -if test "${ac_cv_lib_acl_acl_get_file+set}" = set; then : +if ${ac_cv_lib_acl_acl_get_file+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -24811,7 +24924,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_acl_acl_get_file" >&5 $as_echo "$ac_cv_lib_acl_acl_get_file" >&6; } -if test "x$ac_cv_lib_acl_acl_get_file" = x""yes; then : +if test "x$ac_cv_lib_acl_acl_get_file" = xyes; then : have_acl=yes; if test $have_afs = yes; then @@ -24828,7 +24941,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acl_get_file in -lpacl" >&5 $as_echo_n "checking for acl_get_file in -lpacl... " >&6; } -if test "${ac_cv_lib_pacl_acl_get_file+set}" = set; then : +if ${ac_cv_lib_pacl_acl_get_file+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -24862,7 +24975,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pacl_acl_get_file" >&5 $as_echo "$ac_cv_lib_pacl_acl_get_file" >&6; } -if test "x$ac_cv_lib_pacl_acl_get_file" = x""yes; then : +if test "x$ac_cv_lib_pacl_acl_get_file" = xyes; then : have_acl=yes; FDLIBS="-lpacl $FDLIBS" @@ -24871,7 +24984,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acltotext in -lsec" >&5 $as_echo_n "checking for acltotext in -lsec... " >&6; } -if test "${ac_cv_lib_sec_acltotext+set}" = set; then : +if ${ac_cv_lib_sec_acltotext+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -24905,14 +25018,14 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sec_acltotext" >&5 $as_echo "$ac_cv_lib_sec_acltotext" >&6; } -if test "x$ac_cv_lib_sec_acltotext" = x""yes; then : +if test "x$ac_cv_lib_sec_acltotext" = xyes; then : have_acl=yes; FDLIBS="-lsec $FDLIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acl_totext in -lsec" >&5 $as_echo_n "checking for acl_totext in -lsec... " >&6; } -if test "${ac_cv_lib_sec_acl_totext+set}" = set; then : +if ${ac_cv_lib_sec_acl_totext+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -24946,7 +25059,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sec_acl_totext" >&5 $as_echo "$ac_cv_lib_sec_acl_totext" >&6; } -if test "x$ac_cv_lib_sec_acl_totext" = x""yes; then : +if test "x$ac_cv_lib_sec_acl_totext" = xyes; then : have_extended_acl=yes @@ -25005,7 +25118,7 @@ have_xattr=no if test x$support_xattr = xyes -o x$support_xattr = xauto; then ac_fn_c_check_header_mongrel "$LINENO" "sys/extattr.h" "ac_cv_header_sys_extattr_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_extattr_h" = x""yes; then : +if test "x$ac_cv_header_sys_extattr_h" = xyes; then : $as_echo "#define HAVE_SYS_EXTATTR_H 1" >>confdefs.h @@ -25013,7 +25126,7 @@ ac_fn_c_check_header_mongrel "$LINENO" "libutil.h" "ac_cv_header_libutil_h" "$ac_includes_default" -if test "x$ac_cv_header_libutil_h" = x""yes; then : +if test "x$ac_cv_header_libutil_h" = xyes; then : $as_echo "#define HAVE_LIBUTIL_H 1" >>confdefs.h @@ -25099,7 +25212,7 @@ if test $have_extattr_string_in_libc = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extattr_namespace_to_string extattr_string_to_namespace in -lutil" >&5 $as_echo_n "checking for extattr_namespace_to_string extattr_string_to_namespace in -lutil... " >&6; } -if test "${ac_cv_lib_util_extattr_namespace_to_string_extattr_string_to_namespace+set}" = set; then : +if ${ac_cv_lib_util_extattr_namespace_to_string_extattr_string_to_namespace+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -25133,7 +25246,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_extattr_namespace_to_string_extattr_string_to_namespace" >&5 $as_echo "$ac_cv_lib_util_extattr_namespace_to_string_extattr_string_to_namespace" >&6; } -if test "x$ac_cv_lib_util_extattr_namespace_to_string_extattr_string_to_namespace" = x""yes; then : +if test "x$ac_cv_lib_util_extattr_namespace_to_string_extattr_string_to_namespace" = xyes; then : $as_echo "#define HAVE_EXTATTR_NAMESPACE_TO_STRING 1" >>confdefs.h @@ -25151,7 +25264,7 @@ if test $have_xattr = no; then ac_fn_c_check_header_mongrel "$LINENO" "sys/xattr.h" "ac_cv_header_sys_xattr_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_xattr_h" = x""yes; then : +if test "x$ac_cv_header_sys_xattr_h" = xyes; then : $as_echo "#define HAVE_SYS_XATTR_H 1" >>confdefs.h @@ -25213,7 +25326,7 @@ if test $have_xattr = no; then ac_fn_c_check_header_mongrel "$LINENO" "sys/attr.h" "ac_cv_header_sys_attr_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_attr_h" = x""yes; then : +if test "x$ac_cv_header_sys_attr_h" = xyes; then : $as_echo "#define HAVE_SYS_ATTR_H 1" >>confdefs.h @@ -25221,7 +25334,7 @@ ac_fn_c_check_header_mongrel "$LINENO" "sys/nvpair.h" "ac_cv_header_sys_nvpair_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_nvpair_h" = x""yes; then : +if test "x$ac_cv_header_sys_nvpair_h" = xyes; then : $as_echo "#define HAVE_SYS_NVPAIR_H 1" >>confdefs.h @@ -25229,7 +25342,7 @@ ac_fn_c_check_header_mongrel "$LINENO" "attr.h" "ac_cv_header_attr_h" "$ac_includes_default" -if test "x$ac_cv_header_attr_h" = x""yes; then : +if test "x$ac_cv_header_attr_h" = xyes; then : $as_echo "#define HAVE_ATTR_H 1" >>confdefs.h @@ -25271,7 +25384,7 @@ if test $have_xattr = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nvlist_next_nvpair in -lnvpair" >&5 $as_echo_n "checking for nvlist_next_nvpair in -lnvpair... " >&6; } -if test "${ac_cv_lib_nvpair_nvlist_next_nvpair+set}" = set; then : +if ${ac_cv_lib_nvpair_nvlist_next_nvpair+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -25305,7 +25418,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nvpair_nvlist_next_nvpair" >&5 $as_echo "$ac_cv_lib_nvpair_nvlist_next_nvpair" >&6; } -if test "x$ac_cv_lib_nvpair_nvlist_next_nvpair" = x""yes; then : +if test "x$ac_cv_lib_nvpair_nvlist_next_nvpair" = xyes; then : $as_echo "#define HAVE_NVLIST_NEXT_NVPAIR 1" >>confdefs.h @@ -25357,7 +25470,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cap_set_proc in -lcap" >&5 $as_echo_n "checking for cap_set_proc in -lcap... " >&6; } -if test "${ac_cv_lib_cap_cap_set_proc+set}" = set; then : +if ${ac_cv_lib_cap_cap_set_proc+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -25391,7 +25504,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cap_cap_set_proc" >&5 $as_echo "$ac_cv_lib_cap_cap_set_proc" >&6; } -if test "x$ac_cv_lib_cap_cap_set_proc" = x""yes; then : +if test "x$ac_cv_lib_cap_cap_set_proc" = xyes; then : CAP_LIBS="-lcap" else CAP_LIBS= @@ -25543,10 +25656,21 @@ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && + if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} @@ -25578,7 +25702,7 @@ -: ${CONFIG_STATUS=./config.status} +: "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" @@ -25679,6 +25803,7 @@ IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -25874,16 +25999,16 @@ # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -25943,28 +26068,16 @@ as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -25986,7 +26099,7 @@ # values after options handling. ac_log=" This file was extended by $as_me, which was -generated by GNU Autoconf 2.67. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -26052,10 +26165,10 @@ ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.67, +configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -26145,7 +26258,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' @@ -26546,7 +26659,7 @@ "$PFILES") CONFIG_FILES="$CONFIG_FILES $PFILES" ;; "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -26569,9 +26682,10 @@ # after its creation but before its name has been assigned to `$tmp'. $debug || { - tmp= + tmp= ac_tmp= trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } @@ -26579,12 +26693,13 @@ { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" + test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -26623,13 +26738,13 @@ ac_cs_awk_cr=$ac_cr fi -echo 'BEGIN {' >"$tmp/subs1.awk" && +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF # Create commands to substitute file output variables. { echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && - echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' && + echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' && echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && echo "_ACAWK" && echo "_ACEOF" @@ -26662,7 +26777,7 @@ rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h @@ -26710,7 +26825,7 @@ rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" \$ac_cs_awk_pipe_init @@ -26748,7 +26863,7 @@ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF @@ -26782,7 +26897,7 @@ # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then -cat >"$tmp/defines.awk" <<\_ACAWK || +cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF @@ -26794,8 +26909,8 @@ # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do - ac_t=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_t"; then + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 @@ -26896,7 +27011,7 @@ esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -26915,7 +27030,7 @@ for ac_f do case $ac_f in - -) ac_f="$tmp/stdin";; + -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. @@ -26924,7 +27039,7 @@ [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" @@ -26950,8 +27065,8 @@ esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -27083,24 +27198,25 @@ " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | if $ac_cs_awk_getline; then - $AWK -f "$tmp/subs.awk" + $AWK -f "$ac_tmp/subs.awk" else - $AWK -f "$tmp/subs.awk" | $SHELL -fi >$tmp/out \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + $AWK -f "$ac_tmp/subs.awk" | $SHELL +fi \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} - rm -f "$tmp/stdin" + rm -f "$ac_tmp/stdin" case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; @@ -27111,20 +27227,20 @@ if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" - mv "$tmp/config.h" "$ac_file" \ + mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi ;; @@ -28112,10 +28228,10 @@ fi # clean up any old junk -echo " " -echo "Cleaning up" -echo " " -${MAKE:-make} clean +#echo " " +#echo "Cleaning up" +#echo " " +#${MAKE:-make} clean echo " Configuration on `date`: @@ -28139,6 +28255,7 @@ librsync: ${have_librsync} acl: ${have_acl} xattr: ${have_xattr} + ipv6: ${have_ipv6} " > config.out diff -Nru burp-1.3.0+20120214git/autoconf/configure.in burp-1.3.10/autoconf/configure.in --- burp-1.3.0+20120214git/autoconf/configure.in 2012-02-13 13:13:38.000000000 +0000 +++ burp-1.3.10/autoconf/configure.in 2012-07-27 00:36:21.000000000 +0000 @@ -287,10 +287,10 @@ AC_DEFINE_UNQUOTED(LOCALEDIR, "$localedir") dnl ------------------------------------------------------------------ -dnl If the user has not set --sbindir, we set our default as /sbin +dnl If the user has not set --sbindir, we set our default as /usr/sbin dnl ------------------------------------------------------------------ if test x$sbindir = x'${exec_prefix}/sbin' ; then - sbindir=${exec_prefix}/sbin + sbindir=${exec_prefix}/usr/sbin fi sbindir=`eval echo ${sbindir}` @@ -417,6 +417,42 @@ ] ) +AC_ARG_ENABLE(ipv6, AC_HELP_STRING([--enable-ipv6],[Enable IPv6 support]),[want_v6=$enableval],[want_v6=yes]) + +if test "x$want_v6" = "xno"; then + have_ipv6="no" +else + AC_MSG_CHECKING(for IPv6 support) + have_ipv6="no" + AC_RUN_IFELSE([ + AC_LANG_PROGRAM( + [[ + #include + #include + #include + ]], + [[ + + int fd; + struct sockaddr_in6 foo; + fd = socket(AF_INET6, SOCK_STREAM, 0); + return(fd >= 0 ? 0 : 1); + + ]] + ) + ], + have_ipv6=yes, + have_ipv6=no, + have_ipv6=no) + + AC_MSG_RESULT($have_ipv6) + + if test $have_ipv6 = yes ; then + AC_DEFINE(HAVE_IPV6,,"check if system supports IPV6") + fi +fi + + dnl ----------------------------------------------------------- dnl Check whether OpenSSL is available dnl ----------------------------------------------------------- @@ -546,9 +582,9 @@ dnl -------------------------------------------------------------------------- dnl Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure' dnl -if test -z "$CFLAGS" -o "$CFLAGS" = "-g -O2"; then +if test -z "$CFLAGS" -o "$CFLAGS" = "-g -O0"; then if test -z "$CCOPTS"; then - CCOPTS='-g -O2 -Wall' + CCOPTS='-g -O0 -Wall' fi CFLAGS="$CCOPTS" fi @@ -1152,6 +1188,12 @@ fi AC_SUBST(CRYPT_LIBS) +AC_CHECK_HEADERS(uthash.h, [have_uthash=yes], [have_uthash=no]) +if test $have_uthash = no ; then + echo "No uthash library. Will use own uthash/uthash.h" + cp ${srcdir}/uthash/uthash.h ${srcdir}/src +fi + AC_CHECK_HEADERS(librsync.h) AC_CHECK_LIB(rsync, rs_delta_begin, [RSYNC_LIBS="-lrsync"]) have_librsync=no @@ -1576,10 +1618,10 @@ fi # clean up any old junk -echo " " -echo "Cleaning up" -echo " " -${MAKE:-make} clean +#echo " " +#echo "Cleaning up" +#echo " " +#${MAKE:-make} clean echo " Configuration on `date`: @@ -1603,6 +1645,7 @@ librsync: ${have_librsync} acl: ${have_acl} xattr: ${have_xattr} + ipv6: ${have_ipv6} " > config.out diff -Nru burp-1.3.0+20120214git/autoconf/libtool/libtool.m4 burp-1.3.10/autoconf/libtool/libtool.m4 --- burp-1.3.0+20120214git/autoconf/libtool/libtool.m4 2012-02-13 13:13:38.000000000 +0000 +++ burp-1.3.10/autoconf/libtool/libtool.m4 2012-07-27 00:36:21.000000000 +0000 @@ -6968,7 +6968,7 @@ [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) - test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O0" AC_SUBST(GCJFLAGS)])])[]dnl ]) diff -Nru burp-1.3.0+20120214git/burp.spec burp-1.3.10/burp.spec --- burp-1.3.0+20120214git/burp.spec 1970-01-01 00:00:00.000000000 +0000 +++ burp-1.3.10/burp.spec 2012-07-27 00:36:21.000000000 +0000 @@ -0,0 +1,93 @@ +# vim: set sw=4 ts=4 et nu: + +# Copyright (c) 2012 Pascal Bleser +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ + +Name: burp +Version: 1.3.8 +%define soname 1 +Release: 0 +Summary: Backup and Restore +Source: http://prdownloads.sourceforge.net/burp/burp-%{version}.tar.bz2 +URL: http://burp.grke.net/ +Group: Productivity/Archiving/Backup +License: Affero GNU General Public License version 3 (AGPL v3) +BuildRoot: %{_tmppath}/build-%{name}-%{version} +BuildRequires: gcc-c++ gcc make glibc-devel pkgconfig +BuildRequires: autoconf automake libtool +BuildRequires: ncurses-devel +BuildRequires: openssl-devel +BuildRequires: zlib-devel +BuildRequires: libacl-devel +BuildRequires: libattr-devel +%if 0%{?suse_version} == 0 || 0%{?suse_version} >= 1010 +BuildRequires: libcap-devel +%else +BuildRequires: libcap +%endif +BuildRequires: tcpd-devel +BuildRequires: librsync +Provides: libburp1 = %{version} +Obsoletes: libburp1 < %{version} + +%description +Burp is a backup and restore program. It uses librsync in order to save on the +amount of space that is used by each backup. It also uses VSS (Volume Shadow +Copy Service) to make snapshots when backing up Windows computers. + +%prep +%setup -q -n burp + +%build +%configure \ + --sysconfdir="%{_sysconfdir}/burp" \ + --with-openssl \ + --disable-static \ + --with-tcp-wrappers + +%__make %{?_smp_mflags} + +%install +%makeinstall + +%clean +%{?buildroot:%__rm -rf "%{buildroot}"} + +%files +%defattr(-,root,root) +%doc CHANGELOG CONTRIBUTORS LICENSE README* TODO +%dir %{_sysconfdir}/burp +%config(noreplace) %{_sysconfdir}/burp/burp-server.conf +%config(noreplace) %{_sysconfdir}/burp/burp.conf +%config(noreplace) %{_sysconfdir}/burp/CA.cnf +%dir %{_sysconfdir}/burp/clientconfdir +%config %{_sysconfdir}/burp/clientconfdir/testclient +%dir %{_sysconfdir}/burp/clientconfdir/incexc +%{_sysconfdir}/burp/clientconfdir/incexc/example +%config %{_sysconfdir}/burp/ssl_extra_checks_script +%config %{_sysconfdir}/burp/autoupgrade +%config %{_sysconfdir}/burp/clientconfdir/incexc/example +%config %{_sysconfdir}/burp/autoupgrade/server/win64/script +%config %{_sysconfdir}/burp/autoupgrade/server/win32/script +%config(noreplace) %{_sysconfdir}/burp/notify_script +%config(noreplace) %{_sysconfdir}/burp/summary_script +%config(noreplace) %{_sysconfdir}/burp/timer_script +%{_sbindir}/burp +%{_sbindir}/burp_ca +%{_sbindir}/bedup +%doc %{_mandir}/man8/burp.8%{ext_man} +%doc %{_mandir}/man8/bedup.8%{ext_man} +%doc %{_mandir}/man8/burp_ca.8%{ext_man} + +%changelog + diff -Nru burp-1.3.0+20120214git/configs/certs/CA/CA.cnf burp-1.3.10/configs/certs/CA/CA.cnf --- burp-1.3.0+20120214git/configs/certs/CA/CA.cnf 2012-02-13 13:13:38.000000000 +0000 +++ burp-1.3.10/configs/certs/CA/CA.cnf 2012-07-27 00:36:21.000000000 +0000 @@ -15,8 +15,8 @@ unique_subject = no default_md = sha1 -default_days = 730 -default_crl_days = 30 +default_days = 7300 +default_crl_days = 7300 #???? name_opt = ca_default diff -Nru burp-1.3.0+20120214git/configs/certs/CA/burp_ca burp-1.3.10/configs/certs/CA/burp_ca --- burp-1.3.0+20120214git/configs/certs/CA/burp_ca 2012-02-13 13:13:38.000000000 +0000 +++ burp-1.3.10/configs/certs/CA/burp_ca 2012-07-27 00:36:21.000000000 +0000 @@ -12,7 +12,7 @@ conf=${etc}/CA.cnf name=$(hostname -f) -ca_days=3650 +ca_days=7300 size=2048 def_umask=022 @@ -21,50 +21,56 @@ function help() { cat < and --name ) - --batch do not prompt for anything - --revoke revoke certificate with serial number - --crl generate certificate revoke list - -d|--dir ca output dir (default: $dir) - -c|--config config file (default: $conf) - -n|--name name (default: $name) - -D|--days valid days for certificate (default in config file) - --ca_days valid days for CA certificate (default: $ca_days) - -S|--size key size (default: $size) - -a|--ca ca name if different from name + -h|--help show help + -i|--init inititalize CA + -k|--key generate new key + -K|--keypath path to new key + -r|--request generate certificate sign request + -R|--requestpath path to certificate sign request + -s|--sign sign csr (use --ca and --name ) + --batch do not prompt for anything + --revoke revoke certificate with serial number + --crl generate certificate revoke list + -d|--dir ca output dir (default: $dir) + -c|--config config file (default: $conf) + -n|--name name (default: $name) + -D|--days valid days for certificate (default in config file) + --ca_days valid days for CA certificate (default: $ca_days) + -S|--size key size (default: $size) + -a|--ca ca name if different from name + -f|--dhfile generate Diffie-Hellman file EOF } -if ! options=$(getopt -o hid:c:n:krsa:D:S: \ - -l help,init,dir:,config:,name:,key:,request:,sign,ca:,ca_days,revoke:,crl,batch,days:,size: -- "$@") -then - exit 1 -fi - -eval set -- "$options" +check_second_arg() +{ + if [ "$1" == "0" ] ; then + help + exit 1 + fi +} while [ $# -gt 0 ] do case $1 in - -h|--help) help; exit ;; + -h|--help) help; exit 0 ;; -i|--init) init=yes ;; -k|--key) key=yes ;; + -K|--keypath) check_second_arg $#; keypath=$2; shift ;; -r|--request) request=yes ;; + -R|--requestpath) check_second_arg $#; requestpath=$2; shift ;; -s|--sign) sign=yes ;; --batch) batch="-batch" ;; - --revoke) revoke=$2; shift ;; + --revoke) check_second_arg $#; revoke=$2; shift ;; --crl) crl=yes ;; - -d|--dir) dir=$2; shift ;; - -c|--config) conf=$2; shift ;; - -n|--name) name=$2; shift ;; - -D|--days) days="-days $2"; shift ;; - --ca_days) ca_days=$2; shift ;; - -S|--size) days=$2; shift ;; - -a|--ca) ca=$2; shift ;; + -d|--dir) check_second_arg $#; dir=$2; shift ;; + -c|--config) check_second_arg $#; conf=$2; shift ;; + -n|--name) check_second_arg $#; name=$2; shift ;; + -D|--days) check_second_arg $#; days="-days $2"; shift ;; + --ca_days) check_second_arg $#; ca_days=$2; shift ;; + -S|--size) check_second_arg $#; days=$2; shift ;; + -a|--ca) check_second_arg $#; ca=$2; shift ;; + -f|--dhfile) check_second_arg $#; dhfile=$2; shift ;; --) shift; break;; -*) echo "$0: error - unrecognized option $1" 1>&2; exit 1;; *) break;; @@ -72,6 +78,13 @@ shift done +if [ -n "$dhfile" ] ; then + openssl dhparam -out "$dhfile" 1024 + r=$? + chmod 600 "$dhfile" + exit $r +fi + if [ -z "$ca" ]; then ca=${name} fi @@ -93,7 +106,7 @@ umask ${sec_umask} openssl genrsa -out ${dir}/CA_${ca}.key ${size} umask ${def_umask} - TEMP=$(mktemp || /tmp/temp.$$) + TEMP=$(mktemp /tmp/burp_ca.tmp.XXXXXXXX || echo /tmp/burp_ca.tmp.$$) cat <<-EOF > ${TEMP} RANDFILE = /dev/urandom @@ -119,18 +132,21 @@ fi +[ -z "$keypath" ] && keypath=${dir}/${name}.key + # generate key if [ "$key" = "yes" ]; then - echo "genrating key ${name}" + echo "generating key ${name}: ${keypath}" umask ${sec_umask} - openssl genrsa -out ${dir}/${name}.key ${size} + openssl genrsa -out "${keypath}" ${size} umask ${def_umask} fi # generate signing request +[ -z "$requestpath" ] && requestpath=${dir}/${name}.csr if [ "$request" = "yes" ]; then - echo "genrating request ${name}" - TEMP=$(mktemp || /tmp/temp.$$) + echo "generating request ${name}" + TEMP=$(mktemp /tmp/burp_ca.tmp.XXXXXXXX || echo /tmp/burp_ca.tmp.$$) cat <<-EOF > ${TEMP} RANDFILE = /dev/urandom @@ -145,8 +161,8 @@ commonName = ${name} EOF - openssl req -config ${TEMP} -new -key ${dir}/${name}.key \ - -out ${dir}/${name}.csr -extensions v3_req + openssl req -config ${TEMP} -new -key "${keypath}" \ + -out "${requestpath}" -extensions v3_req rm -f $TEMP fi @@ -155,11 +171,11 @@ if [ "$sign" = "yes" ]; then serial=$(cat ${dir}/serial.txt) CA_DIR=${dir} openssl ca -config ${conf} -name ca \ - -in ${dir}/${name}.csr -out $dir/${name}.crt ${days}\ + -in ${dir}/${name}.csr -out $dir/${name}.crt ${days} \ -keyfile ${dir}/CA_${ca}.key -cert ${dir}/CA_${ca}.crt \ ${batch} if [ ! -f ${dir}/newcerts/${serial}.pem ]; then - exit + exit 0 fi mv ${dir}/newcerts/${serial}.pem ${dir}/certs/${serial}.pem c_rehash ${dir}/certs @@ -175,7 +191,9 @@ #crl if [ -n "$crl" ]; then - CA_DIR=${dir} openssl ca -config ${conf} -name ca \ + CA_DIR=${dir} openssl ca -config ${conf} -name ca \ -gencrl -out ${dir}/CA_${ca}.crl \ -keyfile ${dir}/CA_${ca}.key -cert ${dir}/CA_${ca}.crt fi + +exit 0 diff -Nru burp-1.3.0+20120214git/configs/certs/CA/burp_ca.bat burp-1.3.10/configs/certs/CA/burp_ca.bat --- burp-1.3.0+20120214git/configs/certs/CA/burp_ca.bat 1970-01-01 00:00:00.000000000 +0000 +++ burp-1.3.10/configs/certs/CA/burp_ca.bat 2012-07-27 00:36:21.000000000 +0000 @@ -0,0 +1,52 @@ +echo off + +REM This script is based on burp_ca, runs on Windows, and contains only the +REM stuff that the client needs to run. +REM +REM It is going to be run with arguments that look like the following: +REM burp_ca.bat --key --keypath "C:/Program Files/Burp/ssl_cert-client.key" --request --requestpath "C:/Program Files/Burp/CA/win2008.csr" --name win2008 + +REM The tildas here stop Windows putting quotes around the variable. +set "keypath=%~3" +set "requestpath=%~6" +set "name=%~8" +REM Need to set OPENSSL_CONF otherwise openssl tries to find an conf file from +REM within my mingw build environment and prints a nasty looking warning. +REM Setting it to burp.conf seems to make the warning disappear with no ill +REM consequences. +set OPENSSL_CONF=C:\Program Files\Burp\burp.conf +set "openssl=C:\Program Files\Burp\bin\openssl.exe" + +if %3.==. goto notenoughparams +if %6.==. goto notenoughparams +if %8.==. goto notenoughparams + +REM Need to change forward slashes to backslashes in the paths. +set keypath=%keypath:/=\% +set requestpath=%requestpath:/=\% + +echo "generating key %name%: %keypath%" +"%openssl%" genrsa -out "%keypath%" 2048 + +REM Need to create a config file for openssl in order to make a certicate +REM signing request. There must be a neater way to do it than one line at a time +REM and %tmpconf% at the end each time. +set "tmpconf=C:\Program Files\Burp\CA\tmp.conf" +echo RANDFILE = /dev/urandom > "%tmpconf%" +echo [ req ] >> "%tmpconf%" +echo distinguished_name = req_distinguished_name >> "%tmpconf%" +echo prompt = no >> "%tmpconf%" +echo [ v3_req ] >> "%tmpconf%" +echo basicConstraints=CA:false >> "%tmpconf%" +echo [ req_distinguished_name ] >> "%tmpconf%" +echo commonName = %name% >> "%tmpconf%" + +echo "generating certificate signing request: %requestpath%" +"%openssl%" req -config "%tmpconf%" -new -key "%keypath%" -out "%requestpath%" -extensions v3_req +del "%tmpconf%" +exit 0 + +:notenoughparams +echo "burp_ca.bat not given enough parameters" +exit 1 + diff -Nru burp-1.3.0+20120214git/configs/certs/dhfile.pem burp-1.3.10/configs/certs/dhfile.pem --- burp-1.3.0+20120214git/configs/certs/dhfile.pem 2012-02-13 13:13:38.000000000 +0000 +++ burp-1.3.10/configs/certs/dhfile.pem 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ ------BEGIN DH PARAMETERS----- -MIGHAoGBANmAnfkETuKHOCWaE+W+F3kM/e7z5A8hZb7OqwGMQrUOaBEAr4BWeZBn -G/87hhwZgNP69/KUchm714qd/PpOspCaUJ20x6PcmKujpAgca/f19HGMBjRawQMk -R9oaBwazuQT0l0rTTKmvpMEcrQQIcVWii3CZI56I56oqF8biGPD7AgEC ------END DH PARAMETERS----- diff -Nru burp-1.3.0+20120214git/configs/certs/ssl_cert-client.pem burp-1.3.10/configs/certs/ssl_cert-client.pem --- burp-1.3.0+20120214git/configs/certs/ssl_cert-client.pem 2012-02-13 13:13:38.000000000 +0000 +++ burp-1.3.10/configs/certs/ssl_cert-client.pem 1970-01-01 00:00:00.000000000 +0000 @@ -1,95 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIG+zCCBOOgAwIBAgIBAzANBgkqhkiG9w0BAQUFADCBjjELMAkGA1UEBhMCR0Ix -EjAQBgNVBAgTCVdpbHRzaGlyZTEQMA4GA1UEBxMHU3dpbmRvbjERMA8GA1UEChMI -Z3JrZS5uZXQxETAPBgNVBAsTCGdya2UubmV0MQ8wDQYDVQQDEwZncmtlY2ExIjAg -BgkqhkiG9w0BCQEWE2tlZWxpbmdAc3BhbWNvcC5uZXQwHhcNMTEwMjI3MTczNDMx -WhcNMzEwMjIxMTczNDMxWjBuMQswCQYDVQQGEwJHQjESMBAGA1UECBMJV2lsdHNo -aXJlMRAwDgYDVQQHEwdTd2luZG9uMREwDwYDVQQKEwhncmtlLm5ldDERMA8GA1UE -CxMIZ3JrZS5uZXQxEzARBgNVBAMTCmdya2VjbGllbnQwggIiMA0GCSqGSIb3DQEB -AQUAA4ICDwAwggIKAoICAQCp1PvXtLf1rs9hc5lKXC9tyDO0MPreqZc4rJxbpY0j -nhRS3hapeQyxljo/qRWEfqhN5MfrshwFWJ3OeEjw6oJOgvsRvpBXOWliSj52o39O -wD2tr2w+XGHfhDDH4BiTl+mzrEXad2h2LJDMHhLGKvfvoiezGj0k61YT1Nq3rIOI -hMABb8Oi1IMhTgvxC1UO7RFwFMAJqEnN1ntSmVAwLdW0RFgtejnJFFnXWUgQaZdq -gQywjCjvvXc0kimH6UZBpYZzeZyFM1YKYxoubssrkWdynSkt+0QSx111nJSRu8h2 -Fd8dgJJmss01jsYMHiV36/d+N990m0nQz/8Vs3pMDr3RXtlLn6BMyrVcR7ZElgua -qsJk2QZIt1JzQzDQXH8P5kmIx6ZlFVpoL5fbJTfFlPnOMHW+7pV2PzET3aMsG59E -hNLQjwZnl/RMmoiD6NHZ0NoU0fNQxd/oqHO3Ohv6xXy8PbQExUcMWU2BexDgTb4S -3LPqRoE1YAy0LRQbrFYf0cTzWJWS3wS8cTAMj6LYv6eqF/rZJLL8KZ/z2oyz85+L -5tzH5DiPBosk72qPK+0PSa46J2NN7vHOPaTdteGCOtmbMapZMgy10vg/BwpOEBYT -88KYjJqQStT6mU7zkgzApSj5JjthtJ9I1ZsfpxnY8RjXzzPn6RoLJ4+/YMlATmEK -3wIDAQABo4IBgTCCAX0wCQYDVR0TBAIwADARBglghkgBhvhCAQEEBAMCBLAwKwYJ -YIZIAYb4QgENBB4WHFRpbnlDQSBHZW5lcmF0ZWQgQ2VydGlmaWNhdGUwHQYDVR0O -BBYEFA6y65eZ/RgcKwq4C4k0OsL3W1BRMIHDBgNVHSMEgbswgbiAFLiPMERv5nao -0MURZv8ceIYB907DoYGUpIGRMIGOMQswCQYDVQQGEwJHQjESMBAGA1UECBMJV2ls -dHNoaXJlMRAwDgYDVQQHEwdTd2luZG9uMREwDwYDVQQKEwhncmtlLm5ldDERMA8G -A1UECxMIZ3JrZS5uZXQxDzANBgNVBAMTBmdya2VjYTEiMCAGCSqGSIb3DQEJARYT -a2VlbGluZ0BzcGFtY29wLm5ldIIJANHUZuGXgZTPMB4GA1UdEgQXMBWBE2tlZWxp -bmdAc3BhbWNvcC5uZXQwHgYDVR0RBBcwFYETa2VlbGluZ0BzcGFtY29wLm5ldDAL -BgNVHQ8EBAMCBaAwDQYJKoZIhvcNAQEFBQADggIBAE14164rVwqbUzf+usylW1/n -6EwqUz6dKoapA+7j7TxXSaIQpwiAoltgc+E0BFpkWsgq/yrtUCCBab9IULtW80nM -E0LbkdYrovuA8tvzb2w9/e9WiDl2JCTzMc0uwMx+59buD0XbyPw47eYl+UadweyD -MXxzbZ/4/zjCOxAbrpxPnZ81n/Ae71KCQWqW/FcdQPZJ4fYIX0uAbT+PucMMjfOi -WmSGcG5VGswtKLj5nNCMuWTTiEgCnUUrZMrS24KZaKBy+GQRl5OS6hLByo2Sh7kE -3nDqmEO6bYDl+AYV5xmj7JeHubgh9bh09Vv4oypAbOKAkctlhDvqRPmTA1mRxvtv -ocZ83cQQv63H4d0z25C4jMSS/84jQ3gvhkxnfwuKOMlEYpjD8vUqcw+rUqIu99+B -OkNB9MsR149G+RpBlERSZbxxkIkSI6aThTsoemC03WxGSWM8SS+iH62//ybEr5b8 -rCMOFc8RD1HnBvZqEa7OVG1eTfLbSWoLh3El/BYbf6rPewKWVl/kCDrQvl/93e59 -iwqZ0W3n16u1K4RWRYV1ywdTCEIuEmd+3Z27AF2h0VOe2F6An1gAVr2KPKpnO487 -woLoO5QT4klgeRdZLx2pEH5Kd9+R2lQntmAofGRTcP/Z9uFAcEuk04z7Z7wNl5CG -aDRd8CFx0Na6bDLvwMRL ------END CERTIFICATE----- - ------BEGIN RSA PRIVATE KEY----- -Proc-Type: 4,ENCRYPTED -DEK-Info: DES-EDE3-CBC,5B47E7D89EB3EF31 - -YjBpSBz5lqbXr5Q+hCPihJOCwSiBQsLn3+W5Gg/yiO6I8LmmdQmAVKoSxg/4b7h4 -XO5+mTakCjZHiGiiDcEQJTz54nA2I7xFDBgMyxWEBuR1S002KaeQ1hVu+pR2Ntsl -nvHdKyX0SjEWCUKbGFhC99vM55AYDtglbrydXs/qPqErEpJoxBCJD3EG2a7aBPHC -JZtLhhCDxYm+to985k7OzuX4hEqZK2ZvUMIqdfVjsQgheYBbTXw8kq3RlwGpn9la -HUlJNhUrTV9FF+2DWJOzDLF/kO4Hh1sKCEqStJ1DIa2NIk3gNmrlfsATXUVVa2nK -wa60XcEOiYugRJh8guIrdDBGVB8kZoXPmetxwoT9sVcbQwFzHhtWFIA22b0QnTdy -6YoZ08UEap+frKgBfzS8J6H87EfVyDk25u0mfOytuPIVWcCUHGdrM19HCqZ67HEm -oZK5+pWLtpO69H/VacswR7G/8bzs4tfem4jRPyWMuMBCOTqyChl4ehfKp+XKub9A -/OQxBGMinGvWiGrzR0Q/kExigdognK0BHZ2xtR4ZOrSw9OIUmlj+EO4MkzoBcTL6 -NYrSSJLiuh6d5fNdqxi5nhpiLpb7ftnYDHaMPUjqBPoB6NFHOYjmoM5w/HZFQE2v -oii0uatYlOzDAeKcITXrc9+6c3BqM+8noSMuzufudCO3VAPIqFHDchJVYRBtPGAH -8LtpjLZ9UDBctboA6TrtdJvqec/QdoFBvLjapXpN8GXUTC/ymoVV7byv9UAtsT5z -i/k2b6rM6LIjfdQalxYaGxnLShqu/YzGoOmWuvJm4nYOCESDN8t7rgmKO5KUEFk1 -EYyvkUoQGxxSgMFR4QMCFlKb8p6oGJYtYjZYZcA4hWcPIcyf+QtiI0emFxI6RbMX -g/LwfuhAuNWJgceZFR8RSui9mdFAt9XIiUnOCwGS20GUJQLaFQxKKfy/mA1ECIvk -rgR/QoUr745s8fz0P8T6Bb9dzw7imSwRwo1aoL7IigmhjF+NsdmT1qP+15iXDcww -afe8oE2lJrg2lWE9r7Azqlz70LFQONRDq/x7/T1pdyA0eoQo7yFzXuduLHYosDqZ -8P5IcmUKbLkdYjzvZ5w0hLdqlWEPV79ro7S2rDXn9/C3L9c2jnadDeGqR0kIua7f -wM0xbC7BBBDURzkd4GnOmOAHEKCjZye6bKK3VoBe07e8ErfC8N+xbvw9avr+ZUVt -KoFgsfomGQSICS0wI2xbBIoyZJhCSXtoL8SpLdn1lb4qWh+osJKkP4AYa00CsWqg -eSoquC3baAGIHRlyBWkhwtRMHlNgrWNxC9ek+DcUFwbmYvmjX3ZgiGruhuhTuAmW -T0/KOkSZ48LOGXbXmyPGxTXep5dZlwVRzX47W189j5hvVlwSgMLjAhd/GYwWRK4D -eSyoYV2Zlw9QcjAYF7QtFfUnUoNMEv/a3dN1WfO+StAPoAeAf0URV00BKjdq1PZN -Eu7RCgQD1Y6AzmapLql2Uytp1wZaAe7Tl6VXTQCfSvHud6vuAiwMLV8ZEzvEDIed -YcfWtKdIac/wYSwcoca/8lELkeYFiNsSuHEeHof695V4AWRKIEW0JfCsvbS7h8d7 -oB6NmTuCrk/dy+B03QX+X0FH1iMUE1mjcyu4uS5vHOcILm3Zm56W0LlpWJrYRo42 -cLlZsK8FFf+5Qa/3gRj09pJQ8n1Rh9kLa1eKdpmWD5zYEtWNvl9xI2jBxkPgWnKh -DxBkhc/VsSUIqTJuaRO1dfexA/WsUwfZ9HIbDWvzJnSGp0XDxZRma2OVAmUYSsox -lzbIWQzMCz4+5WKpO4wqcqCZXcYApCddOowqSD9jQhGqhP2i339S0xqIw4H/JF/G -2cptPqrrkTg4EVeIQnqMbGsibhB+grW98XAsyNoJaY2A4GLJ92R9Ag8rpEPS+OL2 -vcrGYBsMKCMsusHECPyuhiaqzF3Bp1Y7uHdL254qptU21S1Tkhr+VleJFD5+ocI0 -l6hhbKDmQrvuuywqIMpgXFaiCWHJddIviVYWtrwLSQwF2t8ewTcrX4CGVbi5egkr -3AchIeoyUozdSI3fm1vq7hcRCHsL+o7z8tMtd9Bpbo6A5SjxgboBHAfWxWMORh5W -8OLLZ0rCbtt+UTd2UICXZ2yWcaMQXWU8Q19GlKjgmMv2cKBmJU0lbPKsNvxNQxwS -JZ5dWZ8bMZ9hB/hyZXNLLk9aaxMvlXJ39nyzjmj233/uyYP6IE14JbmIjSFRl3rM -fUngqzOCS9IWifu3FMXAKQxK7MsBpWIm1GJQF7EmLepasOX7qSFaNURwpsZ18k+v -JL6iHkR/n302x7XShqbX5wCR5de+EYa1p5MXRYp6+uAWNmDAGagCobFlP7yAnY5b -g4m5cZfljhzBH0r8EXirzGrZUR9zp4ioxytFcpVpDG9CpZl8WyjV1ACny4UpYyMD -DVMzLZSccpE7J6XZ9LxVAJy63IkYbbM1dvHFOb3E+FoizFr3Rd8g8GnwnNR6C/rb -7f7a2chonGwMmQ35G08w7WoqSEY4OZEyEuTlhgx8v9dFDti3cJxkjxv9oXVHu3op -svJdpI13ZnO27NvRmdhWR65M6hJ2A0JHN74v8Q006yt43QEAgX/IEQZnX3psjMyj -HCF7WM50lIhGPyQN6skmzyI3XOi0l6Si6HwahULHkkguqd2QeeHW2qbwy2wxxCU0 -RfmBr1gzOmYoOYdgc7mzFkNzl+C0utFY6Gsap6HiG7zQkc8zWseVI+gbTMz1DEJ5 -3AL+RJvRlllH/qUi43D+t9fWHI6FrCeKM6Foj7hWpZgyrqPe6GcoETnE1qVAZEtO -qpUQW83IjGOKzKzJjV+aPPjdaxrPRPxpimHlFNpAFlgnQRtdT/nkz1IFO3OqCpZM -HL2QE+k1f/L93EVXJvCkCHsA45pyuIWpnKolHmiRkS3z+AcKJuOyiEH3shPQ1j91 -et0Ir6qwVZML9gpSmIYZoFTukoOi/aCy82i0B8l6arALaxkgmSTzUk8g4FGP3Wfu -GSQd4mhNlFTrbtO+d567c5oZ2GZdKSCWYX9+orEhlDBBs307EOTveo0EDISSUGdU -rX16AN2k6Eor3VLHCvkN4tLaJ/6MiMTbDbjQK/kkHkJsEtysOZ3qlnMX15KL0XdF ------END RSA PRIVATE KEY----- diff -Nru burp-1.3.0+20120214git/configs/certs/ssl_cert-server.pem burp-1.3.10/configs/certs/ssl_cert-server.pem --- burp-1.3.0+20120214git/configs/certs/ssl_cert-server.pem 2012-02-13 13:13:38.000000000 +0000 +++ burp-1.3.10/configs/certs/ssl_cert-server.pem 1970-01-01 00:00:00.000000000 +0000 @@ -1,95 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIG7jCCBNagAwIBAgIBATANBgkqhkiG9w0BAQUFADCBjjELMAkGA1UEBhMCR0Ix -EjAQBgNVBAgTCVdpbHRzaGlyZTEQMA4GA1UEBxMHU3dpbmRvbjERMA8GA1UEChMI -Z3JrZS5uZXQxETAPBgNVBAsTCGdya2UubmV0MQ8wDQYDVQQDEwZncmtlY2ExIjAg -BgkqhkiG9w0BCQEWE2tlZWxpbmdAc3BhbWNvcC5uZXQwHhcNMTEwMjI3MTczMTA3 -WhcNMzEwMjIxMTczMTA3WjBuMQswCQYDVQQGEwJHQjESMBAGA1UECBMJV2lsdHNo -aXJlMRAwDgYDVQQHEwdTd2luZG9uMREwDwYDVQQKEwhncmtlLm5ldDERMA8GA1UE -CxMIZ3JrZS5uZXQxEzARBgNVBAMTCmdya2VzZXJ2ZXIwggIiMA0GCSqGSIb3DQEB -AQUAA4ICDwAwggIKAoICAQDARG79KErXmNg0Fapk9z134CxjWB+otnJTR9Y51yQg -2ilJmc5K6TPTrjlexx6jccTgnoyalkKkNpqQyvyBY4SXcESxpXBPdCMZs7GF5Y7J -yDsmrTTDGkKK6KeWhaQSTwu1H5LdXupeFFEc63uYODlz76yOo/L3yoJzrKJIJ8u+ -Bk3bMzWYfeR5/3Xjo/Y0i8OAVowmDcbYoMe5z2xPEULJPT3Tt66/Kp/gGPy8smf2 -ZMKNAisOP/UA3EYjn91zBcraYm2olbQyyO1ewoOTllBkrmDaqqI4eZp89sboBMxn -NC0Q+Kw84rqcFE4EVNBLWoyV9fg5o0xXVXiygNginL3LiyXGOfoSdZY3K9GQ/7qG -QMWD5rkSgQdURPUrkCyMmRV/HUm+dVjZb7U3q43qymVKXDSMNf1t4eoNTwzbrVQl -Ax9rNQXdaLY6tiIC0Y21WDtfTKsUn2qbm4TI3px2DJYORgn+isy+fqGszMhbxDWB -fCxW7+++X7pGF/XTkS+uwYXfu+VpbkjjEbcOiG42Lgpe0py97KNS4rDsvzDRsACX -4TPelN5K9a4SOhy5g0Y4p9kztCOrqBy/l4V2YHo6lAhthVYN5n3XxV79nFlGWngy -S6NxtWeVu+iFzxd5cjCvjjOVqXUn+9SICd1F5rw1y/RukZfJFHyRgtLdpVSWO1xG -NwIDAQABo4IBdDCCAXAwCQYDVR0TBAIwADARBglghkgBhvhCAQEEBAMCBkAwKwYJ -YIZIAYb4QgENBB4WHFRpbnlDQSBHZW5lcmF0ZWQgQ2VydGlmaWNhdGUwHQYDVR0O -BBYEFJOnpIz6CPucj/QBk7ejoyHDfYj5MIHDBgNVHSMEgbswgbiAFLiPMERv5nao -0MURZv8ceIYB907DoYGUpIGRMIGOMQswCQYDVQQGEwJHQjESMBAGA1UECBMJV2ls -dHNoaXJlMRAwDgYDVQQHEwdTd2luZG9uMREwDwYDVQQKEwhncmtlLm5ldDERMA8G -A1UECxMIZ3JrZS5uZXQxDzANBgNVBAMTBmdya2VjYTEiMCAGCSqGSIb3DQEJARYT -a2VlbGluZ0BzcGFtY29wLm5ldIIJANHUZuGXgZTPMB4GA1UdEgQXMBWBE2tlZWxp -bmdAc3BhbWNvcC5uZXQwHgYDVR0RBBcwFYETa2VlbGluZ0BzcGFtY29wLm5ldDAN -BgkqhkiG9w0BAQUFAAOCAgEAqRLGezEmwkWAsQ/eURsOdV6aX5dTjXAhKh36r5D8 -GVLoWGA2CKjGlruuw5HdmVXVyF226wodEWvaw/FukkEIDohYnJp9S3CDiL2WLxAZ -YENC7Yrk3vkdmdY2nhsx82oB+P8+4OlvM99wF4hV567grZxe1GizDSin9rvy4jiB -Feh969tt3Pzi7BZRVC5et/Mw6ZQJwC2zOkUUrq/sq0xBbE2YG0pPX9Gab3MevQSJ -hCeoGLE2P/A1d1Bf/LAoVlxbt3kmg8bWB9WPMfABJcT1ppxiveXtTDquNDa+TWx8 -vsIL/WmIv08hl+984SkiLV+qZVjQzydi4Va54X4BrQHnDwF3QkjqPPQGdLE5oB65 -t9FIBQSv/7bJ+gxqM3P0hVPdqxad+PjPgkS2ICbXfrlCQIfo8O/Tic/baLN/jd7C -q5OT0OG1zJIL1MYropCm/vONeaNYEeIX+gwYDqZYFT0dIftVapqZ1RjzHa0aIFcL -ybAD2Cdv/WbBkXfJeK7qHtX6TipfcOddVm8hdXwzw74uz/z8S+P7kALlII6IrS7k -7h6vYkxq/e29EuJ3JklnncmURmYy6MpSBIg6POSQuWCyra9hwAAh6Ccx/xcDs9Q/ -kk5XHbkH5tf106PQ8Mc32xca5w3xEtToLrjpgRUom+Cz2ExxnV0zmFjIz49MXXar -g7I= ------END CERTIFICATE----- - ------BEGIN RSA PRIVATE KEY----- -Proc-Type: 4,ENCRYPTED -DEK-Info: DES-EDE3-CBC,66AC9C31688D259A - -ScWk50+sEXOajCGdZ1+pqhB9uxL880pc7Da+WznFL4UUAQ/65x07qB6G9FGW2MdD -74q4Pl4EFEV0WvA09CniyysK1XMTGDWxqAsE5RLA7rTgUPZMPn5+KhIiYwjzzKGs -ORWjLK+DGWWE9SxY7la4aMP3uOgY0+qNJmWdALuCF3glndCwVibgOqVEcT8I6min -BNe3U/fPo5uToe64tehTTShZEN9hASLOquOCf8sJY82d6L0X3OJips1vA0YEWsnH -FMiY9O9e/NeKPG3WjxU2Zc9bnQyXwYuM95B87TE71XBCJa/MjPCUD4+iPT9zUNXQ -IbAJdhIlrfMGPl6FVD1mUmxfQtpzvSjfTTTuomrd+X9AjC/mXdRdkcHmKXO13kog -zq6DwNlU1N15PHGZfvOlJE5qjRMhRe9Wu1u3AcbGMsa7JEqes/JThRQh8ylgpWGi -D5Oi4Y7J6ZrIF3T4yHU/Dk9JZ5kRQyTs/YV2RQq3A5yI+WC5jRD/JsK2SX5/vmPV -/HQH9Oqi5MIaeLD34XfmxzK6CGMEVaPSGXmX6yWM+vrjySc/LdY7nqq9711kdmzG -ml3D4L5l6CQgJB9DN3Y8cS5MqSA3XGXmV6KSQ6XxQhSxGTFw1X6feeSltEeMtxc8 -XzEmEEqqI2n2CoaqhJwKQnRQ+SAftflkOWliRDkfE69I/uayhF6s5ABl2wDsrzmb -XvKlfWB28qqbEox5nEV1rnEuFYBKg13o3EndPMdof/u3N/eCsGSoKTat4uqeA3Ft -HL257tDHL3pHQCThQZAU0pnV+CJCbpH9dn445T2mc+1q3emzzEI2dAwPxwsbutrw -+PhWc+h61RcCFJc2Qgt1HSqO9xncdQQQZ62KuS8CA4QUVKHC3WOnJgB/YefNdIoe -YTQngTJkAYUlYh3i9l6HxxglaH9MPqbpIbTcGo2gnlO2LSeuez6kgquq16wIkEW6 -WEW+DJMYOXiibX5ENHbVqVvsAP9nEnhN0Ljvuaiz9PPucpvOIGTC7WZTDrqXf6nG -W/IdkKU6jfi6dBkp/VGYArsKcx2rxU++/MXHnxG6u8ZMekKJ5TvkXxwkj8ktfUXr -Da3pjpKIf3Zl9F8YW/yr2Drk8d+6C6PENFxc+WvzbyOQ8NnWhiECvRxfz8ZBvMWI -cZjChcm6TEghkZyui2kYZ1BIUlJp3SQBtDCUgopg8FH+8InwvRe2rcPkp9vggz1i -9VTFlD9uyjdWAJj6lF57tDaYNqASWIp2+9R7jEMA3SCBpBo+8z0LxKr1q75br946 -Os+D1yZV6jjQ3qr9BoAFXkjcf6jGMtKqDv7VZDr1a1z0Ny5qmvvqcAAkvYu4HQUf -nulR40Sy3kBueQ6RJJQ4E74JGm5vIwOWVz3gXPRMNdINeQi2PgxZ9+ts4G3IfiVj -IYfp0AYiS79EBjN8r+kgcrRzgEX1fmzlQKjwZzJs7YRWWXJ60OoEOSul0S1v5GsG -8nByYdQJG9WZCNaxs5W1d3xyblfCTfv44+PfshloyGAyZOTneaEg4btc7Unj30o1 -RP7KyqzSSqvwyQgNg+7VNx02Wva4Y/q3tAHv73Ko12pWpskL3P8MG9D5SFsqp48X -u8WsMtcCx2uXhBwlyq3EY421j1dtQ5vsJIsH59RdeVWpvistAHN8JrJLcvAfezRA -3qrKEPORGv1u47Fnwckw1jwbngiMlLJmCR/utYySGLjB8fq3nwOn42iChpMRED9U -5kjIUy6pt2CMXRMH4j/yjOlbr+YTAy9Q+GQ7F/pSRiz7vHF6j3cdfEur9873ZD50 -jUnjv/MLfCXqVzBB71M9o7mvJ2hpA1g4Jcd4quUz9ah/sRN5fBdB+m9oNz4mufJW -CcQ7lbYZk7GvotR7q7mkgsiGNE4jCkeTZh7yOCiv7UPq0vJvBeiqhmEjkxNfTZOP -N68WLnZbdo3zexoYnRAtAavZ9E7ocUUvKtN7LhaF9N4mApSSBsEk5C7aFo6HMmZE -k69bhitHLaAn0ZegwrjS4ePj3HbL7Ff5BlxWxB0BB2JENW0GmzHxzhL/Di9mpGf7 -weyS6Xn57s2Ms74DFAu7nPC+apBQKe9G5YsYj5CgHs6z53e5AWKF/xOFdjLVlG8Z -TOLyJgUFyJTk60MK84J3E/+LThI3BBR0SFUfCSICdUAtFEoLhuLSPTiNFppadmI2 -LgLR2x55b6zRNDETiidfXqlDg1SzF0g91s01/1o0eXUzEd4PxpsBjsxsyrq5zT4h -wEBojXOTcwkPYkjl8kRJsBqRBjbgYID0rOV+50hCOl7YYPc+TGHqzTCrPWomOUjT -G5faiqkvkfFyhAzhglTYV+QJoBhOfQvHuq+eEYLiIj2GPpUnoObXw0fniWCVtIKm -uED5YieduR85fun5JTAIZwPsIu9tOZ2eAXkyyvTI7T673wiK0JBxJb9lDyiJAwhi -Qd7vmDEW09zUttJVCHlLItrScBLKo2o0k/uTX31vdsNMu5JKb7/784cbj4Lyu9tQ -pItgvsZDQhsplnkVdW4VUmy16eq7wT2CArIaJYOLMFuaW4w6rFqbygpE+Bkg1f3X -tJxExSAP7YNPbz+nfaVfLCs11SjEZpjNlFiDkGNSs4/lccJ98oW0CNr5zmnizYi6 -CGJTVWV6/KEnhudEFZzZeiQN31tTCI8ETa1pw2Z1eXtHxDSJHotSn9IuTdTJ8UW2 -4w1hdyQxLAiyfCveWox4ThuRO+wE5zd1G/N8UeSZ8gSR+XYytNv2EP3mBjYscTAu -eeGMkp4wP1Es8FClpYtDGXTA8J+GkSB3jeX1yu4ore/NFaV5mh2SwQROAxHxnrqV -E88PHWOoosjURBhH3luuIyqz6EmbEeaeaQjRbkxqFUX2Tye96DiIPEeMRRJ0K+nz -j3Xdzia4UWD/uFHNZJCfhliz42XDhRiaV2oTi16QA9JRuLV+dP2Lf510mPk4g2hi -LwUbSIM4mwgUtAu1cJ8dlK5ukwmV5i05BKWHz3PKLLbFwRE/ZfWRvYT3xaR7lh0G -5elBvDN/HFfbv3snUgvsgZgpPJN62oVHxd3uoBIvloKCU6XPmSxRuKu8ks55ob26 -YzrEpJydeSqZQsFoah3CmlOinF7ILtH8V2+WkLD+N3Udc3/chdIsi2ImAoRBSa4P ------END RSA PRIVATE KEY----- diff -Nru burp-1.3.0+20120214git/configs/certs/ssl_cert_ca.pem burp-1.3.10/configs/certs/ssl_cert_ca.pem --- burp-1.3.0+20120214git/configs/certs/ssl_cert_ca.pem 2012-02-13 13:13:38.000000000 +0000 +++ burp-1.3.10/configs/certs/ssl_cert_ca.pem 1970-01-01 00:00:00.000000000 +0000 @@ -1,40 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIHGDCCBQCgAwIBAgIJANHUZuGXgZTPMA0GCSqGSIb3DQEBBQUAMIGOMQswCQYD -VQQGEwJHQjESMBAGA1UECBMJV2lsdHNoaXJlMRAwDgYDVQQHEwdTd2luZG9uMREw -DwYDVQQKEwhncmtlLm5ldDERMA8GA1UECxMIZ3JrZS5uZXQxDzANBgNVBAMTBmdy -a2VjYTEiMCAGCSqGSIb3DQEJARYTa2VlbGluZ0BzcGFtY29wLm5ldDAeFw0xMTAy -MjcxNzMwMTFaFw0zMTAyMjIxNzMwMTFaMIGOMQswCQYDVQQGEwJHQjESMBAGA1UE -CBMJV2lsdHNoaXJlMRAwDgYDVQQHEwdTd2luZG9uMREwDwYDVQQKEwhncmtlLm5l -dDERMA8GA1UECxMIZ3JrZS5uZXQxDzANBgNVBAMTBmdya2VjYTEiMCAGCSqGSIb3 -DQEJARYTa2VlbGluZ0BzcGFtY29wLm5ldDCCAiIwDQYJKoZIhvcNAQEBBQADggIP -ADCCAgoCggIBANhoJiTgOdM/ISwbJ4MeLjvs01hrAAuJHTj9QLemaaN2OUqF07Ad -8NodwaAajZYCOF6lwTllLWs2i9g5rExxk2B9Fa+AMkXg/1M3WCMf8u6dS4jlpzDK -cIlZ0gB0ib7Y9dQ6xwYgBCZ3bCrPWHGWl3Z+vRkKNSjokY6SfXNAF1w8YIT+LxL/ -AYpXzwFA8Y7qikhUfA6wqci5K8Gt9RtNFZp5cmOkhlxGfStxK2KAyMFU9EAhtjDU -v+yh6DQ08s2FS2HBzwOiH4LT75Tc8v6J3100BjBoBllELz8EwcmIJ0Sr92zYu8Nd -3RumtPylSJFzqfFwfnZuiSl+RmldXaewOz9Nbt8ZRxOouzf+YH8b+Wj1g11uWlxq -aFZxtCt7cRQeZhaAWvQPo0RobTfhuyUCRDEyQcYFlkV76z6FwCBKJGg5+u6zx0fo -RrW+Rx0+0SOQKpx+4MY0nWulgrtA0pWaTs8oAzLwhlpObgSPHkyvhwn6UYwL19ry -7cMJJ3YzPpwCBBViw/5+Lp3Ipa7BXbVGosSEDQu02pHYfCp8dA0+lbcf81FsSmn7 -zh1jwNSyg71EULanoYnVymzxrdVdfzltpOW4u2YbnT0Kc4pF7h8Oo+Pn0dgo3gqH -KLlpUyKhZgNmb2NTqi2ofh1QEXY7YLXue+7KKTX9Iu/jhsH0xADWudqFAgMBAAGj -ggF1MIIBcTAdBgNVHQ4EFgQUuI8wRG/mdqjQxRFm/xx4hgH3TsMwgcMGA1UdIwSB -uzCBuIAUuI8wRG/mdqjQxRFm/xx4hgH3TsOhgZSkgZEwgY4xCzAJBgNVBAYTAkdC -MRIwEAYDVQQIEwlXaWx0c2hpcmUxEDAOBgNVBAcTB1N3aW5kb24xETAPBgNVBAoT -CGdya2UubmV0MREwDwYDVQQLEwhncmtlLm5ldDEPMA0GA1UEAxMGZ3JrZWNhMSIw -IAYJKoZIhvcNAQkBFhNrZWVsaW5nQHNwYW1jb3AubmV0ggkA0dRm4ZeBlM8wDwYD -VR0TAQH/BAUwAwEB/zARBglghkgBhvhCAQEEBAMCAQYwCQYDVR0SBAIwADArBglg -hkgBhvhCAQ0EHhYcVGlueUNBIEdlbmVyYXRlZCBDZXJ0aWZpY2F0ZTAeBgNVHREE -FzAVgRNrZWVsaW5nQHNwYW1jb3AubmV0MA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG -9w0BAQUFAAOCAgEAovpXttjvKG6lTR0okMmLmpYaS+vJDBfJFKVjK5ArUwobNsAT -S+fs2VX1jT5hVj4icK9QpZSf0JE9hhZ72dSOH3rDlQXBUoDfLAABDqAKN8FwkX7i -8n0L8nhXlYARCBKYhKISkhZacd+N6hOOGVLk4iEcFYZqlWjxI8/KYiarmDHzjTep -6W2QlST1GrdBBKEDxlXNvOD8WeF9bymknFPs9h4MnUZ8wZEJ50Bjk0Xk5YLKJXrX -WggM6xi3QFTEUdq35lBBYcvqfM4skjhkZPhTZsLcb6AymupINQprN5C5g8gBe7z/ -OjFOmbEVpftHsRdfZO3AgvZIR88sAzstT/ZL+d0vyhPzYjZu2W3zQnrSwpPDzoHa -nS0G3y/pGSAIn9fCwf1Hz/xrUCHtzvu/pnqS+SpQLnsLjLx2osVIxJxa0r7FqH9c -Ra3d4hCOCc9grp6umxPa9NiQdpMgDlr87+z6WagLIFC/1w9r1V4qb8Ex5klcUg4g -Esd62J0LYyvdUSurZoahXqr0RhWH2bJk3osPQj5YZbZRDaoKA4ov37AYZrCICN2o -r2rz2NF/8NiQ5FB6Sq8oXNyT2alU83qkdTOzm8hDG3Aw+xtHueL0sJX+z2bsyxE3 -SIM9np/R7ldY2unyEA9dCCoef07EiVpLU5OnGf8GvGYd5m6AFS3NvVVcssw= ------END CERTIFICATE----- diff -Nru burp-1.3.0+20120214git/configs/client/burp.conf burp-1.3.10/configs/client/burp.conf --- burp-1.3.0+20120214git/configs/client/burp.conf 2012-02-13 13:13:38.000000000 +0000 +++ burp-1.3.10/configs/client/burp.conf 2012-07-27 00:36:21.000000000 +0000 @@ -6,6 +6,7 @@ password = abcdefgh cname = testclient pidfile = /var/run/burp.client.pid +syslog = 1 # Ratelimit throttles the send speed. Specified in Megabits per second (Mb/s). # ratelimit = 1.5 # Network timeout defaults to 7200 seconds (2 hours). @@ -16,24 +17,9 @@ # OS path component for the autoupgrade directory on the server. # autoupgrade_os=test_os -include = /home -#exclude = /home/graham/testdir/librsync-0.9.7/testsuite -#include = /home/graham/testdir/librsync-0.9.7/testsuite/deep -#include = /home/graham/xdir -#exclude = /home/graham/testdir/libr -# Exclude file names ending in '.vdi' or '.vmdk' (case insensitive) -#exclude_ext = vdi -#exclude_ext = vmd -# Exclude various temporary file systems. You may want to add devfs, devpts, -# proc, ramfs, etc. -exclude_fs = sysfs -exclude_fs = tmpfs -# Exclude files based on size. Defaults are 0, which means no limit. -#min_file_size = 0 Mb -#max_file_size = 0 Mb -# The content of directories containing a filesystem entry named like this -# will not be backed up. -nobackup = .nobackup +# More configuration files can be read, using syntax like the following +# (without the leading '# '). +# . path/to/more/conf # Run as different user/group. # user=graham @@ -42,6 +28,11 @@ cross_filesystem=/home cross_all_filesystems=0 +# Uncomment the following lines to automatically generate a certificate signing +# request and send it to the server. +ca_burp_ca = /usr/sbin/burp_ca +ca_csr_dir = /etc/burp/CA-client + # SSL certificate authority - same file on both server and client ssl_cert_ca = /etc/burp/ssl_cert_ca.pem @@ -49,13 +40,13 @@ ssl_cert = /etc/burp/ssl_cert-client.pem # Client SSL key -#ssl_key = /etc/burp/ssl_cert-client.key +ssl_key = /etc/burp/ssl_cert-client.key # SSL key password ssl_key_password = password # Common name in the certificate that the server gives us -ssl_peer_cn = grkeserver +ssl_peer_cn = burpserver # Example syntax for pre/post scripts #backup_script_pre=/path/to/a/script @@ -63,8 +54,36 @@ #restore_script_pre=/path/to/a/script #restore_script_post=/path/to/a/script +# The following options specify exactly what to backup. +# The server will override them if there is at least one 'include=' line on +# the server side. +include = /home +#exclude = /home/graham/testdir/librsync-0.9.7/testsuite +#include = /home/graham/testdir/librsync-0.9.7/testsuite/deep +#include = /home/graham/xdir +# Include path that match a regular expression +#include_regex = /\.cache/ +#exclude = /home/graham/testdir/libr +# Exclude file names ending in '.vdi' or '.vmdk' (case insensitive) +#exclude_ext = vdi +#exclude_ext = vmd +# Exlude file path matching a regular expression +#exclude_re = \.cache +# Exclude various temporary file systems. You may want to add devfs, devpts, +# proc, ramfs, etc. +exclude_fs = sysfs +exclude_fs = tmpfs +# Exclude files based on size. Defaults are 0, which means no limit. +#min_file_size = 0 Mb +#max_file_size = 0 Mb +# The content of directories containing a filesystem entry named like this +# will not be backed up. +nobackup = .nobackup # By default, burp backups up the fifos themselves, rather than reading from # them. These two options let you choose a particular fifo to read, or read # from all fifos. #read_fifo=/path/to/a/fifo #read_all_fifos=0 +# The same for block device nodes. +#read_blockdev=/path/to/a/blockdev +#read_all_blockdevs=0 diff -Nru burp-1.3.0+20120214git/configs/client/cron.example burp-1.3.10/configs/client/cron.example --- burp-1.3.0+20120214git/configs/client/cron.example 2012-02-13 13:13:38.000000000 +0000 +++ burp-1.3.10/configs/client/cron.example 2012-07-27 00:36:21.000000000 +0000 @@ -2,4 +2,4 @@ # will decide whether it is yet time to do a backup or not. # It might be a good idea to change the numbers below for different clients, # in order to spread the load a bit. -7,27,47 * * * * root /sbin/burp -a t >>/var/log/burp-client 2>&1 +7,27,47 * * * * root /usr/sbin/burp -a t >>/var/log/burp-client 2>&1 diff -Nru burp-1.3.0+20120214git/configs/server/burp.conf burp-1.3.10/configs/server/burp.conf --- burp-1.3.0+20120214git/configs/server/burp.conf 2012-02-13 13:13:38.000000000 +0000 +++ burp-1.3.10/configs/server/burp.conf 2012-07-27 00:36:21.000000000 +0000 @@ -9,12 +9,26 @@ hardlinked_archive = 0 working_dir_recovery_method = delete max_children = 5 +max_status_children = 5 umask = 0022 +syslog = 0 +# The following options can restrict what the client can do. +# Set client_can_force_backup to 0 to only allow timed backups. +client_can_force_backup = 1 +client_can_list = 1 +# Set client_can_restore to 0 if you want restores to only be initialised by +# the server. +client_can_restore = 1 +client_can_verify = 1 # Ratelimit throttles the send speed. Specified in Megabits per second (Mb/s). # ratelimit = 1.5 # Network timeout defaults to 7200 seconds (2 hours). # network_timeout = 7200 +# More configuration files can be read, using syntax like the following +# (without the leading '# '). +# . path/to/more/conf + # Location of autoupgrade files to serve to clients. Leave it commented out # to not autoupgrade clients. # autoupgrade_dir = /etc/burp/autoupgrade/server @@ -30,6 +44,17 @@ # user=graham # group=nogroup +# CA options. +# If you want your server to be a certificate authority and generate its own +# certificates, uncomment the following lines. If the directory specified in +# ca_conf does not exist, the server will create, populate it, and the paths +# indicated by ssl_cert_ca, ssl_cert, ssl_key and ssl_dhfile below will be +# overwritten. See docs/burp_ca.txt for more information. +ca_conf = /etc/burp/CA.cnf +ca_name = burpCA +ca_server_name = burpserver +ca_burp_ca = /usr/sbin/burp_ca + # SSL certificate authority - same file on both server and client ssl_cert_ca = /etc/burp/ssl_cert_ca.pem @@ -37,7 +62,7 @@ ssl_cert = /etc/burp/ssl_cert-server.pem # Server SSL key -#ssl_key = /etc/burp/ssl_cert-server.key +ssl_key = /etc/burp/ssl_cert-server.key # SSL key password ssl_key_password = password @@ -64,6 +89,9 @@ # Uncomment the following to have success notifications only if there were # warnings. #notify_success_warnings_only = 1 +# Uncomment the following to have success notifications only if there were +# new or changed files. +#notify_success_changes_only = 1 # Uncomment the following for email notifications of backups that failed. #notify_failure_script = /etc/burp/notify_script diff -Nru burp-1.3.0+20120214git/configs/server/clientconfdir/incexc burp-1.3.10/configs/server/clientconfdir/incexc --- burp-1.3.0+20120214git/configs/server/clientconfdir/incexc 1970-01-01 00:00:00.000000000 +0000 +++ burp-1.3.10/configs/server/clientconfdir/incexc 2012-07-27 00:36:21.000000000 +0000 @@ -0,0 +1,20 @@ +# If you add at least one 'include=' line, the server will override the +# rest of the client options below, which define exactly what to backup. +# Setting any of the other options here will then also take effect on the +# client. +# (This file needs to be included in the clientconfdir file for the client, +# using the '. path/to/this/file' syntax. Alternatively, these options can +# be added to the clientconfdir file directly). + +# include=/home +# exclude=/home/dontwant +# exclude_ext=vdi +# exclude_regex=/\.cache/ +# exclude_fs=tmpfs +# min_file_size=0 +# max_file_size=0 +# cross_filesystem=/some/path +# cross_all_filesystems=0 +# nobackup=.nobackup +# read_fifo=/some/path/to/a/fifo +# read_all_fifos=0 diff -Nru burp-1.3.0+20120214git/configs/server/clientconfdir/testclient burp-1.3.10/configs/server/clientconfdir/testclient --- burp-1.3.0+20120214git/configs/server/clientconfdir/testclient 2012-02-13 13:13:38.000000000 +0000 +++ burp-1.3.10/configs/server/clientconfdir/testclient 2012-07-27 00:36:21.000000000 +0000 @@ -1,4 +1,5 @@ password = abcdefgh -# The common name in the certificate that the client gives us. -ssl_peer_cn = grkeclient +# More configuration files can be read, using syntax like the following +# (without the leading '# '). +. incexc/example diff -Nru burp-1.3.0+20120214git/configs/server/cron.example burp-1.3.10/configs/server/cron.example --- burp-1.3.0+20120214git/configs/server/cron.example 2012-02-13 13:13:38.000000000 +0000 +++ burp-1.3.10/configs/server/cron.example 2012-07-27 00:36:21.000000000 +0000 @@ -8,4 +8,4 @@ # The following will run file deduplication over all client storages every # Saturday at 8 in the morning. Again, if your server is using a different # config file to /etc/burp/burp-server.conf, change that argument. -0 8 * * 6 root /sbin/bedup -l -c /etc/burp/burp-server.conf >>/var/log/burp-bedup 2>&1 +0 8 * * 6 root /usr/sbin/bedup -l -c /etc/burp/burp-server.conf >>/var/log/burp-bedup 2>&1 diff -Nru burp-1.3.0+20120214git/configs/server/ssl_extra_checks_script burp-1.3.10/configs/server/ssl_extra_checks_script --- burp-1.3.0+20120214git/configs/server/ssl_extra_checks_script 2012-02-13 13:13:38.000000000 +0000 +++ burp-1.3.10/configs/server/ssl_extra_checks_script 2012-07-27 00:36:21.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/sh # -# This server pre script was contributed by Jaon Haar. +# This server pre script was contributed by Jason Haar. ( cat< " + logEvent "usage: $prog " exit $error_crlNoArgs } @@ -47,11 +47,11 @@ export client="$1" ; shift export reserved4="$1" ; shift export reserved5="$1" ; shift -export reserved6="$1" ; shift export BURP_CRLDIR="$1" export BURP_SERVER_CONFIG="$2" export BURP_EXTRA_SCRIPT="$3" + [ -z "$BURP_CRLDIR" ] && usage [ -z "$BURP_SERVER_CONFIG" ] && usage @@ -92,8 +92,8 @@ updateCRL() { downloadedCRL=0 - mkdir -p $BURP_CLRDIR - cd $BURP_CLRDIR + mkdir -p $BURP_CRLDIR + cd $BURP_CRLDIR CRL_FILE="`echo $X509_ISSUER_CN|sed 's/[^0-9a-zA-Z]/_/g'`.crl" CRL_AGE=`stat -c %Y "$CRL_FILE" 2>/dev/null` CRL_AGE=${CRL_AGE:-0} @@ -120,12 +120,16 @@ logEvent "CRL: no http CRL points - skipping CRL checks" else updateCRL > /dev/null 2>&1& - if [ "`/bin/ls $BURP_CLRDIR/*.crl 2>/dev/null`" = "" ] ; then - logEvent "CRL: failed crl checks - no CRL files in $BURP_CLRDIR" - exit $error_noCRLs + if [ "`/bin/ls $BURP_CRLDIR/*.crl 2>/dev/null`" = "" ] ; then + #wait 10sec in case this is the first time updateCRL has run + sleep 10 + if [ "`/bin/ls $BURP_CRLDIR/*.crl 2>/dev/null`" = "" ] ; then + logEvent "CRL: failed crl checks - no CRL files in $BURP_CRLDIR" + exit $error_noCRLs + fi fi FOUND_CRL=0 - for crl in $BURP_CLRDIR/*.crl + for crl in $BURP_CRLDIR/*.crl do if [ "`(openssl crl -in $crl -inform DER -text -noout 2>/dev/null || openssl crl -in $crl -inform PEM -text -noout 2>/dev/null)|grep Issuer:|egrep \"$X509_ISSUER_CN\"|egrep \"$X509_ISSUER_emailAddress\"`" != "" ] ; then FOUND_CRL=1 @@ -159,4 +163,3 @@ else exit 0 fi - diff -Nru burp-1.3.0+20120214git/configs/server/summary_script burp-1.3.10/configs/server/summary_script --- burp-1.3.0+20120214git/configs/server/summary_script 2012-02-13 13:13:38.000000000 +0000 +++ burp-1.3.10/configs/server/summary_script 2012-07-27 00:36:21.000000000 +0000 @@ -8,5 +8,5 @@ (echo "To: $2" echo "From: burp" echo "Subject: $3" - /sbin/burp -c "$1" -a S + /usr/sbin/burp -c "$1" -a S echo) | /usr/sbin/sendmail -t diff -Nru burp-1.3.0+20120214git/configs/server/timer_script burp-1.3.10/configs/server/timer_script --- burp-1.3.0+20120214git/configs/server/timer_script 2012-02-13 13:13:38.000000000 +0000 +++ burp-1.3.10/configs/server/timer_script 2012-07-27 00:36:21.000000000 +0000 @@ -6,14 +6,27 @@ client="$1" ; shift current="$1" ; shift +storage_dir="$1" ; shift reserved1="$1" ; shift reserved2="$1" ; shift -reserved3="$1" ; shift interval="$1" ; shift timestamp="$current/timestamp" +# A 'backup' file placed in the storage directory tells this script that +# a backup needs to be done right now. +# This gives the 'server initiates a manual restore' feature. + +manual_file="$storage_dir/$client/backup" +if [ -f "$manual_file" ] ; then + echo "Found $manual_file" + echo "Do a backup of $client now" + rm -f "$manual_file" + exit 0 +fi + # The rest of the arguments, if any, should be timebands. -curdayhour=$(date +"*%a*%H*") +# Set LANG=C so that 'date' returns English day names. +curdayhour=$(LANG=C date +"*%a*%H*") intimeband=1 # If no timebands given, default to OK. while [ "$#" -gt 0 ] ; do intimeband=0 @@ -64,19 +77,27 @@ read junk ts < "$timestamp" - if ! secs=$(date +%s -d "$ts") \ - || ! now=$(date +"%Y-%m-%d %H:%M:%S") \ - || ! nowsecs=$(date +%s -d "$now") + if ! secs=$(LANG=C date +%s -d "$ts") \ + || ! now=$(LANG=C date +"%Y-%m-%d %H:%M:%S") \ + || ! nowsecs=$(LANG=C date +%s -d "$now") then echo "$0: Date command returned error for $client." return 0 fi min_timesecs=$((secs+intervalsecs)) - if ! min_time=$(date -d @$min_timesecs +"%Y-%m-%d %H:%M:%S") + + # GNU coreutils 'date' command should accept the following (even + # slightly old versions). + if ! min_time=$(LANG=C date -d "Jan 1, 1970 00:00:00 +0000 + $min_timesecs seconds" +"%Y-%m-%d %H:%M:%S") then - echo "$0: Date command returned error for $client." - return 0 + # FreeBSD 'date' will return an error with the above, so try + # a version that FreeBSD 'date' should be happy with. + if ! min_time=$(LANG=C date -r $min_timesecs +"%Y-%m-%d %H:%M:%S") + then + echo "$0: Date command returned error for $client." + return 0 + fi fi echo "Last backup: $ts" diff -Nru burp-1.3.0+20120214git/configure burp-1.3.10/configure --- burp-1.3.0+20120214git/configure 2012-02-13 13:13:38.000000000 +0000 +++ burp-1.3.10/configure 2012-07-27 00:36:21.000000000 +0000 @@ -1,11 +1,9 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.67. +# Generated by GNU Autoconf 2.69. # # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -89,6 +87,7 @@ IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -133,6 +132,31 @@ # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh @@ -166,7 +190,8 @@ else exitcode=1; echo positional parameters were not saved. fi -test x\$exitcode = x0 || exit 1" +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && @@ -211,14 +236,25 @@ if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi if test x$as_have_required = xno; then : @@ -320,6 +356,14 @@ } # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take @@ -441,6 +485,10 @@ chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -475,16 +523,16 @@ # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -496,28 +544,8 @@ as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -966,6 +994,7 @@ with_included_gettext with_sbin_perm with_tcp_wrappers +enable_ipv6 with_openssl enable_largefile with_x @@ -1392,7 +1421,7 @@ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac @@ -1443,8 +1472,6 @@ if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1615,6 +1642,7 @@ --enable-includes enable installing of include files [default=no] --disable-nls do not use Native Language Support --disable-rpath do not hardcode runtime library paths + --enable-ipv6 Enable IPv6 support --disable-largefile omit support for large files --disable-afs disable afs support [default=auto] --disable-acl disable acl support [default=auto] @@ -1720,9 +1748,9 @@ if $ac_init_version; then cat <<\_ACEOF configure -generated by GNU Autoconf 2.67 +generated by GNU Autoconf 2.69 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1766,7 +1794,7 @@ ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile @@ -1804,7 +1832,7 @@ ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile @@ -1841,7 +1869,7 @@ ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp @@ -1873,7 +1901,7 @@ test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -1887,7 +1915,7 @@ # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link @@ -1901,7 +1929,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1919,7 +1947,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile @@ -1960,7 +1988,7 @@ ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run @@ -1973,7 +2001,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2028,7 +2056,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func @@ -2064,7 +2092,7 @@ ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_cpp @@ -2096,7 +2124,7 @@ test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -2110,7 +2138,7 @@ # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_link @@ -2124,7 +2152,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" @@ -2165,7 +2193,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type @@ -2177,10 +2205,10 @@ ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval "test \"\${$3+set}\"" = set; then : + if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -2243,7 +2271,7 @@ esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -2252,7 +2280,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel @@ -2273,7 +2301,8 @@ main () { static int test_array [1 - 2 * !(($2) >= 0)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2289,7 +2318,8 @@ main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2315,7 +2345,8 @@ main () { static int test_array [1 - 2 * !(($2) < 0)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2331,7 +2362,8 @@ main () { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2365,7 +2397,8 @@ main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2429,7 +2462,7 @@ rm -f conftest.val fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_compute_int @@ -2443,7 +2476,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 $as_echo_n "checking for $2.$3... " >&6; } -if eval "test \"\${$4+set}\"" = set; then : +if eval \${$4+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2487,7 +2520,7 @@ eval ac_res=\$$4 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_member @@ -2502,7 +2535,7 @@ as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 $as_echo_n "checking whether $as_decl_name is declared... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2533,7 +2566,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_decl @@ -2574,7 +2607,7 @@ ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_run @@ -2583,7 +2616,7 @@ running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.67. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2841,7 +2874,7 @@ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi done @@ -2984,7 +3017,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_TRUEPRG+set}" = set; then : +if ${ac_cv_path_TRUEPRG+:} false; then : $as_echo_n "(cached) " >&6 else case $TRUEPRG in @@ -2998,7 +3031,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_TRUEPRG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3030,7 +3063,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_FALSEPRG+set}" = set; then : +if ${ac_cv_path_FALSEPRG+:} false; then : $as_echo_n "(cached) " >&6 else case $FALSEPRG in @@ -3044,7 +3077,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_FALSEPRG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3093,7 +3126,7 @@ set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3105,7 +3138,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3133,7 +3166,7 @@ set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -3145,7 +3178,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3186,7 +3219,7 @@ set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3198,7 +3231,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3226,7 +3259,7 @@ set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3239,7 +3272,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -3285,7 +3318,7 @@ set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3297,7 +3330,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3329,7 +3362,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -3341,7 +3374,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3384,7 +3417,7 @@ test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -3499,7 +3532,7 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -3542,7 +3575,7 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -3601,7 +3634,7 @@ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi fi fi @@ -3612,7 +3645,7 @@ ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then : +if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -3653,7 +3686,7 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi @@ -3663,7 +3696,7 @@ ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : +if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -3700,7 +3733,7 @@ ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : +if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag @@ -3778,7 +3811,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : +if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no @@ -3787,8 +3820,7 @@ /* end confdefs.h. */ #include #include -#include -#include +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -3889,7 +3921,7 @@ set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then : +if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then @@ -3901,7 +3933,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3933,7 +3965,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : +if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then @@ -3945,7 +3977,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4011,7 +4043,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : +if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -4048,7 +4080,7 @@ ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then : +if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag @@ -4139,7 +4171,7 @@ fi set dummy $CC; ac_cc=`$as_echo "$2" | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\"" = set; then : +if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -4253,7 +4285,7 @@ CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : + if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -4369,7 +4401,7 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -4381,7 +4413,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : +if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then @@ -4395,7 +4427,7 @@ for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -4444,7 +4476,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : +if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 @@ -4461,7 +4493,7 @@ for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -4512,7 +4544,7 @@ if test $ac_cv_c_compiler_gnu = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5 $as_echo_n "checking whether $CC needs -traditional... " >&6; } -if test "${ac_cv_prog_gcc_traditional+set}" = set; then : +if ${ac_cv_prog_gcc_traditional+:} false; then : $as_echo_n "(cached) " >&6 else ac_pattern="Autoconf.*'x'" @@ -4581,7 +4613,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then : +if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -4601,7 +4633,7 @@ # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -4661,7 +4693,7 @@ set dummy mv; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MV+set}" = set; then : +if ${ac_cv_path_MV+:} false; then : $as_echo_n "(cached) " >&6 else case $MV in @@ -4675,7 +4707,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4702,7 +4734,7 @@ set dummy rm; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_REMOVE+set}" = set; then : +if ${ac_cv_path_REMOVE+:} false; then : $as_echo_n "(cached) " >&6 else case $REMOVE in @@ -4716,7 +4748,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_REMOVE="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4743,7 +4775,7 @@ set dummy cp; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_CP+set}" = set; then : +if ${ac_cv_path_CP+:} false; then : $as_echo_n "(cached) " >&6 else case $CP in @@ -4757,7 +4789,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4784,7 +4816,7 @@ set dummy sed; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_SED+set}" = set; then : +if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else case $SED in @@ -4798,7 +4830,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4825,7 +4857,7 @@ set dummy echo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_ECHO+set}" = set; then : +if ${ac_cv_path_ECHO+:} false; then : $as_echo_n "(cached) " >&6 else case $ECHO in @@ -4839,7 +4871,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4866,7 +4898,7 @@ set dummy cmp; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_CMP+set}" = set; then : +if ${ac_cv_path_CMP+:} false; then : $as_echo_n "(cached) " >&6 else case $CMP in @@ -4880,7 +4912,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4907,7 +4939,7 @@ set dummy tbl; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_TBL+set}" = set; then : +if ${ac_cv_path_TBL+:} false; then : $as_echo_n "(cached) " >&6 else case $TBL in @@ -4921,7 +4953,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_TBL="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4948,7 +4980,7 @@ set dummy ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_AR+set}" = set; then : +if ${ac_cv_path_AR+:} false; then : $as_echo_n "(cached) " >&6 else case $AR in @@ -4962,7 +4994,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4989,7 +5021,7 @@ set dummy openssl; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_OPENSSL+set}" = set; then : +if ${ac_cv_path_OPENSSL+:} false; then : $as_echo_n "(cached) " >&6 else case $OPENSSL in @@ -5003,7 +5035,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_OPENSSL="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5030,7 +5062,7 @@ set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKGCONFIG+set}" = set; then : +if ${ac_cv_path_PKGCONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKGCONFIG in @@ -5044,7 +5076,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5071,7 +5103,7 @@ set dummy pidof; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PIDOF+set}" = set; then : +if ${ac_cv_path_PIDOF+:} false; then : $as_echo_n "(cached) " >&6 else case $PIDOF in @@ -5085,7 +5117,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PIDOF="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5114,7 +5146,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then : +if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then @@ -5126,7 +5158,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5166,7 +5198,7 @@ set dummy $THE_AWK; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_AWK+set}" = set; then : +if ${ac_cv_path_AWK+:} false; then : $as_echo_n "(cached) " >&6 else case $AWK in @@ -5180,7 +5212,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5283,7 +5315,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then : +if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias @@ -5299,7 +5331,7 @@ $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -5317,7 +5349,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then : +if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then @@ -5332,7 +5364,7 @@ $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -5350,7 +5382,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } -if test "${ac_cv_path_SED+set}" = set; then : +if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ @@ -5370,7 +5402,7 @@ for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue + as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in @@ -5432,7 +5464,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } -if test "${ac_cv_path_FGREP+set}" = set; then : +if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 @@ -5449,7 +5481,7 @@ for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue + as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in @@ -5563,7 +5595,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi -if test "${lt_cv_path_LD+set}" = set; then : +if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then @@ -5603,7 +5635,7 @@ test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then : +if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. @@ -5630,7 +5662,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if test "${lt_cv_path_NM+set}" = set; then : +if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then @@ -5690,7 +5722,7 @@ set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DUMPBIN+set}" = set; then : +if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then @@ -5702,7 +5734,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5734,7 +5766,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then : +if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then @@ -5746,7 +5778,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5797,18 +5829,18 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } -if test "${lt_cv_nm_interface+set}" = set; then : +if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:5805: $ac_compile\"" >&5) + (eval echo "\"\$as_me:5837: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:5808: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:5840: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:5811: output\"" >&5) + (eval echo "\"\$as_me:5843: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -5832,7 +5864,7 @@ # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } -if test "${lt_cv_sys_max_cmd_len+set}" = set; then : +if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 @@ -6024,7 +6056,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } -if test "${lt_cv_ld_reload_flag+set}" = set; then : +if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' @@ -6060,7 +6092,7 @@ set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OBJDUMP+set}" = set; then : +if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then @@ -6072,7 +6104,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6100,7 +6132,7 @@ set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then @@ -6112,7 +6144,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6159,7 +6191,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } -if test "${lt_cv_deplibs_check_method+set}" = set; then : +if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' @@ -6375,7 +6407,7 @@ set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AR+set}" = set; then : +if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then @@ -6387,7 +6419,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="${ac_tool_prefix}ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6415,7 +6447,7 @@ set dummy ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : +if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then @@ -6427,7 +6459,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6480,7 +6512,7 @@ set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : +if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then @@ -6492,7 +6524,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6520,7 +6552,7 @@ set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then @@ -6532,7 +6564,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6579,7 +6611,7 @@ set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then : +if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then @@ -6591,7 +6623,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6619,7 +6651,7 @@ set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then @@ -6631,7 +6663,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6736,7 +6768,7 @@ # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then : +if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else @@ -7013,7 +7045,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 7016 "configure"' > conftest.$ac_ext + echo '#line 7048 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -7107,7 +7139,7 @@ CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if test "${lt_cv_cc_needs_belf+set}" = set; then : +if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c @@ -7183,7 +7215,7 @@ set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DSYMUTIL+set}" = set; then : +if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then @@ -7195,7 +7227,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7223,7 +7255,7 @@ set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then : +if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then @@ -7235,7 +7267,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7275,7 +7307,7 @@ set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_NMEDIT+set}" = set; then : +if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then @@ -7287,7 +7319,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7315,7 +7347,7 @@ set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then : +if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then @@ -7327,7 +7359,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7367,7 +7399,7 @@ set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_LIPO+set}" = set; then : +if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then @@ -7379,7 +7411,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7407,7 +7439,7 @@ set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then : +if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then @@ -7419,7 +7451,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7459,7 +7491,7 @@ set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL+set}" = set; then : +if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then @@ -7471,7 +7503,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7499,7 +7531,7 @@ set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then : +if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then @@ -7511,7 +7543,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7551,7 +7583,7 @@ set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL64+set}" = set; then : +if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then @@ -7563,7 +7595,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7591,7 +7623,7 @@ set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then : +if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then @@ -7603,7 +7635,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7666,7 +7698,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } -if test "${lt_cv_apple_cc_single_mod+set}" = set; then : +if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no @@ -7695,7 +7727,7 @@ $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if test "${lt_cv_ld_exported_symbols_list+set}" = set; then : +if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no @@ -7762,7 +7794,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -7893,7 +7925,7 @@ do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " -if test "x$ac_cv_header_dlfcn_h" = x""yes; then : +if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF @@ -7920,7 +7952,7 @@ set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then : +if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then @@ -7932,7 +7964,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7964,7 +7996,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : +if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then @@ -7976,7 +8008,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8042,7 +8074,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : +if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -8079,7 +8111,7 @@ ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then : +if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag @@ -8172,7 +8204,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then - if test "${ac_cv_prog_CXXCPP+set}" = set; then : + if ${ac_cv_prog_CXXCPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded @@ -8475,7 +8507,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } -if test "${lt_cv_objdir+set}" = set; then : +if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null @@ -8583,7 +8615,7 @@ if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : +if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in @@ -8649,7 +8681,7 @@ if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : +if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in @@ -8786,7 +8818,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : +if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no @@ -8802,11 +8834,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8805: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8837: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8809: \$? = $ac_status" >&5 + echo "$as_me:8841: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -9125,7 +9157,7 @@ if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works+set}" = set; then : +if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no @@ -9141,11 +9173,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9144: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9176: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:9148: \$? = $ac_status" >&5 + echo "$as_me:9180: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -9184,7 +9216,7 @@ wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works+set}" = set; then : +if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no @@ -9227,7 +9259,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then : +if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no @@ -9246,11 +9278,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9249: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9281: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:9253: \$? = $ac_status" >&5 + echo "$as_me:9285: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -9282,7 +9314,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then : +if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no @@ -9301,11 +9333,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9304: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9336: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:9308: \$? = $ac_status" >&5 + echo "$as_me:9340: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -11410,7 +11442,7 @@ # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : +if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -11444,7 +11476,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else @@ -11458,12 +11490,12 @@ *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = x""yes; then : +if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } -if test "${ac_cv_lib_dld_shl_load+set}" = set; then : +if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -11497,16 +11529,16 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : +if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = x""yes; then : +if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : +if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -11540,12 +11572,12 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } -if test "${ac_cv_lib_svld_dlopen+set}" = set; then : +if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -11579,12 +11611,12 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = x""yes; then : +if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } -if test "${ac_cv_lib_dld_dld_link+set}" = set; then : +if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -11618,7 +11650,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = x""yes; then : +if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi @@ -11659,7 +11691,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self+set}" = set; then : +if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -11668,7 +11700,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11671 "configure" +#line 11703 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11755,7 +11787,7 @@ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self_static+set}" = set; then : +if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -11764,7 +11796,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11767 "configure" +#line 11799 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12142,7 +12174,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi -if test "${lt_cv_path_LD+set}" = set; then : +if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then @@ -12182,7 +12214,7 @@ test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then : +if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. @@ -13704,7 +13736,7 @@ if test -n "$lt_prog_compiler_pic_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then : +if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_CXX=no @@ -13720,11 +13752,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13723: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13755: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13727: \$? = $ac_status" >&5 + echo "$as_me:13759: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -13760,7 +13792,7 @@ wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then : +if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=no @@ -13800,7 +13832,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then : +if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no @@ -13819,11 +13851,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13822: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13854: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13826: \$? = $ac_status" >&5 + echo "$as_me:13858: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -13852,7 +13884,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then : +if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no @@ -13871,11 +13903,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13874: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13906: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13878: \$? = $ac_status" >&5 + echo "$as_me:13910: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15267,7 +15299,7 @@ $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -15358,7 +15390,7 @@ set dummy msgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MSGFMT+set}" = set; then : +if ${ac_cv_path_MSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case "$MSGFMT" in @@ -15399,7 +15431,7 @@ set dummy gmsgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_GMSGFMT+set}" = set; then : +if ${ac_cv_path_GMSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case $GMSGFMT in @@ -15413,7 +15445,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -15470,7 +15502,7 @@ set dummy xgettext; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_XGETTEXT+set}" = set; then : +if ${ac_cv_path_XGETTEXT+:} false; then : $as_echo_n "(cached) " >&6 else case "$XGETTEXT" in @@ -15542,7 +15574,7 @@ set dummy msgmerge; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MSGMERGE+set}" = set; then : +if ${ac_cv_path_MSGMERGE+:} false; then : $as_echo_n "(cached) " >&6 else case "$MSGMERGE" in @@ -15682,7 +15714,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi -if test "${acl_cv_path_LD+set}" = set; then : +if ${acl_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then @@ -15719,7 +15751,7 @@ test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${acl_cv_prog_gnu_ld+set}" = set; then : +if ${acl_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. @@ -15739,7 +15771,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 $as_echo_n "checking for shared library run path origin... " >&6; } -if test "${acl_cv_rpath+set}" = set; then : +if ${acl_cv_rpath+:} false; then : $as_echo_n "(cached) " >&6 else @@ -16168,7 +16200,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 $as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; } -if test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; then : +if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_CPPFLAGS="$CPPFLAGS" @@ -16205,7 +16237,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5 $as_echo_n "checking for CFLocaleCopyCurrent... " >&6; } -if test "${gt_cv_func_CFLocaleCopyCurrent+set}" = set; then : +if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_CPPFLAGS="$CPPFLAGS" @@ -16277,7 +16309,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5 $as_echo_n "checking for GNU gettext in libc... " >&6; } -if test "${gt_cv_func_gnugettext1_libc+set}" = set; then : +if ${gt_cv_func_gnugettext1_libc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -16338,7 +16370,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 $as_echo_n "checking for iconv... " >&6; } -if test "${am_cv_func_iconv+set}" = set; then : +if ${am_cv_func_iconv+:} false; then : $as_echo_n "(cached) " >&6 else @@ -16791,7 +16823,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 $as_echo_n "checking for GNU gettext in libintl... " >&6; } -if test "${gt_cv_func_gnugettext1_libintl+set}" = set; then : +if ${gt_cv_func_gnugettext1_libintl+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_CPPFLAGS="$CPPFLAGS" @@ -17020,7 +17052,7 @@ if test x$sbindir = x'${exec_prefix}/sbin' ; then - sbindir=${exec_prefix}/sbin + sbindir=${exec_prefix}/usr/sbin fi sbindir=`eval echo ${sbindir}` @@ -17043,7 +17075,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MSGFMT+set}" = set; then : +if ${ac_cv_path_MSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case $MSGFMT in @@ -17057,7 +17089,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -17092,7 +17124,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library 2 or newer" >&5 $as_echo_n "checking whether we are using the GNU C Library 2 or newer... " >&6; } -if test "${ac_cv_gnu_library_2+set}" = set; then : +if ${ac_cv_gnu_library_2+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -17128,7 +17160,7 @@ set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then : +if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then @@ -17140,7 +17172,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -17168,7 +17200,7 @@ set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then @@ -17180,7 +17212,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -17218,7 +17250,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror in -lcposix" >&5 $as_echo_n "checking for strerror in -lcposix... " >&6; } -if test "${ac_cv_lib_cposix_strerror+set}" = set; then : +if ${ac_cv_lib_cposix_strerror+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -17252,7 +17284,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cposix_strerror" >&5 $as_echo "$ac_cv_lib_cposix_strerror" >&6; } -if test "x$ac_cv_lib_cposix_strerror" = x""yes; then : +if test "x$ac_cv_lib_cposix_strerror" = xyes; then : LIBS="$LIBS -lcposix" fi @@ -17260,7 +17292,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if test "${ac_cv_c_const+set}" = set; then : +if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -17269,11 +17301,11 @@ int main () { -/* FIXME: Include the comments suggested by Paul. */ + #ifndef __cplusplus - /* Ultrix mips cc rejects this. */ + /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; - const charset cs; + const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; @@ -17290,8 +17322,9 @@ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this. */ - char *t; + { /* SCO 3.2v4 cc rejects this sort of thing. */ + char tx; + char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; @@ -17307,10 +17340,10 @@ iptr p = 0; ++p; } - { /* AIX XL C 1.02.0.0 rejects this saying + { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; + struct s { int j; const int *ap[3]; } bx; + struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; @@ -17341,7 +17374,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed" >&5 $as_echo_n "checking for signed... " >&6; } -if test "${bh_cv_c_signed+set}" = set; then : +if ${bh_cv_c_signed+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -17372,7 +17405,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } -if test "${ac_cv_c_inline+set}" = set; then : +if ${ac_cv_c_inline+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no @@ -17413,7 +17446,7 @@ esac ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" -if test "x$ac_cv_type_off_t" = x""yes; then : +if test "x$ac_cv_type_off_t" = xyes; then : else @@ -17424,7 +17457,7 @@ fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = x""yes; then : +if test "x$ac_cv_type_size_t" = xyes; then : else @@ -17437,7 +17470,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long" >&5 $as_echo_n "checking for long long... " >&6; } -if test "${ac_cv_type_long_long+set}" = set; then : +if ${ac_cv_type_long_long+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -17471,7 +17504,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5 $as_echo_n "checking for long double... " >&6; } -if test "${gt_cv_c_long_double+set}" = set; then : +if ${gt_cv_c_long_double+:} false; then : $as_echo_n "(cached) " >&6 else if test "$GCC" = yes; then @@ -17512,7 +17545,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 $as_echo_n "checking for wchar_t... " >&6; } -if test "${gt_cv_c_wchar_t+set}" = set; then : +if ${gt_cv_c_wchar_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -17545,7 +17578,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5 $as_echo_n "checking for wint_t... " >&6; } -if test "${gt_cv_c_wint_t+set}" = set; then : +if ${gt_cv_c_wint_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -17578,7 +17611,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5 $as_echo_n "checking for inttypes.h... " >&6; } -if test "${gl_cv_header_inttypes_h+set}" = set; then : +if ${gl_cv_header_inttypes_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -17613,7 +17646,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5 $as_echo_n "checking for stdint.h... " >&6; } -if test "${gl_cv_header_stdint_h+set}" = set; then : +if ${gl_cv_header_stdint_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -17650,7 +17683,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5 $as_echo_n "checking for intmax_t... " >&6; } -if test "${gt_cv_c_intmax_t+set}" = set; then : +if ${gt_cv_c_intmax_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -17692,7 +17725,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf() supports POSIX/XSI format strings" >&5 $as_echo_n "checking whether printf() supports POSIX/XSI format strings... " >&6; } -if test "${gt_cv_func_printf_posix+set}" = set; then : +if ${gt_cv_func_printf_posix+:} false; then : $as_echo_n "(cached) " >&6 else @@ -17756,7 +17789,7 @@ # for constant arguments. Useless! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 $as_echo_n "checking for working alloca.h... " >&6; } -if test "${ac_cv_working_alloca_h+set}" = set; then : +if ${ac_cv_working_alloca_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -17789,7 +17822,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 $as_echo_n "checking for alloca... " >&6; } -if test "${ac_cv_func_alloca_works+set}" = set; then : +if ${ac_cv_func_alloca_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -17808,7 +17841,7 @@ #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ -char *alloca (); +void *alloca (size_t); # endif # endif # endif @@ -17852,7 +17885,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } -if test "${ac_cv_os_cray+set}" = set; then : +if ${ac_cv_os_cray+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -17893,7 +17926,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 $as_echo_n "checking stack direction for C alloca... " >&6; } -if test "${ac_cv_c_stack_direction+set}" = set; then : +if ${ac_cv_c_stack_direction+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -17903,23 +17936,20 @@ /* end confdefs.h. */ $ac_includes_default int -find_stack_direction () +find_stack_direction (int *addr, int depth) { - static char *addr = 0; - auto char dummy; - if (addr == 0) - { - addr = &dummy; - return find_stack_direction (); - } - else - return (&dummy > addr) ? 1 : -1; + int dir, dummy = 0; + if (! addr) + addr = &dummy; + *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; + dir = depth ? find_stack_direction (addr, depth - 1) : 0; + return dir + dummy; } int -main () +main (int argc, char **argv) { - return find_stack_direction () < 0; + return find_stack_direction (0, argc + !argv + 20) < 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : @@ -17968,7 +17998,7 @@ for ac_func in getpagesize do : ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" -if test "x$ac_cv_func_getpagesize" = x""yes; then : +if test "x$ac_cv_func_getpagesize" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETPAGESIZE 1 _ACEOF @@ -17978,7 +18008,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 $as_echo_n "checking for working mmap... " >&6; } -if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then : +if ${ac_cv_func_mmap_fixed_mapped+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -18145,7 +18175,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library 2.1 or newer" >&5 $as_echo_n "checking whether we are using the GNU C Library 2.1 or newer... " >&6; } -if test "${ac_cv_gnu_library_2_1+set}" = set; then : +if ${ac_cv_gnu_library_2_1+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -18180,7 +18210,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether integer division by zero raises SIGFPE" >&5 $as_echo_n "checking whether integer division by zero raises SIGFPE... " >&6; } -if test "${gt_cv_int_divbyzero_sigfpe+set}" = set; then : +if ${gt_cv_int_divbyzero_sigfpe+:} false; then : $as_echo_n "(cached) " >&6 else @@ -18261,7 +18291,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long" >&5 $as_echo_n "checking for unsigned long long... " >&6; } -if test "${ac_cv_type_unsigned_long_long+set}" = set; then : +if ${ac_cv_type_unsigned_long_long+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -18314,7 +18344,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5 $as_echo_n "checking for inttypes.h... " >&6; } -if test "${gt_cv_header_inttypes_h+set}" = set; then : +if ${gt_cv_header_inttypes_h+:} false; then : $as_echo_n "(cached) " >&6 else @@ -18353,7 +18383,7 @@ if test $gt_cv_header_inttypes_h = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5 $as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; } -if test "${gt_cv_inttypes_pri_broken+set}" = set; then : +if ${gt_cv_inttypes_pri_broken+:} false; then : $as_echo_n "(cached) " >&6 else @@ -18395,7 +18425,7 @@ for ac_header in stdint.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" -if test "x$ac_cv_header_stdint_h" = x""yes; then : +if test "x$ac_cv_header_stdint_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDINT_H 1 _ACEOF @@ -18493,7 +18523,7 @@ for ac_header in stdint.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" -if test "x$ac_cv_header_stdint_h" = x""yes; then : +if test "x$ac_cv_header_stdint_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDINT_H 1 _ACEOF @@ -18510,7 +18540,7 @@ ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" -if test "x$ac_cv_type_ptrdiff_t" = x""yes; then : +if test "x$ac_cv_type_ptrdiff_t" = xyes; then : else @@ -18552,7 +18582,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _snprintf is declared" >&5 $as_echo_n "checking whether _snprintf is declared... " >&6; } -if test "${ac_cv_have_decl__snprintf+set}" = set; then : +if ${ac_cv_have_decl__snprintf+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -18593,7 +18623,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _snwprintf is declared" >&5 $as_echo_n "checking whether _snwprintf is declared... " >&6; } -if test "${ac_cv_have_decl__snwprintf+set}" = set; then : +if ${ac_cv_have_decl__snwprintf+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -18635,7 +18665,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether feof_unlocked is declared" >&5 $as_echo_n "checking whether feof_unlocked is declared... " >&6; } -if test "${ac_cv_have_decl_feof_unlocked+set}" = set; then : +if ${ac_cv_have_decl_feof_unlocked+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -18676,7 +18706,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fgets_unlocked is declared" >&5 $as_echo_n "checking whether fgets_unlocked is declared... " >&6; } -if test "${ac_cv_have_decl_fgets_unlocked+set}" = set; then : +if ${ac_cv_have_decl_fgets_unlocked+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -18717,7 +18747,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getc_unlocked is declared" >&5 $as_echo_n "checking whether getc_unlocked is declared... " >&6; } -if test "${ac_cv_have_decl_getc_unlocked+set}" = set; then : +if ${ac_cv_have_decl_getc_unlocked+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -18812,7 +18842,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 $as_echo_n "checking for iconv... " >&6; } -if test "${am_cv_func_iconv+set}" = set; then : +if ${am_cv_func_iconv+:} false; then : $as_echo_n "(cached) " >&6 else @@ -18887,7 +18917,7 @@ if test "$am_cv_func_iconv" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 $as_echo_n "checking for iconv declaration... " >&6; } - if test "${am_cv_proto_iconv+set}" = set; then : + if ${am_cv_proto_iconv+:} false; then : $as_echo_n "(cached) " >&6 else @@ -18938,7 +18968,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } -if test "${am_cv_langinfo_codeset+set}" = set; then : +if ${am_cv_langinfo_codeset+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -18973,7 +19003,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 $as_echo_n "checking for LC_MESSAGES... " >&6; } -if test "${gt_cv_val_LC_MESSAGES+set}" = set; then : +if ${gt_cv_val_LC_MESSAGES+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -19015,7 +19045,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_INTLBISON+set}" = set; then : +if ${ac_cv_prog_INTLBISON+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$INTLBISON"; then @@ -19027,7 +19057,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_INTLBISON="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -19087,7 +19117,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 $as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; } -if test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; then : +if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_CPPFLAGS="$CPPFLAGS" @@ -19124,7 +19154,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5 $as_echo_n "checking for CFLocaleCopyCurrent... " >&6; } -if test "${gt_cv_func_CFLocaleCopyCurrent+set}" = set; then : +if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_CPPFLAGS="$CPPFLAGS" @@ -19215,7 +19245,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5 $as_echo_n "checking for GNU gettext in libc... " >&6; } -if test "${gt_cv_func_gnugettext1_libc+set}" = set; then : +if ${gt_cv_func_gnugettext1_libc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -19625,7 +19655,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 $as_echo_n "checking for GNU gettext in libintl... " >&6; } -if test "${gt_cv_func_gnugettext1_libintl+set}" = set; then : +if ${gt_cv_func_gnugettext1_libintl+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_CPPFLAGS="$CPPFLAGS" @@ -19869,13 +19899,13 @@ ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket" -if test "x$ac_cv_func_socket" = x""yes; then : +if test "x$ac_cv_func_socket" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: using libc's socket" >&5 $as_echo "using libc's socket" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lxnet" >&5 $as_echo_n "checking for socket in -lxnet... " >&6; } -if test "${ac_cv_lib_xnet_socket+set}" = set; then : +if ${ac_cv_lib_xnet_socket+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -19909,7 +19939,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xnet_socket" >&5 $as_echo "$ac_cv_lib_xnet_socket" >&6; } -if test "x$ac_cv_lib_xnet_socket" = x""yes; then : +if test "x$ac_cv_lib_xnet_socket" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBXNET 1 _ACEOF @@ -19920,7 +19950,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 $as_echo_n "checking for socket in -lsocket... " >&6; } -if test "${ac_cv_lib_socket_socket+set}" = set; then : +if ${ac_cv_lib_socket_socket+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -19954,7 +19984,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 $as_echo "$ac_cv_lib_socket_socket" >&6; } -if test "x$ac_cv_lib_socket_socket" = x""yes; then : +if test "x$ac_cv_lib_socket_socket" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBSOCKET 1 _ACEOF @@ -19965,7 +19995,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -linet" >&5 $as_echo_n "checking for socket in -linet... " >&6; } -if test "${ac_cv_lib_inet_socket+set}" = set; then : +if ${ac_cv_lib_inet_socket+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -19999,7 +20029,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_inet_socket" >&5 $as_echo "$ac_cv_lib_inet_socket" >&6; } -if test "x$ac_cv_lib_inet_socket" = x""yes; then : +if test "x$ac_cv_lib_inet_socket" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBINET 1 _ACEOF @@ -20022,7 +20052,7 @@ LIBS="$saved_LIBS -lwrap" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing nanosleep" >&5 $as_echo_n "checking for library containing nanosleep... " >&6; } -if test "${ac_cv_search_nanosleep+set}" = set; then : +if ${ac_cv_search_nanosleep+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -20056,11 +20086,11 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_nanosleep+set}" = set; then : + if ${ac_cv_search_nanosleep+:} false; then : break fi done -if test "${ac_cv_search_nanosleep+set}" = set; then : +if ${ac_cv_search_nanosleep+:} false; then : else ac_cv_search_nanosleep=no @@ -20161,6 +20191,69 @@ fi +# Check whether --enable-ipv6 was given. +if test "${enable_ipv6+set}" = set; then : + enableval=$enable_ipv6; want_v6=$enableval +else + want_v6=yes +fi + + +if test "x$want_v6" = "xno"; then + have_ipv6="no" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 support" >&5 +$as_echo_n "checking for IPv6 support... " >&6; } + have_ipv6="no" + if test "$cross_compiling" = yes; then : + have_ipv6=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + #include + #include + #include + +int +main () +{ + + + int fd; + struct sockaddr_in6 foo; + fd = socket(AF_INET6, SOCK_STREAM, 0); + return(fd >= 0 ? 0 : 1); + + + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + have_ipv6=yes +else + have_ipv6=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipv6" >&5 +$as_echo "$have_ipv6" >&6; } + + if test $have_ipv6 = yes ; then + +$as_echo "#define HAVE_IPV6 /**/" >>confdefs.h + + fi +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL" >&5 $as_echo_n "checking for OpenSSL... " >&6; } @@ -20305,7 +20398,7 @@ if test "$support_crypto" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_PKEY_encrypt_old in -lssl" >&5 $as_echo_n "checking for EVP_PKEY_encrypt_old in -lssl... " >&6; } -if test "${ac_cv_lib_ssl_EVP_PKEY_encrypt_old+set}" = set; then : +if ${ac_cv_lib_ssl_EVP_PKEY_encrypt_old+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -20339,7 +20432,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_EVP_PKEY_encrypt_old" >&5 $as_echo "$ac_cv_lib_ssl_EVP_PKEY_encrypt_old" >&6; } -if test "x$ac_cv_lib_ssl_EVP_PKEY_encrypt_old" = x""yes; then : +if test "x$ac_cv_lib_ssl_EVP_PKEY_encrypt_old" = xyes; then : $as_echo "#define HAVE_OPENSSLv1 1" >>confdefs.h @@ -20382,9 +20475,9 @@ $as_echo "#define PROTOTYPES 1" >>confdefs.h -if test -z "$CFLAGS" -o "$CFLAGS" = "-g -O2"; then +if test -z "$CFLAGS" -o "$CFLAGS" = "-g -O0"; then if test -z "$CCOPTS"; then - CCOPTS='-g -O2 -Wall' + CCOPTS='-g -O0 -Wall' fi CFLAGS="$CCOPTS" fi @@ -20404,7 +20497,7 @@ set dummy ${ac_tool_prefix}getconf; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_GETCONF+set}" = set; then : +if ${ac_cv_prog_GETCONF+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$GETCONF"; then @@ -20416,7 +20509,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_GETCONF="${ac_tool_prefix}getconf" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -20444,7 +20537,7 @@ set dummy getconf; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_GETCONF+set}" = set; then : +if ${ac_cv_prog_ac_ct_GETCONF+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_GETCONF"; then @@ -20456,7 +20549,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_GETCONF="getconf" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -20493,7 +20586,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS value to request large file support" >&5 $as_echo_n "checking for CFLAGS value to request large file support... " >&6; } -if test "${ac_cv_sys_largefile_CFLAGS+set}" = set; then : +if ${ac_cv_sys_largefile_CFLAGS+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_CFLAGS=`($GETCONF LFS_CFLAGS) 2>/dev/null` || { @@ -20532,7 +20625,7 @@ $as_echo "$ac_cv_sys_largefile_CFLAGS" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDFLAGS value to request large file support" >&5 $as_echo_n "checking for LDFLAGS value to request large file support... " >&6; } -if test "${ac_cv_sys_largefile_LDFLAGS+set}" = set; then : +if ${ac_cv_sys_largefile_LDFLAGS+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_LDFLAGS=`($GETCONF LFS_LDFLAGS) 2>/dev/null` || { @@ -20544,7 +20637,7 @@ $as_echo "$ac_cv_sys_largefile_LDFLAGS" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBS value to request large file support" >&5 $as_echo_n "checking for LIBS value to request large file support... " >&6; } -if test "${ac_cv_sys_largefile_LIBS+set}" = set; then : +if ${ac_cv_sys_largefile_LIBS+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_LIBS=`($GETCONF LFS_LIBS) 2>/dev/null` || { @@ -20599,7 +20692,7 @@ esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS" >&5 $as_echo_n "checking for _FILE_OFFSET_BITS... " >&6; } -if test "${ac_cv_sys_file_offset_bits+set}" = set; then : +if ${ac_cv_sys_file_offset_bits+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_file_offset_bits=no @@ -20625,7 +20718,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE" >&5 $as_echo_n "checking for _LARGEFILE_SOURCE... " >&6; } -if test "${ac_cv_sys_largefile_source+set}" = set; then : +if ${ac_cv_sys_largefile_source+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_source=no @@ -20651,7 +20744,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES" >&5 $as_echo_n "checking for _LARGE_FILES... " >&6; } -if test "${ac_cv_sys_large_files+set}" = set; then : +if ${ac_cv_sys_large_files+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_large_files=no @@ -20693,8 +20786,8 @@ have_x=disabled else case $x_includes,$x_libraries in #( - *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #( - *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : + *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( + *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then : $as_echo_n "(cached) " >&6 else # One or both of the vars are not set, and there is no cached value. @@ -20971,7 +21064,7 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } -if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then : +if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -21005,14 +21098,14 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } -if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then : +if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; } -if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then : +if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -21046,7 +21139,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } -if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then : +if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" fi @@ -21065,14 +21158,14 @@ # The functions gethostbyname, getservbyname, and inet_addr are # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" -if test "x$ac_cv_func_gethostbyname" = x""yes; then : +if test "x$ac_cv_func_gethostbyname" = xyes; then : fi if test $ac_cv_func_gethostbyname = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; } -if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then : +if ${ac_cv_lib_nsl_gethostbyname+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -21106,14 +21199,14 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } -if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then : +if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" fi if test $ac_cv_lib_nsl_gethostbyname = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; } -if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then : +if ${ac_cv_lib_bsd_gethostbyname+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -21147,7 +21240,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; } -if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then : +if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" fi @@ -21162,14 +21255,14 @@ # must be given before -lnsl if both are needed. We assume that # if connect needs -lnsl, so does gethostbyname. ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" -if test "x$ac_cv_func_connect" = x""yes; then : +if test "x$ac_cv_func_connect" = xyes; then : fi if test $ac_cv_func_connect = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5 $as_echo_n "checking for connect in -lsocket... " >&6; } -if test "${ac_cv_lib_socket_connect+set}" = set; then : +if ${ac_cv_lib_socket_connect+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -21203,7 +21296,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5 $as_echo "$ac_cv_lib_socket_connect" >&6; } -if test "x$ac_cv_lib_socket_connect" = x""yes; then : +if test "x$ac_cv_lib_socket_connect" = xyes; then : X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" fi @@ -21211,14 +21304,14 @@ # Guillermo Gomez says -lposix is necessary on A/UX. ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove" -if test "x$ac_cv_func_remove" = x""yes; then : +if test "x$ac_cv_func_remove" = xyes; then : fi if test $ac_cv_func_remove = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5 $as_echo_n "checking for remove in -lposix... " >&6; } -if test "${ac_cv_lib_posix_remove+set}" = set; then : +if ${ac_cv_lib_posix_remove+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -21252,7 +21345,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5 $as_echo "$ac_cv_lib_posix_remove" >&6; } -if test "x$ac_cv_lib_posix_remove" = x""yes; then : +if test "x$ac_cv_lib_posix_remove" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" fi @@ -21260,14 +21353,14 @@ # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat" -if test "x$ac_cv_func_shmat" = x""yes; then : +if test "x$ac_cv_func_shmat" = xyes; then : fi if test $ac_cv_func_shmat = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5 $as_echo_n "checking for shmat in -lipc... " >&6; } -if test "${ac_cv_lib_ipc_shmat+set}" = set; then : +if ${ac_cv_lib_ipc_shmat+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -21301,7 +21394,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5 $as_echo "$ac_cv_lib_ipc_shmat" >&6; } -if test "x$ac_cv_lib_ipc_shmat" = x""yes; then : +if test "x$ac_cv_lib_ipc_shmat" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" fi @@ -21319,7 +21412,7 @@ # John Interrante, Karl Berry { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; } -if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then : +if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -21353,7 +21446,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; } -if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then : +if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then : X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" fi @@ -21407,7 +21500,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -21519,7 +21612,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5 $as_echo_n "checking whether sys/types.h defines makedev... " >&6; } -if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then : +if ${ac_cv_header_sys_types_h_makedev+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -21547,7 +21640,7 @@ if test $ac_cv_header_sys_types_h_makedev = no; then ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then : +if test "x$ac_cv_header_sys_mkdev_h" = xyes; then : $as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h @@ -21557,7 +21650,7 @@ if test $ac_cv_header_sys_mkdev_h = no; then ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then : +if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then : $as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h @@ -21572,7 +21665,7 @@ as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } -if eval "test \"\${$as_ac_Header+set}\"" = set; then : +if eval \${$as_ac_Header+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -21612,7 +21705,7 @@ if test $ac_header_dirent = dirent.h; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } -if test "${ac_cv_search_opendir+set}" = set; then : +if ${ac_cv_search_opendir+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -21646,11 +21739,11 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_opendir+set}" = set; then : + if ${ac_cv_search_opendir+:} false; then : break fi done -if test "${ac_cv_search_opendir+set}" = set; then : +if ${ac_cv_search_opendir+:} false; then : else ac_cv_search_opendir=no @@ -21669,7 +21762,7 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } -if test "${ac_cv_search_opendir+set}" = set; then : +if ${ac_cv_search_opendir+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -21703,11 +21796,11 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_opendir+set}" = set; then : + if ${ac_cv_search_opendir+:} false; then : break fi done -if test "${ac_cv_search_opendir+set}" = set; then : +if ${ac_cv_search_opendir+:} false; then : else ac_cv_search_opendir=no @@ -21727,7 +21820,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; } -if test "${ac_cv_header_stat_broken+set}" = set; then : +if ${ac_cv_header_stat_broken+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -21769,7 +21862,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } -if test "${ac_cv_header_sys_wait_h+set}" = set; then : +if ${ac_cv_header_sys_wait_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -21810,7 +21903,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } -if test "${ac_cv_header_time+set}" = set; then : +if ${ac_cv_header_time+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -21844,7 +21937,7 @@ fi ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" -if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then : +if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 @@ -21857,7 +21950,7 @@ ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" -if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then : +if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_STAT_ST_BLOCKS 1 @@ -21878,7 +21971,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } -if test "${ac_cv_struct_tm+set}" = set; then : +if ${ac_cv_struct_tm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -21915,7 +22008,7 @@ #include <$ac_cv_struct_tm> " -if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then : +if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_TM_TM_ZONE 1 @@ -21931,7 +22024,7 @@ else ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include " -if test "x$ac_cv_have_decl_tzname" = x""yes; then : +if test "x$ac_cv_have_decl_tzname" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -21943,7 +22036,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5 $as_echo_n "checking for tzname... " >&6; } -if test "${ac_cv_var_tzname+set}" = set; then : +if ${ac_cv_var_tzname+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -21981,7 +22074,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for utime.h" >&5 $as_echo_n "checking for utime.h... " >&6; } -if test "${ba_cv_header_utime_h+set}" = set; then : +if ${ba_cv_header_utime_h+:} false; then : $as_echo_n "(cached) " >&6 else @@ -22023,7 +22116,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t" >&5 $as_echo_n "checking for socklen_t... " >&6; } -if test "${ba_cv_header_socklen_t+set}" = set; then : +if ${ba_cv_header_socklen_t+:} false; then : $as_echo_n "(cached) " >&6 else @@ -22071,7 +22164,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ioctl_req_t" >&5 $as_echo_n "checking for ioctl_req_t... " >&6; } -if test "${ba_cv_header_ioctl_req_t+set}" = set; then : +if ${ba_cv_header_ioctl_req_t+:} false; then : $as_echo_n "(cached) " >&6 else @@ -22128,7 +22221,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5 $as_echo_n "checking for typeof... " >&6; } -if test "${ba_cv_have_typeof+set}" = set; then : +if ${ba_cv_have_typeof+:} false; then : $as_echo_n "(cached) " >&6 else @@ -22174,7 +22267,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if test "${ac_cv_c_const+set}" = set; then : +if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22183,11 +22276,11 @@ int main () { -/* FIXME: Include the comments suggested by Paul. */ + #ifndef __cplusplus - /* Ultrix mips cc rejects this. */ + /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; - const charset cs; + const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; @@ -22204,8 +22297,9 @@ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this. */ - char *t; + { /* SCO 3.2v4 cc rejects this sort of thing. */ + char tx; + char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; @@ -22221,10 +22315,10 @@ iptr p = 0; ++p; } - { /* AIX XL C 1.02.0.0 rejects this saying + { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; + struct s { int j; const int *ap[3]; } bx; + struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; @@ -22347,7 +22441,7 @@ $as_echo "$fstype" >&6; } ac_fn_c_check_header_mongrel "$LINENO" "sys/statvfs.h" "ac_cv_header_sys_statvfs_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_statvfs_h" = x""yes; then : +if test "x$ac_cv_header_sys_statvfs_h" = xyes; then : $as_echo "#define HAVE_SYS_STATVFS_H 1" >>confdefs.h @@ -22357,7 +22451,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 $as_echo_n "checking return type of signal handlers... " >&6; } -if test "${ac_cv_type_signal+set}" = set; then : +if ${ac_cv_type_signal+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22391,7 +22485,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for type of signal functions" >&5 $as_echo_n "checking for type of signal functions... " >&6; } - if test "${bash_cv_signal_vintage+set}" = set; then : + if ${bash_cv_signal_vintage+:} false; then : $as_echo_n "(cached) " >&6 else @@ -22484,7 +22578,7 @@ fi ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" -if test "x$ac_cv_type_mode_t" = x""yes; then : +if test "x$ac_cv_type_mode_t" = xyes; then : else @@ -22496,7 +22590,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 $as_echo_n "checking for uid_t in sys/types.h... " >&6; } -if test "${ac_cv_type_uid_t+set}" = set; then : +if ${ac_cv_type_uid_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22525,7 +22619,7 @@ fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = x""yes; then : +if test "x$ac_cv_type_size_t" = xyes; then : else @@ -22536,7 +22630,7 @@ fi ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" -if test "x$ac_cv_type_pid_t" = x""yes; then : +if test "x$ac_cv_type_pid_t" = xyes; then : else @@ -22547,7 +22641,7 @@ fi ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" -if test "x$ac_cv_type_off_t" = x""yes; then : +if test "x$ac_cv_type_off_t" = xyes; then : else @@ -22559,7 +22653,7 @@ ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default" -if test "x$ac_cv_type_intptr_t" = x""yes; then : +if test "x$ac_cv_type_intptr_t" = xyes; then : $as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h @@ -22572,7 +22666,8 @@ main () { static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -22594,7 +22689,7 @@ ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default" -if test "x$ac_cv_type_uintptr_t" = x""yes; then : +if test "x$ac_cv_type_uintptr_t" = xyes; then : $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h @@ -22608,7 +22703,8 @@ main () { static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -22629,7 +22725,7 @@ ac_fn_c_check_type "$LINENO" "ino_t" "ac_cv_type_ino_t" "$ac_includes_default" -if test "x$ac_cv_type_ino_t" = x""yes; then : +if test "x$ac_cv_type_ino_t" = xyes; then : else @@ -22640,7 +22736,7 @@ fi ac_fn_c_check_type "$LINENO" "dev_t" "ac_cv_type_dev_t" "$ac_includes_default" -if test "x$ac_cv_type_dev_t" = x""yes; then : +if test "x$ac_cv_type_dev_t" = xyes; then : else @@ -22651,7 +22747,7 @@ fi ac_fn_c_check_type "$LINENO" "daddr_t" "ac_cv_type_daddr_t" "$ac_includes_default" -if test "x$ac_cv_type_daddr_t" = x""yes; then : +if test "x$ac_cv_type_daddr_t" = xyes; then : else @@ -22662,7 +22758,7 @@ fi ac_fn_c_check_type "$LINENO" "major_t" "ac_cv_type_major_t" "$ac_includes_default" -if test "x$ac_cv_type_major_t" = x""yes; then : +if test "x$ac_cv_type_major_t" = xyes; then : else @@ -22673,7 +22769,7 @@ fi ac_fn_c_check_type "$LINENO" "minor_t" "ac_cv_type_minor_t" "$ac_includes_default" -if test "x$ac_cv_type_minor_t" = x""yes; then : +if test "x$ac_cv_type_minor_t" = xyes; then : else @@ -22684,7 +22780,7 @@ fi ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" -if test "x$ac_cv_type_ssize_t" = x""yes; then : +if test "x$ac_cv_type_ssize_t" = xyes; then : else @@ -22695,7 +22791,7 @@ fi ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" -if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then : +if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_STAT_ST_BLOCKS 1 @@ -22715,7 +22811,7 @@ ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default" -if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then : +if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_STAT_ST_RDEV 1 @@ -22729,7 +22825,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } -if test "${ac_cv_struct_tm+set}" = set; then : +if ${ac_cv_struct_tm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22764,7 +22860,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if test "${ac_cv_c_const+set}" = set; then : +if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -22773,11 +22869,11 @@ int main () { -/* FIXME: Include the comments suggested by Paul. */ + #ifndef __cplusplus - /* Ultrix mips cc rejects this. */ + /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; - const charset cs; + const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; @@ -22794,8 +22890,9 @@ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this. */ - char *t; + { /* SCO 3.2v4 cc rejects this sort of thing. */ + char tx; + char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; @@ -22811,10 +22908,10 @@ iptr p = 0; ++p; } - { /* AIX XL C 1.02.0.0 rejects this saying + { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; + struct s { int j; const int *ap[3]; } bx; + struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; @@ -22849,7 +22946,7 @@ # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char" >&5 $as_echo_n "checking size of char... " >&6; } -if test "${ac_cv_sizeof_char+set}" = set; then : +if ${ac_cv_sizeof_char+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char))" "ac_cv_sizeof_char" "$ac_includes_default"; then : @@ -22859,7 +22956,7 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (char) -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_char=0 fi @@ -22882,7 +22979,7 @@ # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short int" >&5 $as_echo_n "checking size of short int... " >&6; } -if test "${ac_cv_sizeof_short_int+set}" = set; then : +if ${ac_cv_sizeof_short_int+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short int))" "ac_cv_sizeof_short_int" "$ac_includes_default"; then : @@ -22892,7 +22989,7 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (short int) -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_short_int=0 fi @@ -22915,7 +23012,7 @@ # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 $as_echo_n "checking size of int... " >&6; } -if test "${ac_cv_sizeof_int+set}" = set; then : +if ${ac_cv_sizeof_int+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : @@ -22925,7 +23022,7 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (int) -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_int=0 fi @@ -22948,7 +23045,7 @@ # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long int" >&5 $as_echo_n "checking size of long int... " >&6; } -if test "${ac_cv_sizeof_long_int+set}" = set; then : +if ${ac_cv_sizeof_long_int+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long int))" "ac_cv_sizeof_long_int" "$ac_includes_default"; then : @@ -22958,7 +23055,7 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long int) -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long_int=0 fi @@ -22981,7 +23078,7 @@ # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long int" >&5 $as_echo_n "checking size of long long int... " >&6; } -if test "${ac_cv_sizeof_long_long_int+set}" = set; then : +if ${ac_cv_sizeof_long_long_int+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long int))" "ac_cv_sizeof_long_long_int" "$ac_includes_default"; then : @@ -22991,7 +23088,7 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long long int) -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long_long_int=0 fi @@ -23014,7 +23111,7 @@ # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5 $as_echo_n "checking size of int *... " >&6; } -if test "${ac_cv_sizeof_int_p+set}" = set; then : +if ${ac_cv_sizeof_int_p+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p" "$ac_includes_default"; then : @@ -23024,7 +23121,7 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (int *) -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_int_p=0 fi @@ -23044,7 +23141,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int type" >&5 $as_echo_n "checking for u_int type... " >&6; } -if test "${ac_cv_have_u_int+set}" = set; then : +if ${ac_cv_have_u_int+:} false; then : $as_echo_n "(cached) " >&6 else @@ -23087,7 +23184,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t type" >&5 $as_echo_n "checking for intmax_t type... " >&6; } -if test "${ac_cv_have_intmax_t+set}" = set; then : +if ${ac_cv_have_intmax_t+:} false; then : $as_echo_n "(cached) " >&6 else @@ -23155,7 +23252,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_intmax_t type" >&5 $as_echo_n "checking for u_intmax_t type... " >&6; } -if test "${ac_cv_have_u_intmax_t+set}" = set; then : +if ${ac_cv_have_u_intmax_t+:} false; then : $as_echo_n "(cached) " >&6 else @@ -23223,7 +23320,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intXX_t types" >&5 $as_echo_n "checking for intXX_t types... " >&6; } -if test "${ac_cv_have_intxx_t+set}" = set; then : +if ${ac_cv_have_intxx_t+:} false; then : $as_echo_n "(cached) " >&6 else @@ -23266,7 +23363,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int64_t type" >&5 $as_echo_n "checking for int64_t type... " >&6; } -if test "${ac_cv_have_int64_t+set}" = set; then : +if ${ac_cv_have_int64_t+:} false; then : $as_echo_n "(cached) " >&6 else @@ -23309,7 +23406,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_intXX_t types" >&5 $as_echo_n "checking for u_intXX_t types... " >&6; } -if test "${ac_cv_have_u_intxx_t+set}" = set; then : +if ${ac_cv_have_u_intxx_t+:} false; then : $as_echo_n "(cached) " >&6 else @@ -23352,7 +23449,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int64_t types" >&5 $as_echo_n "checking for u_int64_t types... " >&6; } -if test "${ac_cv_have_u_int64_t+set}" = set; then : +if ${ac_cv_have_u_int64_t+:} false; then : $as_echo_n "(cached) " >&6 else @@ -23439,7 +23536,7 @@ if test -z "$have_u_intxx_t" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uintXX_t types" >&5 $as_echo_n "checking for uintXX_t types... " >&6; } -if test "${ac_cv_have_uintxx_t+set}" = set; then : +if ${ac_cv_have_uintxx_t+:} false; then : $as_echo_n "(cached) " >&6 else @@ -23592,7 +23689,7 @@ for ac_func in fchdir do : ac_fn_c_check_func "$LINENO" "fchdir" "ac_cv_func_fchdir" -if test "x$ac_cv_func_fchdir" = x""yes; then : +if test "x$ac_cv_func_fchdir" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_FCHDIR 1 _ACEOF @@ -23604,7 +23701,7 @@ for ac_func in strtoll do : ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll" -if test "x$ac_cv_func_strtoll" = x""yes; then : +if test "x$ac_cv_func_strtoll" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRTOLL 1 _ACEOF @@ -23616,7 +23713,7 @@ for ac_func in posix_fadvise do : ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise" -if test "x$ac_cv_func_posix_fadvise" = x""yes; then : +if test "x$ac_cv_func_posix_fadvise" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_POSIX_FADVISE 1 _ACEOF @@ -23627,7 +23724,7 @@ for ac_func in fdatasync do : ac_fn_c_check_func "$LINENO" "fdatasync" "ac_cv_func_fdatasync" -if test "x$ac_cv_func_fdatasync" = x""yes; then : +if test "x$ac_cv_func_fdatasync" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_FDATASYNC 1 _ACEOF @@ -23639,7 +23736,7 @@ for ac_func in chflags do : ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags" -if test "x$ac_cv_func_chflags" = x""yes; then : +if test "x$ac_cv_func_chflags" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_CHFLAGS 1 _ACEOF @@ -23663,7 +23760,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5 $as_echo_n "checking for va_copy... " >&6; } -if test "${ba_cv_va_copy+set}" = set; then : +if ${ba_cv_va_copy+:} false; then : $as_echo_n "(cached) " >&6 else @@ -23720,13 +23817,13 @@ # If resolver functions are not in libc check for -lnsl or -lresolv. ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r" -if test "x$ac_cv_func_gethostbyname_r" = x""yes; then : +if test "x$ac_cv_func_gethostbyname_r" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: using libc's resolver" >&5 $as_echo "using libc's resolver" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname_r in -lnsl" >&5 $as_echo_n "checking for gethostbyname_r in -lnsl... " >&6; } -if test "${ac_cv_lib_nsl_gethostbyname_r+set}" = set; then : +if ${ac_cv_lib_nsl_gethostbyname_r+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -23760,7 +23857,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname_r" >&5 $as_echo "$ac_cv_lib_nsl_gethostbyname_r" >&6; } -if test "x$ac_cv_lib_nsl_gethostbyname_r" = x""yes; then : +if test "x$ac_cv_lib_nsl_gethostbyname_r" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBNSL 1 _ACEOF @@ -23771,7 +23868,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname_r in -lresolv" >&5 $as_echo_n "checking for gethostbyname_r in -lresolv... " >&6; } -if test "${ac_cv_lib_resolv_gethostbyname_r+set}" = set; then : +if ${ac_cv_lib_resolv_gethostbyname_r+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -23805,7 +23902,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_gethostbyname_r" >&5 $as_echo "$ac_cv_lib_resolv_gethostbyname_r" >&6; } -if test "x$ac_cv_lib_resolv_gethostbyname_r" = x""yes; then : +if test "x$ac_cv_lib_resolv_gethostbyname_r" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBRESOLV 1 _ACEOF @@ -23820,7 +23917,7 @@ for ac_func in inet_pton do : ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton" -if test "x$ac_cv_func_inet_pton" = x""yes; then : +if test "x$ac_cv_func_inet_pton" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_INET_PTON 1 _ACEOF @@ -23832,7 +23929,7 @@ for ac_func in inet_ntop do : ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop" -if test "x$ac_cv_func_inet_ntop" = x""yes; then : +if test "x$ac_cv_func_inet_ntop" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_INET_NTOP 1 _ACEOF @@ -23844,7 +23941,7 @@ for ac_func in gethostbyname2 do : ac_fn_c_check_func "$LINENO" "gethostbyname2" "ac_cv_func_gethostbyname2" -if test "x$ac_cv_func_gethostbyname2" = x""yes; then : +if test "x$ac_cv_func_gethostbyname2" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETHOSTBYNAME2 1 _ACEOF @@ -23856,7 +23953,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr has a sa_len field" >&5 $as_echo_n "checking for struct sockaddr has a sa_len field... " >&6; } -if test "${ac_cv_struct_sockaddr_sa_len+set}" = set; then : +if ${ac_cv_struct_sockaddr_sa_len+:} false; then : $as_echo_n "(cached) " >&6 else @@ -23900,7 +23997,7 @@ for ac_func in strftime do : ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime" -if test "x$ac_cv_func_strftime" = x""yes; then : +if test "x$ac_cv_func_strftime" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRFTIME 1 _ACEOF @@ -23909,7 +24006,7 @@ # strftime is in -lintl on SCO UNIX. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5 $as_echo_n "checking for strftime in -lintl... " >&6; } -if test "${ac_cv_lib_intl_strftime+set}" = set; then : +if ${ac_cv_lib_intl_strftime+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -23943,7 +24040,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5 $as_echo "$ac_cv_lib_intl_strftime" >&6; } -if test "x$ac_cv_lib_intl_strftime" = x""yes; then : +if test "x$ac_cv_lib_intl_strftime" = xyes; then : $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h LIBS="-lintl $LIBS" @@ -23955,13 +24052,13 @@ for ac_func in vprintf do : ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf" -if test "x$ac_cv_func_vprintf" = x""yes; then : +if test "x$ac_cv_func_vprintf" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VPRINTF 1 _ACEOF ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt" -if test "x$ac_cv_func__doprnt" = x""yes; then : +if test "x$ac_cv_func__doprnt" = xyes; then : $as_echo "#define HAVE_DOPRNT 1" >>confdefs.h @@ -23975,7 +24072,7 @@ # for constant arguments. Useless! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 $as_echo_n "checking for working alloca.h... " >&6; } -if test "${ac_cv_working_alloca_h+set}" = set; then : +if ${ac_cv_working_alloca_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24008,7 +24105,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 $as_echo_n "checking for alloca... " >&6; } -if test "${ac_cv_func_alloca_works+set}" = set; then : +if ${ac_cv_func_alloca_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24027,7 +24124,7 @@ #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ -char *alloca (); +void *alloca (size_t); # endif # endif # endif @@ -24071,7 +24168,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } -if test "${ac_cv_os_cray+set}" = set; then : +if ${ac_cv_os_cray+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24112,7 +24209,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 $as_echo_n "checking stack direction for C alloca... " >&6; } -if test "${ac_cv_c_stack_direction+set}" = set; then : +if ${ac_cv_c_stack_direction+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -24122,23 +24219,20 @@ /* end confdefs.h. */ $ac_includes_default int -find_stack_direction () +find_stack_direction (int *addr, int depth) { - static char *addr = 0; - auto char dummy; - if (addr == 0) - { - addr = &dummy; - return find_stack_direction (); - } - else - return (&dummy > addr) ? 1 : -1; + int dir, dummy = 0; + if (! addr) + addr = &dummy; + *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; + dir = depth ? find_stack_direction (addr, depth - 1) : 0; + return dir + dummy; } int -main () +main (int argc, char **argv) { - return find_stack_direction () < 0; + return find_stack_direction (0, argc + !argv + 20) < 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : @@ -24164,7 +24258,7 @@ # -lseq on Dynix/PTX, -lgen on Unixware. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getmntent" >&5 $as_echo_n "checking for library containing getmntent... " >&6; } -if test "${ac_cv_search_getmntent+set}" = set; then : +if ${ac_cv_search_getmntent+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -24198,11 +24292,11 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_getmntent+set}" = set; then : + if ${ac_cv_search_getmntent+:} false; then : break fi done -if test "${ac_cv_search_getmntent+set}" = set; then : +if ${ac_cv_search_getmntent+:} false; then : else ac_cv_search_getmntent=no @@ -24227,7 +24321,7 @@ for ac_func in getmntinfo do : ac_fn_c_check_func "$LINENO" "getmntinfo" "ac_cv_func_getmntinfo" -if test "x$ac_cv_func_getmntinfo" = x""yes; then : +if test "x$ac_cv_func_getmntinfo" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETMNTINFO 1 _ACEOF @@ -24238,7 +24332,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether closedir returns void" >&5 $as_echo_n "checking whether closedir returns void... " >&6; } -if test "${ac_cv_func_closedir_void+set}" = set; then : +if ${ac_cv_func_closedir_void+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -24280,7 +24374,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 $as_echo_n "checking whether setpgrp takes no argument... " >&6; } -if test "${ac_cv_func_setpgrp_void+set}" = set; then : +if ${ac_cv_func_setpgrp_void+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -24321,7 +24415,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettext in -lintl" >&5 $as_echo_n "checking for gettext in -lintl... " >&6; } -if test "${ac_cv_lib_intl_gettext+set}" = set; then : +if ${ac_cv_lib_intl_gettext+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -24355,14 +24449,14 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_gettext" >&5 $as_echo "$ac_cv_lib_intl_gettext" >&6; } -if test "x$ac_cv_lib_intl_gettext" = x""yes; then : +if test "x$ac_cv_lib_intl_gettext" = xyes; then : LIBS="$LIBS -lintl" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpwnam in -lsun" >&5 $as_echo_n "checking for getpwnam in -lsun... " >&6; } -if test "${ac_cv_lib_sun_getpwnam+set}" = set; then : +if ${ac_cv_lib_sun_getpwnam+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -24396,7 +24490,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sun_getpwnam" >&5 $as_echo "$ac_cv_lib_sun_getpwnam" >&6; } -if test "x$ac_cv_lib_sun_getpwnam" = x""yes; then : +if test "x$ac_cv_lib_sun_getpwnam" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBSUN 1 _ACEOF @@ -24409,7 +24503,7 @@ for ac_header in zlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" -if test "x$ac_cv_header_zlib_h" = x""yes; then : +if test "x$ac_cv_header_zlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_ZLIB_H 1 _ACEOF @@ -24420,7 +24514,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for deflate in -lz" >&5 $as_echo_n "checking for deflate in -lz... " >&6; } -if test "${ac_cv_lib_z_deflate+set}" = set; then : +if ${ac_cv_lib_z_deflate+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -24454,7 +24548,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_deflate" >&5 $as_echo "$ac_cv_lib_z_deflate" >&6; } -if test "x$ac_cv_lib_z_deflate" = x""yes; then : +if test "x$ac_cv_lib_z_deflate" = xyes; then : ZLIBS="-lz" fi @@ -24474,7 +24568,7 @@ for ac_header in crypt.h do : ac_fn_c_check_header_mongrel "$LINENO" "crypt.h" "ac_cv_header_crypt_h" "$ac_includes_default" -if test "x$ac_cv_header_crypt_h" = x""yes; then : +if test "x$ac_cv_header_crypt_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_CRYPT_H 1 _ACEOF @@ -24485,7 +24579,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5 $as_echo_n "checking for crypt in -lcrypt... " >&6; } -if test "${ac_cv_lib_crypt_crypt+set}" = set; then : +if ${ac_cv_lib_crypt_crypt+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -24519,7 +24613,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5 $as_echo "$ac_cv_lib_crypt_crypt" >&6; } -if test "x$ac_cv_lib_crypt_crypt" = x""yes; then : +if test "x$ac_cv_lib_crypt_crypt" = xyes; then : CRYPT_LIBS="-lcrypt" fi @@ -24531,10 +24625,29 @@ fi +for ac_header in uthash.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "uthash.h" "ac_cv_header_uthash_h" "$ac_includes_default" +if test "x$ac_cv_header_uthash_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_UTHASH_H 1 +_ACEOF + have_uthash=yes +else + have_uthash=no +fi + +done + +if test $have_uthash = no ; then + echo "No uthash library. Will use own uthash/uthash.h" + cp ${srcdir}/uthash/uthash.h ${srcdir}/src +fi + for ac_header in librsync.h do : ac_fn_c_check_header_mongrel "$LINENO" "librsync.h" "ac_cv_header_librsync_h" "$ac_includes_default" -if test "x$ac_cv_header_librsync_h" = x""yes; then : +if test "x$ac_cv_header_librsync_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBRSYNC_H 1 _ACEOF @@ -24545,7 +24658,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rs_delta_begin in -lrsync" >&5 $as_echo_n "checking for rs_delta_begin in -lrsync... " >&6; } -if test "${ac_cv_lib_rsync_rs_delta_begin+set}" = set; then : +if ${ac_cv_lib_rsync_rs_delta_begin+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -24579,7 +24692,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rsync_rs_delta_begin" >&5 $as_echo "$ac_cv_lib_rsync_rs_delta_begin" >&6; } -if test "x$ac_cv_lib_rsync_rs_delta_begin" = x""yes; then : +if test "x$ac_cv_lib_rsync_rs_delta_begin" = xyes; then : RSYNC_LIBS="-lrsync" fi @@ -24599,7 +24712,7 @@ for ac_header in ncurses.h do : ac_fn_c_check_header_mongrel "$LINENO" "ncurses.h" "ac_cv_header_ncurses_h" "$ac_includes_default" -if test "x$ac_cv_header_ncurses_h" = x""yes; then : +if test "x$ac_cv_header_ncurses_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_NCURSES_H 1 _ACEOF @@ -24610,7 +24723,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for curs_set in -lncurses" >&5 $as_echo_n "checking for curs_set in -lncurses... " >&6; } -if test "${ac_cv_lib_ncurses_curs_set+set}" = set; then : +if ${ac_cv_lib_ncurses_curs_set+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -24644,7 +24757,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_curs_set" >&5 $as_echo "$ac_cv_lib_ncurses_curs_set" >&6; } -if test "x$ac_cv_lib_ncurses_curs_set" = x""yes; then : +if test "x$ac_cv_lib_ncurses_curs_set" = xyes; then : NCURSES_LIBS="-lncurses" fi @@ -24699,7 +24812,7 @@ for ac_header in afs/stds.h do : ac_fn_c_check_header_mongrel "$LINENO" "afs/stds.h" "ac_cv_header_afs_stds_h" "$ac_includes_default" -if test "x$ac_cv_header_afs_stds_h" = x""yes; then : +if test "x$ac_cv_header_afs_stds_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_AFS_STDS_H 1 _ACEOF @@ -24761,7 +24874,7 @@ have_extended_acl=no if test x$support_acl = xyes -o x$support_acl = xauto; then ac_fn_c_check_header_mongrel "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_acl_h" = x""yes; then : +if test "x$ac_cv_header_sys_acl_h" = xyes; then : $as_echo "#define HAVE_SYS_ACL_H 1" >>confdefs.h @@ -24769,7 +24882,7 @@ ac_fn_c_check_func "$LINENO" "acl_get_file" "ac_cv_func_acl_get_file" -if test "x$ac_cv_func_acl_get_file" = x""yes; then : +if test "x$ac_cv_func_acl_get_file" = xyes; then : have_acl=yes @@ -24777,7 +24890,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acl_get_file in -lacl" >&5 $as_echo_n "checking for acl_get_file in -lacl... " >&6; } -if test "${ac_cv_lib_acl_acl_get_file+set}" = set; then : +if ${ac_cv_lib_acl_acl_get_file+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -24811,7 +24924,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_acl_acl_get_file" >&5 $as_echo "$ac_cv_lib_acl_acl_get_file" >&6; } -if test "x$ac_cv_lib_acl_acl_get_file" = x""yes; then : +if test "x$ac_cv_lib_acl_acl_get_file" = xyes; then : have_acl=yes; if test $have_afs = yes; then @@ -24828,7 +24941,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acl_get_file in -lpacl" >&5 $as_echo_n "checking for acl_get_file in -lpacl... " >&6; } -if test "${ac_cv_lib_pacl_acl_get_file+set}" = set; then : +if ${ac_cv_lib_pacl_acl_get_file+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -24862,7 +24975,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pacl_acl_get_file" >&5 $as_echo "$ac_cv_lib_pacl_acl_get_file" >&6; } -if test "x$ac_cv_lib_pacl_acl_get_file" = x""yes; then : +if test "x$ac_cv_lib_pacl_acl_get_file" = xyes; then : have_acl=yes; FDLIBS="-lpacl $FDLIBS" @@ -24871,7 +24984,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acltotext in -lsec" >&5 $as_echo_n "checking for acltotext in -lsec... " >&6; } -if test "${ac_cv_lib_sec_acltotext+set}" = set; then : +if ${ac_cv_lib_sec_acltotext+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -24905,14 +25018,14 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sec_acltotext" >&5 $as_echo "$ac_cv_lib_sec_acltotext" >&6; } -if test "x$ac_cv_lib_sec_acltotext" = x""yes; then : +if test "x$ac_cv_lib_sec_acltotext" = xyes; then : have_acl=yes; FDLIBS="-lsec $FDLIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acl_totext in -lsec" >&5 $as_echo_n "checking for acl_totext in -lsec... " >&6; } -if test "${ac_cv_lib_sec_acl_totext+set}" = set; then : +if ${ac_cv_lib_sec_acl_totext+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -24946,7 +25059,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sec_acl_totext" >&5 $as_echo "$ac_cv_lib_sec_acl_totext" >&6; } -if test "x$ac_cv_lib_sec_acl_totext" = x""yes; then : +if test "x$ac_cv_lib_sec_acl_totext" = xyes; then : have_extended_acl=yes @@ -25005,7 +25118,7 @@ have_xattr=no if test x$support_xattr = xyes -o x$support_xattr = xauto; then ac_fn_c_check_header_mongrel "$LINENO" "sys/extattr.h" "ac_cv_header_sys_extattr_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_extattr_h" = x""yes; then : +if test "x$ac_cv_header_sys_extattr_h" = xyes; then : $as_echo "#define HAVE_SYS_EXTATTR_H 1" >>confdefs.h @@ -25013,7 +25126,7 @@ ac_fn_c_check_header_mongrel "$LINENO" "libutil.h" "ac_cv_header_libutil_h" "$ac_includes_default" -if test "x$ac_cv_header_libutil_h" = x""yes; then : +if test "x$ac_cv_header_libutil_h" = xyes; then : $as_echo "#define HAVE_LIBUTIL_H 1" >>confdefs.h @@ -25099,7 +25212,7 @@ if test $have_extattr_string_in_libc = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extattr_namespace_to_string extattr_string_to_namespace in -lutil" >&5 $as_echo_n "checking for extattr_namespace_to_string extattr_string_to_namespace in -lutil... " >&6; } -if test "${ac_cv_lib_util_extattr_namespace_to_string_extattr_string_to_namespace+set}" = set; then : +if ${ac_cv_lib_util_extattr_namespace_to_string_extattr_string_to_namespace+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -25133,7 +25246,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_extattr_namespace_to_string_extattr_string_to_namespace" >&5 $as_echo "$ac_cv_lib_util_extattr_namespace_to_string_extattr_string_to_namespace" >&6; } -if test "x$ac_cv_lib_util_extattr_namespace_to_string_extattr_string_to_namespace" = x""yes; then : +if test "x$ac_cv_lib_util_extattr_namespace_to_string_extattr_string_to_namespace" = xyes; then : $as_echo "#define HAVE_EXTATTR_NAMESPACE_TO_STRING 1" >>confdefs.h @@ -25151,7 +25264,7 @@ if test $have_xattr = no; then ac_fn_c_check_header_mongrel "$LINENO" "sys/xattr.h" "ac_cv_header_sys_xattr_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_xattr_h" = x""yes; then : +if test "x$ac_cv_header_sys_xattr_h" = xyes; then : $as_echo "#define HAVE_SYS_XATTR_H 1" >>confdefs.h @@ -25213,7 +25326,7 @@ if test $have_xattr = no; then ac_fn_c_check_header_mongrel "$LINENO" "sys/attr.h" "ac_cv_header_sys_attr_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_attr_h" = x""yes; then : +if test "x$ac_cv_header_sys_attr_h" = xyes; then : $as_echo "#define HAVE_SYS_ATTR_H 1" >>confdefs.h @@ -25221,7 +25334,7 @@ ac_fn_c_check_header_mongrel "$LINENO" "sys/nvpair.h" "ac_cv_header_sys_nvpair_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_nvpair_h" = x""yes; then : +if test "x$ac_cv_header_sys_nvpair_h" = xyes; then : $as_echo "#define HAVE_SYS_NVPAIR_H 1" >>confdefs.h @@ -25229,7 +25342,7 @@ ac_fn_c_check_header_mongrel "$LINENO" "attr.h" "ac_cv_header_attr_h" "$ac_includes_default" -if test "x$ac_cv_header_attr_h" = x""yes; then : +if test "x$ac_cv_header_attr_h" = xyes; then : $as_echo "#define HAVE_ATTR_H 1" >>confdefs.h @@ -25271,7 +25384,7 @@ if test $have_xattr = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nvlist_next_nvpair in -lnvpair" >&5 $as_echo_n "checking for nvlist_next_nvpair in -lnvpair... " >&6; } -if test "${ac_cv_lib_nvpair_nvlist_next_nvpair+set}" = set; then : +if ${ac_cv_lib_nvpair_nvlist_next_nvpair+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -25305,7 +25418,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nvpair_nvlist_next_nvpair" >&5 $as_echo "$ac_cv_lib_nvpair_nvlist_next_nvpair" >&6; } -if test "x$ac_cv_lib_nvpair_nvlist_next_nvpair" = x""yes; then : +if test "x$ac_cv_lib_nvpair_nvlist_next_nvpair" = xyes; then : $as_echo "#define HAVE_NVLIST_NEXT_NVPAIR 1" >>confdefs.h @@ -25357,7 +25470,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cap_set_proc in -lcap" >&5 $as_echo_n "checking for cap_set_proc in -lcap... " >&6; } -if test "${ac_cv_lib_cap_cap_set_proc+set}" = set; then : +if ${ac_cv_lib_cap_cap_set_proc+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -25391,7 +25504,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cap_cap_set_proc" >&5 $as_echo "$ac_cv_lib_cap_cap_set_proc" >&6; } -if test "x$ac_cv_lib_cap_cap_set_proc" = x""yes; then : +if test "x$ac_cv_lib_cap_cap_set_proc" = xyes; then : CAP_LIBS="-lcap" else CAP_LIBS= @@ -25543,10 +25656,21 @@ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && + if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} @@ -25578,7 +25702,7 @@ -: ${CONFIG_STATUS=./config.status} +: "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" @@ -25679,6 +25803,7 @@ IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -25874,16 +25999,16 @@ # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -25943,28 +26068,16 @@ as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -25986,7 +26099,7 @@ # values after options handling. ac_log=" This file was extended by $as_me, which was -generated by GNU Autoconf 2.67. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -26052,10 +26165,10 @@ ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.67, +configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -26145,7 +26258,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' @@ -26546,7 +26659,7 @@ "$PFILES") CONFIG_FILES="$CONFIG_FILES $PFILES" ;; "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -26569,9 +26682,10 @@ # after its creation but before its name has been assigned to `$tmp'. $debug || { - tmp= + tmp= ac_tmp= trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } @@ -26579,12 +26693,13 @@ { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" + test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -26623,13 +26738,13 @@ ac_cs_awk_cr=$ac_cr fi -echo 'BEGIN {' >"$tmp/subs1.awk" && +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF # Create commands to substitute file output variables. { echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && - echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' && + echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' && echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && echo "_ACAWK" && echo "_ACEOF" @@ -26662,7 +26777,7 @@ rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h @@ -26710,7 +26825,7 @@ rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" \$ac_cs_awk_pipe_init @@ -26748,7 +26863,7 @@ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF @@ -26782,7 +26897,7 @@ # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then -cat >"$tmp/defines.awk" <<\_ACAWK || +cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF @@ -26794,8 +26909,8 @@ # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do - ac_t=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_t"; then + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 @@ -26896,7 +27011,7 @@ esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -26915,7 +27030,7 @@ for ac_f do case $ac_f in - -) ac_f="$tmp/stdin";; + -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. @@ -26924,7 +27039,7 @@ [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" @@ -26950,8 +27065,8 @@ esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -27083,24 +27198,25 @@ " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | if $ac_cs_awk_getline; then - $AWK -f "$tmp/subs.awk" + $AWK -f "$ac_tmp/subs.awk" else - $AWK -f "$tmp/subs.awk" | $SHELL -fi >$tmp/out \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + $AWK -f "$ac_tmp/subs.awk" | $SHELL +fi \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} - rm -f "$tmp/stdin" + rm -f "$ac_tmp/stdin" case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; @@ -27111,20 +27227,20 @@ if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" - mv "$tmp/config.h" "$ac_file" \ + mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi ;; @@ -28112,10 +28228,10 @@ fi # clean up any old junk -echo " " -echo "Cleaning up" -echo " " -${MAKE:-make} clean +#echo " " +#echo "Cleaning up" +#echo " " +#${MAKE:-make} clean echo " Configuration on `date`: @@ -28139,6 +28255,7 @@ librsync: ${have_librsync} acl: ${have_acl} xattr: ${have_xattr} + ipv6: ${have_ipv6} " > config.out diff -Nru burp-1.3.0+20120214git/debian/burp.cron.d burp-1.3.10/debian/burp.cron.d --- burp-1.3.0+20120214git/debian/burp.cron.d 2012-02-11 22:20:45.000000000 +0000 +++ burp-1.3.10/debian/burp.cron.d 2012-07-27 00:36:21.000000000 +0000 @@ -5,4 +5,4 @@ # will decide whether it is yet time to do a backup or not. # It might be a good idea to change the numbers below for different clients, # in order to spread the load a bit. -#7,27,47 * * * * root [ -x /sbin/burp ] && /sbin/burp -a t >>/var/log/burp-client 2>&1 +#7,27,47 * * * * root [ -x /usr/sbin/burp ] && /usr/sbin/burp -a t >>/var/log/burp-client 2>&1 diff -Nru burp-1.3.0+20120214git/debian/burp.lintian-overrides burp-1.3.10/debian/burp.lintian-overrides --- burp-1.3.0+20120214git/debian/burp.lintian-overrides 2012-02-11 22:13:08.000000000 +0000 +++ burp-1.3.10/debian/burp.lintian-overrides 2012-07-27 00:36:21.000000000 +0000 @@ -2,6 +2,4 @@ non-standard-file-perm etc/burp/burp-server.conf 0600 != 0644 non-standard-file-perm etc/burp/burp.conf 0600 != 0644 non-standard-dir-perm etc/burp/clientconfdir/ 0700 != 0755 -non-standard-file-perm etc/burp/ssl_cert-client.pem 0600 != 0644 -non-standard-file-perm etc/burp/ssl_cert-server.pem 0600 != 0644 non-standard-dir-perm var/spool/burp/ 0700 != 0755 diff -Nru burp-1.3.0+20120214git/debian/changelog burp-1.3.10/debian/changelog --- burp-1.3.0+20120214git/debian/changelog 2012-06-08 15:50:28.000000000 +0000 +++ burp-1.3.10/debian/changelog 2013-02-15 10:18:18.000000000 +0000 @@ -1,14 +1,90 @@ -burp (1.3.0+20120214git-1ubuntu2) maverick; urgency=low +burp (1.3.10-1ubuntu3) maverick; urgency=low - * Maverick release + * ppa build Maverick - -- Bastiaan Franciscus van den Dikkenberg Fri, 08 Jun 2012 17:50:13 +0200 + -- Bastiaan Franciscus van den Dikkenberg Fri, 15 Feb 2013 11:06:02 +0200 -burp (1.3.0+20120214git-1ubuntu1) lucid; urgency=low - * Lucid Release +burp (1.3.10-1) unstable; urgency=low - -- Bastiaan Franciscus van den Dikkenberg Fri, 08 Jun 2012 17:47:29 +0200 + * New upstream release version 1.3.10 + * Added Tony Cheneau's IPv6 fixes. + * Fixed bug to do with directory_tree=1 that would stop resume working. + * Stop status monitor exiting on terminal resize. + * Small man page corrections about overwriting existing files. + * Don't use mingw64's utime() to set Windows file times, because it doesn't + work on read-only files. + * Tweak to timer_script to let it run with slightly older versions of 'date', + plus the FreeBSD version of 'date'. + * "burp -a l" should say that a backup is finalising. + * Upgraded Windows to gcc-4.6.3. + * Upgraded Windows to zlib-1.2.7. + * Upgraded Windows to openssl-1.0.0j. + * Added pcre-8.31 to Windows. + * Added Gonri Le Bouder's exclude_regex option. + * Add a gentle shutdown server option - send signal 12 to the main process. + * Make librsync errors in phase4 non-fatal. + * Check for errors on gzclose() and fclose(). + + + -- Bastiaan Franciscus van den Dikkenberg Fri, 15 Feb 2013 11:06:02 +0200 + + +burp (1.3.6-1) UNRELEASED; urgency=low + + * New upstream release version 1.3.6 + + -- Bastiaan Franciscus van den Dikkenberg Tue, 29 May 2012 12:45:58 +0200 +burp (1.3.4-2) unstable; urgency=low + + * Fixes building isues with hppa and powerpcspe and sparc64 + Changed debhelper version to (>= 8) + + -- Bastiaan Franciscus van den Dikkenberg Fri, 04 May 2012 11:57:30 +0200 + +burp (1.3.4-1) unstable; urgency=low + + * New upstream release version 1.3.3 + * Fixed make error during build process + * Fixed compression directive not fully functional only numeric value + allowed Debian bug: (Closes: #665843) + * Fix "Build of version 1.3.2 failing" (Closes: #669107) + * Tidy up "Raw partition" (Closes: #670598) + * Prevent client from browsing backups (Closes: #670599) + * Prevent client from running a restore (Closes: #670600) + * Fix "Document or implement ability to prevent *client* from initiating + manual backup (Closes: #670601) + + -- Bastiaan Franciscus van den Dikkenberg Sat, 28 Apr 2012 09:22:05 +0200 + + +burp (1.3.1-1) unstable; urgency=low + + * New upstream release version 1.3.1 + * Switched to Standards-Version 3.9.3 Debian bug: (Closes: #661001) + * respect noopt in DEB_BUILD_OPTIONS. Debian bug: (Closes: #661281) + * Fixed typo in logrotate script Debian bug: (Closes: #660964) + * added debug package Debian bug: (Closes: #661267) + * Add 'exclude_fs =' option for Linux so that you can skip partitions + types (for example, tmpfs) without generating warnings. + * If recovery method 'resume' is set, but the includes/excludes change, + switch to 'use', then start a new backup. + * In the tests, check to see whether it looks like the server has finished + the backup before moving on, rather than just waiting a set amount of time. + * Remove embedded uthash code. It will need to be installed as a dependency. + For example, in Debian, you might run 'apt-get install uthash-dev'. + * Add Bas van den Dikkenberg's tweaks for getting burp into official Debian + and Ubuntu repositories. Burp is now in debian sid and ubuntu precise. + * Make the server tell the client what extra_comms features it supports, so + that, in future, old servers are more likely to work with new clients. + * Improve 'make clean'. + * Add option to strip off leading path components on restore. + * Fix segfault that was happening on the server when SSL_accept() failed. + * Move burp and bedup to /usr/sbin (you need to check that any cron jobs + are pointing there too). + * Moved list of things to do to https://github.com/grke/burp/issues + + -- Bastiaan Franciscus van den Dikkenberg Mon, 27 Feb 2012 15:34:17 +0100 burp (1.3.0+20120214git-1) unstable; urgency=low @@ -19,10 +95,10 @@ * If recovery method 'resume' is set, but the includes/excludes change, switch to 'use', then start a new backup. * In the tests, check to see whether it looks like the server has finished - the backup before moving on, rather than just waiting a set + the backup before moving on, rather than just waiting a set amount of time.(Closes: #659462) * Add man pages for bedup and burp_ca. - * Remove embedded uthash code. It will need to be installed + * Remove embedded uthash code. It will need to be installed as a dependency. (Closes: #659454) -- Bastiaan Franciscus van den Dikkenberg Tue, 14 Feb 2012 15:47:01 +0100 @@ -38,7 +114,7 @@ * added forwarded header to patches * removed changelog entries from patches * removed debian/README (Closes: #659453) - * removed blank MAILTO header in cronjob and + * removed blank MAILTO header in cronjob and redirected output to /var/log/burp-client (Closes: #659452) * added extra logrotate for /var/log/burp-client * changed /var/run to /run (Closes: #659464) @@ -68,3 +144,77 @@ -- Bastiaan Franciscus van den Dikkenberg Fri, 10 Feb 2012 17:14:13 +0100 + +Old Changelog: + +burp (1.3.0) unstable; urgency=low + + * update to 1.3.0 + + -- Graham Keeling Fri, 27 January 2012 17:00:00 +0000 + +burp (1.2.7) unstable; urgency=low + + * update to 1.2.7 + + -- Graham Keeling Fri, 30 December 2011 22:00:00 +0000 + +burp (1.2.5) unstable; urgency=low + + * update to 1.2.5 + + -- Graham Keeling Sat, 26 November 2011 23:30:00 +0000 + +burp (1.2.4) unstable; urgency=low + + * update to 1.2.4 + + -- Graham Keeling Thu, 22 November 2011 20:00:00 +0000 + +burp (1.2.2) unstable; urgency=low + + * update to 1.2.2 + + -- Graham Keeling Thu, 29 September 2011 21:00:00 +0000 + +burp (1.2.0) unstable; urgency=low + + * update to 1.2.0 + + -- Graham Keeling Fri, 09 September 2011 20:20:00 +0000 + +burp (1.1.70) unstable; urgency=low + + * update to 1.1.70 + + -- Graham Keeling Tue, 26 July 2011 22:00:00 +0000 + +burp (1.1.65) unstable; urgency=low + + * update to 1.1.65 + + -- Graham Keeling Mon, 27 June 2011 21:40:00 +0000 + +burp (1.1.57) unstable; urgency=low + + * update to 1.1.57 + + -- Graham Keeling Tue, 06 June 2011 23:00:00 +0000 + +burp (1.1.55) unstable; urgency=low + + * update to 1.1.55 + + -- Patrick Koppen Sat, 14 May 2011 21:48:17 +0200 + +burp (1.1.51+git0) unstable; urgency=low + + * debian package + + -- Patrick Koppen Mon, 09 May 2011 21:24:24 +0200 + +burp (1.1.51) unstable; urgency=low + + * Initial Release. + + -- Patrick Koppen Mon, 09 May 2011 20:48:57 +0200 diff -Nru burp-1.3.0+20120214git/debian/control burp-1.3.10/debian/control --- burp-1.3.0+20120214git/debian/control 2012-02-14 13:35:11.000000000 +0000 +++ burp-1.3.10/debian/control 2012-07-27 00:36:21.000000000 +0000 @@ -2,8 +2,8 @@ Section: utils Priority: extra Maintainer: Bastiaan Franciscus van den Dikkenberg -Build-Depends: debhelper (>= 7.0.50~), autotools-dev, libncurses5-dev, libssl-dev, zlib1g-dev, librsync-dev, libacl1-dev, libattr1-dev, uthash-dev -Standards-Version: 3.9.2 +Build-Depends: debhelper (>= 8), autotools-dev, libncurses5-dev, libssl-dev, zlib1g-dev, librsync-dev, libacl1-dev, libattr1-dev, uthash-dev, openssl +Standards-Version: 3.9.3 Homepage: http://burp.grke.net/ Vcs-Git: git://github.com/grke/burp.git #Vcs-Browser: http://git.debian.org/?p=collab-maint/burp.git;a=summary @@ -11,7 +11,18 @@ Package: burp Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} -Description: simple network BackUp and Restore Program +Description: Simple cross-platform network BackUp and Restore Program Burp is a client/server backup system that saves space and network usage by using librsync, and uses the Volume Snapshot Service when backing up Windows clients. + +Package: burp-dbg +Architecture: any +Section: debug +Depends: burp (= ${binary:Version}), ${misc:Depends} +Description: debugging symbols for Burp + Burp is a client/server backup system that saves space and network + usage by using librsync, and uses the Volume Snapshot Service when + backing up Windows clients. + . + This package contains debugging symbols for burp. diff -Nru burp-1.3.0+20120214git/debian/copyright burp-1.3.10/debian/copyright --- burp-1.3.0+20120214git/debian/copyright 2012-02-06 22:59:24.000000000 +0000 +++ burp-1.3.10/debian/copyright 2012-07-27 00:36:21.000000000 +0000 @@ -1,4 +1,4 @@ -Format: http://dep.debian.net/deps/dep5 +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: burp Source: http://burp.grke.net/ Upstream-Contact: Graham Keeling @@ -325,7 +325,7 @@ END OF TERMS AND CONDITIONS Files: debian/* -Copyright: 2012 Bas van den Dikkenberg +Copyright: 2012 Bastiaan Franciscus van den Dikkenberg License: GPL-2+ This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -340,5 +340,5 @@ along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,MA 02110-1301, USA. . On Debian GNU/Linux systems, the complete text of the GNU General - Public License can be found in `/usr/share/common-licenses/GPL'. + Public License can be found in `/usr/share/common-licenses/GPL-2'. diff -Nru burp-1.3.0+20120214git/debian/init burp-1.3.10/debian/init --- burp-1.3.0+20120214git/debian/init 2012-02-07 12:10:30.000000000 +0000 +++ burp-1.3.10/debian/init 2012-07-27 00:36:21.000000000 +0000 @@ -17,7 +17,7 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin DESC=burp # Introduce a short description here NAME=burp # Introduce the short server's name here -DAEMON=/sbin/burp # Introduce the server's location here +DAEMON=/usr/sbin/burp # Introduce the server's location here DAEMON_ARGS="" # Arguments to run the daemon with PIDFILE=/var/run/burp.server.pid SCRIPTNAME=/etc/init.d/$NAME diff -Nru burp-1.3.0+20120214git/debian/logrotate burp-1.3.10/debian/logrotate --- burp-1.3.0+20120214git/debian/logrotate 2012-02-11 22:19:03.000000000 +0000 +++ burp-1.3.10/debian/logrotate 2012-07-27 00:36:21.000000000 +0000 @@ -3,7 +3,7 @@ missingok rotate 7 postrotate - invoke-rd.d burp reload >/dev/null + invoke-rc.d burp reload >/dev/null endscript compress notifempty diff -Nru burp-1.3.0+20120214git/debian/patches/Backup-phase2-compilation-problem burp-1.3.10/debian/patches/Backup-phase2-compilation-problem --- burp-1.3.0+20120214git/debian/patches/Backup-phase2-compilation-problem 2012-02-13 09:53:28.000000000 +0000 +++ burp-1.3.10/debian/patches/Backup-phase2-compilation-problem 1970-01-01 00:00:00.000000000 +0000 @@ -1,31 +0,0 @@ -Description: Backup phase2 compilation problem - . - burp (1.3.0-4) unstable; urgency=low - . - * Compilation bug solved for in farm (Closes: #659692) -Author: Graham Keeling - - ---- -The information above should follow the Patch Tagging Guidelines, please -checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here -are templates for supplementary fields that you might want to add: - -Origin: vendor -Bug-Debian: http://bugs.debian.org/ -Bug-Debian: http://bugs.debian.org/659692 -Forwarded: keeling@spamcop.net -Reviewed-By: Bastiaan Franciscus van den Dikkenberg -Last-Update: 2012-02-13 - ---- burp-1.3.0.orig/src/backup_phase2_server.c -+++ burp-1.3.0/src/backup_phase2_server.c -@@ -569,7 +569,7 @@ int backup_phase2_server(gzFile *cmanfp, - if(!(p2fp=open_file(phase2data, "r+b"))) - goto error; - -- if(resume && do_resume(p1zp, p2fp, ucfp, cmanfp, dpth, cconf, -+ if(resume && do_resume(p1zp, p2fp, ucfp, *cmanfp, dpth, cconf, - p1cntr, cntr)) - goto error; - diff -Nru burp-1.3.0+20120214git/debian/patches/Updated-man-pages burp-1.3.10/debian/patches/Updated-man-pages --- burp-1.3.0+20120214git/debian/patches/Updated-man-pages 2012-02-14 13:15:44.000000000 +0000 +++ burp-1.3.10/debian/patches/Updated-man-pages 1970-01-01 00:00:00.000000000 +0000 @@ -1,72 +0,0 @@ -Description: Updates man pages -Author: Bastiaan Franciscus van den Dikkenberg - ---- -Last-Update: 2012-02-14 -Forwarded: keeling@spamcop.net - ---- burp-1.3.1.orig/manpages/bedup.8 -+++ burp-1.3.1/manpages/bedup.8 -@@ -1,15 +1,15 @@ --.\" manual page [] for bedup --.\" SH section heading --.\" SS subsection heading --.\" LP paragraph --.\" IP indented paragraph --.\" TP hanging label --.TH bedup 8 "bedup" -+.\"Created with GNOME Manpages Editor Wizard -+.\"http://sourceforge.net/projects/gmanedit2 -+.TH bedup 8 "February 10, 2012" "" "bedup" -+ - .SH NAME --bedup -+bedup \- program for deduplication program with additional knowledge of burp -+ - .SH SYNOPSIS --.B bedup: [options] --.SH DESCRIPTION -+.B bedup -+.RI [ options ] -+.br -+ - .LP - A file deduplication program with additional knowledge of burp storage directories. This program comes with the burp backup and restore package. - -@@ -36,10 +36,8 @@ Non-burp mode. Deduplicate any (set of) - \fB\-v\fR \fB\fR - Print version and exit.\fR - .TP --\fB\Defaults\fR \fB\fR - By default, bedup will read /etc/burp/burp.conf and deduplicate client storage directories using special knowledge of the structure.\fR - .TP --\fB\Defaults\fR \fB\fR - With '-n', this knowledge is turned off and you have to specify the directories to deduplicate on the command line. Running with '-n' is therefore dangerous if you are deduplicating burp storage directories. - - .SH BUGS ---- burp-1.3.1.orig/manpages/burp_ca.8 -+++ burp-1.3.1/manpages/burp_ca.8 -@@ -1,15 +1,13 @@ --.\" manual page [] for burp_ca --.\" SH section heading --.\" SS subsection heading --.\" LP paragraph --.\" IP indented paragraph --.\" TP hanging label --.TH burp_ca 8 "burp_ca" -+.TH burp_ca 8 "February 10, 2012" "" "burp_ca" -+ - .SH NAME --bedup -+burp_ca \- program for generating certificates for use with burp -+ - .SH SYNOPSIS --.B burp_ca: [options] --.SH DESCRIPTION -+.B burp_ca -+.RI [ options ] -+.br -+ - .LP - A script for generating certificates for use with burp. This script comes with the burp backup and restore package, and was contributed by Patrick Koppen. - diff -Nru burp-1.3.0+20120214git/debian/patches/series burp-1.3.10/debian/patches/series --- burp-1.3.0+20120214git/debian/patches/series 2012-02-14 13:14:36.000000000 +0000 +++ burp-1.3.10/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -Backup-phase2-compilation-problem -Updated-man-pages diff -Nru burp-1.3.0+20120214git/debian/rules burp-1.3.10/debian/rules --- burp-1.3.0+20120214git/debian/rules 2012-02-14 17:53:59.000000000 +0000 +++ burp-1.3.10/debian/rules 2012-07-27 00:36:21.000000000 +0000 @@ -9,18 +9,22 @@ override_dh_install: dh_install - install -m 0644 configs/certs/CA/CA.cnf debian/burp/etc/burp/ - install -m 0755 configs/certs/CA/burp_ca debian/burp/usr/sbin/ override_dh_fixperms: dh_fixperms chmod 0600 debian/burp/etc/burp/burp.conf chmod 0600 debian/burp/etc/burp/burp-server.conf - chmod 0600 debian/burp/etc/burp/ssl_cert-client.pem - chmod 0600 debian/burp/etc/burp/ssl_cert-server.pem chmod 0700 debian/burp/etc/burp/clientconfdir chmod 0700 debian/burp/var/spool/burp override_dh_auto_configure: ./configure +override_dh_strip: + dh_strip --dbg-package=burp-dbg + +override_dh_auto_install: + dh_auto_install --destdir=debian/burp + +override_dh_installdocs: + dh_installdocs --link-doc=burp diff -Nru burp-1.3.0+20120214git/docs/burp_ca.txt burp-1.3.10/docs/burp_ca.txt --- burp-1.3.0+20120214git/docs/burp_ca.txt 2012-02-13 13:13:38.000000000 +0000 +++ burp-1.3.10/docs/burp_ca.txt 2012-07-27 00:36:21.000000000 +0000 @@ -1,11 +1,112 @@ -CA and cert HOWTO: +Certificate Authority (CA) and certificate how-to +------------------------------------------------- + +As of burp-1.3.2, the process of generating SSL certificates has been +automated. + +Effectively, the automation means that you can set up a new client on the +server (in /etc/burp/clientconfdir/), and the first client to connect +that matches that client name and password will get its certificate signed +and given back. If a different, second client, happens to connect with the +same client name and password, it will be rejected because it doesn't have +a matching certificate. + + +Server CA options: +ca_conf = /etc/burp/CA.cnf +ca_name = burpCA +ca_server_name = burpserver +ca_burp_ca = /usr/sbin/burp_ca + +Server SSL options: +ssl_dhfile = /etc/burp/dhfile.pem +ssl_cert_ca = /etc/burp/ssl_cert_ca.pem +ssl_cert = /etc/burp/ssl_cert-server.pem +ssl_key = /etc/burp/ssl_cert-server.key +ssl_key_password = password + +If you do not want the server to automate the CA stuff, do not set ca_conf. + +When the server starts, the ca_conf file will be read, and the CA_DIR value +from that file will be read. +If the CA_DIR directory already exists, the automatic CA setup finishes here. + +Next, if ssl_dhfile does not exist, an appropriate dhfile will be generated. +The dhfile is used in encypting the SSL connection with the Diffie-Hellman +protocol. + +Next, the CA directory is initialised using ca_burp_ca, which should point to +the burp_ca script. +The name of the CA will be the value of ca_name. + +A key for the burp server is then generated, along with a certificate signing +request to give to the CA. The CA then signs the request. The ssl_cert_ca, +ssl_cert and ssl_key paths are then overwritten with symlinks to the new keys +and certificates. + +This concludes the CA setup on the server. + +----- + +Client CA options: +ca_burp_ca=/usr/sbin/burp_ca +ca_csr_dir=/etc/burp/CA + +Client SSL options: +ssl_cert_ca = /etc/burp/ssl_cert_ca.pem +ssl_cert = /etc/burp/ssl_cert-client.pem +ssl_key = /etc/burp/ssl_cert-client.key +ssl_key_password = password +ssl_peer_cn = burpserver + +If you do not want the client to automate the CA stuff, do not set ca_burp_ca. +Clients as of 1.3.2 will not include the old default certificates, so if you +want to install new clients connecting to a server that is using the old +certificates, you will also have to copy the old certificates onto the client. + +When the client runs (for example, with 'burp -a b'), it will try to connect +to the server using the burp client name (cname) and password. If you haven't +got the client name and password right, everything stops here. + +If the path to ssl_key exists, the client will not try to generate a key and +certificate signing request - it assumes that this has already been done. +Otherwise, a client key is generated at the path of ssl_key, and a certificate +request is generated in the ca_csr_dir directory, named after the client name. + +This is copied to CA_DIR on the server, unless the server already has a file +named the same, or a signed certificate with the same name. If either already +exists, the server will reject the request. + +If the server accepts the request, it will generate a signed certificate +and send it back to the client, along with the CA certificate. +The ssl_cert_ca and ssl_cert paths will be overwritten on the client, and +burp.conf will be rewritten with ssl_peer_cn set correctly. + +The connection between server and client is dropped and the client will +reconnect using the new certificates to start the real work (for example, a +backup). In previous versions of burp, you needed to set ssl_peer_cn in the +client's clientconfdir file on the server. You don't need to set this any +more, because the server will default to using the client name instead. + +This concludes the certificate setup on the client. + +----- + + + + + +The following is the (slightly tweaked) original documentation for burp_ca. It +might still be of use in order to help understand the process, or if it is +necessary to do it by hand. Note that there is a burp_ca.bat script if you are +generating certificate signing requests on Windows. + Setup the server: 1) generate Diffie-Hellman Parameters - openssl dhparam -out /etc/burp/dhfile.pem 1024 - chmod 600 /etc/burp/dhfile.pem + burp_ca --dhfile /etc/burp/dhfile.pem 2) Initialise CA @@ -26,26 +127,22 @@ ln -s CA/CA_myCA.crt /etc/burp/ssl_cert_ca.pem ln -s CA/myServer.crt /etc/burp/ssl_cert-server.pem - ln -s CA/myServer,key /etc/burp/ssl_cert-server.key + ln -s CA/myServer.key /etc/burp/ssl_cert-server.key (use the ssl_cert and ssl_key options in burp-server.conf !) -Setup the client (the easy way - unsecure): + +Setup the client (the easy way - insecure) 1) Generate client key and cert __on the server__ burp_ca --name myClient --ca myCA --key --request --sign --batch -2) on the client you dont need a CA, so just - - mkdir /etc/burp/CA - chmod 700 /etc/burp/CA - -3) copy key and certs from server to client +2) copy key and certs from server to client server:/etc/burp/ssl_cert_ca.pem -> client:/etc/burp/ssl_cert_ca.pem - server:/etc/burp/CA/myClient.crt -> client:/etc/burp/ssl_cert-client.crt + server:/etc/burp/CA/myClient.crt -> client:/etc/burp/ssl_cert-client.pem server:/etc/burp/CA/myClient.key -> client:/etc/burp/ssl_cert-client.key chmod 600 /etc/burp/ssl_cert-client.key @@ -62,14 +159,16 @@ 2) Generate client key and cert signing request burp_ca --key --request --name myClient +(on Windows: burp_ca.bat --key --keypath \ + --request --requestpath --name myClient) 3) copy the request from client to the server - client:/etc/burp/CA/myClient.csr -> server:/etc/burp/ssl/myClient.csr + client:/etc/burp/CA/myClient.csr -> server:/etc/burp/CA/myClient.csr 4) sign the request __on the server__ - burp_ca --name myClient --ca myCA --key --request --sign --batch + burp_ca --name myClient --ca myCA --sign --batch 5) copy the certs back to the client @@ -80,6 +179,6 @@ ln -s CA/CA_myCA.crt /etc/burp/ssl_cert_ca.pem ln -s CA/myClient.crt /etc/burp/ssl_cert-client.pem - ln -s CA/myClient,key /etc/burp/ssl_cert-client.key + ln -s CA/myClient.key /etc/burp/ssl_cert-client.key (use the ssl_cert and ssl_key options in burp.conf !) diff -Nru burp-1.3.0+20120214git/docs/debug.txt burp-1.3.10/docs/debug.txt --- burp-1.3.0+20120214git/docs/debug.txt 1970-01-01 00:00:00.000000000 +0000 +++ burp-1.3.10/docs/debug.txt 2012-07-27 00:36:21.000000000 +0000 @@ -0,0 +1,33 @@ +If you have a problem with burp crashing, then I would like to be able +to fix it. +This is easier if the crash is reproducible. That is, if you can run the +client on the command line and watch it crash on demand. + +You then need to run it in a debugger. I use gdb. There are Windows versions +of gdb too. + +How to get gdb for Windows: +Go to the following URL. +http://sourceforge.net/projects/mingw-w64/files/External%20binary%20packages%20%28Win64%20hosted%29/gdb/ +If you are using 32 bit Windows, download one of the i686- variants. +If you are using 64 bit Windows, download one of the x86_64- variants. +Unpack the download to C:\ + +To run gdb on Windows: +cd "C:\Program Files\Burp\bin" +Change mingw32 to mingw64 in the following if you are using the 64 bit version. +C:\mingw32\bin\gdb.exe --args burp.exe (append the arguments that make it crash) +Then enter "run" and the program will start running. +When it crashes, enter "bt", and it will hopefully give you useful information +for tracking down the code that it ran before it crashed. + +Send the output to the mailing list. + +If you are not running Windows, running gdb is exactly the same except that +the paths to gdb and burp are simpler. + + +If you have a problem with a burp server crashing, then the procedure is the +same, except that I always find it easier to run the server in 'no-fork' and +'foreground' mode. You can do this with '-F -n' appended to the server +arguments. diff -Nru burp-1.3.0+20120214git/docs/shuffling.txt burp-1.3.10/docs/shuffling.txt --- burp-1.3.0+20120214git/docs/shuffling.txt 1970-01-01 00:00:00.000000000 +0000 +++ burp-1.3.10/docs/shuffling.txt 2012-07-27 00:36:21.000000000 +0000 @@ -0,0 +1,107 @@ +Originally posted on the mailing list, but possibly helpful to people with +more questions about the shuffling pase, librsync=[0|1], and +hardlinked_archive=[0|1]. + +On Thu, May 10, 2012 at 07:29:09PM +0200, Davide Bozzelli wrote: +> Just a simple question: what is the purpose of the shuffle operation at the +> end of backup ? + +On Thu, May 10, 2012 at 9:54 PM, Graham Keeling wrote: +> Once all the files and bits of files have been transferred to the server, +> it needs to assemble them into the final backup. +> By default, this includes hardlinking files that haven't changed since the +> immediately previous backup into place, patching the ones that have changed +> with the new deltas, generating reverse deltas to be able to recreate the +> previous files that change, and deleting the files that changed from the +> previous backup. + +On Thu, May 10, 2012 at 07:29:09PM +0200, Davide Bozzelli wrote: +> I see that a lot of time is taken by it (even much more that the time taken +> for transfer file). +> +> Is there a way to speedup this process ? + +On Thu, May 10, 2012 at 9:54 PM, Graham Keeling wrote: +> Yes, you can stop it from generating the reverse deltas and deleting the +> original files by setting hardlinked_archive=1, which means that a complete +> copy of every version of each file will be kept. This also has the benefit +> of speeding up restores for older backups, because no reverse deltas need +> to be applied, but it has the disadvantage of taking up more disk space. + +On Tue, May 15, 2012 at 09:20:50PM +0200, Davide Bozzelli wrote: +> Does it means that on every backup run ALL the files need to be trasferred +> ? or onlu the changed ones ? + +On Tue, May 15, 2012 at 10:35:10PM +0100, Graham Keeling wrote: +> Only the changed ones. + + + +On Wed, May 16, 2012 at 11:12:50AM +1200, Jason Haar wrote: +> Just to clarify this for myself and others, can you confirm burp works +> like this +> +> client -> I have one file that is different -> server +> server -> server copies old version (from last backup) into temp dir +> client -> sends whole file using rsync tricks [compression, deltas] -> +> server pointing at temp dir +> +> server then compares this temp file against last backup version, creates +> delta, deletes temp file, creates hardlink to old version and documents +> that file == last backup + delta. This is the "shuffling" phase. Does +> that sum it up? + +No. +In the source, there is a file called 'backup_phases.txt' that explains it: +------ +backup_phase1_client: Scan the client filesystem and send stats to the server. +backup_phase1_server: Receive the stats from the client. + +backup_phase2_server: Request and receive changes from the client and create + an unchanged list and a changed list. +backup_phase2_client: Send the changes that the server requests. The work of + the client is now finished. + +backup_phase3_server: Generate the new manifest list for the backup out of + the unchanged list and the changed list. + +backup_phase4_server: Finish off the backup by jiggling the received data + around and putting everything in the correct place. Need to + generate reverse deltas in order to save space for the previous backup + (unless hardlinked_archive is turned on). +------ +(phase4 is the shuffling bit) + +> One last question about "hardlinked_archive=1". This means for each +> backup, if the file hasn't changed since the last backup, burp hardlinks +> the old file to the new? + +Yes, and it doesn't generate reverse deltas for the files that changed and it +doesn't delete the original files. + +> If "hardlinked_archive=0", then burp... does what? + +It generates reverse deltas for the files that changed and it deletes the +original files. + +> The documentation says that "hardlinked_archive=1" uses more +> diskspace - but I can't understand how. Surely "hardlinked_archive=0" +> would mean burp is keeping a zero-sized delta plus metadata referring to +> the original backup - that must take up about as much diskspace as a +> hardlink? + +No, for at least three reasons: + +a) If a file didn't change and 'hardlinked_archive = 0', burp will just delete +the original and keep the new version, and not keep a delta at all (zero-sized +deltas actually have a few bytes in them). + +b) A complete file plus a reverse delta takes up less space than two complete +files. Imagine you have a 1MB file, back it up, then add a byte to it, then +back it up again. With 'hardlinked_archive = 1', the server stores both +complete versions of the files. With 'hardlinked_archive = 0', the server +stores the most recent version, plus a reverse delta (which contains a small +block that has the effect of removing a byte from the recent version) +so that it can re-generate the older version if it has to. + +c) Your filesystem doesn't have unlimited inodes. A hardlink uses an inode. diff -Nru burp-1.3.0+20120214git/manpages/Makefile burp-1.3.10/manpages/Makefile --- burp-1.3.0+20120214git/manpages/Makefile 2012-02-13 13:13:38.000000000 +0000 +++ burp-1.3.10/manpages/Makefile 1970-01-01 00:00:00.000000000 +0000 @@ -1,152 +0,0 @@ -# -# -# -# This file is pulled in by all the Unix Burp Makefiles -# so it has all the "common" definitions -# - -DATE="" -LSMDATE= -VERSION=1.3.1 -VERNAME=burp-$(VERSION)# -MAINT=Graham Keeling# -MAINTEMAIL=# -WEBMAINT=# -WEBMAINTEMAIL=# -WEBPAGE=# -FTPSITENAME=# -FTPSITEDIR=# -#------------------------------------------------------------------------- - -SHELL = /bin/sh - -# Installation target directories & other installation stuff -prefix = -exec_prefix = -binprefix = -manprefix = -datarootdir = /usr/share -docdir = /usr/share/doc/burp -sbindir = /sbin -libdir = /usr/lib -includedir = /usr/include -sysconfdir = /etc/burp -plugindir = @plugindir@ -scriptdir = @scriptdir@ -archivedir = @archivedir@ -mandir = ${datarootdir}/man -manext = 8 - -NO_ECHO = @ - -# Tools & program stuff -CC = gcc -CPP = gcc -E -CXX = g++ -MV = /bin/mv -RM = /bin/rm -RMF = $(RM) -f -CP = /bin/cp -SED = /bin/sed -AWK = /usr/bin/mawk -ECHO = /bin/echo -CMP = /usr/bin/cmp -TBL = /usr/bin/tbl -AR = /usr/bin/ar -GMAKE = @GMAKE@ -RANLIB = ranlib -MKDIR = /home/graham/burp/autoconf/mkinstalldirs -INSTALL = /usr/bin/install -c -# add the -s to the following in PRODUCTION mode -INSTALL_PROGRAM = $(INSTALL) -m 0755 -INSTALL_LIB = $(INSTALL) -m 755 -INSTALL_DATA = $(INSTALL) -m 644 -INSTALL_SCRIPT = $(INSTALL) -m 0755 -INSTALL_CONFIG = $(INSTALL) -m 640 - -# -# Libtool specific settings -# -DEFAULT_OBJECT_TYPE = .lo -DEFAULT_ARCHIVE_TYPE = .la -DEFAULT_SHARED_OBJECT_TYPE = .la -LIBTOOL = /home/graham/burp/libtool -LIBTOOL_COMPILE = $(LIBTOOL) --silent --tag=CXX --mode=compile -LIBTOOL_LINK = $(LIBTOOL) --silent --tag=CXX --mode=link -LIBTOOL_INSTALL = $(LIBTOOL) --silent --tag=CXX --mode=install -LIBTOOL_INSTALL_FINISH = $(LIBTOOL) --silent --tag=CXX --finish --mode=install -LIBTOOL_UNINSTALL = $(LIBTOOL) --silent --tag=CXX --mode=uninstall -LIBTOOL_CLEAN = $(LIBTOOL) --silent --tag=CXX --mode=clean - -# Flags & libs -CFLAGS = -g -O2 -Wall -fno-strict-aliasing -fno-exceptions -fno-rtti - -CPPFLAGS = -fno-strict-aliasing -fno-exceptions -fno-rtti -LDFLAGS = -TTOOL_LDFLAGS = @TTOOL_LDFLAGS@ -#DEFS = -DHAVE_CONFIG_H -LIBS = -WRAPLIBS = -DINCLUDE = -DLIB = -DB_LIBS = -PYTHON_LIBS = @PYTHON_LIBS@ -PYTHON_INC = @PYTHON_INCDIR@ -OPENSSL_LIBS = -lssl -lcrypto -RSYNC_LIBS = -lrsync -NCURSES_LIBS = -lncurses -CRYPT_LIBS = -lcrypt -ZLIBS = -lz -BDB_CPPFLAGS = @BDB_CPPFLAGS@ -BDB_LIBS = @BDB_LIBS@ - - -# Windows (cygwin) flags -WCFLAGS = -WLDFLAGS = - -# X Include directory -#XINC = @XPM_CFLAGS@ - -# extra libraries needed by X on some systems, X library location -#XLIB = @XPM_LIBS@ -lX11 - -# End of common section of the Makefile -#------------------------------------------------------------------------- - -.PHONY: dummy - -MAN8 = burp.8 burp_ca.8 bedup.8 \ - -MAN1 = - -all: - -nothing: - -depend: - -install: - $(MKDIR) $(DESTDIR)/$(mandir)/man8 - for I in ${MAN8}; \ - do ($(RMF) $$I.gz; gzip -c $$I >$$I.gz; \ - $(INSTALL_DATA) $$I.gz $(DESTDIR)$(mandir)/man8/$$I.gz; \ - rm -f $$I.gz); \ - done - -uninstall: - for I in ${MAN8}; \ - do (rm -f $(DESTDIR)$(mandir)/man8/$$I.gz); \ - done - for I in ${MAN1}; \ - do (rm -f $(DESTDIR)$(mandir)/man1/$$I.gz); \ - done - -clean: - @$(RMF) *~ 1 2 3 *.bak - @find . -name .#* -exec $(RMF) {} \; - -depend: - -distclean: clean - $(RMF) Makefile diff -Nru burp-1.3.0+20120214git/manpages/Makefile.in burp-1.3.10/manpages/Makefile.in --- burp-1.3.0+20120214git/manpages/Makefile.in 2012-02-13 13:13:38.000000000 +0000 +++ burp-1.3.10/manpages/Makefile.in 2012-07-27 00:36:21.000000000 +0000 @@ -32,6 +32,7 @@ clean: @$(RMF) *~ 1 2 3 *.bak + @$(RMF) Makefile @find . -name .#* -exec $(RMF) {} \; depend: diff -Nru burp-1.3.0+20120214git/manpages/bedup.8 burp-1.3.10/manpages/bedup.8 --- burp-1.3.0+20120214git/manpages/bedup.8 2012-02-13 13:13:38.000000000 +0000 +++ burp-1.3.10/manpages/bedup.8 2012-07-27 00:36:21.000000000 +0000 @@ -1,15 +1,15 @@ -.\" manual page [] for bedup -.\" SH section heading -.\" SS subsection heading -.\" LP paragraph -.\" IP indented paragraph -.\" TP hanging label -.TH bedup 8 "bedup" +.\"Created with GNOME Manpages Editor Wizard +.\"http://sourceforge.net/projects/gmanedit2 +.TH bedup 8 "February 10, 2012" "" "bedup" + .SH NAME -bedup +bedup \- program for deduplication program with additional knowledge of burp + .SH SYNOPSIS -.B bedup: [options] -.SH DESCRIPTION +.B bedup +.RI [ options ] +.br + .LP A file deduplication program with additional knowledge of burp storage directories. This program comes with the burp backup and restore package. @@ -36,11 +36,9 @@ \fB\-v\fR \fB\fR Print version and exit.\fR .TP -\fB\Defaults\fR \fB\fR By default, bedup will read /etc/burp/burp.conf and deduplicate client storage directories using special knowledge of the structure.\fR .TP -\fB\Defaults\fR \fB\fR -With '-n', this knowledge is turned off and you have to specify the directories to deduplicate on the command line. Running with '-n' is therefore dangerous if you are deduplicating burp storage directories. +With '\-n', this knowledge is turned off and you have to specify the directories to deduplicate on the command line. Running with '\-n' is therefore dangerous if you are deduplicating burp storage directories. .SH BUGS If you find bugs, please report them to the email list. See the website diff -Nru burp-1.3.0+20120214git/manpages/burp.8 burp-1.3.10/manpages/burp.8 --- burp-1.3.0+20120214git/manpages/burp.8 2012-02-13 13:13:38.000000000 +0000 +++ burp-1.3.10/manpages/burp.8 2012-07-27 00:36:21.000000000 +0000 @@ -15,22 +15,19 @@ .SH SERVER OPTIONS .TP -\fB\-c\fR \fBpath\fR +\fB\-c\fR \fB[path]\fR Short for 'config file'. The argument is a path to the config file. The default is /etc/burp/burp.conf. .TP \fB\-n\fR \fB\fR No forking mode. The program will accept a single query, deal with it, and then -exit. This is useful for debugging. Implies '-F'. +exit. This is useful for debugging. Implies '\-F'. .TP \fB\-F\fR \fB\fR Foreground mode. The server will fork into the background and run as a daemon if you do not give this option. .TP -\fB\-a s\fR \fB\fR -Run this to connect to a running server to get a live monitor of the status of all your backup clients. If your server config file is not in the default location, you will also need to specify the path with the '-c' option. The live monitor requires ncurses support at compile time. -.TP -\fB\-a S\fR \fB\fR -Similar to '-a s', but it prints the main status monitor summary screen to stdout. The intention is that a script can run this and email an administrator the output on a cron job. This doesn't require ncurses support. +\fB\-g\fR \fB\fR +Generate initial CA keys and certificates, and then exit. .TP \fB\-i\fR \fB\fR Print an index table of symbols that humans may see burp produce, and exit. @@ -41,6 +38,26 @@ option in the config file. Use .I /dev/null to deactivate or '' to reactivate output. +.TP +\fB\-a s\fR \fB\fR +Run this to connect to a running server to get a live monitor of the status of all your backup clients. If your server config file is not in the default location, you will also need to specify the path with the '\-c' option. The live monitor requires ncurses support at compile time. +.TP +\fB\-a S\fR \fB\fR +Similar to '\-a s', but it prints the main status monitor summary screen to stdout. The intention is that a script can run this and email an administrator the output on a cron job. This doesn't require ncurses support. There are additional options that can be given with '\-a S', listed below. These enable logs and contents of backups to be listed whilst logged in on the server machine. +.TP +ADDITIONAL SERVER OPTIONS TO USE WITH '\-a S' +.TP +\fB\-C\fR \fB[client]\fR +Limit the output to a single client. +.TP +\fB\-b\fR \fB[number]\fR +Show listable files in a particular backup (requires \-C). +.TP +\fB\-z\fR \fB[file]\fR +Dump a particular log file in a backup (requires \-C and \-b). +.TP +\fB\-d\fR \fB[path]\fR +Show a particular path in a backup (requires \-C and \-b). .SH CLIENT OPTIONS .TP @@ -56,8 +73,7 @@ is /etc/burp/burp.conf, or C:\\Program Files\\Burp\\burp.conf on Windows. .TP \fB\-d\fR \fB[path]\fR -Short for 'directory'. The argument is a path to an alternative directory -to restore to. +Short for 'directory'. When restoring, the argument is a path to an alternative directory to restore to. When listing, the argument is the directory to list. .TP \fB\-f\fR \fB[path]\fR Short for 'force overwrite'. Without this option set, a restore will not @@ -77,51 +93,66 @@ option in the config file. Use .I /dev/null to deactivate or '' to reactivate output. +.TP +\fB\-s\fR \fB[number]\fR +For use with restores \- strip a number of leading path components. .SH EXAMPLES .TP -\fBburp -a b\fR +\fBburp \-a b\fR Runs a backup. .TP -\fBburp -a l\fR +\fBburp \-a l\fR Lists the available backups and dates. .TP -\fBburp -a l -b 1\fR +\fBburp \-a l \-b 1\fR Lists all the files in backup number 1. .TP -\fBburp -a l -b 1 -l /dev/null\fR +\fBburp \-a l \-b 1 \-l /dev/null\fR Lists all the files in backup number 1 without extra debug info. .TP -\fBburp -a l -b a\fR +\fBburp \-a l \-b a\fR Lists all the files in all the backups. .TP -\fBburp -a l -b 1 -r myregex\fR +\fBburp \-a l \-b 1 \-r myregex\fR Lists all the files in backup number 1 that match the regular expression 'myregex'. .TP -\fBburp -a L -b 1 -r myregex\fR -Long lists all the files in backup number 1 that match the regular expression 'myregex'. This is like doing an 'ls -l'. +\fBburp \-a L \-b 1 \-r myregex\fR +Long lists all the files in backup number 1 that match the regular expression 'myregex'. This is like doing an 'ls \-l'. .TP -\fBburp -a r -b 1 -r myregex\fR -Restores all the files in backup number 1 that match the regular expression 'myregex' back to their original location. You won't be given a warning if the files already exist there, so use with caution. +\fBburp \-a r \-b 1 \-r myregex\fR +Restores all the files in backup number 1 that match the regular expression 'myregex' back to their original location. .TP -\fBburp -a r -b 1 -r myregex -d /tmp/restoredir\fR +\fBburp \-a r \-b 1 \-r myregex \-d /tmp/restoredir\fR Restores all the files in backup number 1 that match the regular expression 'myregex' into the directory /tmp/restoredir. .TP -\fBburp -a r\fR -Restores all the files in the most recent backup to their original location. You won't be given a warning if the files already exist there, so use with caution. +\fBburp \-a r \-b 1 \-r myregex \-d /tmp/restoredir \-s 2\fR +Restores all the files in backup number 1 that match the regular expression 'myregex' into the directory /tmp/restoredir and strip 2 leading path components. +.TP +\fBburp \-a r\fR +Restores all the files in the most recent backup to their original location. .TP -\fBburp -a v\fR +\fBburp \-a v\fR Verifies the most recent backup. .TP -\fBburp -a v -b 1 -r myregex\fR +\fBburp \-a v \-b 1 \-r myregex\fR Verifies everything in backup number 1 that matches the regular expression 'myregex'. .TP -\fBburp -a t\fR -Timed backup. The same as 'burp -a b', except that a script is run on the server before deciding to go ahead. The intention is that this command will be run on a repeating cron job with a short interval, and that the server will decide when it is time for a new backup. +\fBburp \-a t\fR +Timed backup. The same as 'burp \-a b', except that a script is run on the server before deciding to go ahead. The intention is that this command will be run on a repeating cron job with a short interval, and that the server will decide when it is time for a new backup. +.TP +\fBburp \-a L \-b 1 \-d ''\fR +Long list the top level directory of backup 1. +.TP +\fBburp \-a L \-b 1 \-d '/home/graham'\fR +Long list the /home/graham directory of backup 1. These '\-d' versions of the list function provide the ability to 'browse' backups. .SH SERVER CONFIGURATION FILE OPTIONS .TP +\fB. [path]\fR +Read an additional configuration file. +.TP \fBmode=server\fR Required to run in server mode. .TP @@ -131,9 +162,21 @@ \fBstatus_port=[port number]\fR Defines the TCP port that the server listens on for status requests. .TP +\fBdaemon=[0|1]\fR +Whether to daemonise. The default is 1. +.TP +\fBfork=[0|1]\fR +Whether to fork children. The default is 1. +.TP \fBdirectory=[path]\fR Path to the directory in which to store backups. .TP +\fBdirectory_tree=[0|1]\fR +When turned on (which is the default) and the client is on version 1.3.6 or greater, the structure of the storage directory will mimic that of the original filesystem on the client. +.TP +\fBtimestamp_format=[strftime format]\fR +This allows you to tweak the format of the timestamps of individual backups. See 'man strftime' to see available substitutions. If this option is unset, burp uses "%Y-%m-%d %H:%M:%S". +.TP \fBclientconfdir=[path]\fR Path to the directory that contains client configuration files. .TP @@ -147,9 +190,12 @@ \fBlogfile=[path]\fR Path to the logfile. .TP +\fBsyslog=[0|1]\fR +Log to syslog. +.TP \fBkeep=[number]\fR Number of backups to keep. This can be overriddden by the client configuration -files in clientconfdir on the server. Specify multiple 'keep' entries on separate lines in order to keep multiple periods of backups. For example, assuming that you are doing a backup a day, keep=7 keep=4 keep=6 (on separate lines) will keep 7 daily backups, 4 weekly backups (7x4=28), and 6 multiples of 4 weeks (7x4x6=168) - roughly 6 monthly backups. Effectively, you will be guaranteed to be able to restore up to 168 days ago, with the number of available backups exponentially decreasing as you go back in time to that point. In this example, every 7th backup will be hardlinked to allow burp to safely delete intermediate backups when necessary. You can have as many 'keep' lines as you like, as long as they don't exceed 52560000 when multiplied together. That is, a backup every minute for 100 years. +files in clientconfdir on the server. Specify multiple 'keep' entries on separate lines in order to keep multiple periods of backups. For example, assuming that you are doing a backup a day, keep=7 keep=4 keep=6 (on separate lines) will keep 7 daily backups, 4 weekly backups (7x4=28), and 6 multiples of 4 weeks (7x4x6=168) \- roughly 6 monthly backups. Effectively, you will be guaranteed to be able to restore up to 168 days ago, with the number of available backups exponentially decreasing as you go back in time to that point. In this example, every 7th backup will be hardlinked to allow burp to safely delete intermediate backups when necessary. You can have as many 'keep' lines as you like, as long as they don't exceed 52560000 when multiplied together. That is, a backup every minute for 100 years. .TP \fBhardlinked_archive=[0|1]\fR On the server, defines whether to keep hardlinked files in the backups, or whether to generate reverse deltas and delete the original files. Can be set to either 0 (off) or 1 (on). Disadvantage: More disk space will be used Advantage: Restores will be faster, and since no reverse deltas need to be generated, the time and effort the server needs at the end of a backup is reduced. @@ -160,7 +206,7 @@ \fBlibrsync=[0|1]\fR When set to 0, delta differencing will not take place. That is, when a file changes, the server will request the whole new file. The default is 1. This option can be overridden by the client configuration files in clientconfdif on the server. .TP -\fBcompression=[gzip0-9]\fR +\fBcompression=gzip[0-9]\fR Choose the level of gzip compression. Setting 0 or gzip0 turns compression off. The default is gzip9. This option can be overridden by the client configuration files in clientconfdif on the server. .TP \fBclient_lockdir=[path]\fR @@ -191,8 +237,20 @@ .TP \fBresume:\fR Simply continue the previous backup from the point at which it left off. NOTE: If the client has changed its include/exclude configuration since the backup was interrupted, the recovery method will automatically switch to 'use'. .TP +\fBclient_can_force_backup=[0|1]\fR +Turn this off to prevent clients from forcing backups with the '\-a b' option. Timed backups will still work. The default is that clients can force backups. +.TP +\fBclient_can_list=[0|1]\fR +Turn this off to prevent clients from listing backups with the '\-a l' option. The default is that clients can list backups. +.TP +\fBclient_can_restore=[0|1]\fR +Turn this off to prevent clients from initiating restores with the '\-a r' option. The default is that clients can initiate restores. +.TP +\fBclient_can_verify=[0|1]\fR +Turn this off to prevent clients from initiating a verify job with the '\-a v' option. The default is that clients can initiate a verify job. +.TP \fBssl_cert_ca=[path]\fR -The path to the SSL CA certificate. This file will probably be the same on both the server and the client. The file should contain just the certificate in PEM format +The path to the SSL CA certificate. This file will probably be the same on both the server and the client. The file should contain just the certificate in PEM format. For more information on this, and the other ssl_* options, please see docs/burp_ca.txt. .TP \fBssl_cert=[path]\fR The path to the server SSL certificate. It works for me when the file contains the concatenation of the certificate and private key in PEM format. @@ -207,11 +265,14 @@ Synonym for ssl_key_password. .TP \fBssl_dhfile=[path]\fR -Path to Diffie-Hellman parameter file. To generate one with openssl, use a command like this: openssl dhparam -out dhfile.pem -5 1024 +Path to Diffie-Hellman parameter file. To generate one with openssl, use a command like this: openssl dhparam \-out dhfile.pem \-5 1024 .TP \fBmax_children=[number]\fR Defines the number of child processes to fork (the number of clients that can simultaneously connect. The default is 5. .TP +\fBmax_status_children=[number]\fR +Defines the number of status child processes to fork (the number of status clients that can simultaneously connect. The default is 5. +.TP \fBmax_storage_subdirs=[number]\fR Defines the number of subdirectories in the data storage areas. The maximum number of subdirectories that ext3 allows is 32000. If you do not set this option, it defaults to 30000. .TP @@ -228,7 +289,10 @@ A user-definable argument to the notify success script. You can have many of these. The notify_success_arg options can be overriddden by the client configuration files in clientconfdir on the server. .TP \fBnotify_success_warnings_only=[0|1]\fR -Set to 1 to send success notifications only when there were warnings. Leave unset or set to 0 to send success notifications for every backup. +Set to 1 to send success notifications when there were warnings. If this and notify_success_changes_only are not turned on, success notifications are always sent. +.TP +\fBnotify_success_changes_only=[0|1]\fR +Set to 1 to send success notifications when there were new or changed files. If this and notify_success_warnings_only are not turned on, success notifications are always sent. .TP \fBnotify_failure_script=[path]\fR The same as notify_success_script, but for backups that failed. @@ -237,7 +301,7 @@ The same as notify_failure_arg, but for backups that failed. .TP \fBdedup_group=[string]\fR -Enables you to group clients together for file deduplication purposes. For example, you might want to set 'dedup_group=xp' for each Windows XP client, and then run the bedup program on a cron job every other day with the option '-g xp'. +Enables you to group clients together for file deduplication purposes. For example, you might want to set 'dedup_group=xp' for each Windows XP client, and then run the bedup program on a cron job every other day with the option '\-g xp'. .TP \fBserver_script_pre=[path]\fR Path to a script to run on the server after each successfully authenticated connection but before any work is carried out. The arguments to it are 'pre', '(client command)', 'reserved3' to 'reserved5', and then arguments defined by server_script_pre_arg. If the script returns non-zero, the task asked for by the client will not be run. This command and related options can be overriddden by the client configuration files in clientconfdir on the server. @@ -262,10 +326,25 @@ .TP \fBautoupgrade_dir=[path]\fR Path to autoupgrade directory from which upgrades are downloaded. The option can be left unset in order not to autoupgrade clients. Please see docs/autoupgrade.txt in the source package for more help with this option. +.TP +\fBca_conf=[path]\fR +Path to certificate authority configuration file. The CA configuration file will usually be /etc/burp/CA.cnf. The CA directory indicated by CA.cnf will usually be /etc/burp/CA. If ca_conf is set and the CA directory does not exist, the server will create, populate it, and the paths indicated by ssl_cert_ca, ssl_cert, ssl_key and ssl_dhfile will be overwritten. For more detailed information on this and the other ca_* options, please see docs/burp_ca.txt. +.TP +\fBca_name=[name]\fR +Name of the CA that the server will generate when using the ca_conf option. +.TP +\fBca_server_name=[name]\fR +The name that the server will put into its own SSL certficates when using the ca_conf option. +.TP +\fBca_burp_ca=[path]\fR +Path to the burp_ca script when using the ca_conf option. .SH CLIENT CONFIGURATION FILE OPTIONS .TP +\fB. [path]\fR +Read an additional configuration file. +.TP \fBmode=client\fR Required to run in client mode. .TP @@ -291,6 +370,9 @@ \fBlogfile=[path]\fR Path to the logfile. .TP +\fBsyslog=[0|1]\fR +Log to syslog. +.TP \fBuser=[username]\fR Run as a particular user (not supported on Windows). .TP @@ -303,41 +385,14 @@ \fBnetwork_timeout=[s]\fR Set the network timeout in seconds. If no data is sent or received over a period of this length, burp will give up. The default is 7200 seconds (2 hours). .TP -\fBinclude=[path]\fR -Path to include in the backup. You can have multiple include lines. Use forward slashes '/', not backslashes '\\' as path delimiters. -.TP -\fBexclude=[path]\fR -Path to exclude from the backup. You can have multiple exclude lines. Use forward slashes '/', not backslashes '\\' as path delimiters. -.TP -\fBexclude_ext=[extension]\fR -Extensions to exclude from the backup. Case insensitive. You can have multiple exclude extension lines. For example, set 'vdi' to exclude VirtualBox disk images. -.TP -\fBexclude_fs=[fstype]\fR -File systems to exclude from the backup. Case insensitive. You can have multiple exclude file system lines. For example, set 'tmpfs' to exclude tmpfs. Burp has an internal mapping of file system names to file system IDs. If you know the file system ID, you can use that instead. For example, 'exclude_fs = 0x01021994' will also exclude tmpfs. -.TP -\fBmin_file_size=[b/Kb/Mb/Gb]\fR -Do not back up files that are less than the specified size. Example: 'min_file_size = 10Mb'. Set to 0 (the default) to have no limit. -.TP -\fBmax_file_size=[b/Kb/Mb/Gb]\fR -Do not back up files that are greater than the specified size. Example: 'max_file_size = 10Mb'. Set to 0 (the default) to have no limit. -.TP -\fBcross_filesystem=[path]\fR -Allow backups to cross a particular filesystem mountpoint. -.TP -\fBcross_all_filesystems=[0|1]\fR -Allow backups to cross all filesystem mountpoints. -.TP -\fBnobackup=[file name]\fR -If this file system entry exists, the directory containing it will not be backed up. -.TP -\fBread_fifo=[path]\fR -Do not back up the given fifo itself, but open it for reading and back up the contents as if it were a regular file. +\fBca_burp_ca=[path]\fR +Path to the burp_ca script (burp_ca.bat on Windows). For more information on this, please see docs/burp_ca.txt. .TP -\fBread_all_fifos=[0|1]\fR -Open all fifos for reading and back up the contents as if they were regular files. +\fBca_csr_dir=[path]\fR +Directory where certificate signing requests are generated. For more information on this, please see docs/burp_ca.txt. .TP \fBssl_cert_ca=[path]\fR -The path to the SSL CA certificate. This file will probably be the same on both the server and the client. The file should contain just the certificate in PEM format +The path to the SSL CA certificate. This file will probably be the same on both the server and the client. The file should contain just the certificate in PEM format. For more information on this and the other ssl_* options, please see docs/burp_ca.txt. .TP \fBssl_cert=[path]\fR The path to the client SSL certificate. It works for me when the file contains the concatenation of the certificate and private key in PEM format. @@ -351,6 +406,9 @@ \fBssl_cert_password=[password]\fR Synonym for ssl_key_password. .TP +\fBssl_peer_cn=[string]\fR +Must match the common name in the SSL certificate that the server gives when it connects. If ssl_peer_cn is not set, the server name will be used instead. +.TP \fBencryption_password=[password]\fR Set this to enable client side file Blowfish encryption. If you do not want encryption, leave this field out of your config file. \fBIMPORTANT:\fR Configuring this renders delta differencing pointless, since the smallest real change to a file will make the whole file look different. Therefore, activating this option turns off delta differencing so that whenever a client file changes, the whole new file will be uploaded on the next backup. \fBALSO IMPORTANT:\fR If you manage to lose your encryption password, you will not be able to unencrypt your files. You should therefore think about having a copy of the encryption password somewhere off-box, in case of your client hard disk failing. \fBFINALLY:\fR If you change your encryption password, you will end up with a mixture of files on the server with different encryption and it may become tricky to restore more than one file at a time. For this reason, if you change your encryption password, you may want to start a fresh chain of backups (by moving the original set aside, for example). Burp will cope fine with turning the same encryption password on and off between backups, and will restore a backup of mixed encrypted and unencrypted files without a problem. .TP @@ -402,6 +460,58 @@ \fBautoupgrade_os=[string]\fR Name of the client operating system. Should match a directory name in the server's autoupgrade_dir. If you do not want your client to autoupgrade, do not set this option. +.SH INCLUDES / EXCLUDES + +.TP +The following options specify exactly what is backed up. The client can specify these options, or if you include at least one 'include=' in the client configuration files on the server, the server will override them all. +.TP +\fBinclude=[path]\fR +Path to include in the backup. You can have multiple include lines. Use forward slashes '/', not backslashes '\\' as path delimiters. +.TP +\fBexclude=[path]\fR +Path to exclude from the backup. You can have multiple exclude lines. Use forward slashes '/', not backslashes '\\' as path delimiters. +.TP +\fBinclude_regex=[regular expression]\fR +Not implemented. +.TP +\fBexclude_regex=[regular expression]\fR +Exclude paths that match the regular expression. +.TP +\fBinclude_ext=[extension]\fR +Extensions to include in the backup. Case insensitive. Nothing else will be included in the backup. You can have multiple include extension lines. For example, set 'txt' to include files that end in '.txt'. You need to specify an 'include' line so that burp knows where to start looking. +.TP +\fBexclude_ext=[extension]\fR +Extensions to exclude from the backup. Case insensitive. You can have multiple exclude extension lines. For example, set 'vdi' to exclude VirtualBox disk images. +.TP +\fBexclude_fs=[fstype]\fR +File systems to exclude from the backup. Case insensitive. You can have multiple exclude file system lines. For example, set 'tmpfs' to exclude tmpfs. Burp has an internal mapping of file system names to file system IDs. If you know the file system ID, you can use that instead. For example, 'exclude_fs = 0x01021994' will also exclude tmpfs. +.TP +\fBmin_file_size=[b/Kb/Mb/Gb]\fR +Do not back up files that are less than the specified size. Example: 'min_file_size = 10Mb'. Set to 0 (the default) to have no limit. +.TP +\fBmax_file_size=[b/Kb/Mb/Gb]\fR +Do not back up files that are greater than the specified size. Example: 'max_file_size = 10Mb'. Set to 0 (the default) to have no limit. +.TP +\fBcross_filesystem=[path]\fR +Allow backups to cross a particular filesystem mountpoint. +.TP +\fBcross_all_filesystems=[0|1]\fR +Allow backups to cross all filesystem mountpoints. +.TP +\fBnobackup=[file name]\fR +If this file system entry exists, the directory containing it will not be backed up. +.TP +\fBread_fifo=[path]\fR +Do not back up the given fifo itself, but open it for reading and back up the contents as if it were a regular file. +.TP +\fBread_all_fifos=[0|1]\fR +Open all fifos for reading and back up the contents as if they were regular files. +.TP +\fBread_blockdev=[path]\fR +Do not back up the given block device itself, but open it for reading and back up the contents as if it were a regular file. +.TP +\fBread_all_blockdevs=[0|1]\fR +Open all block devices for reading and back up the contents as if they were regular files. .SH SERVER CLIENTCONFDIR FILE .TP @@ -409,15 +519,22 @@ .TP The file name must match the name in the 'cname' field on the client. .TP -\fBssl_peer_cn=[string]\fR must also be set and match the common name in the SSL certificate that the client gives when it connects. +\fBssl_peer_cn=[string]\fR must match the common name in the SSL certificate that the client gives when it connects. If ssl_peer_cn is not set, the client name will be used instead (the clientconfdir file name). .TP -The file needs to contain a line like \fBpassword=[password]\fR that matches the same field on the client, or \fBpasswd=[encrypted password]\fR - where the plain text password on the client will be tested against an encrypted password of the kind you might find in /etc/passwd. +The file needs to contain a line like \fBpassword=[password]\fR that matches the same field on the client, or \fBpasswd=[encrypted password]\fR \- where the plain text password on the client will be tested against an encrypted password of the kind you might find in /etc/passwd. .TP Additionally, the following options can be overridden here for each client: \fBdirectory\fR +\fBdirectory_tree\fR +\fBtimestamp_format\fR \fBkeep\fR \fBworking_dir_recovery_method\fR \fBlibrsync\fR +\fBsyslog\fR +\fBclient_can_force_backup\fR +\fBclient_can_list\fR +\fBclient_can_restore\fR +\fBclient_can_verify\fR \fBcompression\fR \fBtimer_script\fR \fBtimer_arg\fR @@ -434,6 +551,10 @@ \fBserver_script\fR \fBserver_script_arg\fR \fBserver_script_post_run_on_fail\fR +.TP +Additionally, the includes and excludes can be overridden here, as described in the section above. +.TP +As with the other configuration files, extra configuration can be included with the '. path/to/config/file' syntax. .SH Some notes on SSL certificates .TP @@ -453,6 +574,36 @@ .TP Anything with a .gz suffix is compressed in gzip format. You can use standard tools, such as zcat, zless or cp, to view them or copy them elsewhere. +.SH Server initiated backups +.TP +You can queue a backup on the server, to be performed when the client next makes contact. To do this, you put a file called 'backup' into the top level of the client storage directory. The contents of the file are ignored. + +.SH Server initiated restores +.TP +You can queue a restore on the server, to be performed when the client next makes contact. To do this, you put a file called 'restore' into the top level of the client storage directory. Valid fields to include in the restore file are: +.TP +\fBbackup=[number|a]\fR +The number of the backup to restore from. Equivalent to '\-b' when initiating a restore from the client. +.TP +\fBoverwrite=[0|1]\fR +Whether to overwrite existing files. Equivalent to '\-f' when initiating a restore from the client. +.TP +\fBstrip=[number]\fR +Number of leading path components to strip. Equivalent to '\-s' when initiating a restore from the client. +.TP +\fBrestoreprefix=[path]\fR +Prefix to the restore path. Equivalent to '\-d' when initiating a restore from the client. +.TP +\fBregex=[regular expression]\fR +Only restore files matching the regular expression. Equivalent to '\-r' when initiating a restore from the client. +.TP +\fBinclude=[path]\fR +Restore directories and files that match the path. If it is a directory, the contents of the directory will be restored. You can have multiple 'include' lines. There is no equivalent when initiating a restore from the client. +.TP +As a minimum, the 'restore' file needs to contain a 'backup' option, and one 'regex' or 'include' line. + +.SH SIGNALS +Sending signal 1 (HUP) to the main server process will cause it to reload. For the vast majority of configuration changes, a reload is unnecessary as the server will pick up changes "on-the-fly". Sending signal 12 (USR2) to the main server process will cause it to wait until there are no longer any child processes, and then exit. The intention is to help with upgrades without interrupting current backups. if you are running upstart, a new burp server process will start up when the old one exits. .SH BUGS If you find bugs, please report them to the email list. See the website diff -Nru burp-1.3.0+20120214git/manpages/burp_ca.8 burp-1.3.10/manpages/burp_ca.8 --- burp-1.3.0+20120214git/manpages/burp_ca.8 2012-02-13 13:13:38.000000000 +0000 +++ burp-1.3.10/manpages/burp_ca.8 2012-07-27 00:36:21.000000000 +0000 @@ -1,64 +1,65 @@ -.\" manual page [] for burp_ca -.\" SH section heading -.\" SS subsection heading -.\" LP paragraph -.\" IP indented paragraph -.\" TP hanging label -.TH burp_ca 8 "burp_ca" +.TH burp_ca 8 "February 10, 2012" "" "burp_ca" + .SH NAME -bedup +burp_ca \- program for generating certificates for use with burp + .SH SYNOPSIS -.B burp_ca: [options] -.SH DESCRIPTION +.B burp_ca +.RI [ options ] +.br + .LP A script for generating certificates for use with burp. This script comes with the burp backup and restore package, and was contributed by Patrick Koppen. .SH OPTIONS .TP -\fB\-h|--help\fR \fB\fR +\fB\-h|\-\-help\fR \fB\fR show help .TP -\fB\-i|--init\fR \fB\fR +\fB\-i|\-\-init\fR \fB\fR inititalize CA .TP -\fB\-k|--key\fR \fB\fR +\fB\-k|\-\-key\fR \fB\fR generate new key .TP -\fB\-r|--request \fR \fB\fR +\fB\-r|-\-request \fR \fB\fR generate certificate sign request .TP -\fB\-s|--sign\fR \fB\fR -sign csr (use --ca and --name ) +\fB\-s|\-\-sign\fR \fB\fR +sign csr (use \-\-ca and \-\-name ) .IP -\fB\--batch\fR \fB\fR +\fB\-\-batch\fR \fB\fR do not prompt for anything .IP -\fB\--revoke\fR \fB\fR +\fB\-\-revoke\fR \fB\fR revoke certificate with serial number .IP -\fB\--crl\fR \fB\fR +\fB\-\-crl\fR \fB\fR generate certificate revoke list .TP -\fB\-d|--dir\fR \fB\fR +\fB\-d|\-\-dir\fR \fB\fR ca output dir (default: /etc/burp/CA) .TP -\fB\-c|--config\fR \fB\fR +\fB\-c|\-\-config\fR \fB\fR config file (default: /etc/burp/CA.cnf) .TP -\fB\-n|--name\fR \fB\fR +\fB\-n|\-\-name\fR \fB\fR name (default: builder) .TP -\fB\-D|--days\fR \fB\fR +\fB\-D|\-\-days\fR \fB\fR valid days for certificate (default in config file) .IP -\fB\--ca_days\fR \fB\fR +\fB\-\-ca_days\fR \fB\fR valid days for CA certificate (default: 3650) .TP -\fB\-S|--size\fR \fB\fR +\fB\-S|\-\-size\fR \fB\fR key size (default: 2048) .TP -\fB\-a|--ca\fR \fB\fR +\fB\-a|\-\-ca\fR \fB\fR ca name if different from name +.TP +\fB\-f|\-\-dhfile\fR \fB\fR +generate a new dhfile .SH .SH BUGS diff -Nru burp-1.3.0+20120214git/src/Makefile.in burp-1.3.10/src/Makefile.in --- burp-1.3.0+20120214git/src/Makefile.in 2012-02-13 13:13:38.000000000 +0000 +++ burp-1.3.10/src/Makefile.in 2012-07-27 00:36:21.000000000 +0000 @@ -35,6 +35,8 @@ base64.c \ berrno.c \ bfile.c \ + ca_client.c \ + ca_server.c \ client.c \ client_vss.c \ conf.c \ @@ -45,21 +47,23 @@ find.c \ forkchild.c \ handy.c \ - incexc_recv_server.c \ - incexc_send_client.c \ + incexc_recv.c \ + incexc_send.c \ list_client.c \ list_server.c \ lock.c \ log.c \ msg.c \ + prepend.c \ prog.c \ + regexp.c \ restore_client.c \ restore_server.c \ rs_buf.c \ sbuf.c \ server.c \ ssl.c \ - status_client.c \ + status_client_ncurses.c \ status_server.c \ strlist.c \ xattr.c \ @@ -129,12 +133,12 @@ bedup: Makefile bedup.o @WIN32@ @echo "Linking $@ ..." - $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -o $@ bedup.o conf.o lock.o log.o strlist.o \ + $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -o $@ bedup.o conf.o lock.o log.o prepend.o regexp.o strlist.o \ $(WIN32LIBS) $(FDLIBS) -lm $(LIBS) \ $(DLIB) $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(RSYNC_LIBS) $(ZLIBS) $(NCURSES_LIBS) $(CRYPT_LIBS) static-bedup: Makefile bedup.o @WIN32@ - $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -static -o $@ bedup.o conf.o lock.o log.o strlist.o \ + $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -static -o $@ bedup.o conf.o lock.o log.o prepend.o regexp.o strlist.o \ $(WIN32LIBS) $(FDLIBS) -lm $(LIBS) \ $(DLIB) $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(RSYNC_LIBS) $(ZLIBS) $(NCURSES_LIBS) $(CRYPT_LIBS) -ldl -lgpm @@ -147,7 +151,9 @@ clean: libtool-clean @$(RMF) burp core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3 - @$(RMF) bedup static-burp static-bedup + @$(RMF) bedup static-burp static-bedup config.h + @$(RMF) Makefile + @$(RMF) uthash.h # @if test -f win32/Makefile -a "${GMAKE}" != "none"; then \ # (cd win32; $(GMAKE) clean); \ # fi @@ -170,13 +176,12 @@ fi install: all + rm -f $(DESTDIR)/sbin/burp ; \ + rm -f $(DESTDIR)/sbin/bedup ; \ + rm -f $(DESTDIR)/usr/sbin/burp ; \ + rm -f $(DESTDIR)/usr/sbin/bedup ; \ $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) burp $(DESTDIR)$(sbindir)/burp $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) bedup $(DESTDIR)$(sbindir)/bedup - @if [ $(sbindir) != /usr/sbin ] ; then \ - rm -f $(DESTDIR)/usr/sbin/burp ; \ - mkdir -p $(DESTDIR)/usr/sbin ; \ - ln -sfT $(sbindir)/burp $(DESTDIR)/usr/sbin/burp ; \ - fi @if test -f static-burp; then \ $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) static-burp $(DESTDIR)$(sbindir)/static-burp; \ fi diff -Nru burp-1.3.0+20120214git/src/asyncio.c burp-1.3.10/src/asyncio.c --- burp-1.3.0+20120214git/src/asyncio.c 2012-02-13 13:13:38.000000000 +0000 +++ burp-1.3.10/src/asyncio.c 2012-07-27 00:36:21.000000000 +0000 @@ -8,6 +8,13 @@ #include "ssl.h" #include "sbuf.h" +/* For IPTOS / IPTOS_THROUGHPUT */ +#ifdef HAVE_WIN32 +#include +#else +#include +#endif + static int fd=-1; static SSL *ssl=NULL; static float ratelimit=0; @@ -233,6 +240,7 @@ ssl=assl; ratelimit=conf->ratelimit; max_network_timeout=conf->network_timeout; + network_timeout=max_network_timeout; doing_estimate=estimate; if(doing_estimate) return 0; @@ -243,6 +251,21 @@ } +int set_bulk_packets(void) +{ +#if defined(IP_TOS) && defined(IPTOS_THROUGHPUT) + int opt=IPTOS_THROUGHPUT; + if(fd<0) return -1; + if(setsockopt(fd, IPPROTO_IP, IP_TOS, (char *) &opt, sizeof(opt))<0) + { + logp("Error: setsockopt IPTOS_THROUGHPUT: %s\n", + strerror(errno)); + return -1; + } +#endif + return 0; +} + void async_free(void) { // printf("in async_free\n"); @@ -617,7 +640,8 @@ } else if(cmd==CMD_STAT) { - decode_stat(buf, &(sb->statp), &(sb->winattr)); + decode_stat(buf, &(sb->statp), + &(sb->winattr), &(sb->compression)); sb->statbuf=buf; sb->slen=len; sb->datapth=d; diff -Nru burp-1.3.0+20120214git/src/asyncio.h burp-1.3.10/src/asyncio.h --- burp-1.3.0+20120214git/src/asyncio.h 2012-02-13 13:13:38.000000000 +0000 +++ burp-1.3.10/src/asyncio.h 2012-07-27 00:36:21.000000000 +0000 @@ -53,4 +53,6 @@ // should be in src/lib/log.c int logw(struct cntr *cntr, const char *fmt, ...); +extern int set_bulk_packets(void); + #endif // _ASYNC_ROUTINES_H diff -Nru burp-1.3.0+20120214git/src/attribs.c burp-1.3.10/src/attribs.c --- burp-1.3.0+20120214git/src/attribs.c 2012-02-13 13:13:38.000000000 +0000 +++ burp-1.3.10/src/attribs.c 2012-07-27 00:36:21.000000000 +0000 @@ -10,65 +10,65 @@ #include "find.h" #include "cmd.h" #include "berrno.h" +#include "asyncio.h" /* * Encode a stat structure into a base64 character string * All systems must create such a structure. */ -void encode_stat(char *buf, struct stat *statp, int64_t winattr) +void encode_stat(char *buf, struct stat *statp, int64_t winattr, int compression) { char *p = buf; - /* - * Encode a stat packet. I should have done this more intelligently - * with a length so that it could be easily expanded. - */ - p += to_base64((int64_t)statp->st_dev, p); + p += to_base64(statp->st_dev, p); *p++ = ' '; /* separate fields with a space */ - p += to_base64((int64_t)statp->st_ino, p); + p += to_base64(statp->st_ino, p); *p++ = ' '; - p += to_base64((int64_t)statp->st_mode, p); + p += to_base64(statp->st_mode, p); *p++ = ' '; - p += to_base64((int64_t)statp->st_nlink, p); + p += to_base64(statp->st_nlink, p); *p++ = ' '; - p += to_base64((int64_t)statp->st_uid, p); + p += to_base64(statp->st_uid, p); *p++ = ' '; - p += to_base64((int64_t)statp->st_gid, p); + p += to_base64(statp->st_gid, p); *p++ = ' '; - p += to_base64((int64_t)statp->st_rdev, p); + p += to_base64(statp->st_rdev, p); *p++ = ' '; - p += to_base64((int64_t)statp->st_size, p); + p += to_base64(statp->st_size, p); *p++ = ' '; #ifdef HAVE_WIN32 - p += to_base64((int64_t)0, p); /* output place holder */ + p += to_base64(0, p); /* output place holder */ *p++ = ' '; - p += to_base64((int64_t)0, p); /* output place holder */ + p += to_base64(0, p); /* output place holder */ #else - p += to_base64((int64_t)statp->st_blksize, p); + p += to_base64(statp->st_blksize, p); *p++ = ' '; - p += to_base64((int64_t)statp->st_blocks, p); + p += to_base64(statp->st_blocks, p); #endif *p++ = ' '; - p += to_base64((int64_t)statp->st_atime, p); + p += to_base64(statp->st_atime, p); *p++ = ' '; - p += to_base64((int64_t)statp->st_mtime, p); + p += to_base64(statp->st_mtime, p); *p++ = ' '; - p += to_base64((int64_t)statp->st_ctime, p); + p += to_base64(statp->st_ctime, p); *p++ = ' '; #ifdef HAVE_CHFLAGS /* FreeBSD function */ - p += to_base64((int64_t)statp->st_flags, p); /* output st_flags */ + p += to_base64(statp->st_flags, p); /* output st_flags */ #else - p += to_base64((int64_t)0, p); /* output place holder */ + p += to_base64(0, p); /* output place holder */ #endif *p++ = ' '; #ifdef HAVE_WIN32 - p += to_base64((int64_t)winattr, p); + p += to_base64(winattr, p); #else - p += to_base64((int64_t)0, p); /* output place holder */ + p += to_base64(0, p); /* output place holder */ #endif + *p++ = ' '; + + p += to_base64(compression, p); *p = 0; return; @@ -93,7 +93,7 @@ /* Decode a stat packet from base64 characters */ -void decode_stat(const char *buf, struct stat *statp, int64_t *winattr) +void decode_stat(const char *buf, struct stat *statp, int64_t *winattr, int *compression) { const char *p = buf; int64_t val; @@ -157,52 +157,57 @@ } /* Look for winattr */ -#ifdef HAVE_WIN32 if (*p == ' ' || (*p != 0 && *(p+1) == ' ')) { p++; p += from_base64(&val, p); } else { val = 0; } -#else - val=0; -#endif *winattr=val; -} -static uid_t my_uid=1; -static gid_t my_gid=1; -static bool uid_set=false; + /* Compression */ + if (*p == ' ' || (*p != 0 && *(p+1) == ' ')) { + p++; + if(!*p) return; + p += from_base64(&val, p); + *compression=val; + } else { + *compression=-1; + } +} -static int set_file_times(const char *path, struct utimbuf *ut) +static int set_file_times(const char *path, struct utimbuf *ut, struct stat *statp, struct cntr *cntr) { - if(utime(path, ut)<0 && !my_uid) + int e; +// The mingw64 utime() appears not to work on read-only files. +// Use the utime() from bacula instead. +#ifdef HAVE_WIN32 + //e=utime(path, ut); + e=win32_utime(path, ut); +#else + e=utime(path, ut); +#endif + if(e<0) { berrno be; - fprintf(stderr, _("Unable to set file times %s: ERR=%s\n"), + logw(cntr, "Unable to set file times %s: ERR=%s", path, be.bstrerror()); return -1; } return 0; } -bool set_attributes(const char *path, char cmd, struct stat *statp, int64_t winattr) +bool set_attributes(const char *path, char cmd, struct stat *statp, int64_t winattr, struct cntr *cntr) { struct utimbuf ut; bool ok = true; - if (uid_set) { - my_uid = getuid(); - my_gid = getgid(); - uid_set = true; - } - ut.actime = statp->st_atime; ut.modtime = statp->st_mtime; #ifdef HAVE_WIN32 win32_chmod(path, statp->st_mode, winattr); - set_file_times(path, &ut); + set_file_times(path, &ut, statp, cntr); return true; #endif @@ -217,27 +222,27 @@ meta stuff on links. */ if (cmd==CMD_SOFT_LINK) { /* Change owner of link, not of real file */ - if (lchown(path, statp->st_uid, statp->st_gid) < 0 && my_uid == 0) { + if (lchown(path, statp->st_uid, statp->st_gid) < 0) { berrno be; - fprintf(stderr, _("Unable to set file owner %s: ERR=%s\n"), + logw(cntr, "Unable to set file owner %s: ERR=%s", path, be.bstrerror()); ok = false; } } else { - if (chown(path, statp->st_uid, statp->st_gid) < 0 && my_uid == 0) { + if (chown(path, statp->st_uid, statp->st_gid) < 0) { berrno be; - fprintf(stderr, _("Unable to set file owner %s: ERR=%s\n"), + logw(cntr, "Unable to set file owner %s: ERR=%s", path, be.bstrerror()); ok = false; } - if (chmod(path, statp->st_mode) < 0 && my_uid == 0) { + if (chmod(path, statp->st_mode) < 0) { berrno be; - fprintf(stderr, _("Unable to set file modes %s: ERR=%s\n"), + logw(cntr, "Unable to set file modes %s: ERR=%s", path, be.bstrerror()); ok = false; } - if(set_file_times(path, &ut)) ok=false; + if(set_file_times(path, &ut, statp, cntr)) ok=false; #ifdef HAVE_CHFLAGS /* * FreeBSD user flags @@ -246,9 +251,9 @@ * but if the immutable bit is set, it will make the utimes() * fail. */ - if (chflags(path, statp->st_flags) < 0 && my_uid == 0) { + if (chflags(path, statp->st_flags) < 0) { berrno be; - fprintf(stderr, _("Unable to set file flags %s: ERR=%s\n"), + logw(cntr, "Unable to set file flags %s: ERR=%s", path, be.bstrerror()); ok = false; } diff -Nru burp-1.3.0+20120214git/src/auth_client.c burp-1.3.10/src/auth_client.c --- burp-1.3.0+20120214git/src/auth_client.c 2012-02-13 13:13:38.000000000 +0000 +++ burp-1.3.10/src/auth_client.c 2012-07-27 00:36:21.000000000 +0000 @@ -11,7 +11,7 @@ #include "sbuf.h" #include "auth_client.h" -int authorise_client(struct config *conf, struct cntr *p1cntr) +int authorise_client(struct config *conf, char **server_version, struct cntr *p1cntr) { char cmd; char *buf=NULL; @@ -20,9 +20,32 @@ snprintf(hello, sizeof(hello), "hello:%s", VERSION); - if(async_write_str(CMD_GEN, hello) - || async_read_expect(CMD_GEN, "whoareyou") - || async_write_str(CMD_GEN, conf->cname) + if(async_write_str(CMD_GEN, hello)) + { + logp("problem with auth\n"); + return -1; + } + if(async_rw_ensure_read(&cmd, &buf, &l, '\0', NULL, 0) + || cmd!=CMD_GEN || strncmp(buf, "whoareyou", strlen("whoareyou"))) + { + logp("problem with auth\n"); + if(buf) free(buf); + return -1; + } + if(buf) + { + char *cp=NULL; + if((cp=strchr(buf, ':'))) + { + cp++; + if(cp) *server_version=strdup(cp); + } + free(buf); + buf=NULL; + } + + + if(async_write_str(CMD_GEN, conf->cname) || async_read_expect(CMD_GEN, "okpassword") || async_write_str(CMD_GEN, conf->password) || async_read(&cmd, &buf, &l)) diff -Nru burp-1.3.0+20120214git/src/auth_client.h burp-1.3.10/src/auth_client.h --- burp-1.3.0+20120214git/src/auth_client.h 2012-02-13 13:13:38.000000000 +0000 +++ burp-1.3.10/src/auth_client.h 2012-07-27 00:36:21.000000000 +0000 @@ -1,6 +1,6 @@ #ifndef _AUTH_CLIENT_H #define _AUTH_CLIENT_H -extern int authorise_client(struct config *conf, struct cntr *p1cntr); +extern int authorise_client(struct config *conf, char **server_version, struct cntr *p1cntr); #endif // _AUTH_CLIENT_H diff -Nru burp-1.3.0+20120214git/src/auth_server.c burp-1.3.10/src/auth_server.c --- burp-1.3.0+20120214git/src/auth_server.c 2012-02-13 13:13:38.000000000 +0000 +++ burp-1.3.10/src/auth_server.c 2012-07-27 00:36:21.000000000 +0000 @@ -40,9 +40,22 @@ // client. init_config(cconf); snprintf(cpath, sizeof(cpath), "%s/%s", conf->clientconfdir, client); - if(set_client_global_config(conf, cconf) - || load_config(cpath, cconf, 0)) + if(set_client_global_config(conf, cconf, client) + || load_config(cpath, cconf, FALSE)) return -1; + if(!cconf->ssl_peer_cn) + { + logp("ssl_peer_cn unset"); + if(client) + { + logp("Falling back to using '%s'\n", client); + if(!(cconf->ssl_peer_cn=strdup(client))) + { + logp("out of memory\n"); + return -1; + } + } + } if(!cconf->password && !cconf->passwd) { @@ -93,6 +106,7 @@ size_t len=0; char *buf=NULL; char *password=NULL; + char whoareyou[256]=""; if(async_read(&cmd, &buf, &len)) { logp("unable to read initial message\n"); @@ -114,7 +128,23 @@ if(cp) *cversion=strdup(cp); } free(buf); buf=NULL; - async_write_str(CMD_GEN, "whoareyou"); + + snprintf(whoareyou, sizeof(whoareyou), "whoareyou"); + if(*cversion) + { + long min_ver=0; + long cli_ver=0; + if((min_ver=version_to_long("1.3.2"))<0 + || (cli_ver=version_to_long(*cversion))<0) + return -1; + // Stick the server version on the end of the whoareyou string. + // if the client version is recent enough. + if(min_ver<=cli_ver) + snprintf(whoareyou, sizeof(whoareyou), + "whoareyou:%s", VERSION); + } + + async_write_str(CMD_GEN, whoareyou); if(async_read(&cmd, &buf, &len) || !len) { logp("unable to get client name\n"); diff -Nru burp-1.3.0+20120214git/src/autoupgrade_client.c burp-1.3.10/src/autoupgrade_client.c --- burp-1.3.0+20120214git/src/autoupgrade_client.c 2012-02-13 13:13:38.000000000 +0000 +++ burp-1.3.10/src/autoupgrade_client.c 2012-07-27 00:36:21.000000000 +0000 @@ -12,53 +12,10 @@ static int receive_file(const char *autoupgrade_dir, const char *file, struct cntr *p1cntr) { int ret=0; -#ifdef HAVE_WIN32 - BFILE bfd; -#else - FILE *fp=NULL; -#endif char *incoming=NULL; - unsigned long long rcvdbytes=0; - unsigned long long sentbytes=0; - if(!(incoming=prepend_s(autoupgrade_dir, file, strlen(file)))) - { - ret=-1; - goto end; - } -#ifdef HAVE_WIN32 - binit(&bfd, 0); - bfd.use_backup_api=0; - //set_win32_backup(&bfd); - if(bopen(&bfd, incoming, - O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, - S_IRUSR | S_IWUSR)<0) - { - berrno be; - logp("Could not open for writing %s: %s\n", - incoming, be.bstrerror(errno)); - ret=-1; - goto end; - } -#else - if(!(fp=open_file(incoming, "wb"))) - { - ret=-1; - goto end; - } -#endif - -#ifdef HAVE_WIN32 - ret=transfer_gzfile_in(incoming, &bfd, NULL, &rcvdbytes, &sentbytes, - NULL, 0, p1cntr, NULL); - bclose(&bfd); -#else - ret=transfer_gzfile_in(incoming, NULL, fp, &rcvdbytes, &sentbytes, - NULL, 0, p1cntr, NULL); - close_fp(&fp); -#endif -end: - if(!ret) logp("received: %s\n", incoming); + return -1; + ret=receive_a_file(incoming, p1cntr); if(incoming) free(incoming); return ret; } @@ -154,8 +111,10 @@ /* Run the script here. */ ret=run_script(script_path, - NULL, 0, NULL, NULL, NULL, NULL, NULL, p1cntr, - 0 /* do not wait */); + NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, + p1cntr, + 0 /* do not wait */, 1 /* use logp */); /* To get round Windows problems to do with installing over files that the current process is running from, I am forking the child, then immediately exiting the parent process. */ diff -Nru burp-1.3.0+20120214git/src/autoupgrade_server.c burp-1.3.10/src/autoupgrade_server.c --- burp-1.3.0+20120214git/src/autoupgrade_server.c 2012-02-13 13:13:38.000000000 +0000 +++ burp-1.3.10/src/autoupgrade_server.c 2012-07-27 00:36:21.000000000 +0000 @@ -6,25 +6,6 @@ #include "asyncio.h" #include "autoupgrade_server.h" -static int send_a_file(const char *path, struct cntr *p1cntr) -{ - int ret=0; - FILE *fp=NULL; - unsigned long long bytes=0; - if(open_file_for_send(NULL, &fp, path, 0, p1cntr) - || send_whole_file_gz(path, "datapth", 0, &bytes, NULL, - p1cntr, 9, /* compression */ - NULL, fp, NULL, 0)) - { - ret=-1; - goto end; - } - logp("Sent %s\n", path); -end: - close_file_for_send(NULL, &fp); - return ret; -} - // Return -1 on error or success, 0 to continue normally. int autoupgrade_server(long ser_ver, long cli_ver, const char *os, struct config *conf, struct cntr *p1cntr) { diff -Nru burp-1.3.0+20120214git/src/backup_phase1_client.c burp-1.3.10/src/backup_phase1_client.c --- burp-1.3.0+20120214git/src/backup_phase1_client.c 2012-02-13 13:13:38.000000000 +0000 +++ burp-1.3.10/src/backup_phase1_client.c 2012-07-27 00:36:21.000000000 +0000 @@ -30,7 +30,11 @@ char attribs[MAXSTRING]; if(!file_is_included(conf->incexcdir, conf->iecount, - conf->excext, conf->excount, ff->fname)) return 0; + conf->incext, conf->incount, + conf->excext, conf->excount, + conf->increg, conf->ircount, + conf->excreg, conf->ercount, + ff->fname, top_level)) return 0; #ifdef HAVE_WIN32 // Useful Windows attributes debug /* @@ -54,9 +58,35 @@ */ if(ff->winattr & FILE_ATTRIBUTE_ENCRYPTED) { - if(ff->type!=FT_DIREND) - logw(p1cntr, "EFS not yet supported: %s", ff->fname); - return 0; +// if(ff->type!=FT_DIREND) +// logw(p1cntr, "EFS not yet supported: %s", ff->fname); +// return 0; + + if(ff->type==FT_REGE + || ff->type==FT_REG + || ff->type==FT_DIRBEGIN) + { + encode_stat(attribs, + &ff->statp, ff->winattr, conf->compression); + if(async_write_str(CMD_STAT, attribs) + || async_write_str(CMD_EFS_FILE, ff->fname)) + return -1; + do_filecounter(p1cntr, CMD_EFS_FILE, 1); + if(ff->type==FT_REG) + do_filecounter_bytes(p1cntr, + (unsigned long long)ff->statp.st_size); + return 0; + } + else if(ff->type==FT_DIREND) + return 0; + else + { + // Hopefully, here is never reached. + logw(p1cntr, "EFS type %d not yet supported: %s", + ff->type, + ff->fname); + return 0; + } } #endif @@ -65,7 +95,7 @@ switch (ff->type) { case FT_LNKSAVED: //printf("Lnka: %s -> %s\n", ff->fname, ff->link); - encode_stat(attribs, &ff->statp, ff->winattr); + encode_stat(attribs, &ff->statp, ff->winattr, conf->compression); if(async_write_str(CMD_STAT, attribs) || async_write_str(CMD_HARD_LINK, ff->fname) || async_write_str(CMD_HARD_LINK, ff->link)) @@ -78,7 +108,7 @@ case FT_FIFO: case FT_REGE: case FT_REG: - encode_stat(attribs, &ff->statp, ff->winattr); + encode_stat(attribs, &ff->statp, ff->winattr, conf->compression); if(async_write_str(CMD_STAT, attribs) || async_write_str(filesymbol, ff->fname)) return -1; @@ -90,7 +120,7 @@ break; case FT_LNK: //printf("link: %s -> %s\n", ff->fname, ff->link); - encode_stat(attribs, &ff->statp, ff->winattr); + encode_stat(attribs, &ff->statp, ff->winattr, conf->compression); if(async_write_str(CMD_STAT, attribs) || async_write_str(CMD_SOFT_LINK, ff->fname) || async_write_str(CMD_SOFT_LINK, ff->link)) @@ -102,8 +132,6 @@ case FT_DIREND: return 0; case FT_NOFSCHG: - case FT_INVALIDFS: - case FT_INVALIDDT: case FT_DIRBEGIN: case FT_REPARSE: case FT_JUNCTION: @@ -111,10 +139,6 @@ char errmsg[100] = ""; if (ff->type == FT_NOFSCHG) snprintf(errmsg, sizeof(errmsg), _("\t[will not descend: file system change not allowed]")); - else if (ff->type == FT_INVALIDFS) - snprintf(errmsg, sizeof(errmsg), _("\t[will not descend: disallowed file system]")); - else if (ff->type == FT_INVALIDDT) - snprintf(errmsg, sizeof(errmsg), _("\t[will not descend: disallowed drive type]")); if(*errmsg) { snprintf(msg, sizeof(msg), @@ -123,7 +147,8 @@ } else { - encode_stat(attribs, &ff->statp, ff->winattr); + encode_stat(attribs, + &ff->statp, ff->winattr, conf->compression); if(async_write_str(CMD_STAT, attribs)) return -1; #if defined(WIN32_VSS) if(async_write_str(filesymbol, ff->fname)) return -1; @@ -138,7 +163,7 @@ } break; case FT_SPEC: // special file - fifo, socket, device node... - encode_stat(attribs, &ff->statp, ff->winattr); + encode_stat(attribs, &ff->statp, ff->winattr, conf->compression); if(async_write_str(CMD_STAT, attribs) || async_write_str(CMD_SPECIAL, ff->fname)) return -1; diff -Nru burp-1.3.0+20120214git/src/backup_phase1_server.c burp-1.3.10/src/backup_phase1_server.c --- burp-1.3.0+20120214git/src/backup_phase1_server.c 2012-02-13 13:13:38.000000000 +0000 +++ burp-1.3.10/src/backup_phase1_server.c 2012-07-27 01:28:43.000000000 +0000 @@ -58,13 +58,18 @@ if(sb.cmd==CMD_FILE || sb.cmd==CMD_ENC_FILE || sb.cmd==CMD_METADATA - || sb.cmd==CMD_ENC_METADATA) + || sb.cmd==CMD_ENC_METADATA + || sb.cmd==CMD_EFS_FILE) do_filecounter_bytes(p1cntr, (unsigned long long)sb.statp.st_size); } free_sbuf(&sb); - if(p1zp) gzclose(p1zp); + if(gzclose(p1zp)) + { + logp("error closing %s in backup_phase1_server\n", phase1tmp); + ret=-1; + } if(!ret && do_rename(phase1tmp, phase1data)) ret=-1; free(phase1tmp); @@ -101,7 +106,8 @@ if(p1b.cmd==CMD_FILE || p1b.cmd==CMD_ENC_FILE || p1b.cmd==CMD_METADATA - || p1b.cmd==CMD_ENC_METADATA) + || p1b.cmd==CMD_ENC_METADATA + || p1b.cmd==CMD_EFS_FILE) do_filecounter_bytes(p1cntr, (unsigned long long)p1b.statp.st_size); } @@ -202,7 +208,7 @@ return 0; } -int do_resume(gzFile p1zp, FILE *p2fp, FILE *ucfp, gzFile cmanfp, struct dpth *dpth, struct config *cconf, struct cntr *p1cntr, struct cntr *cntr) +int do_resume(gzFile p1zp, FILE *p2fp, FILE *ucfp, struct dpth *dpth, struct config *cconf, struct cntr *p1cntr, struct cntr *cntr) { int ret=0; struct sbuf p1b; diff -Nru burp-1.3.0+20120214git/src/backup_phase1_server.h burp-1.3.10/src/backup_phase1_server.h --- burp-1.3.0+20120214git/src/backup_phase1_server.h 2012-02-13 13:13:38.000000000 +0000 +++ burp-1.3.10/src/backup_phase1_server.h 2012-07-27 00:36:21.000000000 +0000 @@ -2,6 +2,6 @@ #define BACKUP_PHASE1_SERVER_H extern int backup_phase1_server(const char *phase1data, const char *client, struct cntr *p1cntr, struct cntr *cntr, struct config *cconf); -extern int do_resume(gzFile p1zp, FILE *p2fp, FILE *ucfp, gzFile cmanfp, struct dpth *dpth, struct config *cconf, struct cntr *p1cntr, struct cntr *cntr); +extern int do_resume(gzFile p1zp, FILE *p2fp, FILE *ucfp, struct dpth *dpth, struct config *cconf, struct cntr *p1cntr, struct cntr *cntr); #endif diff -Nru burp-1.3.0+20120214git/src/backup_phase2_client.c burp-1.3.10/src/backup_phase2_client.c --- burp-1.3.0+20120214git/src/backup_phase2_client.c 2012-02-13 13:13:38.000000000 +0000 +++ burp-1.3.10/src/backup_phase2_client.c 2012-07-27 00:36:21.000000000 +0000 @@ -122,13 +122,13 @@ return r; } -static int send_whole_file_w(const char *fname, const char *datapth, int quick_read, unsigned long long *bytes, const char *encpassword, struct cntr *cntr, int compression, BFILE *bfd, FILE *fp, const char *extrameta, size_t elen) +static int send_whole_file_w(char cmd, const char *fname, const char *datapth, int quick_read, unsigned long long *bytes, const char *encpassword, struct cntr *cntr, int compression, BFILE *bfd, FILE *fp, const char *extrameta, size_t elen) { - if(compression || encpassword) + if((compression || encpassword) && cmd!=CMD_EFS_FILE) return send_whole_file_gz(fname, datapth, quick_read, bytes, encpassword, cntr, compression, bfd, fp, extrameta, elen); else - return send_whole_file(fname, datapth, quick_read, bytes, + return send_whole_file(cmd, fname, datapth, quick_read, bytes, cntr, bfd, fp, extrameta, elen); } @@ -183,7 +183,7 @@ } else if(buf) { - //logp("got: %c:%s\n", cmd, buf); + //logp("now: %c:%s\n", cmd, buf); if(cmd==CMD_DATAPTH) { sb.datapth=buf; @@ -203,7 +203,8 @@ else if(cmd==CMD_FILE || cmd==CMD_ENC_FILE || cmd==CMD_METADATA - || cmd==CMD_ENC_METADATA) + || cmd==CMD_ENC_METADATA + || cmd==CMD_EFS_FILE) { int forget=0; int64_t winattr=0; @@ -234,13 +235,13 @@ } if(conf->min_file_size - && statbuf.st_sizemin_file_size) + && statbuf.st_size<(boffset_t)conf->min_file_size) { logw(cntr, "File size decreased below min_file_size after initial scan: %s", sb.path); forget++; } else if(conf->max_file_size - && statbuf.st_size>conf->max_file_size) + && statbuf.st_size>(boffset_t)conf->max_file_size) { logw(cntr, "File size increased above max_file_size after initial scan: %s", sb.path); forget++; @@ -248,8 +249,14 @@ if(!forget) { - encode_stat(attribs, &statbuf, winattr); - if(open_file_for_send(&bfd, &fp, + encode_stat(attribs, + &statbuf, winattr, conf->compression); + if(open_file_for_send( +#ifdef HAVE_WIN32 + &bfd, NULL, +#else + NULL, &fp, +#endif sb.path, winattr, cntr)) forget++; } @@ -315,7 +322,7 @@ // send the whole file. if(async_write_str(CMD_STAT, attribs) || async_write_str(cmd, sb.path) - || send_whole_file_w(sb.path, + || send_whole_file_w(cmd, sb.path, NULL, 0, &bytes, conf->encryption_password, cntr, conf->compression, @@ -327,11 +334,7 @@ } else { - //if(cmd==CMD_METADATA - // || cmd==CMD_ENC_METADATA) - do_filecounter(cntr, cmd, 1); - //else - // do_filecounter(cntr, CMD_NEW_FILE, 1); + do_filecounter(cntr, cmd, 1); do_filecounter_bytes(cntr, bytes); do_filecounter_sentbytes(cntr, bytes); } diff -Nru burp-1.3.0+20120214git/src/backup_phase2_server.c burp-1.3.10/src/backup_phase2_server.c --- burp-1.3.0+20120214git/src/backup_phase2_server.c 2012-02-13 13:13:38.000000000 +0000 +++ burp-1.3.10/src/backup_phase2_server.c 2012-07-27 02:10:05.000000000 +0000 @@ -13,31 +13,66 @@ #include "backup_phase2_server.h" #include "current_backups_server.h" +static int treedata(struct sbuf *sb) +{ + // Windows is sending directory data as if it is file data - this + // cannot be saved in a tree structure. + // So, need to decode the stat to test for whether it is a directory. + decode_stat(sb->statbuf, &(sb->statp), + &(sb->winattr), &(sb->compression)); + if(S_ISDIR(sb->statp.st_mode)) return 0; + + if(sb->cmd==CMD_FILE + || sb->cmd==CMD_ENC_FILE + || sb->cmd==CMD_EFS_FILE) + return 1; + return 0; +} + static int start_to_receive_new_file(struct sbuf *sb, const char *datadirtmp, struct dpth *dpth, struct cntr *cntr, struct config *cconf) { - int ret=0; + int ret=-1; char *rpath=NULL; + int istreedata=0; //logp("start to receive: %s\n", sb->path); - if(!(sb->datapth=strdup(dpth->path))) // file data path + if(cconf->directory_tree) istreedata=treedata(sb); + + if(istreedata) { - log_and_send("out of memory"); - ret=-1; + // We want to place this file in a directory structure like + // the directory structure on the original client. + if(!(sb->datapth=prepend_s("t", sb->path, strlen(sb->path)))) + { + log_and_send("out of memory"); + goto end; + } + } + else + { + mk_dpth(dpth, cconf, sb->cmd); + if(!(sb->datapth=strdup(dpth->path))) // file data path + { + log_and_send("out of memory"); + goto end; + } } - else if(build_path(datadirtmp, sb->datapth, strlen(sb->datapth), + if(build_path(datadirtmp, sb->datapth, strlen(sb->datapth), &rpath, datadirtmp)) { log_and_send("build path failed"); - ret=-1; + goto end; } - else if(!(sb->fp=open_file(rpath, "wb"))) + if(!(sb->fp=open_file(rpath, "wb"))) { log_and_send("make file failed"); - ret=-1; + goto end; } if(rpath) free(rpath); - incr_dpth(dpth, cconf); + if(!istreedata) incr_dpth(dpth, cconf); + ret=0; +end: return ret; } @@ -46,7 +81,8 @@ return (cmd==CMD_FILE || cmd==CMD_ENC_FILE || cmd==CMD_METADATA - || cmd==CMD_ENC_METADATA); + || cmd==CMD_ENC_METADATA + || cmd==CMD_EFS_FILE); } static int process_changed_file(struct sbuf *cb, struct sbuf *p1b, const char *currentdata, struct cntr *cntr) @@ -67,7 +103,7 @@ logp("out of memory\n"); return -1; } - if(dpth_is_compressed(curpath)) + if(dpth_is_compressed(cb->compression, curpath)) p1b->sigzp=gzopen_file(curpath, "rb"); else p1b->sigfp=open_file(curpath, "rb"); @@ -175,17 +211,24 @@ static int maybe_process_file(struct sbuf *cb, struct sbuf *p1b, FILE *p2fp, FILE *ucfp, const char *currentdata, struct cntr *cntr, struct config *cconf) { int pcmp; +// logp("in maybe_proc %s\n", p1b->path); if(!(pcmp=sbuf_pathcmp(cb, p1b))) { int oldcompressed=0; + // If the file type changed, I think it is time to back it + // up again (for example, EFS changing to normal file, or + // back again). + if(cb->cmd!=p1b->cmd) + return process_new_file(cb, p1b, p2fp, ucfp, cntr); + // mtime is the actual file data. // ctime is the attributes or meta data. if(cb->statp.st_mtime==p1b->statp.st_mtime && cb->statp.st_ctime==p1b->statp.st_ctime) { // got an unchanged file - //logp("got unchanged file: %s\n", cb->path); + //logp("got unchanged file: %s %c %c\n", cb->path, cb->cmd, p1b->cmd); return process_unchanged_file(cb, ucfp, cntr); } @@ -199,7 +242,9 @@ || p1b->cmd==CMD_ENC_METADATA // TODO: make unencrypted metadata use the librsync || cb->cmd==CMD_METADATA - || p1b->cmd==CMD_METADATA) + || p1b->cmd==CMD_METADATA + || cb->cmd==CMD_EFS_FILE + || p1b->cmd==CMD_EFS_FILE) return process_new_file(cb, p1b, p2fp, ucfp, cntr); else @@ -216,6 +261,8 @@ || p1b->cmd==CMD_ENC_FILE || cb->cmd==CMD_ENC_METADATA || p1b->cmd==CMD_ENC_METADATA + || cb->cmd==CMD_EFS_FILE + || p1b->cmd==CMD_EFS_FILE // TODO: make unencrypted metadata use the librsync || cb->cmd==CMD_METADATA || p1b->cmd==CMD_METADATA) @@ -223,7 +270,7 @@ // Get new files if they have switched between compression on // or off. - if(cb->datapth && dpth_is_compressed(cb->datapth)) + if(cb->datapth && dpth_is_compressed(cb->compression, cb->datapth)) oldcompressed=1; if( ( oldcompressed && !cconf->compression) || (!oldcompressed && cconf->compression)) @@ -348,14 +395,16 @@ static int finish_delta(struct sbuf *rb, const char *working, const char *deltmppath) { int ret=0; - char deltmp[64]=""; + char *deltmp=NULL; char *delpath=NULL; - snprintf(deltmp, sizeof(deltmp), "deltas.forward/%s", rb->datapth); - if(!(delpath=prepend_s(working, deltmp, strlen(deltmp))) + if(!(deltmp=prepend_s("deltas.forward", + rb->datapth, strlen(rb->datapth))) + || !(delpath=prepend_s(working, deltmp, strlen(deltmp))) || mkpath(&delpath, working) || do_rename(deltmppath, delpath)) ret=-1; if(delpath) free(delpath); + if(deltmp) free(deltmp); return ret; } @@ -406,15 +455,23 @@ // Write it to the phase2 file, and free the // buffers. - close_fp(&(rb->fp)); - gzclose_fp(&(rb->zp)); + if(close_fp(&(rb->fp))) + { + logp("error closing delta for %s in receive\n", rb->path); + ret=-1; + } + if(gzclose_fp(&(rb->zp))) + { + logp("error gzclosing delta for %s in receive\n", rb->path); + ret=-1; + } rb->endfile=rbuf; rb->elen=rlen; rbuf=NULL; - if(rb->receivedelta + if(!ret && rb->receivedelta && finish_delta(rb, working, deltmppath)) ret=-1; - else + else if(!ret) { if(sbuf_to_manifest(rb, p2fp, NULL)) ret=-1; @@ -466,10 +523,7 @@ rb->slen=rlen; rbuf=NULL; } - else if(rcmd==CMD_FILE - || rcmd==CMD_ENC_FILE - || rcmd==CMD_METADATA - || rcmd==CMD_ENC_METADATA) + else if(filedata(rcmd)) { rb->cmd=rcmd; rb->plen=rlen; @@ -569,8 +623,7 @@ if(!(p2fp=open_file(phase2data, "r+b"))) goto error; - if(resume && do_resume(p1zp, p2fp, ucfp, cmanfp, dpth, cconf, - p1cntr, cntr)) + if(resume && do_resume(p1zp, p2fp, ucfp, dpth, cconf, p1cntr, cntr)) goto error; logp("Begin phase2 (receive file data)\n"); @@ -670,13 +723,23 @@ error: ret=-1; end: + if(close_fp(&p2fp)) + { + logp("error closing %s in backup_phase2_server\n", + phase2data); + ret=-1; + } + if(close_fp(&ucfp)) + { + logp("error closing %s in backup_phase2_server\n", + unchangeddata); + ret=-1; + } free(deltmppath); free_sbuf(&cb); free_sbuf(&p1b); free_sbuf(&rb); gzclose_fp(&p1zp); - close_fp(&p2fp); - close_fp(&ucfp); if(!ret) unlink(phase1data); logp("End phase2 (receive file data)\n"); diff -Nru burp-1.3.0+20120214git/src/backup_phase3_server.c burp-1.3.10/src/backup_phase3_server.c --- burp-1.3.0+20120214git/src/backup_phase3_server.c 2012-02-13 13:13:38.000000000 +0000 +++ burp-1.3.10/src/backup_phase3_server.c 2012-07-27 02:04:19.000000000 +0000 @@ -111,9 +111,19 @@ free_sbuf(&p2b); close_fp(&p2fp); - close_fp(&mp); close_fp(&ucfp); - gzclose_fp(&mzp); + if(close_fp(&mp)) + { + logp("error closing %s in backup_phase3_server\n", + manifesttmp); + ret=-1; + } + if(gzclose_fp(&mzp)) + { + logp("error gzclosing %s in backup_phase3_server\n", + manifesttmp); + ret=-1; + } if(!ret) { diff -Nru burp-1.3.0+20120214git/src/backup_phase4_server.c burp-1.3.10/src/backup_phase4_server.c --- burp-1.3.0+20120214git/src/backup_phase4_server.c 2012-02-13 13:13:38.000000000 +0000 +++ burp-1.3.10/src/backup_phase4_server.c 2012-07-27 02:11:08.000000000 +0000 @@ -16,7 +16,7 @@ #include #include -static int make_rev_sig(const char *dst, const char *sig, const char *endfile, struct cntr *cntr) +static int make_rev_sig(const char *dst, const char *sig, const char *endfile, int compression, struct cntr *cntr) { FILE *dstfp=NULL; gzFile dstzp=NULL; @@ -24,7 +24,7 @@ rs_result result; //logp("make rev sig: %s %s\n", dst, sig); - if(dpth_is_compressed(dst)) + if(dpth_is_compressed(compression, dst)) dstzp=gzopen_file(dst, "rb"); else dstfp=open_file(dst, "rb"); @@ -41,12 +41,16 @@ RS_DEFAULT_STRONG_LEN, NULL, cntr); gzclose_fp(&dstzp); close_fp(&dstfp); - close_fp(&sigp); + if(close_fp(&sigp)) + { + logp("error closing %s in make_rev_sig\n", sig); + return -1; + } //logp("end of make rev sig\n"); return result; } -static int make_rev_delta(const char *src, const char *sig, const char *del, struct cntr *cntr, struct config *cconf) +static int make_rev_delta(const char *src, const char *sig, const char *del, int compression, struct cntr *cntr, struct config *cconf) { gzFile srczp=NULL; FILE *srcfp=NULL; @@ -67,7 +71,7 @@ //logp("make rev deltb: %s %s %s\n", src, sig, del); - if(dpth_is_compressed(src)) + if(dpth_is_compressed(compression, src)) srczp=gzopen_file(src, "rb"); else srcfp=open_file(src, "rb"); @@ -89,7 +93,11 @@ return -1; } result=rs_delta_gzfile(sumset, srcfp, srczp, NULL, delzp, NULL, cntr); - gzclose_fp(&delzp); + if(gzclose_fp(&delzp)) + { + logp("error closing %s in make_rev_delta\n", del); + result=RS_IO_ERROR; + } } else { @@ -102,7 +110,14 @@ return -1; } result=rs_delta_gzfile(sumset, srcfp, srczp, delfp, NULL, NULL, cntr); - close_fp(&delfp); + if(close_fp(&delfp)) + { + logp("error closing %s in make_rev_delta\n", del); + gzclose_fp(&srczp); + close_fp(&srcfp); + rs_free_sumset(sumset); + return -1; + } } rs_free_sumset(sumset); @@ -113,7 +128,7 @@ } -static int gen_rev_delta(const char *sigpath, const char *deltadir, const char *oldpath, const char *finpath, const char *path, const char *endfile, struct cntr *cntr, struct config *cconf) +static int gen_rev_delta(const char *sigpath, const char *deltadir, const char *oldpath, const char *finpath, const char *path, const char *endfile, int compression, struct cntr *cntr, struct config *cconf) { int ret=0; char *delpath=NULL; @@ -134,12 +149,14 @@ logp("could not mkpaths for: %s\n", delpath); ret=-1; } - else if(make_rev_sig(finpath, sigpath, endfile, cntr)) + else if(make_rev_sig(finpath, sigpath, + endfile, compression, cntr)) { logp("could not make signature from: %s\n", finpath); ret=-1; } - else if(make_rev_delta(oldpath, sigpath, delpath, cntr, cconf)) + else if(make_rev_delta(oldpath, sigpath, delpath, + compression, cntr, cconf)) { logp("could not make delta from: %s\n", oldpath); ret=-1; @@ -149,7 +166,7 @@ return ret; } -static int inflate_or_link_oldfile(const char *oldpath, const char *infpath, struct config *cconf) +static int inflate_or_link_oldfile(const char *oldpath, const char *infpath, int compression, struct config *cconf) { int ret=0; struct stat statp; @@ -160,7 +177,7 @@ return -1; } - if(dpth_is_compressed(oldpath)) + if(dpth_is_compressed(compression, oldpath)) { FILE *source=NULL; FILE *dest=NULL; @@ -179,7 +196,11 @@ // just close the destination and we have duplicated a // zero length file. logp("asked to inflate zero length file: %s\n", oldpath); - close_fp(&dest); + if(close_fp(&dest)) + { + logp("error closing %s in inflate_or_link_oldfile\n", infpath); + return -1; + } return 0; } if(!(source=open_file(oldpath, "rb"))) @@ -190,7 +211,12 @@ if((ret=zlib_inflate(source, dest))!=Z_OK) logp("zlib_inflate returned: %d\n", ret); close_fp(&source); - close_fp(&dest); + if(close_fp(&dest)) + { + logp("error closing %s in inflate_or_link_oldfile\n", + infpath); + return -1; + } } else { @@ -202,7 +228,7 @@ return ret; } -static int jiggle(const char *datapth, const char *currentdata, const char *datadirtmp, const char *datadir, const char *deltabdir, const char *deltafdir, const char *sigpath, const char *endfile, int hardlinked, struct cntr *cntr, struct config *cconf) +static int jiggle(const char *datapth, const char *currentdata, const char *datadirtmp, const char *datadir, const char *deltabdir, const char *deltafdir, const char *sigpath, const char *endfile, const char *deletionsfile, FILE **delfp, struct sbuf *sb, int hardlinked, int compression, struct cntr *cntr, struct config *cconf) { int ret=0; struct stat statp; @@ -252,7 +278,7 @@ } else if(!lstat(deltafpath, &statp) && S_ISREG(statp.st_mode)) { - char *cp=NULL; + int lrs; char *infpath=NULL; // Got a forward patch to do. @@ -260,42 +286,58 @@ // otherwise the librsync patch will take // forever, because it will be doing seeks // all over the place, and gzseeks are slow. - - if(!(infpath=strdup(deltafpath))) + if(!(infpath=prepend_s(deltafdir, + "inflate", strlen("inflate")))) { logp("out of memory\n"); ret=-1; goto cleanup; } - else if(!(cp=strrchr(infpath, '.'))) - { - logp("could not strip the suffix from '%s'\n", infpath); - ret=-1; - goto cleanup; - } - *cp='\0'; //logp("Fixing up: %s\n", datapth); - if(inflate_or_link_oldfile(oldpath, infpath, cconf)) + if(inflate_or_link_oldfile(oldpath, infpath, compression, cconf)) { logp("error when inflating old file: %s\n", oldpath); ret=-1; + free(infpath); goto cleanup; } - if(do_patch(infpath, deltafpath, newpath, cconf->compression, - cntr, cconf)) - { - logp("error when patching\n"); - ret=-1; + if((lrs=do_patch(infpath, deltafpath, newpath, + cconf->compression, + compression /* from the manifest */, cntr, cconf))) + { + logp("WARNING: librsync error when patching %s: %d\n", + oldpath, lrs); + do_filecounter(cntr, CMD_WARNING, 1); + // Try to carry on with the rest of the backup + // regardless. + //ret=-1; // Remove anything that got written. unlink(newpath); + unlink(infpath); + free(infpath); + + // First, note that we want to remove this entry from + // the manifest. + if(!*delfp && !(*delfp=open_file(deletionsfile, "ab"))) + { + // Could not mark this file as deleted. Fatal. + ret=-1; + goto cleanup; + } + if(sbuf_to_manifest(sb, *delfp, NULL)) + ret=-1; + if(fflush(*delfp)) + { + logp("error fflushing deletions file in jiggle: %s\n", strerror(errno)); + ret=-1; + } + goto cleanup; } // Get rid of the inflated old file. - // This will also remove it if there was an - // error. unlink(infpath); free(infpath); @@ -306,7 +348,7 @@ { if(gen_rev_delta(sigpath, deltabdir, oldpath, newpath, datapth, endfile, - cntr, cconf)) + compression, cntr, cconf)) { ret=-1; goto cleanup; @@ -434,9 +476,122 @@ return !ret; } +static int maybe_delete_files_from_manifest(const char *manifest, const char *deletionsfile, struct config *cconf, struct cntr *cntr) +{ + int ars=0; + int ret=0; + int pcmp=0; + FILE *dfp=NULL; + struct sbuf db; + struct sbuf mb; + gzFile nmzp=NULL; + gzFile omzp=NULL; + char *manifesttmp=NULL; + struct stat statp; + + if(lstat(deletionsfile, &statp)) + { + // No deletions, no problem. + return 0; + } + logp("Performing deletions on manifest\n"); + + if(!(manifesttmp=get_tmp_filename(manifest))) + { + ret=-1; + goto end; + } + + if(!(dfp=open_file(deletionsfile, "rb")) + || !(omzp=gzopen_file(manifest, "rb")) + || !(nmzp=gzopen_file(manifesttmp, comp_level(cconf)))) + { + ret=-1; + goto end; + } + + init_sbuf(&db); + init_sbuf(&mb); + + while(omzp || dfp) + { + if(dfp && !db.path && (ars=sbuf_fill(dfp, NULL, &db, cntr))) + { + if(ars<0) { ret=-1; break; } + // ars==1 means it ended ok. + close_fp(&dfp); + } + if(omzp && !mb.path && (ars=sbuf_fill(NULL, omzp, &mb, cntr))) + { + if(ars<0) { ret=-1; break; } + // ars==1 means it ended ok. + gzclose_fp(&omzp); + } + + if(mb.path && !db.path) + { + if(sbuf_to_manifest(&mb, NULL, nmzp)) { ret=-1; break; } + free_sbuf(&mb); + } + else if(!mb.path && db.path) + { + free_sbuf(&db); + } + else if(!mb.path && !db.path) + { + continue; + } + else if(!(pcmp=sbuf_pathcmp(&mb, &db))) + { + // They were the same - do not write. + free_sbuf(&mb); + free_sbuf(&db); + } + else if(pcmp<0) + { + // Behind in manifest. Write. + if(sbuf_to_manifest(&mb, NULL, nmzp)) { ret=-1; break; } + free_sbuf(&mb); + } + else + { + // Behind in deletions file. Do not write. + free_sbuf(&db); + } + } + +end: + if(gzclose_fp(&nmzp)) + { + logp("error closing %s in maybe_delete_files_from_manifest\n", + manifesttmp); + ret=-1; + } + + close_fp(&dfp); + gzclose_fp(&omzp); + free_sbuf(&db); + free_sbuf(&mb); + if(!ret) + { + unlink(deletionsfile); + if(do_rename(manifesttmp, manifest)) + { + free(manifesttmp); + return -1; + } + } + if(manifesttmp) + { + unlink(manifesttmp); + free(manifesttmp); + } + return ret; +} + /* Need to make all the stuff that this does atomic so that existing backups never get broken, even if somebody turns the power off on the server. */ -static int atomic_data_jiggle(const char *finishing, const char *working, const char *manifest, const char *current, const char *currentdata, const char *datadir, const char *datadirtmp, struct config *cconf, const char *client, int hardlinked, unsigned long bno, struct cntr *p1cntr, struct cntr *cntr) +static int atomic_data_jiggle(const char *finishing, const char *working, const char *manifest, const char *current, const char *currentdata, const char *datadir, const char *datadirtmp, const char *deletionsfile, struct config *cconf, const char *client, int hardlinked, unsigned long bno, struct cntr *p1cntr, struct cntr *cntr) { int ret=0; int ars=0; @@ -450,6 +605,8 @@ gzFile zp=NULL; struct sbuf sb; + FILE *delfp=NULL; + logp("Doing the atomic data jiggle...\n"); if(!(tmpman=get_tmp_filename(manifest))) return -1; @@ -486,8 +643,10 @@ if((ret=jiggle(sb.datapth, currentdata, datadirtmp, datadir, deltabdir, deltafdir, - sigpath, sb.endfile, - hardlinked, cntr, cconf))) break; + sigpath, sb.endfile, deletionsfile, &delfp, + &sb, + hardlinked, sb.compression, cntr, cconf))) + break; } free_sbuf(&sb); } @@ -496,15 +655,22 @@ if(ars>0) ret=0; else ret=-1; } - gzclose_fp(&zp); - if(ret) + if(close_fp(&delfp)) { - // Remove the temporary data directory, we have now removed - // everything useful from it. - sync(); // try to help CIFS - recursive_delete(deltafdir, NULL, FALSE /* do not del files */); + logp("error closing %s in atomic_data_jiggle\n", deletionsfile); + ret=-1; } + gzclose_fp(&zp); + + if(maybe_delete_files_from_manifest(manifest, deletionsfile, + cconf, cntr)) ret=-1; + + // Remove the temporary data directory, we have probably removed + // useful files from it. + sync(); // try to help CIFS + recursive_delete(deltafdir, NULL, FALSE /* do not del files */); + if(deltabdir) free(deltabdir); if(deltafdir) free(deltafdir); if(sigpath) free(sigpath); @@ -517,6 +683,7 @@ int ret=0; struct stat statp; char *manifest=NULL; + char *deletionsfile=NULL; char *datadir=NULL; char *datadirtmp=NULL; char *currentdup=NULL; @@ -539,6 +706,7 @@ if(!(datadir=prepend_s(finishing, "data", strlen("data"))) || !(datadirtmp=prepend_s(finishing, "data.tmp", strlen("data.tmp"))) || !(manifest=prepend_s(finishing, "manifest.gz", strlen("manifest.gz"))) + || !(deletionsfile=prepend_s(finishing, "deletions", strlen("deletions"))) || !(currentdup=prepend_s(finishing, "currentdup", strlen("currentdup"))) || !(currentduptmp=prepend_s(finishing, "currentdup.tmp", strlen("currentdup.tmp"))) || !(currentdupdata=prepend_s(currentdup, "data", strlen("data"))) @@ -553,7 +721,7 @@ goto endfunc; } - if(!(logfp=open_file(logpath, "ab")) || set_logfp(logfp)) + if(!(logfp=open_file(logpath, "ab")) || set_logfp(logfp, cconf)) { ret=-1; goto endfunc; @@ -616,7 +784,12 @@ goto endfunc; } fprintf(fwd, "%s\n", tstmp); - close_fp(&fwd); + if(close_fp(&fwd)) + { + log_and_send("error closing forward file\n"); + return -1; + goto endfunc; + } if(newdup) { @@ -658,7 +831,12 @@ // be useful one day when wondering when the next // backup, now deleted, was made. fprintf(hfp, "%s\n", tstmp); - close_fp(&hfp); + if(close_fp(&hfp)) + { + logp("error closing hardlinked indication\n"); + ret=-1; + goto endfunc; + } logp(" doing hardlinked archive\n"); logp(" will not generate reverse deltas\n"); } @@ -672,7 +850,7 @@ if(atomic_data_jiggle(finishing, working, manifest, currentdup, currentdupdata, - datadir, datadirtmp, cconf, client, + datadir, datadirtmp, deletionsfile, cconf, client, hardlinked, bno, p1cntr, cntr)) { logp("could not finish up backup.\n"); @@ -730,7 +908,7 @@ print_filecounters(p1cntr, cntr, ACTION_BACKUP, 0); logp("Backup completed.\n"); logp("End phase4 (shuffle files)\n"); - set_logfp(NULL); // will close logfp. + set_logfp(NULL, cconf); // will close logfp. compress_filename(current, "log", "log.gz", cconf); @@ -738,6 +916,7 @@ if(datadir) free(datadir); if(datadirtmp) free(datadirtmp); if(manifest) free(manifest); + if(deletionsfile) free(deletionsfile); if(currentdup) free(currentdup); if(currentduptmp) free(currentduptmp); if(currentdupdata) free(currentdupdata); diff -Nru burp-1.3.0+20120214git/src/backup_phases.txt burp-1.3.10/src/backup_phases.txt --- burp-1.3.0+20120214git/src/backup_phases.txt 2012-02-13 13:13:38.000000000 +0000 +++ burp-1.3.10/src/backup_phases.txt 2012-07-27 00:36:21.000000000 +0000 @@ -1,7 +1,8 @@ backup_phase1_client: Scan the client filesystem and send stats to the server. backup_phase1_server: Receive the stats from the client. -backup_phase2_server: Request and receive changes from the client. +backup_phase2_server: Request and receive changes from the client and create + an unchanged list and a changed list. backup_phase2_client: Send the changes that the server requests. The work of the client is now finished. diff -Nru burp-1.3.0+20120214git/src/base64.c burp-1.3.10/src/base64.c --- burp-1.3.0+20120214git/src/base64.c 2012-02-13 13:13:38.000000000 +0000 +++ burp-1.3.10/src/base64.c 2012-07-27 00:36:21.000000000 +0000 @@ -32,9 +32,9 @@ * stored (not including the EOS). */ int -to_base64(intmax_t value, char *where) +to_base64(int64_t value, char *where) { - uintmax_t val; + uint64_t val; int i = 0; int n; @@ -56,7 +56,7 @@ val = value; where[i] = 0; do { - where[--i] = base64_digits[val & (uintmax_t)0x3F]; + where[--i] = base64_digits[val & (uint64_t)0x3F]; val >>= 6; } while (val); return n; @@ -70,9 +70,9 @@ * Returns the value. */ int -from_base64(intmax_t *value, const char *where) +from_base64(int64_t *value, const char *where) { - uintmax_t val = 0; + uint64_t val = 0; int i, neg; if (!base64_inited) @@ -89,6 +89,6 @@ val += base64_map[(uint8_t)where[i++]]; } - *value = neg ? -(intmax_t)val : (intmax_t)val; + *value = neg ? -(int64_t)val : (int64_t)val; return i; } diff -Nru burp-1.3.0+20120214git/src/base64.h burp-1.3.10/src/base64.h --- burp-1.3.0+20120214git/src/base64.h 2012-02-13 13:13:38.000000000 +0000 +++ burp-1.3.10/src/base64.h 2012-07-27 00:36:21.000000000 +0000 @@ -5,7 +5,7 @@ #define BASE64_SIZE(len) ((4 * len + 2) / 3 + 1) void base64_init (void); -int to_base64 (intmax_t value, char *where); -int from_base64 (intmax_t *value, const char *where); +int to_base64 (int64_t value, char *where); +int from_base64 (int64_t *value, const char *where); #endif diff -Nru burp-1.3.0+20120214git/src/bedup.c burp-1.3.10/src/bedup.c --- burp-1.3.0+20120214git/src/bedup.c 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/bedup.c 2012-07-27 00:36:21.000000000 +0000 @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include @@ -147,7 +147,7 @@ while(1) { - if((ogot=fread(obuf, 1, FULL_CHUNK, *ofp))<0) return 0; + ogot=fread(obuf, 1, FULL_CHUNK, *ofp); ngot=fread(nbuf, 1, FULL_CHUNK, *nfp); if(ogot!=ngot) return 0; for(i=0; id_name, ".") || !strcmp(dirinfo->d_name, "..") - || looks_like_vim_tmpfile(dirinfo->d_name)) + || looks_like_vim_tmpfile(dirinfo->d_name) + || !is_regular_file(conf->clientconfdir, dirinfo->d_name)) continue; if(gcount) diff -Nru burp-1.3.0+20120214git/src/bfile.c burp-1.3.10/src/bfile.c --- burp-1.3.0+20120214git/src/bfile.c 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/bfile.c 2012-07-27 00:36:21.000000000 +0000 @@ -14,12 +14,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* - * Bacula low level File I/O routines. This routine simulates - * open(), read(), write(), and close(), but using native routines. - * I.e. on Windows, we use Windows APIs. - * - */ #include "burp.h" #include "prog.h" @@ -77,58 +71,62 @@ //#define CREATE_FOR_DIR 2 //#define OVERWRITE_HIDDEN 4 -static int bopen_encrypted(BFILE *bfd, const char *fname, int flags, mode_t mode) +static int bopen_encrypted(BFILE *bfd, const char *fname, int flags, mode_t mode, int isdir) { + int ret=0; + ULONG ulFlags=0; char *win32_fname=NULL; char *win32_fname_wchar=NULL; if(!(p_OpenEncryptedFileRawA || p_OpenEncryptedFileRawW)) { + logp("no OpenEncryptedFileRaw pointers.\n"); return 0; } if (p_OpenEncryptedFileRawW && p_MultiByteToWideChar) { if(!(win32_fname_wchar=make_win32_path_UTF8_2_wchar_w(fname))) - logp("could not get widename!"); + logp("could not get widename!"); } if(!(win32_fname=unix_name_to_win32((char *)fname))) return 0; - if(flags & O_CREAT) /* Create */ + if((flags & O_CREAT) /* Create */ + || (flags & O_WRONLY)) /* Open existing for write */ { + ulFlags |= CREATE_FOR_IMPORT; + ulFlags |= OVERWRITE_HIDDEN; + if(isdir) ulFlags |= CREATE_FOR_DIR; } - else if (flags & O_WRONLY) /* Open existing for write */ + else /* Open existing for read */ { + ulFlags = CREATE_FOR_EXPORT; } - else /* Open existing for read */ + + if(p_OpenEncryptedFileRawW && p_MultiByteToWideChar) + { + // unicode open + ret=p_OpenEncryptedFileRawW((LPCWSTR)win32_fname_wchar, + ulFlags, &(bfd->pvContext)); + if(ret) bfd->mode=BF_CLOSED; + else bfd->mode=BF_READ; + goto end; + } + else { - int ret=0; - if(p_OpenEncryptedFileRawW && p_MultiByteToWideChar) - { - // unicode open for open existing read - ret=OpenEncryptedFileRawW((LPCWSTR)win32_fname_wchar, - CREATE_FOR_EXPORT, - &(bfd->pvContext)); - if(ret) bfd->mode=BF_CLOSED; - else bfd->mode=BF_READ; - goto end; - } - else - { - // ascii open - ret=OpenEncryptedFileRawA(win32_fname, - CREATE_FOR_EXPORT, - &(bfd->pvContext)); - if(ret) bfd->mode=BF_CLOSED; - else bfd->mode=BF_READ; - goto end; - } + // ascii open + ret=p_OpenEncryptedFileRawA(win32_fname, + ulFlags, &(bfd->pvContext)); + if(ret) bfd->mode=BF_CLOSED; + else bfd->mode=BF_READ; + goto end; } + end: if(win32_fname_wchar) free(win32_fname_wchar); if(win32_fname) free(win32_fname); return bfd->mode == BF_CLOSED ? -1 : 1; } -int bopen(BFILE *bfd, const char *fname, int flags, mode_t mode) +int bopen(BFILE *bfd, const char *fname, int flags, mode_t mode, int isdir) { char *win32_fname=NULL; char *win32_fname_wchar=NULL; @@ -136,7 +134,7 @@ DWORD dwaccess, dwflags, dwshare; if(bfd->winattr & FILE_ATTRIBUTE_ENCRYPTED) - return bopen_encrypted(bfd, fname, flags, mode); + return bopen_encrypted(bfd, fname, flags, mode, isdir); if (!(p_CreateFileA || p_CreateFileW)) { return 0; @@ -262,6 +260,14 @@ return bfd->mode == BF_CLOSED ? -1 : 1; } +static int bclose_encrypted(BFILE *bfd) +{ + CloseEncryptedFileRaw(bfd->pvContext); + bfd->pvContext=NULL; + bfd->mode = BF_CLOSED; + return 0; +} + /* * Returns 0 on success * -1 on error @@ -270,6 +276,8 @@ { int stat = 0; + if(!bfd) return 0; + if (bfd->errmsg) { free(bfd->errmsg); bfd->errmsg = NULL; @@ -278,6 +286,9 @@ return 0; } + if(bfd->winattr & FILE_ATTRIBUTE_ENCRYPTED) + return bclose_encrypted(bfd); + /* * We need to tell the API to release the buffer it * allocated in lpContext. We do so by calling the diff -Nru burp-1.3.0+20120214git/src/bfile.h burp-1.3.10/src/bfile.h --- burp-1.3.0+20120214git/src/bfile.h 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/bfile.h 2012-07-27 00:36:21.000000000 +0000 @@ -61,7 +61,7 @@ void binit(BFILE *bfd, int64_t winattr); bool set_win32_backup(BFILE *bfd); bool have_win32_api(); -int bopen(BFILE *bfd, const char *fname, int flags, mode_t mode); +int bopen(BFILE *bfd, const char *fname, int flags, mode_t mode, int isdir); int bclose(BFILE *bfd); ssize_t bread(BFILE *bfd, void *buf, size_t count); ssize_t bwrite(BFILE *bfd, void *buf, size_t count); diff -Nru burp-1.3.0+20120214git/src/ca_client.c burp-1.3.10/src/ca_client.c --- burp-1.3.0+20120214git/src/ca_client.c 1970-01-01 00:00:00.000000000 +0000 +++ burp-1.3.10/src/ca_client.c 2012-07-27 02:11:26.000000000 +0000 @@ -0,0 +1,205 @@ +#include "burp.h" +#include "prog.h" +#include "conf.h" +#include "ca_client.h" +#include "log.h" +#include "msg.h" +#include "handy.h" +#include "cmd.h" +#include "asyncio.h" +#include "counter.h" +#include "client_vss.h" + +static int generate_key_and_csr(struct config *conf, const char *csr_path) +{ + logp("Generating SSL key and certificate signing request\n"); + logp("Running '%s --key --keypath %s --request --requestpath %s --name %s'\n", conf->ca_burp_ca, conf->ssl_key, csr_path, conf->cname); +#ifdef HAVE_WIN32 + win32_enable_backup_privileges(1 /* ignore_errors */); +#endif + if(run_script(conf->ca_burp_ca, NULL, 0, "--key", "--keypath", + conf->ssl_key, "--request", "--requestpath", csr_path, + "--name", conf->cname, NULL, NULL, + NULL /* cntr */, + 1 /* wait */, + 0 /* do not use logp - stupid openssl prints lots of dots + one at a time with no way to turn it off */)) + { + logp("error when running '%s --key --keypath %s --request --requestpath %s --name %s'\n", + conf->ca_burp_ca, conf->ssl_key, csr_path, conf->cname); + return -1; + } + + return 0; +} + +/* Rewrite the config file with the ssl_peer_cn value changed to what the + server told us it should be. */ +static int rewrite_client_conf(struct config *conf) +{ + int ret=-1; + char p[32]=""; + FILE *dp=NULL; + FILE *sp=NULL; + char *tmp=NULL; + char buf[4096]=""; + + logp("Rewriting config file: %s\n", conf->configfile); + snprintf(p, sizeof(p), ".%d", getpid()); + if(!(tmp=prepend(conf->configfile, p, strlen(p), ""))) + goto end; + if(!(sp=open_file(conf->configfile, "rb")) + || !(dp=open_file(tmp, "wb"))) + goto end; + + while(fgets(buf, sizeof(buf), sp)) + { + char *copy=NULL; + char *field=NULL; + char *value=NULL; + + if(!(copy=strdup(buf))) + { + logp("out of memory\n"); + goto end; + } + if(config_get_pair(buf, &field, &value) + || !field || !value + || strcmp(field, "ssl_peer_cn")) + { + fprintf(dp, "%s", copy); + free(copy); + continue; + } + free(copy); + + fprintf(dp, "ssl_peer_cn = %s\n", conf->ssl_peer_cn); + } + close_fp(&sp); + if(close_fp(&dp)) + { + logp("error closing %s in rewrite_client_conf\n", tmp); + ret=-1; + goto end; + } +#ifdef HAVE_WIN32 + // Need to delete the destination, or Windows gets upset. + unlink(conf->configfile); +#endif + if(do_rename(tmp, conf->configfile)) goto end; + + ret=0; +end: + close_fp(&sp); + close_fp(&dp); + if(ret) + { + logp("Rewrite failed\n"); + unlink(tmp); + } + if(tmp) free(tmp); + return ret; +} + +/* Return 1 for everything OK, signed and returned, -1 for error, 0 for + nothing done. */ +int ca_client_setup(struct config *conf, struct cntr *p1cntr) +{ + char cmd; + int ret=-1; + size_t len=0; + char *buf=NULL; + char csr_path[256]=""; + char ssl_cert_tmp[512]=""; + char ssl_cert_ca_tmp[512]=""; + struct stat statp; + + // Do not continue if we have none of the following things set. + if( !conf->ca_burp_ca + || !conf->ca_csr_dir + || !conf->ssl_cert_ca + || !conf->ssl_cert + || !conf->ssl_key + // Do not try to get a new certificate if we already have a + // key. + || !lstat(conf->ssl_key, &statp)) + { + if(async_write_str(CMD_GEN, "nocsr") + || async_read_expect(CMD_GEN, "nocsr ok")) + { + logp("problem reading from server nocsr\n"); + return -1; + } + logp("nocsr ok\n"); + return 0; + } + + // Tell the server we want to do a signing request. + if(async_write_str(CMD_GEN, "csr")) + return -1; + + if(async_rw_ensure_read(&cmd, &buf, &len, '\0', NULL, 0)) + { + logp("problem reading from server csr\n"); + goto end; + } + if(cmd!=CMD_GEN || strncmp(buf, "csr ok:", strlen("csr ok:"))) + { + logp("unexpected command from server: %c:%s\n", cmd, buf); + goto end; + } + // The server appends its name after 'csr ok:' + if(conf->ssl_peer_cn) free(conf->ssl_peer_cn); + if(!(conf->ssl_peer_cn=strdup(buf+strlen("csr ok:")))) + { + logp("out of memory\n"); + goto end; + } + + logp("Server will sign a certificate request\n"); + + // First need to generate a client key and a certificate signing + // request. + snprintf(csr_path, sizeof(csr_path), "%s/%s.csr", + conf->ca_csr_dir, conf->cname); + if(generate_key_and_csr(conf, csr_path)) goto end; + + // Then copy the csr to the server. + if(send_a_file(csr_path, p1cntr)) goto end; + + snprintf(ssl_cert_tmp, sizeof(ssl_cert_tmp), "%s.%d", + conf->ssl_cert, getpid()); + snprintf(ssl_cert_ca_tmp, sizeof(ssl_cert_ca_tmp), "%s.%d", + conf->ssl_cert_ca, getpid()); + + // The server will then sign it, and give it back. + if(receive_a_file(ssl_cert_tmp, p1cntr)) goto end; + + // The server will also send the CA certificate. + if(receive_a_file(ssl_cert_ca_tmp, p1cntr)) goto end; + + if(do_rename(ssl_cert_tmp, conf->ssl_cert) + || do_rename(ssl_cert_ca_tmp, conf->ssl_cert_ca)) + goto end; + + // Need to rewrite our configuration file to contain the server + // name (ssl_peer_cn) + if(rewrite_client_conf(conf)) goto end; + + // My goodness, everything seems to have gone OK. Stand back! + ret=1; +end: + if(buf) free(buf); + if(ret<0) + { + // On error, remove any possibly newly created files, so that + // this function might run again on another go. + unlink(csr_path); + unlink(conf->ssl_key); + unlink(conf->ssl_cert); + unlink(conf->ssl_cert_ca); + unlink(ssl_cert_tmp); + unlink(ssl_cert_ca_tmp); + } + return ret; +} diff -Nru burp-1.3.0+20120214git/src/ca_client.h burp-1.3.10/src/ca_client.h --- burp-1.3.0+20120214git/src/ca_client.h 1970-01-01 00:00:00.000000000 +0000 +++ burp-1.3.10/src/ca_client.h 2012-07-27 00:36:21.000000000 +0000 @@ -0,0 +1,6 @@ +#ifndef CA_CLIENT_H +#define CA_CLIENT_H + +extern int ca_client_setup(struct config *conf, struct cntr *p1cntr); + +#endif diff -Nru burp-1.3.0+20120214git/src/ca_server.c burp-1.3.10/src/ca_server.c --- burp-1.3.0+20120214git/src/ca_server.c 1970-01-01 00:00:00.000000000 +0000 +++ burp-1.3.10/src/ca_server.c 2012-07-27 00:36:21.000000000 +0000 @@ -0,0 +1,371 @@ +#include "burp.h" +#include "prog.h" +#include "conf.h" +#include "ca_server.h" +#include "log.h" +#include "msg.h" +#include "handy.h" +#include "cmd.h" +#include "asyncio.h" +#include "current_backups_server.h" + +static int setup_stuff_done=0; + +/* Remember the directory so that it can be used later for client certificate + signing requests. */ +static char *gca_dir=NULL; + +static char *get_ca_dir(struct config *conf) +{ + FILE *fp=NULL; + char buf[4096]=""; + if(!(fp=open_file(conf->ca_conf, "r"))) return NULL; + while(fgets(buf, sizeof(buf), fp)) + { + char *field=NULL; + char *value=NULL; + if(config_get_pair(buf, &field, &value) + || !field || !value) continue; + + if(!strcasecmp(field, "CA_DIR")) + { + if(!(gca_dir=strdup(value))) + { + logp("out of memory"); + fclose(fp); + return NULL; + } + break; + } + } + fclose(fp); + return gca_dir; +} + +static void remove_file(const char *path) +{ + logp("Removing %s\n", path); + unlink(path); +} + +static int symlink_file(const char *oldpath, const char *newpath) +{ + struct stat statp; + logp("Symlinking %s to %s\n", newpath, oldpath); + if(lstat(oldpath, &statp)) + { + logp("Could not symlink: %s does not exist\n", oldpath); + return -1; + } + if(symlink(oldpath, newpath)) + { + logp("Could not symlink: %s does not exist\n", oldpath); + return -1; + } + return 0; +} + +static int burp_ca_init(struct config *conf, const char *ca_dir) +{ + char linktarget[1024]=""; + + if(is_dir(ca_dir)) return 0; + + setup_stuff_done++; + + logp("Initialising %s\n", ca_dir); + logp("Running '%s --init --ca %s --dir %s --config %s'\n", + conf->ca_burp_ca, conf->ca_name, ca_dir, conf->ca_conf); + if(run_script(conf->ca_burp_ca, NULL, 0, "--init", "--ca", + conf->ca_name, "--dir", ca_dir, "--config", conf->ca_conf, + NULL, NULL, NULL, NULL /* cntr */, 1 /* wait */, + 0 /* do not use logp - stupid openssl prints lots of dots + one at a time with no way to turn it off */)) + { + logp("Error running %s\n", conf->ca_burp_ca); + return -1; + } + + logp("Generating server key and cert signing request\n"); + logp("Running '%s --key --request --name %s --dir %s --config %s'\n", + conf->ca_burp_ca, conf->ca_server_name, ca_dir, conf->ca_conf); + if(run_script(conf->ca_burp_ca, NULL, 0, "--key", "--request", + "--name", conf->ca_server_name, "--dir", ca_dir, "--config", + conf->ca_conf, NULL, NULL, + NULL /* cntr */, 1 /* wait */, + 0 /* do not use logp - stupid openssl prints lots of dots + one at a time with no way to turn it off */)) + { + logp("Error running %s\n", conf->ca_burp_ca); + return -1; + } + + logp("Signing request\n"); + logp("Running '%s --key --request --name %s --dir %s --config %s'\n", + conf->ca_burp_ca, conf->ca_server_name, ca_dir, conf->ca_conf); + if(run_script(conf->ca_burp_ca, NULL, 0, "--sign", "--ca", + conf->ca_name, "--name", conf->ca_server_name, "--batch", + "--dir", ca_dir, "--config", conf->ca_conf, + NULL /* cntr */, 1 /* wait */, + 0 /* do not use logp - stupid openssl prints lots of dots + one at a time with no way to turn it off */)) + { + logp("Error running %s\n", conf->ca_burp_ca); + return -1; + } + + snprintf(linktarget, sizeof(linktarget), "%s/CA_%s.crt", + ca_dir, conf->ca_name); + if(strcmp(linktarget, conf->ssl_cert_ca)) + { + remove_file(conf->ssl_cert_ca); + if(symlink_file(linktarget, conf->ssl_cert_ca)) return -1; + } + + snprintf(linktarget, sizeof(linktarget), "%s/%s.crt", + ca_dir, conf->ca_server_name); + if(strcmp(linktarget, conf->ssl_cert)) + { + remove_file(conf->ssl_cert); + if(symlink_file(linktarget, conf->ssl_cert)) return -1; + } + + snprintf(linktarget, sizeof(linktarget), "%s/%s.key", + ca_dir, conf->ca_server_name); + if(strcmp(linktarget, conf->ssl_key)) + { + remove_file(conf->ssl_key); + if(symlink_file(linktarget, conf->ssl_key)) return -1; + } + + return 0; +} + +static int maybe_make_dhfile(struct config *conf, const char *ca_dir) +{ + char *path=NULL; + struct stat statp; + if(!lstat(conf->ssl_dhfile, &statp)) + { + free(path); + return 0; + } + + setup_stuff_done++; + + logp("Creating %s\n", conf->ssl_dhfile); + logp("Running '%s --dhfile %s --dir %s'\n", + conf->ca_burp_ca, conf->ssl_dhfile, ca_dir); + if(run_script(conf->ca_burp_ca, NULL, 0, "--dhfile", conf->ssl_dhfile, + "--dir", ca_dir, NULL, NULL, NULL, NULL, NULL, NULL, + NULL /* cntr */, 1 /* wait */, + 0 /* do not use logp - stupid openssl prints lots of dots + one at a time with no way to turn it off */)) + { + logp("Error running %s\n", conf->ca_burp_ca); + free(path); + return -1; + } + + free(path); + return 0; +} + +int ca_server_setup(struct config *conf) +{ + int ret=0; + char *ca_dir=NULL; + + if(!conf->ca_conf) return 0; + + /* Need to read CA_DIR from ca_conf. */ + if(!(ca_dir=get_ca_dir(conf))) + { + ret=-1; + goto end; + } + + if(maybe_make_dhfile(conf, ca_dir)) + { + ret=-1; + goto end; + } + + if(burp_ca_init(conf, ca_dir)) + { + recursive_delete(ca_dir, "", TRUE); + ret=-1; + goto end; + } + +end: + // Keeping it in gca_dir for later. + //if(ca_dir) free(ca_dir); + if(setup_stuff_done) + { + if(ret) logp("CA setup failed\n"); + else logp("CA setup succeeded\n"); + } + return ret; +} + +/* Return 1 for everything OK, signed and returned, -1 for error */ +static int sign_client_cert(const char *client, struct config *conf, struct cntr *p1cntr) +{ + int ret=-1; + char msg[256]=""; + char csrpath[512]=""; + char crtpath[512]=""; + struct stat statp; + snprintf(csrpath, sizeof(csrpath), "%s/%s.csr", gca_dir, client); + snprintf(crtpath, sizeof(crtpath), "%s/%s.crt", gca_dir, client); + + if(!strcmp(client, conf->ca_name)) + { + char msg[512]=""; + snprintf(msg, sizeof(msg), "Will not accept a client certificate request with the same name as the CA (%s)!", conf->ca_name); + log_and_send(msg); + // Do not goto end, as it will delete things; + return -1; + } + + if(!lstat(crtpath, &statp)) + { + char msg[512]=""; + snprintf(msg, sizeof(msg), "Will not accept a client certificate request for '%s' - %s already exists!", client, crtpath); + log_and_send(msg); + // Do not goto end, as it will delete things; + return -1; + } + + if(!lstat(csrpath, &statp)) + { + char msg[512]=""; + snprintf(msg, sizeof(msg), "Will not accept a client certificate request for '%s' - %s already exists!", client, csrpath); + log_and_send(msg); + // Do not goto end, as it will delete things; + return -1; + } + + // Tell the client that we will do it, and send the server name at the + // same time. + snprintf(msg, sizeof(msg), "csr ok:%s", conf->ca_server_name); + if(async_write_str(CMD_GEN, msg)) + { + // Do not goto end, as it will delete things; + return -1; + } + + /* After this point, we might have uploaded files, so on error, go + to end and delete any new files. */ + + // Get the CSR from the client. + if(receive_a_file(csrpath, p1cntr)) goto end; + + // Now, sign it. + logp("Signing certificate signing request from %s\n", client); + logp("Running '%s --name %s --ca %s --sign --batch --dir %s --config %s'\n", conf->ca_burp_ca, client, conf->ca_name, gca_dir, conf->ca_conf); + if(run_script(conf->ca_burp_ca, NULL, 0, "--name", client, + "--ca", conf->ca_name, "--sign", "--batch", "--dir", gca_dir, + "--config", conf->ca_conf, + NULL /* cntr */, 1 /* wait */, + 0 /* do not use logp - stupid openssl prints lots of dots + one at a time with no way to turn it off */)) + { + logp("Error running %s\n", conf->ca_burp_ca); + goto end; + } + + // Now, we should have a signed certificate. + // Need to send it back to the client. + if(send_a_file(crtpath, p1cntr)) + goto end; + + // Also need to send the CA public certificate back to the client. + if(send_a_file(conf->ssl_cert_ca, p1cntr)) + goto end; + + ret=1; +end: + if(ret<0) + { + unlink(crtpath); + unlink(csrpath); + } + return ret; +} + +/* Return 1 for everything OK, signed and returned, -1 for error, 0 for + nothing done. */ +int ca_server_maybe_sign_client_cert(const char *client, const char *cversion, struct config *conf, struct cntr *p1cntr) +{ + int ret=0; + char *buf=NULL; + long min_ver=0; + long cli_ver=0; + + if((min_ver=version_to_long("1.3.2"))<0 + || (cli_ver=version_to_long(cversion))<0) + return -1; + // Clients before 1.3.2 did not know how to send cert signing requests. + if(cli_verca_conf || !gca_dir) + { + logp("But server is not configured to sign client certificate requests.\n"); + logp("See option 'ca_conf'.\n"); + async_write_str(CMD_ERROR, "server not configured to sign client certificates"); + ret=-1; + break; + } + // sign_client_cert() will return 1 for + // everything signed and returned, or -1 + // for error + ret=sign_client_cert(client, conf, p1cntr); + break; + + } + else if(!strcmp(buf, "nocsr")) + { + // Client does not want to sign a certificate. + // No problem, just carry on. + logp("Client %s does not want a certificate signed\n", client); + ret=async_write_str(CMD_GEN, "nocsr ok"); + break; + } + else + { + logp("unexpected command from client when expecting csr: %c:%s\n", cmd, buf); + ret=-1; + break; + } + } + else + { + logp("unexpected command from client when expecting csr: %c:%s\n", cmd, buf); + ret=-1; + break; + } + + if(buf) free(buf); buf=NULL; + } + + if(buf) free(buf); + return ret; +} diff -Nru burp-1.3.0+20120214git/src/ca_server.h burp-1.3.10/src/ca_server.h --- burp-1.3.0+20120214git/src/ca_server.h 1970-01-01 00:00:00.000000000 +0000 +++ burp-1.3.10/src/ca_server.h 2012-07-27 00:36:21.000000000 +0000 @@ -0,0 +1,8 @@ +#ifndef CA_SERVER_H +#define CA_SERVER_H + +extern int ca_server_setup(struct config *conf); + +extern int ca_server_maybe_sign_client_cert(const char *client, const char *cversion, struct config *conf, struct cntr *p1cntr); + +#endif diff -Nru burp-1.3.0+20120214git/src/client.c burp-1.3.10/src/client.c --- burp-1.3.0+20120214git/src/client.c 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/client.c 2012-07-27 00:36:21.000000000 +0000 @@ -16,7 +16,9 @@ #include "berrno.h" #include "forkchild.h" #include "autoupgrade_client.h" -#include "incexc_send_client.h" +#include "incexc_recv.h" +#include "incexc_send.h" +#include "ca_client.h" #include @@ -80,7 +82,7 @@ win32_enable_backup_privileges(1 /* ignore_errors */); #endif #if defined(WIN32_VSS) - win32_start_vss(conf); + if((ret=win32_start_vss(conf))) return ret; #endif // Scan the file system and send the results to the server. @@ -124,17 +126,42 @@ #endif } +static int server_supports(const char *feat, const char *wanted) +{ + if(strstr(feat, wanted)) return 1; + return 0; +} + +static int server_supports_autoupgrade(const char *feat) +{ + // 1.3.0 servers did not list the features, but the only feature + // that was supported was autoupgrade. + if(!strcmp(feat, "extra_comms_begin ok")) return 1; + return server_supports(feat, ":autoupgrade:"); +} + static int s_server_session_id_context=1; -int client(struct config *conf, enum action act, const char *backup, const char *restoreprefix, const char *regex, int forceoverwrite) +/* May return 1 to mean try again. This happens after a successful certificate + signing request so that it connects again straight away with the new + key/certificate. + Returns 2 if there were restore/verify warnings. + Returns 3 if timer conditions were not met. +*/ +static int do_client(struct config *conf, enum action act) { int ret=0; int rfd=-1; + int resume=0; SSL *ssl=NULL; BIO *sbio=NULL; + char buf[256]=""; SSL_CTX *ctx=NULL; struct cntr cntr; struct cntr p1cntr; + char *incexc=NULL; + char *server_version=NULL; + const char *phase1str="backupphase1"; reset_filecounter(&p1cntr); reset_filecounter(&cntr); @@ -149,183 +176,319 @@ if(!(ctx=ssl_initialise_ctx(conf))) { logp("error initialising ssl ctx\n"); - return -1; + ret=-1; + goto end; } SSL_CTX_set_session_id_context(ctx, (const unsigned char *)&s_server_session_id_context, sizeof(s_server_session_id_context)); - if((rfd=init_client_socket(conf->server, conf->port))<0) return 1; + if((rfd=init_client_socket(conf->server, conf->port))<0) + { + ret=-1; + goto end; + } if(!(ssl=SSL_new(ctx)) || !(sbio=BIO_new_socket(rfd, BIO_NOCLOSE))) { - logp("There was a problem joining ssl to the socket.\n"); - close_fd(&rfd); - return 1; + ERR_error_string_n(ERR_get_error(), buf, sizeof(buf)); + logp("Problem joining SSL to the socket: %s\n", buf); + ret=-1; + goto end; } SSL_set_bio(ssl, sbio, sbio); if(SSL_connect(ssl)<=0) { - berr_exit("SSL connect error\n"); - close_fd(&rfd); - return 1; - } - if(ssl_check_cert(ssl, conf)) - { - logp("check cert failed\n"); - close_fd(&rfd); - return 1; + ERR_error_string_n(ERR_get_error(), buf, sizeof(buf)); + logp("SSL connect error: %s\n", buf); + ret=-1; + goto end; } - set_non_blocking(rfd); } - ret=async_init(rfd, ssl, conf, act==ACTION_ESTIMATE); + if((ret=async_init(rfd, ssl, conf, act==ACTION_ESTIMATE))) + goto end; + + // Set quality of service bits on backup packets. + if(act==ACTION_BACKUP || act==ACTION_BACKUP_TIMED) + set_bulk_packets(); - if(!ret && act!=ACTION_ESTIMATE) + if(act!=ACTION_ESTIMATE) { - ret=authorise_client(conf, &p1cntr); + char cmd; + size_t len=0; + char *feat=NULL; + int ca_ret=0; + if((ret=authorise_client(conf, &server_version, &p1cntr))) + goto end; - if(async_write_str(CMD_GEN, "extra_comms_begin") - || async_read_expect(CMD_GEN, "extra_comms_begin ok")) + if(server_version) + { + logp("Server version: %s\n", server_version); + // Servers before 1.3.2 did not tell us their versions. + // 1.3.2 and above can do the automatic CA stuff that + // follows. + if((ca_ret=ca_client_setup(conf, &p1cntr))<0) + { + // Error + logp("Error with certificate signing request\n"); + ret=-1; + goto end; + } + else if(ca_ret>0) + { + // Certificate signed successfully. + // Everything is OK, but we will reconnect now, in + // order to use the new keys/certificates. + ret=1; + goto end; + } + } + + set_non_blocking(rfd); + + if((ret=ssl_check_cert(ssl, conf))) + { + logp("check cert failed\n"); + goto end; + } + + if((ret=async_write_str(CMD_GEN, "extra_comms_begin"))) { logp("Problem requesting extra_comms_begin\n"); + goto end; + } + // Servers greater than 1.3.0 will list the extra_comms + // features they support. + else if((ret=async_read(&cmd, &feat, &len))) + { + logp("Problem reading response to extra_comms_begin\n"); + goto end; + } + else if(cmd!=CMD_GEN) + { + logp("Unexpected command from server when reading response to extra_comms_begin: %c:%s\n", cmd, feat); + ret=-1; + goto end; + } + else if(strncmp(feat, + "extra_comms_begin ok", strlen("extra_comms_begin ok"))) + { + logp("Unexpected response from server when reading response to extra_comms_begin: %c:%s\n", cmd, feat); ret=-1; + goto end; } // Can add extra bits here. The first extra bit is the // autoupgrade stuff. - if(!ret && conf->autoupgrade_dir && conf->autoupgrade_os) - ret=autoupgrade_client(conf, &p1cntr); + if(server_supports_autoupgrade(feat)) + { + if(conf->autoupgrade_dir && conf->autoupgrade_os + && (ret=autoupgrade_client(conf, &p1cntr))) + goto end; + } - if(!ret) ret=incexc_send_client(conf, &p1cntr); + // :srestore: means that the server wants to do a restore. + if(server_supports(feat, ":srestore:")) + { + logp("Server is initiating a restore\n"); + if(incexc) { free(incexc); incexc=NULL; } + if((ret=incexc_recv_client_restore(&incexc, + conf, &p1cntr))) + goto end; + if(incexc) + { + if((ret=parse_incexcs_buf(conf, incexc))) + goto end; + act=ACTION_RESTORE; + log_restore_settings(conf, 1); + } + } - if(async_write_str(CMD_GEN, "extra_comms_end") - || async_read_expect(CMD_GEN, "extra_comms_end ok")) + // :sincexc: is for the server giving the client the + // incexc config. + if(act==ACTION_BACKUP || act==ACTION_BACKUP_TIMED) + { + if(!incexc && server_supports(feat, ":sincexc:")) + { + logp("Server is setting includes/excludes.\n"); + if(incexc) { free(incexc); incexc=NULL; } + if((ret=incexc_recv_client(&incexc, + conf, &p1cntr))) goto end; + if(incexc && (ret=parse_incexcs_buf(conf, + incexc))) goto end; + } + } + + // :incexc: is for the client sending the server the + // incexc config so that it better knows what to do on + // resume. + if(server_supports(feat, ":incexc:") + && (ret=incexc_send_client(conf, &p1cntr))) + goto end; + + if((ret=async_write_str(CMD_GEN, "extra_comms_end")) + || (ret=async_read_expect(CMD_GEN, "extra_comms_end ok"))) { logp("Problem requesting extra_comms_end\n"); - ret=-1; + goto end; } + + if(feat) free(feat); } - if(!ret) + rfd=-1; + switch(act) { - rfd=-1; - int resume=0; - const char *phase1str="backupphase1"; - switch(act) - { - case ACTION_BACKUP_TIMED: - phase1str="backupphase1timed"; - case ACTION_BACKUP: + case ACTION_BACKUP_TIMED: + phase1str="backupphase1timed"; + case ACTION_BACKUP: + { + // Set bulk packets quality of service flags on backup. + if(incexc) { - if(!(ret=maybe_check_timer(phase1str, - conf, &resume))) - { - if(conf->backup_script_pre - && run_script( - conf->backup_script_pre, - conf->backup_script_pre_arg, - conf->bprecount, - "pre", - "reserved2", - "reserved3", - "reserved4", - "reserved5", - &p1cntr, 1)) ret=-1; - - if(!ret && do_backup_client(conf, - resume, 0, &p1cntr, &cntr)) - ret=-1; - - if((conf->backup_script_post_run_on_fail - || !ret) && conf->backup_script_post) - { - if(run_script( - conf->backup_script_post, - conf->backup_script_post_arg, - conf->bpostcount, - "post", - // Tell post script whether the restore - // failed. - ret?"1":"0", - "reserved3", - "reserved4", - "reserved5", - &cntr, 1)) ret=-1; - } - } - - if(ret<0) - logp("error in backup\n"); - else if(ret>0) - { } // timer script said no. - else - logp("backup finished ok\n"); - - break; + logp("Server is overriding the configuration\n"); + logp("with the following settings:\n"); + printf("%s\n", incexc); } - case ACTION_RESTORE: - case ACTION_VERIFY: + if(!conf->sdcount) { - if(conf->restore_script_pre - && run_script( - conf->restore_script_pre, - conf->restore_script_pre_arg, - conf->rprecount, - "pre", - "reserved2", - "reserved3", - "reserved4", - "reserved5", - &cntr, 1)) ret=-1; - if(!ret && do_restore_client(conf, - act, backup, - restoreprefix, regex, forceoverwrite, - &p1cntr, &cntr)) ret=-1; - if((conf->restore_script_post_run_on_fail - || !ret) && conf->restore_script_post) + logp("Found no include paths!\n"); + ret=-1; + goto end; + } + + if(!(ret=maybe_check_timer(phase1str, + conf, &resume))) + { + if(conf->backup_script_pre + && run_script( + conf->backup_script_pre, + conf->backup_script_pre_arg, + conf->bprecount, + "pre", + "reserved2", + "reserved3", + "reserved4", + "reserved5", + NULL, NULL, NULL, NULL, NULL, + &p1cntr, 1, 1)) ret=-1; + + if(!ret && do_backup_client(conf, + resume, 0, &p1cntr, &cntr)) + ret=-1; + + if((conf->backup_script_post_run_on_fail + || !ret) && conf->backup_script_post) { - if(run_script( - conf->restore_script_post, - conf->restore_script_post_arg, - conf->rpostcount, + if(run_script( + conf->backup_script_post, + conf->backup_script_post_arg, + conf->bpostcount, "post", - // Tell post script whether the restore - // failed. + // Tell post script whether the restore + // failed. ret?"1":"0", "reserved3", "reserved4", "reserved5", - &cntr, 1)) ret=-1; + NULL, NULL, NULL, NULL, NULL, + &cntr, 1, 1)) ret=-1; } + } - // Return non-zero if there were warnings, - // so that the test script can easily check. - if(p1cntr.warning+cntr.warning) - ret=1; - - break; + if(ret<0) + logp("error in backup\n"); + else if(ret>0) + { + // Timer script said no. + // Have a distinct return value to + // differentiate between other cases + // (ssl reconnection and restore/verify + // warnings). + ret=3; } - case ACTION_ESTIMATE: - if(!ret) ret=do_backup_client(conf, 0, 1, - &p1cntr, &cntr); - break; - case ACTION_LIST: - case ACTION_LONG_LIST: - default: - ret=do_list_client(backup, regex, act); - break; + else + logp("backup finished ok\n"); + + break; + } + case ACTION_RESTORE: + case ACTION_VERIFY: + { + if(conf->restore_script_pre + && run_script( + conf->restore_script_pre, + conf->restore_script_pre_arg, + conf->rprecount, + "pre", + "reserved2", + "reserved3", + "reserved4", + "reserved5", + NULL, NULL, NULL, NULL, NULL, + &cntr, 1, 1)) ret=-1; + if(!ret && do_restore_client(conf, + act, &p1cntr, &cntr)) ret=-1; + if((conf->restore_script_post_run_on_fail + || !ret) && conf->restore_script_post) + { + if(run_script( + conf->restore_script_post, + conf->restore_script_post_arg, + conf->rpostcount, + "post", + // Tell post script whether the restore + // failed. + ret?"1":"0", + "reserved3", + "reserved4", + "reserved5", + NULL, NULL, NULL, NULL, NULL, + &cntr, 1, 1)) ret=-1; + } + + // Return non-zero if there were warnings, + // so that the test script can easily check. + if(p1cntr.warning+cntr.warning) + ret=2; + + break; } + case ACTION_ESTIMATE: + if(!ret) ret=do_backup_client(conf, 0, 1, + &p1cntr, &cntr); + break; + case ACTION_LIST: + case ACTION_LONG_LIST: + default: + ret=do_list_client(conf, act); + break; } - rfd=-1; +end: + close_fd(&rfd); async_free(); - if(act!=ACTION_ESTIMATE) - ssl_destroy_ctx(ctx); + if(act!=ACTION_ESTIMATE) ssl_destroy_ctx(ctx); + + if(incexc) free(incexc); + if(server_version) free(server_version); //logp("end client\n"); return ret; } + +int client(struct config *conf, enum action act) +{ + int ret=0; + if((ret=do_client(conf, act))==1) + { + logp("Re-opening connection to server\n"); + sleep(5); + ret=do_client(conf, act); + } + return ret; +} diff -Nru burp-1.3.0+20120214git/src/client_vss.c burp-1.3.10/src/client_vss.c --- burp-1.3.0+20120214git/src/client_vss.c 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/client_vss.c 2012-07-27 00:36:21.000000000 +0000 @@ -24,7 +24,9 @@ char szWinDriveLetters[27]; for(i=0, j=0; i < conf->sdcount && j<26; i++) { - const char *path=conf->startdir[i]->path; + const char *path=NULL; + if(!conf->startdir[i]->flag) continue; + path=conf->startdir[i]->path; if(strlen(path)>2 && isalpha(path[0]) && path[1]==':') { int x=0; diff -Nru burp-1.3.0+20120214git/src/cmd.h burp-1.3.10/src/cmd.h --- burp-1.3.0+20120214git/src/cmd.h 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/cmd.h 2012-07-27 00:36:21.000000000 +0000 @@ -1,39 +1,6 @@ #ifndef _CMD_H #define _CMD_H -// used in CMD_*: -// a -// c -// d -// e -// E -// f -// g -// G -// h -// H -// i -// j -// J -// l -// L -// m -// M -// n -// p -// P -// r -// s -// t -// u -// w -// x -// X -// y -// Y -// z -// Z - /* These things appear at the beginning of each line of communication on the network, and in the manifest. */ @@ -50,6 +17,7 @@ #define CMD_SPECIAL 's' /* Fifo, socket, device node... */ #define CMD_METADATA 'm' /* Extra meta data */ #define CMD_ENC_METADATA 'n' /* Encrypted extra meta data */ +#define CMD_EFS_FILE 'k' /* Windows EFS file */ // Commands #define CMD_GEN 'c' /* Generic command */ @@ -86,6 +54,9 @@ #define CMD_SPECIAL_CHANGED 'h' #define CMD_SPECIAL_SAME 'H' +#define CMD_EFS_FILE_CHANGED 'I' +#define CMD_EFS_FILE_SAME 'K' + #define CMD_TIMESTAMP 'b' /* Backup timestamp (in response to list) */ diff -Nru burp-1.3.0+20120214git/src/conf.c burp-1.3.10/src/conf.c --- burp-1.3.0+20120214git/src/conf.c 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/conf.c 2012-07-27 00:36:21.000000000 +0000 @@ -3,48 +3,85 @@ #include "counter.h" #include "conf.h" #include "msg.h" -#include "handy.h" #include "strlist.h" +#include "prepend.h" +#include "regexp.h" -static int conf_error(const char *config_path, int line) +/* Init only stuff related to includes/excludes. + This is so that the server can override them all on the client. */ +static void init_incexcs(struct config *conf) { - logp("%s: parse error on line %d\n", config_path, line); - return -1; + conf->startdir=NULL; conf->sdcount=0; + conf->incexcdir=NULL; conf->iecount=0; + conf->fschgdir=NULL; conf->fscount=0; + conf->nobackup=NULL; conf->nbcount=0; + conf->incext=NULL; conf->incount=0; // include extensions + conf->excext=NULL; conf->excount=0; // exclude extensions + conf->increg=NULL; conf->ircount=0; // include (regular expression) + conf->excreg=NULL; conf->ercount=0; // include (regular expression) + conf->excfs=NULL; conf->exfscount=0; // exclude filesystems + conf->fifos=NULL; conf->ffcount=0; + conf->blockdevs=NULL; conf->bdcount=0; + /* stuff to do with restore */ + conf->overwrite=0; + conf->strip=0; + conf->backup=NULL; + conf->restoreprefix=NULL; + conf->regex=NULL; +} + +/* Free only stuff related to includes/excludes. + This is so that the server can override them all on the client. */ +static void free_incexcs(struct config *conf) +{ + strlists_free(conf->startdir, conf->sdcount); + strlists_free(conf->incexcdir, conf->iecount); + strlists_free(conf->fschgdir, conf->fscount); + strlists_free(conf->nobackup, conf->nbcount); + strlists_free(conf->incext, conf->incount); // include extensions + strlists_free(conf->excext, conf->excount); // exclude extensions + strlists_free(conf->increg, conf->ircount); // include (regular expression) + strlists_free(conf->excreg, conf->ercount); // exclude (regular expression) + strlists_free(conf->excfs, conf->exfscount); // exclude filesystems + strlists_free(conf->fifos, conf->ffcount); + strlists_free(conf->blockdevs, conf->bdcount); + if(conf->backup) free(conf->backup); + if(conf->restoreprefix) free(conf->restoreprefix); + if(conf->regex) free(conf->regex); + init_incexcs(conf); } void init_config(struct config *conf) { + conf->configfile=NULL; conf->mode=MODE_UNSET; conf->port=NULL; conf->status_port=NULL; conf->hardlinked_archive=0; conf->working_dir_recovery_method=NULL; + conf->forking=0; + conf->daemon=0; + conf->directory_tree=1; conf->clientconfdir=NULL; conf->cname=NULL; conf->directory=NULL; + conf->timestamp_format=NULL; + conf->ca_conf=NULL; + conf->ca_name=NULL; + conf->ca_server_name=NULL; + conf->ca_burp_ca=NULL; + conf->ca_csr_dir=NULL; conf->lockfile=NULL; conf->logfile=NULL; + conf->syslog=0; conf->password=NULL; conf->passwd=NULL; conf->server=NULL; conf->ratelimit=0; conf->network_timeout=60*60*2; // two hours - conf->startdir=NULL; - conf->incexcdir=NULL; - conf->fschgdir=NULL; - conf->nobackup=NULL; - conf->excext=NULL; - conf->excfs=NULL; - conf->sdcount=0; - conf->iecount=0; - conf->fscount=0; - conf->nbcount=0; - conf->ffcount=0; - conf->excount=0; - conf->exfscount=0; - conf->fifos=NULL; conf->cross_all_filesystems=0; conf->read_all_fifos=0; + conf->read_all_blockdevs=0; conf->min_file_size=0; conf->max_file_size=0; conf->autoupgrade_dir=NULL; @@ -57,6 +94,7 @@ conf->ssl_peer_cn=NULL; conf->encryption_password=NULL; conf->max_children=0; + conf->max_status_children=0; // ext3 maximum number of subdirs is 32000, so leave a little room. conf->max_storage_subdirs=30000; conf->librsync=1; @@ -77,6 +115,7 @@ conf->notify_success_arg=NULL; conf->nscount=0; conf->notify_success_warnings_only=0; + conf->notify_success_changes_only=0; conf->notify_failure_script=NULL; conf->notify_failure_arg=NULL; @@ -121,14 +160,30 @@ conf->sscount=0; conf->dedup_group=NULL; + conf->browsefile=NULL; + conf->browsedir=NULL; + + conf->client_can_force_backup=1; + conf->client_can_list=1; + conf->client_can_restore=1; + conf->client_can_verify=1; + + init_incexcs(conf); } void free_config(struct config *conf) { if(!conf) return; + if(conf->configfile) free(conf->configfile); if(conf->clientconfdir) free(conf->clientconfdir); if(conf->cname) free(conf->cname); if(conf->directory) free(conf->directory); + if(conf->timestamp_format) free(conf->timestamp_format); + if(conf->ca_conf) free(conf->ca_conf); + if(conf->ca_name) free(conf->ca_name); + if(conf->ca_server_name) free(conf->ca_server_name); + if(conf->ca_burp_ca) free(conf->ca_burp_ca); + if(conf->ca_csr_dir) free(conf->ca_csr_dir); if(conf->lockfile) free(conf->lockfile); if(conf->logfile) free(conf->logfile); if(conf->password) free(conf->password); @@ -148,13 +203,6 @@ if(conf->client_lockdir) free(conf->client_lockdir); if(conf->autoupgrade_dir) free(conf->autoupgrade_dir); if(conf->autoupgrade_os) free(conf->autoupgrade_os); - strlists_free(conf->startdir, conf->sdcount); - strlists_free(conf->incexcdir, conf->iecount); - strlists_free(conf->fschgdir, conf->fscount); - strlists_free(conf->nobackup, conf->nbcount); - strlists_free(conf->fifos, conf->ffcount); - strlists_free(conf->excext, conf->excount); - strlists_free(conf->excfs, conf->exfscount); if(conf->timer_script) free(conf->timer_script); strlists_free(conf->timer_arg, conf->tacount); @@ -190,6 +238,10 @@ strlists_free(conf->keep, conf->kpcount); if(conf->dedup_group) free(conf->dedup_group); + if(conf->browsefile) free(conf->browsefile); + if(conf->browsedir) free(conf->browsedir); + + free_incexcs(conf); init_config(conf); } @@ -208,7 +260,12 @@ return 0; } -static int get_pair(char *buf, char **field, char **value) +static void get_conf_val_int(const char *field, const char *value, const char *want, int *dest) +{ + if(!strcmp(field, want)) *dest=atoi(value); +} + +int config_get_pair(char buf[], char **field, char **value) { char *cp=NULL; char *eq=NULL; @@ -269,15 +326,19 @@ return 0; } +/* Windows users have a nasty habit of putting in backslashes. Convert them. */ +#ifdef HAVE_WIN32 +static void convert_backslashes(char **path) +{ + char *p=NULL; + for(p=*path; *p; p++) if(*p=='\\') *p='/'; +} +#endif + #define ABSOLUTE_ERROR "ERROR: Please use absolute include/exclude paths.\n" static int path_checks(const char *path) { const char *p=NULL; - if(strchr(path, '\\')) - { - logp("ERROR: Please use forward slashes '/' instead of backslashes '\\' in your include/exclude paths.\n"); - return -1; - } for(p=path; *p; p++) { if(*p!='.' || *(p+1)!='.') continue; @@ -287,19 +348,18 @@ return -1; } } -#ifdef HAVE_WIN32 - if(!isalpha(*path) || *(path+1)!=':') - { - logp(ABSOLUTE_ERROR); - return -1; - } -#else - if(*path!='/') +// This is being run on the server too, where you can enter paths for the +// clients, so need to allow windows style paths for windows and unix. + if((!isalpha(*path) || *(path+1)!=':') +#ifndef HAVE_WIN32 + // Windows does not need to check for unix style paths. + && *path!='/' +#endif + ) { logp(ABSOLUTE_ERROR); return -1; } -#endif return 0; } @@ -352,6 +412,12 @@ return -1; // y is longer } +static int conf_error(const char *config_path, int line) +{ + logp("%s: parse error on line %d\n", config_path, line); + return -1; +} + static int get_file_size(const char *value, unsigned long *dest, const char *config_path, int line) { // Store in bytes, allow k/m/g. @@ -413,6 +479,18 @@ *dest=list; } +static void do_build_regex(struct strlist **list, int count, struct strlist ***dest) +{ + int i; + for(i=0; ire), list[i]->path); + } + +} + + #ifdef HAVE_LINUX_OS struct fstype { @@ -424,6 +502,7 @@ { "debugfs", 0x64626720 }, { "devfs", 0x00001373 }, { "devpts", 0x00001CD1 }, + { "devtmpfs", 0x00009FA0 }, { "ext2", 0x0000EF53 }, { "ext3", 0x0000EF53 }, { "ext4", 0x0000EF53 }, @@ -443,6 +522,29 @@ { "tmpfs", 0x01021994 }, { NULL, 0 }, }; +/* Use this C code to figure out what f_type gets set to. +#include +#include + +int main(int argc, char *argv[]) +{ + int i=0; + struct statfs buf; + if(argc<1) + { + printf("not enough args\n"); + return -1; + } + if(statfs(argv[1], &buf)) + { + printf("error\n"); + return -1; + } + printf("0x%08X\n", buf.f_type); + return 0; +} +*/ + #endif static int fstype_to_flag(const char *fstype, long *flag) @@ -463,448 +565,635 @@ return -1; } -int load_config(const char *config_path, struct config *conf, bool loadall) +struct llists { - int i=0; - int r=0; - int line=0; - FILE *fp=NULL; - char buf[256]=""; - struct strlist **sdlist=NULL; - struct strlist **ielist=NULL; - struct strlist **fslist=NULL; - struct strlist **nblist=NULL; - struct strlist **fflist=NULL; - struct strlist **talist=NULL; - struct strlist **nslist=NULL; - struct strlist **nflist=NULL; - struct strlist **bprelist=NULL; - struct strlist **bpostlist=NULL; - struct strlist **rprelist=NULL; - struct strlist **rpostlist=NULL; - - struct strlist **sprelist=NULL; - struct strlist **spostlist=NULL; - - struct strlist **bslist=NULL; - struct strlist **rslist=NULL; - - struct strlist **sslist=NULL; - - struct strlist **exlist=NULL; - struct strlist **exfslist=NULL; - struct strlist **kplist=NULL; - int have_include=0; - int got_timer_args=conf->tacount; - int got_ns_args=conf->nscount; - int got_nf_args=conf->nfcount; - int got_kp_args=conf->kpcount; - int got_spre_args=conf->sprecount; - int got_spost_args=conf->spostcount; - int got_ss_args=conf->sscount; + struct strlist **kplist; + struct strlist **ielist; + struct strlist **fslist; + struct strlist **nblist; + struct strlist **fflist; // fifos to read + struct strlist **bdlist; // blockdevs to read + struct strlist **inlist; // include extensions + struct strlist **exlist; // exclude extensions + struct strlist **irlist; // include (regular expression) + struct strlist **erlist; // exclude (regular expression) + struct strlist **exfslist; // exclude filesystems + struct strlist **talist; + struct strlist **nslist; + struct strlist **nflist; + struct strlist **bprelist; + struct strlist **bpostlist; + struct strlist **rprelist; + struct strlist **rpostlist; + struct strlist **sprelist; + struct strlist **spostlist; + struct strlist **bslist; + struct strlist **rslist; + struct strlist **sslist; + int got_kp_args; + int got_timer_args; + int got_ns_args; + int got_nf_args; + int got_spre_args; + int got_spost_args; + int got_ss_args; +}; - //logp("in load_config\n"); +static int load_config_ints(struct config *conf, const char *field, const char *value) +{ + get_conf_val_int(field, value, "syslog", + &(conf->syslog)); + get_conf_val_int(field, value, "hardlinked_archive", + &(conf->hardlinked_archive)); + get_conf_val_int(field, value, "max_hardlinks", + &(conf->max_hardlinks)); + get_conf_val_int(field, value, "librsync", + &(conf->librsync)); + get_conf_val_int(field, value, "cross_all_filesystems", + &(conf->cross_all_filesystems)); + get_conf_val_int(field, value, "read_all_fifos", + &(conf->read_all_fifos)); + get_conf_val_int(field, value, "read_all_blockdevs", + &(conf->read_all_blockdevs)); + get_conf_val_int(field, value, "backup_script_post_run_on_fail", + &(conf->backup_script_post_run_on_fail)); + get_conf_val_int(field, value, "server_script_post_run_on_fail", + &(conf->server_script_post_run_on_fail)); + get_conf_val_int(field, value, "notify_success_warnings_only", + &(conf->notify_success_warnings_only)); + get_conf_val_int(field, value, "notify_success_changes_only", + &(conf->notify_success_changes_only)); + get_conf_val_int(field, value, "network_timeout", + &(conf->network_timeout)); + get_conf_val_int(field, value, "max_children", + &(conf->max_children)); + get_conf_val_int(field, value, "max_status_children", + &(conf->max_status_children)); + get_conf_val_int(field, value, "max_storage_subdirs", + &(conf->max_storage_subdirs)); + get_conf_val_int(field, value, "overwrite", + &(conf->overwrite)); + get_conf_val_int(field, value, "strip", + &(conf->strip)); + get_conf_val_int(field, value, "fork", + &(conf->forking)); + get_conf_val_int(field, value, "daemon", + &(conf->daemon)); + get_conf_val_int(field, value, "directory_tree", + &(conf->directory_tree)); + get_conf_val_int(field, value, "client_can_force_backup", + &(conf->client_can_force_backup)); + get_conf_val_int(field, value, "client_can_list", + &(conf->client_can_list)); + get_conf_val_int(field, value, "client_can_restore", + &(conf->client_can_restore)); + get_conf_val_int(field, value, "client_can_verify", + &(conf->client_can_verify)); - if(!(fp=fopen(config_path, "r"))) - { - logp("could not open '%s' for reading.\n", config_path); + return 0; +} + +static int load_config_strings(struct config *conf, const char *field, const char *value, struct llists *l) +{ + if(get_conf_val(field, value, "port", &(conf->port))) return -1; - } - while(fgets(buf, sizeof(buf), fp)) - { - char *field=NULL; - char *value=NULL; - line++; + if(get_conf_val(field, value, "status_port", &(conf->status_port))) + return -1; + if(get_conf_val(field, value, "ssl_cert_ca", &(conf->ssl_cert_ca))) + return -1; + if(get_conf_val(field, value, "ssl_cert", &(conf->ssl_cert))) + return -1; + if(get_conf_val(field, value, "ssl_key", &(conf->ssl_key))) + return -1; + // ssl_cert_password is a synonym for ssl_key_password + if(get_conf_val(field, value, "ssl_cert_password", + &(conf->ssl_key_password))) return -1; + if(get_conf_val(field, value, "ssl_key_password", + &(conf->ssl_key_password))) return -1; + if(get_conf_val(field, value, "ssl_dhfile", &(conf->ssl_dhfile))) + return -1; + if(get_conf_val(field, value, "ssl_peer_cn", &(conf->ssl_peer_cn))) + return -1; + if(get_conf_val(field, value, "clientconfdir", &(conf->clientconfdir))) + return -1; + if(get_conf_val(field, value, "cname", &(conf->cname))) + return -1; + if(get_conf_val(field, value, "directory", &(conf->directory))) + return -1; + if(get_conf_val(field, value, "timestamp_format", + &(conf->timestamp_format))) return -1; + if(get_conf_val(field, value, "ca_conf", &(conf->ca_conf))) + return -1; + if(get_conf_val(field, value, "ca_name", &(conf->ca_name))) + return -1; + if(get_conf_val(field, value, "ca_server_name", + &(conf->ca_server_name))) return -1; + if(get_conf_val(field, value, "ca_burp_ca", + &(conf->ca_burp_ca))) return -1; + if(get_conf_val(field, value, "ca_csr_dir", + &(conf->ca_csr_dir))) return -1; + if(get_conf_val(field, value, "backup", &(conf->backup))) + return -1; + if(get_conf_val(field, value, "restoreprefix", &(conf->restoreprefix))) + return -1; + if(get_conf_val(field, value, "regex", &(conf->regex))) + return -1; + if(get_conf_val(field, value, "browsedir", &(conf->browsedir))) + return -1; + if(get_conf_val(field, value, "browsefile", &(conf->browsefile))) + return -1; + if(get_conf_val(field, value, "working_dir_recovery_method", + &(conf->working_dir_recovery_method))) return -1; + if(get_conf_val(field, value, "autoupgrade_dir", + &(conf->autoupgrade_dir))) return -1; + if(get_conf_val(field, value, "autoupgrade_os", + &(conf->autoupgrade_os))) return -1; + if(get_conf_val(field, value, "lockfile", &(conf->lockfile))) + return -1; + // "pidfile" is a synonym for "lockfile". + if(get_conf_val(field, value, "pidfile", &(conf->lockfile))) + return -1; + if(get_conf_val(field, value, "logfile", &(conf->logfile))) return -1; + if(get_conf_val(field, value, "password", &(conf->password))) return -1; + if(get_conf_val(field, value, "passwd", &(conf->passwd))) return -1; + if(get_conf_val(field, value, "server", &(conf->server))) return -1; + if(get_conf_val(field, value, "user", &(conf->user))) return -1; + if(get_conf_val(field, value, "group", &(conf->group))) return -1; + if(get_conf_val(field, value, "client_lockdir", + &(conf->client_lockdir))) return -1; + if(get_conf_val(field, value, "encryption_password", + &(conf->encryption_password))) return -1; + if(get_conf_val_args(field, value, "keep", &(conf->keep), + &(l->got_kp_args), &(conf->kpcount), &(l->kplist), 1)) + return -1; + if(get_conf_val_args(field, value, "include", NULL, + NULL, &(conf->iecount), &(l->ielist), 1)) return -1; + if(get_conf_val_args(field, value, "exclude", NULL, + NULL, &(conf->iecount), &(l->ielist), 0)) return -1; + if(get_conf_val_args(field, value, "cross_filesystem", NULL, + NULL, &(conf->fscount), &(l->fslist), 0)) return -1; + if(get_conf_val_args(field, value, "nobackup", NULL, + NULL, &(conf->nbcount), &(l->nblist), 0)) return -1; + if(get_conf_val_args(field, value, "read_fifo", NULL, + NULL, &(conf->ffcount), &(l->fflist), 0)) return -1; + if(get_conf_val_args(field, value, "read_blockdev", NULL, + NULL, &(conf->bdcount), &(l->bdlist), 0)) return -1; + if(get_conf_val_args(field, value, "include_ext", NULL, + NULL, &(conf->incount), &(l->inlist), 0)) return -1; + if(get_conf_val_args(field, value, "exclude_ext", NULL, + NULL, &(conf->excount), &(l->exlist), 0)) return -1; + if(get_conf_val_args(field, value, "include_regex", NULL, + NULL, &(conf->ircount), &(l->irlist), 0)) return -1; + if(get_conf_val_args(field, value, "exclude_regex", NULL, + NULL, &(conf->ercount), &(l->erlist), 0)) return -1; + if(get_conf_val_args(field, value, "exclude_fs", NULL, + NULL, &(conf->exfscount), &(l->exfslist), 0)) return -1; + if(get_conf_val(field, value, "timer_script", &(conf->timer_script))) + return -1; + if(get_conf_val_args(field, value, "timer_arg", &(conf->timer_arg), + &(l->got_timer_args), &(conf->tacount), + &(l->talist), 0)) return -1; + if(get_conf_val(field, value, "notify_success_script", + &(conf->notify_success_script))) return -1; + if(get_conf_val_args(field, value, "notify_success_arg", + &(conf->notify_success_arg), + &(l->got_ns_args), &(conf->nscount), + &(l->nslist), 0)) return -1; + if(get_conf_val(field, value, "notify_failure_script", + &(conf->notify_failure_script))) return -1; + if(get_conf_val_args(field, value, "notify_failure_arg", + &(conf->notify_failure_arg), &(l->got_nf_args), + &(conf->nfcount), &(l->nflist), 0)) return -1; + if(get_conf_val(field, value, "backup_script_pre", + &(conf->backup_script_pre))) return -1; + if(get_conf_val_args(field, value, "backup_script_pre_arg", + &(conf->backup_script_pre_arg), NULL, &(conf->bprecount), + &(l->bprelist), 0)) return -1; + if(get_conf_val(field, value, "backup_script_post", + &(conf->backup_script_post))) return -1; + if(get_conf_val_args(field, value, "backup_script_post_arg", + &(conf->backup_script_post_arg), NULL, &(conf->bpostcount), + &(l->bpostlist), 0)) return -1; + if(get_conf_val(field, value, "restore_script_pre", + &(conf->restore_script_pre))) return -1; + if(get_conf_val_args(field, value, "restore_script_pre_arg", + &(conf->restore_script_pre_arg), NULL, &(conf->rprecount), + &(l->rprelist), 0)) return -1; + if(get_conf_val(field, value, "restore_script_post", + &(conf->restore_script_post))) return -1; + if(get_conf_val_args(field, value, "restore_script_post_arg", + &(conf->restore_script_post_arg), NULL, &(conf->rpostcount), + &(l->rpostlist), 0)) return -1; + + if(get_conf_val(field, value, "server_script_pre", + &(conf->server_script_pre))) return -1; + if(get_conf_val_args(field, value, "server_script_pre_arg", + &(conf->server_script_pre_arg), &(l->got_spre_args), + &(conf->sprecount), &(l->sprelist), 0)) return -1; + if(get_conf_val(field, value, "server_script_post", + &(conf->server_script_post))) return -1; + if(get_conf_val_args(field, value, "server_script_post_arg", + &(conf->server_script_post_arg), &(l->got_spost_args), + &(conf->spostcount), &(l->spostlist), 0)) return -1; - if(get_pair(buf, &field, &value)) - return conf_error(config_path, line); - if(!field || !value) continue; + if(get_conf_val(field, value, "backup_script", &(conf->backup_script))) + return -1; + if(get_conf_val_args(field, value, "backup_script_arg", + &(conf->backup_script_arg), NULL, &(conf->bscount), + &(l->bslist), 0)) return -1; + if(get_conf_val(field, value, "restore_script", + &(conf->restore_script))) return -1; + if(get_conf_val_args(field, value, "restore_script_arg", + &(conf->restore_script_arg), NULL, &(conf->rscount), + &(l->rslist), 0)) return -1; + if(get_conf_val(field, value, "server_script", + &(conf->server_script))) return -1; + if(get_conf_val_args(field, value, "server_script_arg", + &(conf->server_script_arg), &(l->got_ss_args), + &(conf->sscount), &(l->sslist), 0)) return -1; - if(!strcmp(field, "mode")) - { - if(!strcmp(value, "server")) - conf->mode=MODE_SERVER; - else if(!strcmp(value, "client")) - conf->mode=MODE_CLIENT; - else - return conf_error(config_path, line); - } - else if(!strcmp(field, "hardlinked_archive")) + if(get_conf_val(field, value, "dedup_group", &(conf->dedup_group))) + return -1; + + return 0; +} + +static int load_config_field_and_value(struct config *conf, const char *field, const char *value, struct llists *l, const char *config_path, int line) +{ + if(!strcmp(field, "mode")) + { + if(!strcmp(value, "server")) conf->mode=MODE_SERVER; + else if(!strcmp(value, "client")) conf->mode=MODE_CLIENT; + else return -1; + } + else if(!strcmp(field, "compression")) + { + const char *cp=NULL; + cp=value; + if(!strncmp(value, "gzip", strlen("gzip"))) + cp=value+strlen("gzip"); + if(strlen(cp)!=1 || !isdigit(*cp)) + return -1; + + conf->compression=atoi(cp); + } + else if(!strcmp(field, "umask")) + { + conf->umask=strtol(value, NULL, 8); + } + else if(!strcmp(field, "ratelimit")) + { + float f=0; + f=atof(value); + // User is specifying Mega bits per second. + // Need to convert to bytes per second. + f=(f*1024*1024)/8; + if(!f) { - if(atoi(value)) conf->hardlinked_archive=1; + logp("ratelimit should be greater than zero\n"); + return -1; } - else if(!strcmp(field, "max_hardlinks")) + conf->ratelimit=f; + } + else if(!strcmp(field, "min_file_size")) + { + if(get_file_size(value, &(conf->min_file_size), + config_path, line)) return -1; + } + else if(!strcmp(field, "max_file_size")) + { + if(get_file_size(value, &(conf->max_file_size), + config_path, line)) return -1; + } + else + { + if(load_config_ints(conf, field, value)) + return -1; + if(load_config_strings(conf, field, value, l)) + return -1; + } + return 0; +} + +/* Recursing, so need to define load_config_lines ahead of parse_config_line. +*/ +int load_config_lines(const char *config_path, struct config *conf, struct llists *l); + +static int parse_config_line(struct config *conf, struct llists *l, const char *config_path, char buf[], int line) +{ + char *field=NULL; + char *value=NULL; + + if(!strncmp(buf, ". ", 2)) + { + // The conf file specifies another file to include. + char *np=NULL; + char *extrafile=NULL; + + if(!(extrafile=strdup(buf+2))) { - conf->max_hardlinks=atoi(value); + logp("out of memory\n"); + return -1; } - else if(!strcmp(field, "librsync")) + + if((np=strrchr(extrafile, '\n'))) *np='\0'; + if(!*extrafile) { - conf->librsync=atoi(value); + free(extrafile); + return -1; } - else if(!strcmp(field, "compression")) + +#ifdef HAVE_WIN32 + if(strlen(extrafile)>2 + && extrafile[1]!=':') +#else + if(*extrafile!='/') +#endif { + // It is relative to the directory that the + // current config file is in. char *cp=NULL; - cp=value; - if(!strncmp(value, "gzip", strlen("gzip"))) - cp=value+strlen("gzip")+1; - if(strlen(cp)!=1 || !isdigit(*cp)) - return conf_error(config_path, line); - - conf->compression=atoi(value); - } - else if(!strcmp(field, "umask")) - { - conf->umask=strtol(value, NULL, 8); - } - else if(!strcmp(field, "working_dir_recovery_method")) - { - if(get_conf_val(field, value, - "working_dir_recovery_method", - &(conf->working_dir_recovery_method))) return -1; - if(strcmp(conf->working_dir_recovery_method, "delete") - && strcmp(conf->working_dir_recovery_method, "resume") - && strcmp(conf->working_dir_recovery_method, "use")) + char *copy=NULL; + char *tmp=NULL; + if(!(copy=strdup(config_path))) + { + logp("out of memory\n"); + free(extrafile); + return -1; + } + if((cp=strrchr(copy, '/'))) *cp='\0'; + if(!(tmp=prepend_s(copy, + extrafile, strlen(extrafile)))) { - logp("unknown working_dir_recovery_method: %s\n", - conf->working_dir_recovery_method); - return conf_error(config_path, line); + logp("out of memory\n"); + free(extrafile); + free(copy); } + free(extrafile); + free(copy); + extrafile=tmp; } - else if(!strcmp(field, "cross_all_filesystems")) - { - conf->cross_all_filesystems=atoi(value); - } - else if(!strcmp(field, "read_all_fifos")) - { - conf->read_all_fifos=atoi(value); - } - else if(!strcmp(field, "max_children")) - { - if((conf->max_children=atoi(value))<=0) - return conf_error(config_path, line); - } - else if(!strcmp(field, "max_storage_subdirs")) - { - if((conf->max_storage_subdirs=atoi(value))<=1000) - return conf_error(config_path, line); - } - else if(!strcmp(field, "backup_script_post_run_on_fail")) - { - conf->backup_script_post_run_on_fail=atoi(value); - } - else if(!strcmp(field, "restore_script_post_run_on_fail")) - { - conf->restore_script_post_run_on_fail=atoi(value); - } - else if(!strcmp(field, "server_script_post_run_on_fail")) - { - conf->server_script_post_run_on_fail=atoi(value); - } - else if(!strcmp(field, "notify_success_warnings_only")) - { - conf->notify_success_warnings_only=atoi(value); - } - else if(!strcmp(field, "network_timeout")) + + if(load_config_lines(extrafile, conf, l)) { - conf->network_timeout=atoi(value); + free(extrafile); + return -1; } - else if(!strcmp(field, "min_file_size")) - { - if(get_file_size(value, &(conf->min_file_size), - config_path, line)) return -1; + free(extrafile); + return 0; + } + + if(config_get_pair(buf, &field, &value)) return -1; + if(!field || !value) return 0; + + if(load_config_field_and_value(conf, + field, value, l, config_path, line)) + return -1; + return 0; +} + +static void conf_problem(const char *config_path, const char *msg, int *r) +{ + logp("%s: %s\n", config_path, msg); + (*r)--; +} + +static int server_conf_checks(struct config *conf, const char *path, int *r) +{ + if(!conf->directory) + conf_problem(path, "directory unset", r); + if(!conf->timestamp_format + && !(conf->timestamp_format=strdup("%Y-%m-%d %H:%M:%S"))) + conf_problem(path, "timestamp_format unset", r); + if(!conf->clientconfdir) + conf_problem(path, "clientconfdir unset", r); + if(!conf->working_dir_recovery_method + || (strcmp(conf->working_dir_recovery_method, "delete") + && strcmp(conf->working_dir_recovery_method, "resume") + && strcmp(conf->working_dir_recovery_method, "use"))) + conf_problem(path, "unknown working_dir_recovery_method", r); + if(!conf->ssl_cert) + conf_problem(path, "ssl_cert unset", r); + if(!conf->ssl_cert_ca) + conf_problem(path, "ssl_cert_ca unset", r); + if(!conf->ssl_dhfile) + conf_problem(path, "ssl_dhfile unset", r); + if(conf->encryption_password) + conf_problem(path, + "encryption_password should not be set on the server!", r); + if(!conf->status_port) // carry on if not set. + logp("%s: status_port unset", path); + if(!conf->max_children) + { + logp("%s: max_children unset - using 5\n", path); + conf->max_children=5; + } + if(!conf->max_status_children) + { + logp("%s: max_status_children unset - using 5\n", path); + conf->max_status_children=5; + } + if(!conf->kpcount) + conf_problem(path, "keep unset", r); + if(conf->max_hardlinks<2) + conf_problem(path, "max_hardlinks too low", r); + if(conf->max_children<=0) + conf_problem(path, "max_children too low", r); + if(conf->max_status_children<=0) + conf_problem(path, "max_status_children too low", r); + if(conf->max_storage_subdirs<=1000) + conf_problem(path, "max_storage_subdirs too low", r); + if(conf->ca_conf) + { + int ca_err=0; + if(!conf->ca_name) + { + logp("ca_conf set, but ca_name not set\n"); + ca_err++; + } + if(!conf->ca_server_name) + { + logp("ca_conf set, but ca_server_name not set\n"); + ca_err++; + } + if(!conf->ca_burp_ca) + { + logp("ca_conf set, but ca_burp_ca not set\n"); + ca_err++; + } + if(!conf->ssl_dhfile) + { + logp("ca_conf set, but ssl_dhfile not set\n"); + ca_err++; + } + if(!conf->ssl_cert_ca) + { + logp("ca_conf set, but ssl_cert_ca not set\n"); + ca_err++; + } + if(!conf->ssl_cert) + { + logp("ca_conf set, but ssl_cert not set\n"); + ca_err++; } - else if(!strcmp(field, "max_file_size")) + if(!conf->ssl_key) { - if(get_file_size(value, &(conf->max_file_size), - config_path, line)) return -1; + logp("ca_conf set, but ssl_key not set\n"); + ca_err++; } - else if(!strcmp(field, "ratelimit")) + if(ca_err) return -1; + } + + return 0; +} + +static int client_conf_checks(struct config *conf, const char *path, int *r) +{ + if(!conf->cname) + conf_problem(path, "client name unset", r); + if(!conf->password) + conf_problem(path, "password unset", r); + if(!conf->server) + conf_problem(path, "server unset", r); + if(!conf->ssl_cert) + conf_problem(path, "ssl_cert unset", r); + if(!conf->ssl_cert_ca) + conf_problem(path, "ssl_cert_ca unset", r); + if(!conf->ssl_peer_cn) + { + logp("ssl_peer_cn unset\n"); + if(conf->server) { - float f=0; - f=atof(value); - // User is specifying Mega bits per second. - // Need to convert to bytes per second. - f=(f*1024*1024)/8; - if(!f) + logp("falling back to '%s'\n", conf->server); + if(!(conf->ssl_peer_cn=strdup(conf->server))) { - logp("ratelimit should be greater than zero\n"); - return conf_error(config_path, line); - } - conf->ratelimit=f; - } - else - { - if(get_conf_val(field, value, - "port", &(conf->port))) return -1; - if(get_conf_val(field, value, - "status_port", &(conf->status_port))) return -1; - if(get_conf_val(field, value, - "ssl_cert_ca", &(conf->ssl_cert_ca))) return -1; - if(get_conf_val(field, value, - "ssl_cert", &(conf->ssl_cert))) return -1; - if(get_conf_val(field, value, - "ssl_key", &(conf->ssl_key))) return -1; - // ssl_cert_password is a synonym for ssl_key_password - if(get_conf_val(field, value, - "ssl_cert_password", &(conf->ssl_key_password))) + logp("out of memory\n"); return -1; - if(get_conf_val(field, value, - "ssl_key_password", &(conf->ssl_key_password))) - return -1; - if(get_conf_val(field, value, - "ssl_dhfile", &(conf->ssl_dhfile))) return -1; - if(get_conf_val(field, value, - "ssl_peer_cn", &(conf->ssl_peer_cn))) return -1; - if(get_conf_val(field, value, - "clientconfdir", &(conf->clientconfdir))) return -1; - if(get_conf_val(field, value, - "cname", &(conf->cname))) return -1; - if(get_conf_val(field, value, - "directory", &(conf->directory))) return -1; - if(get_conf_val(field, value, - "autoupgrade_dir", &(conf->autoupgrade_dir))) return -1; - if(get_conf_val(field, value, - "autoupgrade_os", &(conf->autoupgrade_os))) return -1; - if(get_conf_val(field, value, - "lockfile", &(conf->lockfile))) return -1; - // "pidfile" is a synonym for "lockfile". - if(get_conf_val(field, value, - "pidfile", &(conf->lockfile))) return -1; - if(get_conf_val(field, value, - "logfile", &(conf->logfile))) return -1; - if(get_conf_val(field, value, - "password", &(conf->password))) return -1; - if(get_conf_val(field, value, - "passwd", &(conf->passwd))) return -1; - if(get_conf_val(field, value, - "server", &(conf->server))) return -1; - if(get_conf_val(field, value, - "user", &(conf->user))) return -1; - if(get_conf_val(field, value, - "group", &(conf->group))) return -1; - if(get_conf_val(field, value, - "client_lockdir", &(conf->client_lockdir))) return -1; - if(get_conf_val(field, value, - "encryption_password", &(conf->encryption_password))) - return -1; - if(get_conf_val_args(field, value, - "keep", - &(conf->keep), - &got_kp_args, &(conf->kpcount), - &kplist, 1)) return -1; - if(get_conf_val_args(field, value, - "include", - NULL, NULL, &(conf->iecount), - &ielist, 1)) return -1; - if(get_conf_val_args(field, value, - "exclude", - NULL, NULL, &(conf->iecount), - &ielist, 0)) return -1; - if(get_conf_val_args(field, value, - "cross_filesystem", - NULL, NULL, &(conf->fscount), - &fslist, 0)) return -1; - if(get_conf_val_args(field, value, - "nobackup", - NULL, NULL, &(conf->nbcount), - &nblist, 0)) return -1; - if(get_conf_val_args(field, value, - "read_fifo", - NULL, NULL, &(conf->ffcount), - &fflist, 0)) return -1; - if(get_conf_val_args(field, value, - "exclude_ext", - NULL, NULL, &(conf->excount), - &exlist, 0)) return -1; - if(get_conf_val_args(field, value, - "exclude_fs", - NULL, NULL, &(conf->exfscount), - &exfslist, 0)) return -1; - if(get_conf_val(field, value, - "timer_script", &(conf->timer_script))) return -1; - if(get_conf_val_args(field, value, - "timer_arg", - &(conf->timer_arg), - &got_timer_args, &(conf->tacount), - &talist, 0)) return -1; - if(get_conf_val(field, value, - "notify_success_script", - &(conf->notify_success_script))) return -1; - if(get_conf_val_args(field, value, - "notify_success_arg", - &(conf->notify_success_arg), - &got_ns_args, &(conf->nscount), - &nslist, 0)) return -1; - if(get_conf_val(field, value, - "notify_failure_script", - &(conf->notify_failure_script))) return -1; - if(get_conf_val_args(field, value, - "notify_failure_arg", - &(conf->notify_failure_arg), - &got_nf_args, &(conf->nfcount), - &nflist, 0)) return -1; - if(get_conf_val(field, value, - "backup_script_pre", - &(conf->backup_script_pre))) return -1; - if(get_conf_val_args(field, value, - "backup_script_pre_arg", - &(conf->backup_script_pre_arg), - NULL, &(conf->bprecount), - &bprelist, 0)) return -1; - if(get_conf_val(field, value, - "backup_script_post", - &(conf->backup_script_post))) return -1; - if(get_conf_val_args(field, value, - "backup_script_post_arg", - &(conf->backup_script_post_arg), - NULL, &(conf->bpostcount), - &bpostlist, 0)) return -1; - if(get_conf_val(field, value, - "restore_script_pre", - &(conf->restore_script_pre))) return -1; - if(get_conf_val_args(field, value, - "restore_script_pre_arg", - &(conf->restore_script_pre_arg), - NULL, &(conf->rprecount), - &rprelist, 0)) return -1; - if(get_conf_val(field, value, - "restore_script_post", - &(conf->restore_script_post))) return -1; - if(get_conf_val_args(field, value, - "restore_script_post_arg", - &(conf->restore_script_post_arg), - NULL, &(conf->rpostcount), - &rpostlist, 0)) return -1; - - if(get_conf_val(field, value, - "server_script_pre", - &(conf->server_script_pre))) return -1; - if(get_conf_val_args(field, value, - "server_script_pre_arg", - &(conf->server_script_pre_arg), - &got_spre_args, &(conf->sprecount), - &sprelist, 0)) return -1; - if(get_conf_val(field, value, - "server_script_post", - &(conf->server_script_post))) return -1; - if(get_conf_val_args(field, value, - "server_script_post_arg", - &(conf->server_script_post_arg), - &got_spost_args, &(conf->spostcount), - &spostlist, 0)) return -1; - - if(get_conf_val(field, value, - "backup_script", - &(conf->backup_script))) return -1; - if(get_conf_val_args(field, value, - "backup_script_arg", - &(conf->backup_script_arg), - NULL, &(conf->bscount), - &bslist, 0)) return -1; - if(get_conf_val(field, value, - "restore_script", - &(conf->restore_script))) return -1; - if(get_conf_val_args(field, value, - "restore_script_arg", - &(conf->restore_script_arg), - NULL, &(conf->rscount), - &rslist, 0)) return -1; - if(get_conf_val(field, value, - "server_script", - &(conf->server_script))) return -1; - if(get_conf_val_args(field, value, - "server_script_arg", - &(conf->server_script_arg), - &got_ss_args, &(conf->sscount), - &sslist, 0)) return -1; - - - if(get_conf_val(field, value, - "dedup_group", - &(conf->dedup_group))) return -1; + } } } - fclose(fp); + if(!conf->lockfile) + conf_problem(path, "lockfile unset", r); + if(conf->autoupgrade_os + && strstr(conf->autoupgrade_os, "..")) + conf_problem(path, + "autoupgrade_os must not contain a '..' component", r); + if(conf->ca_burp_ca) + { + if(!conf->ca_csr_dir) + conf_problem(path, "ca_burp_ca set, but ca_csr_dir not set\n", r); + if(!conf->ssl_cert_ca) + conf_problem(path, "ca_burp_ca set, but ssl_cert_ca not set\n", r); + if(!conf->ssl_cert) + conf_problem(path, "ca_burp_ca set, but ssl_cert not set\n", r); + if(!conf->ssl_key) + conf_problem(path, "ca_burp_ca set, but ssl_key not set\n", r); + } + + if(!r) + { + logp("Listing configured paths:\n"); + for(int b=0; biecount; b++) + logp("%s: %s\n", + conf->incexcdir[b]->flag? + "include":"exclude", + conf->incexcdir[b]->path); + logp("Listing starting paths:\n"); + for(int b=0; bsdcount; b++) + if(conf->startdir[b]->flag) + logp("%s\n", conf->startdir[b]->path); + } + return 0; +} + +static int finalise_config(const char *config_path, struct config *conf, struct llists *l, bool loadall) +{ + int i=0; + int r=0; + struct strlist **sdlist=NULL; // Set the strlist flag for the excluded fstypes for(i=0; iexfscount; i++) { - exfslist[i]->flag=0; - if(!strncasecmp(exfslist[i]->path, "0x", 2)) + l->exfslist[i]->flag=0; + if(!strncasecmp(l->exfslist[i]->path, "0x", 2)) { - exfslist[i]->flag=strtol((exfslist[i]->path)+2, + l->exfslist[i]->flag=strtol((l->exfslist[i]->path)+2, NULL, 16); logp("Excluding file system type 0x%08X\n", - exfslist[i]->flag); + l->exfslist[i]->flag); } else { - if(fstype_to_flag(exfslist[i]->path, - &(exfslist[i]->flag))) + if(fstype_to_flag(l->exfslist[i]->path, + &(l->exfslist[i]->flag))) { logp("Unknown exclude fs type: %s\n", - exfslist[i]->path); - return -1; + l->exfslist[i]->path); + l->exfslist[i]->flag=0; } } } - do_strlist_sort(exlist, conf->excount, &(conf->excext)); - do_strlist_sort(exfslist, conf->exfscount, &(conf->excfs)); - do_strlist_sort(fflist, conf->ffcount, &(conf->fifos)); - do_strlist_sort(fslist, conf->fscount, &(conf->fschgdir)); - do_strlist_sort(ielist, conf->iecount, &(conf->incexcdir)); - do_strlist_sort(nblist, conf->nbcount, &(conf->nobackup)); + // include extensions + do_strlist_sort(l->inlist, conf->incount, &(conf->incext)); + // exclude extensions + do_strlist_sort(l->exlist, conf->excount, &(conf->excext)); + // include (regular expression) + do_build_regex(l->irlist, conf->ircount, &(conf->increg)); + // exclude (regular expression) + do_build_regex(l->erlist, conf->ercount, &(conf->excreg)); + // exclude filesystems + do_strlist_sort(l->exfslist, conf->exfscount, &(conf->excfs)); + do_strlist_sort(l->fflist, conf->ffcount, &(conf->fifos)); + do_strlist_sort(l->bdlist, conf->bdcount, &(conf->blockdevs)); + do_strlist_sort(l->fslist, conf->fscount, &(conf->fschgdir)); + do_strlist_sort(l->ielist, conf->iecount, &(conf->incexcdir)); + do_strlist_sort(l->nblist, conf->nbcount, &(conf->nobackup)); // This decides which directories to start backing up, and which // are subdirectories which don't need to be started separately. for(i=0; iiecount; i++) { - if(path_checks(ielist[i]->path)) r--; - if(ielist[i]->flag) have_include++; - if(!i) - { - // ielist is sorted - the first entry is one that - // can be backed up - if(!ielist[i]->flag) - { - logp("Top level should not be an exclude: %s\n", - ielist[i]->path); - return -1; - } - if(strlist_add(&sdlist, &(conf->sdcount), - ielist[i]->path, 1)) return -1; - continue; - } +#ifdef HAVE_WIN32 + convert_backslashes(&(l->ielist[i]->path)); +#endif + if(path_checks(l->ielist[i]->path)) + return -1; + + if(!l->ielist[i]->flag) continue; // an exclude + // Ensure that we do not backup the same directory twice. - if(!strcmp(ielist[i]->path, ielist[i-1]->path)) + if(i>0 && !strcmp(l->ielist[i]->path, l->ielist[i-1]->path)) { logp("Directory appears twice in config: %s\n", - ielist[i]->path); + l->ielist[i]->path); return -1; } // If it is not a subdirectory of the most recent start point, // we have found another start point. - if(!is_subdir(sdlist[(conf->sdcount)-1]->path, ielist[i]->path)) + if(!conf->sdcount || !is_subdir(sdlist[(conf->sdcount)-1]->path, + l->ielist[i]->path)) { if(strlist_add(&sdlist, &(conf->sdcount), - ielist[i]->path, 1)) return -1; + l->ielist[i]->path, l->ielist[i]->flag)) + return -1; } } conf->startdir=sdlist; - if(!got_kp_args) + if(!l->got_kp_args) { unsigned long long mult=1; for(i=0; ikpcount; i++) { - if(!(kplist[i]->flag=atoi(kplist[i]->path))) + if(!(l->kplist[i]->flag=atoi(l->kplist[i]->path))) { logp("'keep' value cannot be set to '%s'\n", - kplist[i]->path); + l->kplist[i]->path); return -1; } - mult*=kplist[i]->flag; + mult*=l->kplist[i]->flag; // An error if you try to keep backups every second // for 100 years. @@ -918,8 +1207,8 @@ // This is so that, for example, having set 7, 4, 6, then // a backup of age 7*4*6=168 or more is guaranteed to be kept. // Otherwise, only 7*4*5=140 would be guaranteed to be kept. - if(conf->kpcount>1) kplist[i-1]->flag++; - conf->keep=kplist; + if(conf->kpcount>1) l->kplist[i-1]->flag++; + conf->keep=l->kplist; } pre_post_override(&(conf->backup_script), @@ -929,36 +1218,33 @@ pre_post_override(&(conf->server_script), &(conf->server_script_pre), &(conf->server_script_post)); - if(!got_timer_args) conf->timer_arg=talist; - if(!got_ns_args) conf->notify_success_arg=nslist; - if(!got_nf_args) conf->notify_failure_arg=nflist; - if(!got_ss_args) conf->server_script_arg=sslist; + if(!l->got_timer_args) conf->timer_arg=l->talist; + if(!l->got_ns_args) conf->notify_success_arg=l->nslist; + if(!l->got_nf_args) conf->notify_failure_arg=l->nflist; + if(!l->got_ss_args) conf->server_script_arg=l->sslist; - setup_script_arg_override(bslist, conf->bscount, - &bprelist, &bpostlist, + setup_script_arg_override(l->bslist, conf->bscount, + &(l->bprelist), &(l->bpostlist), &(conf->bprecount), &(conf->bpostcount)); - setup_script_arg_override(rslist, conf->rscount, - &rprelist, &rpostlist, + setup_script_arg_override(l->rslist, conf->rscount, + &(l->rprelist), &(l->rpostlist), &(conf->rprecount), &(conf->rpostcount)); setup_script_arg_override(conf->server_script_arg, conf->sscount, - &sprelist, &spostlist, + &(l->sprelist), &(l->spostlist), &(conf->sprecount), &(conf->spostcount)); - conf->backup_script_pre_arg=bprelist; - conf->backup_script_post_arg=bpostlist; - conf->restore_script_pre_arg=rprelist; - conf->restore_script_post_arg=rpostlist; + conf->backup_script_pre_arg=l->bprelist; + conf->backup_script_post_arg=l->bpostlist; + conf->restore_script_pre_arg=l->rprelist; + conf->restore_script_post_arg=l->rpostlist; - if(!got_spre_args) conf->server_script_pre_arg=sprelist; - if(!got_spost_args) conf->server_script_post_arg=spostlist; + if(!l->got_spre_args) conf->server_script_pre_arg=l->sprelist; + if(!l->got_spost_args) conf->server_script_post_arg=l->spostlist; if(!loadall) return 0; - if(!conf->port) - { - logp("%s: port unset\n", config_path); - r--; - } + if(!conf->port) conf_problem(config_path, "port unset", &r); + // Let the caller check the 'keep' value. if(!conf->ssl_key_password) conf->ssl_key_password=strdup(""); @@ -966,87 +1252,18 @@ switch(conf->mode) { case MODE_SERVER: - if(!conf->directory) - { logp("%s: directory unset\n", config_path); r--; } - if(!conf->clientconfdir) - { logp("%s: clientconfdir unset\n", config_path); r--; } - if(!conf->working_dir_recovery_method) - { logp("%s: working_dir_recovery_method unset\n", config_path); r--; } - if(!conf->ssl_cert) - { logp("%s: ssl_cert unset\n", config_path); r--; } - if(!conf->ssl_cert_ca) - { logp("%s: ssl_cert_ca unset\n", config_path); r--; } - if(!conf->ssl_dhfile) - { logp("%s: ssl_dhfile unset\n", config_path); r--; } - if(conf->encryption_password) - { logp("%s: encryption_password should not be set on the server!\n", config_path); r--; } - if(!conf->status_port) // carry on if not set. - { logp("%s: status_port unset\n", config_path); } - if(!conf->max_children) - { - logp("%s: max_children unset - using 5\n", - config_path); - conf->max_children=5; - } - if(!conf->kpcount) - { logp("%s: keep unset\n", config_path); r--; } - if(conf->max_hardlinks<2) - { logp("%s: max_hardlinks too low\n", - config_path); r--; } + if(server_conf_checks(conf, config_path, &r)) r--; break; case MODE_CLIENT: - if(!conf->cname) - { logp("%s: client name unset\n", config_path); r--; } - if(!conf->password) - { logp("%s: password unset\n", config_path); r--; } - if(!conf->server) - { logp("%s: server unset\n", config_path); r--; } - if(!conf->ssl_cert) - { logp("%s: ssl_cert unset\n", config_path); r--; } - if(!conf->ssl_cert_ca) - { logp("%s: ssl_cert_ca unset\n", config_path); r--; } - if(!conf->ssl_peer_cn) - { logp("%s: ssl_peer_cn unset\n", config_path); r--; } - if(!conf->lockfile) - { logp("%s: lockfile unset\n", config_path); r--; } - if(!have_include) - { - logp("%s: no 'include' paths configured\n", - config_path); - r--; - } - if(conf->autoupgrade_os - && strstr(conf->autoupgrade_os, "..")) - { - logp("%s: autoupgrade_os must not contain a '..' component.\n", config_path); - r--; - } - if(!r) - { - logp("Listing configured paths:\n"); - for(int b=0; biecount; b++) - logp("%s: %s\n", - conf->incexcdir[b]->flag? - "include":"exclude", - conf->incexcdir[b]->path); - logp("Listing starting paths:\n"); - for(int b=0; bsdcount; b++) - logp("%s\n", conf->startdir[b]->path); - if(!conf->sdcount) - { - logp("Found no starting paths!\n"); - return -1; - } - } + if(client_conf_checks(conf, config_path, &r)) r--; break; case MODE_UNSET: default: - logp("%s: mode unset - should be 'server' or 'client'\n", - config_path); - r--; - break; + logp("%s: mode unset - need 'server' or 'client'\n", + config_path); + r--; + break; } - //if(!r) logp("ok\n"); // If client_lockdir not set, use conf->directory. if(!conf->client_lockdir && conf->directory @@ -1059,6 +1276,111 @@ return r; } + +int load_config_lines(const char *config_path, struct config *conf, struct llists *l) +{ + int line=0; + FILE *fp=NULL; + char buf[4096]=""; + + if(!(fp=fopen(config_path, "r"))) + { + logp("could not open '%s' for reading.\n", config_path); + return -1; + } + while(fgets(buf, sizeof(buf), fp)) + { + line++; + if(parse_config_line(conf, l, config_path, buf, line)) + goto err; + } + if(fp) fclose(fp); + return 0; +err: + conf_error(config_path, line); + if(fp) fclose(fp); + return -1; +} + +static void set_got_args(struct llists *l, struct config *conf) +{ + l->got_timer_args=conf->tacount; + l->got_ns_args=conf->nscount; + l->got_nf_args=conf->nfcount; + l->got_kp_args=conf->kpcount; + l->got_spre_args=conf->sprecount; + l->got_spost_args=conf->spostcount; + l->got_ss_args=conf->sscount; +} + +int load_config(const char *config_path, struct config *conf, bool loadall) +{ + struct llists l; + + memset(&l, 0, sizeof(struct llists)); + set_got_args(&l, conf); + + //logp("in load_config\n"); + if(loadall) + { + if(conf->configfile) free(conf->configfile); + if(!(conf->configfile=strdup(config_path))) + { + logp("out of memory\n"); + return -1; + } + } + + if(load_config_lines(config_path, conf, &l)) + return -1; + + return finalise_config(config_path, conf, &l, loadall); +} + +/* The client runs this when the server overrides the incexcs. */ +int parse_incexcs_buf(struct config *conf, const char *incexc) +{ + int ret=0; + int line=0; + char *tok=NULL; + char *copy=NULL; + struct llists l; + memset(&l, 0, sizeof(struct llists)); + set_got_args(&l, conf); + if(!(copy=strdup(incexc))) + { + logp("out of memory\n"); + return -1; + } + free_incexcs(conf); + if(!(tok=strtok(copy, "\n"))) + { + logp("unable to parse server incexc\n"); + free(copy); + return -1; + } + do + { + line++; + if(parse_config_line(conf, &l, "", tok, line)) + { + ret=-1; + break; + } + } while((tok=strtok(NULL, "\n"))); + free(copy); + + if(ret) return ret; + return finalise_config("server override", conf, &l, FALSE); +} + +/* The server runs this when parsing a restore file on the server. */ +int parse_incexcs_path(struct config *conf, const char *path) +{ + free_incexcs(conf); + return load_config(path, conf, FALSE); +} + static int set_global_str(char **dst, const char *src) { if(src && !(*dst=strdup(src))) @@ -1086,15 +1408,24 @@ } /* Remember to update the list in the man page when you change these.*/ -int set_client_global_config(struct config *conf, struct config *cconf) +int set_client_global_config(struct config *conf, struct config *cconf, const char *client) { + cconf->syslog=conf->syslog; + cconf->client_can_force_backup=conf->client_can_force_backup; + cconf->client_can_list=conf->client_can_list; + cconf->client_can_restore=conf->client_can_restore; + cconf->client_can_verify=conf->client_can_verify; cconf->hardlinked_archive=conf->hardlinked_archive; cconf->librsync=conf->librsync; cconf->compression=conf->compression; cconf->notify_success_warnings_only=conf->notify_success_warnings_only; + cconf->notify_success_changes_only=conf->notify_success_changes_only; cconf->server_script_post_run_on_fail=conf->server_script_post_run_on_fail; + cconf->directory_tree=conf->directory_tree; if(set_global_str(&(cconf->directory), conf->directory)) return -1; + if(set_global_str(&(cconf->timestamp_format), conf->timestamp_format)) + return -1; if(set_global_str(&(cconf->working_dir_recovery_method), conf->working_dir_recovery_method)) return -1; if(set_global_str(&(cconf->timer_script), conf->timer_script)) @@ -1136,5 +1467,10 @@ conf->server_script_arg, &(cconf->sscount), conf->sscount)) return -1; + // If ssl_peer_cn is not set, default it to the client name. + if(!conf->ssl_peer_cn + && set_global_str(&(cconf->ssl_peer_cn), client)) + return -1; + return 0; } diff -Nru burp-1.3.0+20120214git/src/conf.h burp-1.3.10/src/conf.h --- burp-1.3.0+20120214git/src/conf.h 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/conf.h 2012-07-27 00:36:21.000000000 +0000 @@ -12,11 +12,13 @@ struct config { + char *configfile; char *port; char *status_port; enum burp_mode mode; char *lockfile; char *logfile; + int syslog; char *ssl_cert_ca; char *ssl_cert; char *ssl_key; @@ -29,13 +31,22 @@ // server options char *directory; + char *timestamp_format; char *clientconfdir; char *ssl_dhfile; int max_children; + int max_status_children; char *client_lockdir; mode_t umask; - unsigned int max_hardlinks; + int max_hardlinks; int max_storage_subdirs; + int forking; + int daemon; + int directory_tree; + char *ca_conf; + char *ca_name; + char *ca_server_name; + char *ca_burp_ca; // client options char *cname; @@ -45,26 +56,36 @@ char *encryption_password; char *autoupgrade_os; char *autoupgrade_dir; // also a server option + char *ca_csr_dir; // This block of client stuff is all to do with what files to backup. - struct strlist **startdir; - struct strlist **incexcdir; - struct strlist **fschgdir; - struct strlist **nobackup; - struct strlist **excext; - struct strlist **excfs; - int sdcount; - int iecount; - int fscount; - int nbcount; - int excount; - int exfscount; + int sdcount; struct strlist **startdir; + int iecount; struct strlist **incexcdir; + int fscount; struct strlist **fschgdir; + int nbcount; struct strlist **nobackup; + int incount; struct strlist **incext; // include extensions + int excount; struct strlist **excext; // exclude extensions + int ircount; struct strlist **increg; // include (regular expression) + int ercount; struct strlist **excreg; // exclude (regular expression) + int exfscount; struct strlist **excfs; // exclude filesystems int cross_all_filesystems; int read_all_fifos; struct strlist **fifos; int ffcount; + int read_all_blockdevs; + struct strlist **blockdevs; + int bdcount; unsigned long min_file_size; unsigned long max_file_size; + // These are to do with restore. + int overwrite; + int strip; + char *backup; + char *restoreprefix; + char *regex; + // To do with listing. + char *browsefile; + char *browsedir; char *backup_script_pre; struct strlist **backup_script_pre_arg; @@ -121,22 +142,29 @@ struct strlist **notify_success_arg; int nscount; int notify_success_warnings_only; + int notify_success_changes_only; char *notify_failure_script; struct strlist **notify_failure_arg; int nfcount; char *dedup_group; + + int client_can_force_backup; + int client_can_list; + int client_can_restore; + int client_can_verify; }; extern void init_config(struct config *conf); extern int load_config(const char *config_path, struct config *conf, bool loadall); extern void free_config(struct config *conf); -extern int set_client_global_config(struct config *conf, struct config *cconf); +extern int set_client_global_config(struct config *conf, struct config *cconf, const char *client); extern int is_subdir(const char *dir, const char *sub); extern int pathcmp(const char *a, const char *b); +extern int config_get_pair(char buf[], char **field, char **value); +extern int parse_incexcs_buf(struct config *conf, const char *incexc); +extern int parse_incexcs_path(struct config *conf, const char *path); -extern int send_incexc_client(struct config *conf, struct cntr *p1cntr); -extern int recv_incexc_server(struct config *conf, struct cntr *p1cntr); #endif diff -Nru burp-1.3.0+20120214git/src/counter.c burp-1.3.10/src/counter.c --- burp-1.3.0+20120214git/src/counter.c 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/counter.c 2012-07-27 00:36:21.000000000 +0000 @@ -44,6 +44,10 @@ c->special_same=0; c->special_changed=0; + c->efs=0; + c->efs_same=0; + c->efs_changed=0; + c->warning=0; c->byte=0; c->recvbyte=0; @@ -64,6 +68,7 @@ case CMD_SOFT_LINK: return CMD_SOFT_LINK_SAME; case CMD_HARD_LINK: return CMD_HARD_LINK_SAME; case CMD_SPECIAL: return CMD_SPECIAL_SAME; + case CMD_EFS_FILE: return CMD_EFS_FILE_SAME; } return CMD_ERROR; } @@ -80,6 +85,7 @@ case CMD_SOFT_LINK: return CMD_SOFT_LINK_CHANGED; case CMD_HARD_LINK: return CMD_HARD_LINK_CHANGED; case CMD_SPECIAL: return CMD_SPECIAL_CHANGED; + case CMD_EFS_FILE: return CMD_EFS_FILE_CHANGED; } return CMD_ERROR; } @@ -194,6 +200,13 @@ case CMD_SPECIAL_CHANGED: ++(c->special_changed); ++(c->total_changed); break; + case CMD_EFS_FILE: + ++(c->efs); ++(c->total); break; + case CMD_EFS_FILE_SAME: + ++(c->efs_same); ++(c->total_same); break; + case CMD_EFS_FILE_CHANGED: + ++(c->efs_changed); ++(c->total_changed); break; + case CMD_WARNING: ++(c->warning); return; // do not add to total case CMD_ERROR: @@ -240,25 +253,44 @@ { switch(form) { + /* Windows has awful difficultly printf-ing more than one + '%llu' type thing at a time, sometimes segfaulting, + so split them all up. */ case FORMAT_SERVER: if(!d && !a && !b && !c) return; - logc("% 22s % 9llu % 9llu % 9llu % 9llu |% 9llu\n", - msg, a, b, c, a+b+c, d); + logc("% 22s ", msg); + logc("% 9llu ", a); + logc("% 9llu ", b); + logc("% 9llu ", c); + logc("% 9llu |", a+b+c); + logc("% 9llu\n", d); break; case FORMAT_CLIENT_DATA: if(!d && !a && !b && !c) return; - logc("% 22s % 9llu % 9llu % 9s % 9llu |% 9llu\n", - msg, a, b, "-", a+b+c, d); + logc("% 22s ", msg); + logc("% 9llu ", a); + logc("% 9llu ", b); + logc("% 9s ", "-"); + logc("% 9llu |", a+b+c); + logc("% 9llu\n", d); break; case FORMAT_CLIENT_NODE: if(!d && !a && !b && !c) return; - logc("% 22s % 9s % 9s % 9s % 9s |% 9llu\n", - msg, "-", "-", "-", "-", d); + logc("% 22s ", msg); + logc("% 9s ", "-"); + logc("% 9s ", "-"); + logc("% 9s ", "-"); + logc("% 9s |", "-"); + logc("% 9llu\n", d); break; case FORMAT_CLIENT_RESTORE: if(!d && !a && !b && !c) return; - logc("% 22s % 9s % 9s % 9s % 9llu |% 9s\n", - msg, "-", "-", "-", c, "-"); + logc("% 22s ", msg); + logc("% 9s ", "-"); + logc("% 9s ", "-"); + logc("% 9s ", "-"); + logc("% 9llu |", d); + logc("% 9s\n", "-"); break; } } @@ -274,17 +306,17 @@ logc(" Warnings: % 11llu\n", b->warning + a->warning); logc("\n"); - logc(" Bytes estimated: % 11llu%s\n", - a->byte, bytes_to_human(a->byte)); + logc(" Bytes estimated: % 11llu", a->byte); + logc("%s\n", bytes_to_human(a->byte)); if(act==ACTION_ESTIMATE) return; - logc(" Bytes in backup: % 11llu%s\n", - b->byte, bytes_to_human(b->byte)); - logc(" Bytes received: % 11llu%s\n", - b->recvbyte, bytes_to_human(b->recvbyte)); - logc(" Bytes sent: % 11llu%s\n", - b->sentbyte, bytes_to_human(b->sentbyte)); + logc(" Bytes in backup: % 11llu", b->byte); + logc("%s\n", bytes_to_human(b->byte)); + logc(" Bytes received: % 11llu", b->recvbyte); + logc("%s\n", bytes_to_human(b->recvbyte)); + logc(" Bytes sent: % 11llu", b->sentbyte); + logc("%s\n", bytes_to_human(b->sentbyte)); } void print_filecounters(struct cntr *p1c, struct cntr *c, enum action act, int client) @@ -310,6 +342,7 @@ restore_print("Soft links:", c->slink); restore_print("Hard links:", c->hlink); restore_print("Special files:", c->special); + restore_print("EFS files:", c->efs); restore_print("Grand total:", c->total); } else if(act==ACTION_VERIFY) @@ -322,6 +355,7 @@ restore_print("Verified soft links:", c->slink); restore_print("Verified hard links:", c->hlink); restore_print("Verified special:", c->special); + restore_print("Verified EFS files:", c->efs); restore_print("Grand total:", c->total); } else @@ -382,6 +416,13 @@ p1c->special, client?FORMAT_CLIENT_NODE:FORMAT_SERVER); + quint_print("EFS files:", + c->efs, + c->efs_changed, + c->efs_same, + p1c->efs, + client?FORMAT_CLIENT_NODE:FORMAT_SERVER); + quint_print("Grand total:", c->total, c->total_changed, diff -Nru burp-1.3.0+20120214git/src/counter.h burp-1.3.10/src/counter.h --- burp-1.3.0+20120214git/src/counter.h 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/counter.h 2012-07-27 00:36:21.000000000 +0000 @@ -41,6 +41,10 @@ unsigned long long special_same; unsigned long long special_changed; + unsigned long long efs; + unsigned long long efs_same; + unsigned long long efs_changed; + unsigned long long warning; unsigned long long byte; unsigned long long recvbyte; diff -Nru burp-1.3.0+20120214git/src/current_backups_server.c burp-1.3.10/src/current_backups_server.c --- burp-1.3.0+20120214git/src/current_backups_server.c 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/current_backups_server.c 2012-07-27 00:44:49.000000000 +0000 @@ -13,7 +13,6 @@ #include #include -#include #include int recursive_hardlink(const char *src, const char *dst, const char *client, struct cntr *p1cntr, struct cntr *cntr, struct config *conf) @@ -399,7 +398,7 @@ return ret; } -int get_new_timestamp(const char *basedir, char *buf, size_t s) +int get_new_timestamp(struct config *cconf, const char *basedir, char *buf, size_t s) { int a=0; time_t t=0; @@ -424,7 +423,7 @@ ctm=localtime(&t); // Windows does not like the %T strftime format option - you get // complaints under gdb. - strftime(tmpbuf, sizeof(tmpbuf), "%Y-%m-%d %H:%M:%S", ctm); + strftime(tmpbuf, sizeof(tmpbuf), cconf->timestamp_format, ctm); snprintf(buf, s, "%07lu %s", ++index, tmpbuf); return 0; @@ -467,8 +466,7 @@ } } close_fp(&mp); - gzclose_fp(&zp); - return 0; + return gzclose_fp(&zp); // this can give an error when out of space } int compress_file(const char *src, const char *dst, struct config *cconf) @@ -672,31 +670,6 @@ return 0; } -int compile_regex(regex_t **regex, const char *str) -{ - if(str && *str) - { - if(!(*regex=(regex_t *)malloc(sizeof(regex_t))) - || regcomp(*regex, str, REG_EXTENDED)) - { - log_and_send("unable to compile regex\n"); - return -1; - } - } - return 0; -} - -int check_regex(regex_t *regex, const char *buf) -{ - if(!regex) return 1; - switch(regexec(regex, buf, 0, NULL, 0)) - { - case 0: return 1; - case REG_NOMATCH: return 0; - default: return 0; - } -} - /* Need to base librsync block length on the size of the old file, otherwise the risk of librsync collisions and silent corruption increases as the size of the new file gets bigger. */ @@ -747,7 +720,7 @@ int do_link(const char *oldpath, const char *newpath, struct stat *statp, struct config *conf) { /* Avoid creating too many hardlinks */ - if(statp->st_nlink >= conf->max_hardlinks) + if(statp->st_nlink >= (unsigned int)conf->max_hardlinks) { return duplicate_file(oldpath, newpath); } diff -Nru burp-1.3.0+20120214git/src/current_backups_server.h burp-1.3.10/src/current_backups_server.h --- burp-1.3.0+20120214git/src/current_backups_server.h 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/current_backups_server.h 2012-07-27 00:36:21.000000000 +0000 @@ -20,14 +20,12 @@ extern int recursive_delete(const char *d, const char *file, bool delfiles); extern void free_current_backups(struct bu **arr, int a); extern int get_current_backups(const char *basedir, struct bu **arr, int *a, int log); -extern int get_new_timestamp(const char *basedir, char *buf, size_t s); +extern int get_new_timestamp(struct config *cconf, const char *basedir, char *buf, size_t s); extern int read_timestamp(const char *path, char buf[], size_t len); extern int write_timestamp(const char *timestamp, const char *tstmp); extern int compress_file(const char *current, const char *file, struct config *cconf); extern int compress_filename(const char *d, const char *file, const char *zfile, struct config *cconf); extern int remove_old_backups(const char *basedir, struct config *cconf, const char *client); -extern int compile_regex(regex_t **regex, const char *str); -extern int check_regex(regex_t *regex, const char *buf); extern size_t get_librsync_block_len(const char *endfile); extern int do_link(const char *oldpath, const char *newpath, struct stat *statp, struct config *conf); diff -Nru burp-1.3.0+20120214git/src/dpth.c burp-1.3.10/src/dpth.c --- burp-1.3.0+20120214git/src/dpth.c 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/dpth.c 2012-07-27 00:36:21.000000000 +0000 @@ -8,11 +8,13 @@ #include "dpth.h" #include "find.h" -static void mk_dpth(struct dpth *dpth, struct config *cconf) +void mk_dpth(struct dpth *dpth, struct config *cconf, char cmd) { // file data snprintf(dpth->path, sizeof(dpth->path), "%04X/%04X/%04X%s", - dpth->prim, dpth->seco, dpth->tert, cconf->compression?".gz":""); + dpth->prim, dpth->seco, dpth->tert, + /* Because of the way EFS works, it cannot be compressed. */ + (cconf->compression && cmd!=CMD_EFS_FILE)?".gz":""); } static void mk_dpth_prim(struct dpth *dpth) @@ -60,7 +62,7 @@ { // Could not open directory. Set all zeros. dpth->prim=0; - mk_dpth(dpth, cconf); +// mk_dpth(dpth, cconf); return 0; } mk_dpth_prim(dpth); @@ -73,7 +75,7 @@ { // Could not open directory. Set zero. dpth->seco=0; - mk_dpth(dpth, cconf); +// mk_dpth(dpth, cconf); free(tmp); return 0; } @@ -88,7 +90,7 @@ { // Could not open directory. Set zero. dpth->tert=0; - mk_dpth(dpth, cconf); +// mk_dpth(dpth, cconf); free(tmp); return 0; } @@ -128,7 +130,7 @@ } } //printf("before incr_dpth: %s %04X/%04X/%04X\n", dpth->path, dpth->prim, dpth->seco, dpth->tert); - mk_dpth(dpth, cconf); +// mk_dpth(dpth, cconf); //printf("after incr_dpth: %s\n", dpth->path); return 0; } @@ -138,7 +140,10 @@ unsigned int a=0; unsigned int b=0; unsigned int c=0; - if(!datapath) return 0; + + if(!datapath + || *datapath=='t') // The path used the tree style structure. + return 0; if((sscanf(datapath, "%04X/%04X/%04X", &a, &b, &c))!=3) return -1; @@ -151,6 +156,6 @@ dpth->prim=a; dpth->seco=b; dpth->tert=c; - mk_dpth(dpth, cconf); +// mk_dpth(dpth, cconf); return 0; } diff -Nru burp-1.3.0+20120214git/src/dpth.h burp-1.3.10/src/dpth.h --- burp-1.3.0+20120214git/src/dpth.h 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/dpth.h 2012-07-27 00:36:21.000000000 +0000 @@ -13,5 +13,6 @@ extern int init_dpth(struct dpth *dpth, const char *currentdata, struct config *cconf); extern int incr_dpth(struct dpth *dpth, struct config *cconf); extern int set_dpth_from_string(struct dpth *dpth, const char *datapath, struct config *conf); +extern void mk_dpth(struct dpth *dpth, struct config *cconf, char cmd); #endif diff -Nru burp-1.3.0+20120214git/src/find.c burp-1.3.10/src/find.c --- burp-1.3.0+20120214git/src/find.c 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/find.c 2012-07-27 00:36:21.000000000 +0000 @@ -4,6 +4,7 @@ #include "log.h" #include "asyncio.h" #include "handy.h" +#include "regexp.h" #include "backup_phase1_client.h" #ifdef HAVE_DARWIN_OS #include @@ -170,29 +171,80 @@ return false; /* do backup */ } -static int -myalphasort (const struct dirent **a, const struct dirent **b) +static int myalphasort (const struct dirent **a, const struct dirent **b) { - return pathcmp ((*a)->d_name, (*b)->d_name); + return pathcmp ((*a)->d_name, (*b)->d_name); } -int file_is_included(struct strlist **ielist, int iecount, struct strlist **excext, int excount, const char *fname) +/* Return 1 to include the file, 0 to exclude it. */ +static int in_include_ext(struct strlist **incext, int incount, const char *fname) +{ + int i=0; + const char *cp=NULL; + // If not doing include_ext, let the file get backed up. + if(!incount) return 1; + // If file has no extension, it cannot be included. + if(!(cp=strrchr(fname, '.'))) return 0; + for(i=0; ipath, cp+1)) + return 1; + return 0; +} + +static int in_exclude_ext(struct strlist **excext, int excount, const char *fname) +{ + int i=0; + const char *cp=NULL; + // If not doing exclude_ext, let the file get backed up. + if(!excount) return 0; + // If file has no extension, it is included. + if(!(cp=strrchr(fname, '.'))) return 0; + for(i=0; ipath, cp+1)) + return 1; + return 0; +} + +/* Return 1 to include the file, 0 to exclude it. */ +/* Currently not used - it needs more thinking about. */ +int in_include_regex(struct strlist **increg, int ircount, const char *fname) +{ + int i; + // If not doing include_regex, let the file get backed up. + if(!ircount) return 1; + for(i=0; ire, fname)) + return 1; + } + return 0; +} + +int in_exclude_regex(struct strlist **excreg, int ercount, const char *fname) +{ + int i; + // If not doing exclude_regex, let the file get backed up. + //if(!ercount) return 0; (will return 0 anyway) + for(i=0; ire, fname)) + return 1; + } + return 0; +} + +// When recursing into directories, do not want to check the include_ext list. +static int file_is_included_no_incext(struct strlist **ielist, int iecount, struct strlist **excext, int excount, struct strlist **excreg, int ercount, const char *fname) { int i=0; int ret=0; int longest=0; int matching=0; int best=-1; - const char *cp=NULL; - //logp("in is_inc: %s\n", fname); - // Check excluded extension list. - if(excount && (cp=strrchr(fname, '.'))) - { - cp++; - for(i=0; ipath, cp)) return 0; - } + if(in_exclude_ext(excext, excount, fname) + || in_exclude_regex(excreg, ercount, fname)) + return 0; // Check include/exclude directories. for(i=0; iread_all_blockdevs) return 1; + for(i=0; ibdcount; i++) + if(!strcmp(conf->blockdevs[i]->path, fname)) return 1; + return 0; +} + static int nobackup_directory(struct config *conf, const char *path) { int i=0; @@ -261,8 +344,10 @@ sizeleft=ff_pkt->statp.st_size; // If the user specified a minimum or maximum file size, obey it. - if(conf->min_file_size && sizeleftmin_file_size) return 0; - if(conf->max_file_size && sizeleft>conf->max_file_size) return 0; + if(conf->min_file_size && sizeleft<(boffset_t)conf->min_file_size) + return 0; + if(conf->max_file_size && sizeleft>(boffset_t)conf->max_file_size) + return 0; /* Don't bother opening empty, world readable files. Also do not open files when archive is meant for /dev/null. */ @@ -596,8 +681,10 @@ for(i=0; id_name); i++) *q++=*p++; *q=0; - if(file_is_included(conf->incexcdir, conf->iecount, - conf->excext, conf->excount, link)) + if(file_is_included_no_incext(conf->incexcdir, conf->iecount, + conf->excext, conf->excount, + conf->excreg, conf->ercount, + link)) { rtn_stat=find_files(ff_pkt, conf, cntr, link, our_device, false); @@ -663,11 +750,6 @@ struct cntr *cntr, char *fname, bool top_level) { int rtn_stat; - /* - * If it is explicitly mentioned (i.e. top_level) and is - * a block device, we do a raw backup of it or if it is - * a fifo, we simply read it. - */ #ifdef HAVE_FREEBSD_OS /* * On FreeBSD, all block devices are character devices, so @@ -676,16 +758,18 @@ * crw-r----- 1 root operator - 116, 0x00040002 Jun 9 19:32 /dev/ad0s3 * crw-r----- 1 root operator - 116, 0x00040002 Jun 9 19:32 /dev/rad0s3 */ - if((S_ISBLK(ff_pkt->statp.st_mode) || S_ISCHR(ff_pkt->statp.st_mode))) + if((S_ISBLK(ff_pkt->statp.st_mode) || S_ISCHR(ff_pkt->statp.st_mode)) + && need_to_read_blockdev(conf, ff_pkt->fname)) { #else - if(S_ISBLK(ff_pkt->statp.st_mode)) + if(S_ISBLK(ff_pkt->statp.st_mode) + && need_to_read_blockdev(conf, ff_pkt->fname)) { #endif - ff_pkt->type = FT_RAW; /* raw partition */ + ff_pkt->type = FT_RAW; /* raw partition */ } - else if(S_ISFIFO(ff_pkt->statp.st_mode) && - need_to_read_fifo(conf, ff_pkt->fname)) + else if(S_ISFIFO(ff_pkt->statp.st_mode) + && need_to_read_fifo(conf, ff_pkt->fname)) { ff_pkt->type=FT_FIFO; } @@ -830,15 +914,15 @@ /* This is not a link to a previously dumped file, so dump it. */ if(S_ISREG(ff_pkt->statp.st_mode)) - return found_regular_file(ff_pkt, - conf, cntr, fname, top_level, &restore_times); - else if(S_ISLNK(ff_pkt->statp.st_mode)) - return found_soft_link(ff_pkt, conf, cntr, fname, top_level); - else if(S_ISDIR(ff_pkt->statp.st_mode)) - return found_directory(ff_pkt, - conf, cntr, fname, parent_device, top_level, &restore_times); - - return found_other(ff_pkt, conf, cntr, fname, top_level); + return found_regular_file(ff_pkt, conf, cntr, fname, + top_level, &restore_times); + else if(S_ISLNK(ff_pkt->statp.st_mode)) + return found_soft_link(ff_pkt, conf, cntr, fname, top_level); + else if(S_ISDIR(ff_pkt->statp.st_mode)) + return found_directory(ff_pkt, conf, cntr, fname, + parent_device, top_level, &restore_times); + else + return found_other(ff_pkt, conf, cntr, fname, top_level); } int find_files_begin(FF_PKT *ff_pkt, struct config *conf, char *fname, struct cntr *cntr) diff -Nru burp-1.3.0+20120214git/src/find.h burp-1.3.10/src/find.h --- burp-1.3.0+20120214git/src/find.h 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/find.h 2012-07-27 00:36:21.000000000 +0000 @@ -116,11 +116,17 @@ int find_files_begin(FF_PKT *ff_pkt, struct config *conf, char *fname, struct cntr *cntr); int pathcmp(const char *a, const char *b); int file_is_included(struct strlist **ielist, int iecount, - struct strlist **excext, int excount, const char *fname); + struct strlist **incext, int incount, + struct strlist **excext, int excount, + struct strlist **increg, int ircount, + struct strlist **excreg, int ercount, + const char *fname, bool top_level); +int in_include_regex(struct strlist **incre, int incount, const char *fname); +int in_exclude_regex(struct strlist **excre, int excount, const char *fname); /* from attribs.c */ -void encode_stat(char *buf, struct stat *statp, int64_t winattr); -void decode_stat(const char *buf, struct stat *statp, int64_t *winattr); -bool set_attributes(const char *path, char cmd, struct stat *statp, int64_t winattr); +void encode_stat(char *buf, struct stat *statp, int64_t winattr, int compression); +void decode_stat(const char *buf, struct stat *statp, int64_t *winattr, int *compression); +bool set_attributes(const char *path, char cmd, struct stat *statp, int64_t winattr, struct cntr *cntr); #endif /* __FILES_H */ diff -Nru burp-1.3.0+20120214git/src/gcc-Wall burp-1.3.10/src/gcc-Wall --- burp-1.3.0+20120214git/src/gcc-Wall 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/gcc-Wall 1970-01-01 00:00:00.000000000 +0000 @@ -1,40 +0,0 @@ -#!/bin/sh -# gcc -Wall plus other important warnings not included in -Wall - -for arg -do - case $arg in - -O*) Wuninitialized=-Wuninitialized;; # only makes sense with `-O' - esac -done - -exec gcc \ - -Wall $Wuninitialized \ - -Wwrite-strings \ - -Wcast-qual \ - -Wbad-function-cast \ - -Wpointer-arith \ - -Wstrict-prototypes \ - -Wmissing-prototypes \ - -Wmissing-declarations \ - -Wnested-externs \ - -Wtraditional \ - -Wconversion \ - -Wcomment \ - -Wcast-align \ - -Winline \ - -Wshadow \ - -Wredundant-decls \ - -Wid-clash-31 \ - "$@" - -# -Wall implies: -# -Wimplicit -# -Wreturn-type -# -Wunused -# -Wswitch -# -Wformat -# -Wchar-subscripts -# -Wparentheses -# -Wmissing-braces ------------------------------------------------------------------------------- diff -Nru burp-1.3.0+20120214git/src/handy.c burp-1.3.10/src/handy.c --- burp-1.3.0+20120214git/src/handy.c 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/handy.c 2012-07-27 02:11:43.000000000 +0000 @@ -25,19 +25,35 @@ *fd=-1; } -void close_fp(FILE **fp) +int close_fp(FILE **fp) { - if(!*fp) return; - fclose(*fp); + if(!*fp) return 0; + if(fclose(*fp)) + { + logp("fclose failed: %s\n", strerror(errno)); + *fp=NULL; + return -1; + } *fp=NULL; + return 0; } -void gzclose_fp(gzFile *fp) +int gzclose_fp(gzFile *fp) { - if(!*fp) return; - gzflush(*fp, Z_FINISH); - gzclose(*fp); + int e; + if(!*fp) return 0; + if((e=gzclose(*fp))) + { + char msg[256]=""; + const char *str=NULL; + if(e==Z_ERRNO) str=strerror(errno); + else str=gzerror(*fp, &e); + logp("gzclose failed: %d (%s)\n", e, str?:""); + *fp=NULL; + return -1; + } *fp=NULL; + return 0; } int is_dir(const char *path) @@ -49,56 +65,6 @@ return S_ISDIR(buf.st_mode); } -/* This may be given binary data, of which we need to already know the length */ -char *prepend_len(const char *prep, size_t plen, const char *fname, size_t flen, const char *sep, size_t slen, size_t *newlen) -{ - size_t l=0; - char *rpath=NULL; - - l+=plen; - l+=flen; - l+=slen; - l+=1; - - if(!(rpath=(char *)malloc(l))) - { - logp("could not malloc for prepend to %s\n", fname); - return NULL; - } - if(plen) memcpy(rpath, prep, plen); - if(slen) memcpy(rpath+plen, sep, slen); - if(flen) memcpy(rpath+plen+slen, fname, flen); - rpath[plen+slen+flen]='\0'; - - if(newlen) (*newlen)+=slen+flen; - return rpath; -} - -char *prepend(const char *prep, const char *fname, size_t len, const char *sep) -{ - return prepend_len(prep, prep?strlen(prep):0, - fname, len, - sep, (sep && *fname)?strlen(sep):0, NULL); -} - -char *prepend_s(const char *prep, const char *fname, size_t len) -{ - if(!prep || !*prep) - { - char *ret=NULL; - if(!(ret=strdup(fname))) - logp("out of memory in prepend_s\n"); - return ret; - } - // Try to avoid getting a double slash in the path. - if(fname && fname[0]=='/') - { - fname++; - len--; - } - return prepend(prep, fname, len, "/"); -} - int mkpath(char **rpath, const char *limit) { char *cp=NULL; @@ -334,32 +300,37 @@ int open_file_for_send(BFILE *bfd, FILE **fp, const char *fname, int64_t winattr, struct cntr *cntr) { -#ifdef HAVE_WIN32 - binit(bfd, winattr); - if(bopen(bfd, fname, O_RDONLY | O_BINARY | O_NOATIME, 0)<0) + if(fp) { - berrno be; - logw(cntr, - "Could not open %s: %s\n", fname, be.bstrerror(errno)); - return -1; + if(!(*fp=fopen(fname, "rb"))) + { + logw(cntr, + "Could not open %s: %s\n", fname, strerror(errno)); + return -1; + } } -#else - if(!(*fp=fopen(fname, "rb"))) +#ifdef HAVE_WIN32 + else { - logw(cntr, - "Could not open %s: %s\n", fname, strerror(errno)); - return -1; + binit(bfd, winattr); + if(bopen(bfd, fname, O_RDONLY | O_BINARY | O_NOATIME, 0, + (winattr & FILE_ATTRIBUTE_DIRECTORY))<=0) + { + berrno be; + logw(cntr, "Could not open %s: %s\n", + fname, be.bstrerror(errno)); + return -1; + } } #endif return 0; } -void close_file_for_send(BFILE *bfd, FILE **fp) +int close_file_for_send(BFILE *bfd, FILE **fp) { + if(fp) return close_fp(fp); #ifdef HAVE_WIN32 - bclose(bfd); -#else - fclose(*fp); + if(bfd) return bclose(bfd); #endif } @@ -432,10 +403,9 @@ } else { + if(fp) strm.avail_in=fread(in, 1, ZCHUNK, fp); #ifdef HAVE_WIN32 - strm.avail_in=(uint32_t)bread(bfd, in, ZCHUNK); -#else - strm.avail_in=fread(in, 1, ZCHUNK, fp); + else strm.avail_in=(uint32_t)bread(bfd, in, ZCHUNK); #endif } if(!compression && !strm.avail_in) break; @@ -579,7 +549,42 @@ return ret; } -int send_whole_file(const char *fname, const char *datapth, int quick_read, unsigned long long *bytes, struct cntr *cntr, BFILE *bfd, FILE *fp, const char *extrameta, size_t elen) +#ifdef HAVE_WIN32 +struct winbuf +{ + MD5_CTX *md5; + int quick_read; + const char *datapth; + struct cntr *cntr; + unsigned long long *bytes; +}; + +static DWORD WINAPI write_efs(PBYTE pbData, PVOID pvCallbackContext, ULONG ulLength) +{ + struct winbuf *mybuf=(struct winbuf *)pvCallbackContext; + (*(mybuf->bytes))+=ulLength; + if(!MD5_Update(mybuf->md5, pbData, ulLength)) + { + logp("MD5_Update() failed\n"); + return ERROR_FUNCTION_FAILED; + } + if(async_write(CMD_APPEND, (const char *)pbData, ulLength)) + { + return ERROR_FUNCTION_FAILED; + } + if(mybuf->quick_read) + { + int qr; + if((qr=do_quick_read(mybuf->datapth, mybuf->cntr))<0) + return ERROR_FUNCTION_FAILED; + if(qr) // client wants to interrupt + return ERROR_FUNCTION_FAILED; + } + return ERROR_SUCCESS; +} +#endif + +int send_whole_file(char cmd, const char *fname, const char *datapth, int quick_read, unsigned long long *bytes, struct cntr *cntr, BFILE *bfd, FILE *fp, const char *extrameta, size_t elen) { int ret=0; size_t s=0; @@ -625,8 +630,30 @@ else { #ifdef HAVE_WIN32 - if(!ret) while((s=(uint32_t)bread(bfd, buf, 4096))>0) + if(!ret && cmd==CMD_EFS_FILE) { + struct winbuf mybuf; + mybuf.md5=&md5; + mybuf.quick_read=quick_read; + mybuf.datapth=datapth; + mybuf.cntr=cntr; + mybuf.bytes=bytes; + // The EFS read function, ReadEncryptedFileRaw(), + // works in an annoying way. You have to give it a + // function that it calls repeatedly every time the + // read buffer is called. + // So ReadEncryptedFileRaw() will not return until + // it has read the whole file. I have no idea why + // they do not have a plain 'read()' function for it. + + ReadEncryptedFileRaw((PFE_EXPORT_FUNC)write_efs, + &mybuf, bfd->pvContext); + } + + if(!ret && cmd!=CMD_EFS_FILE) + { + while((s=(uint32_t)bread(bfd, buf, 4096))>0) + { *bytes+=s; if(!MD5_Update(&md5, buf, s)) { @@ -653,6 +680,7 @@ break; } } + } } #else //printf("send_whole_file: %s\n", fname); @@ -766,7 +794,7 @@ rfd=socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol); if(rfd<0) continue; if(connect(rfd, rp->ai_addr, rp->ai_addrlen) != -1) break; - close(rfd); + close_fd(&rfd); } freeaddrinfo(result); if(!rp) @@ -787,17 +815,100 @@ void reuseaddr(int fd) { int tmpfd; - setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, - (sockopt_val_t)&tmpfd, sizeof(tmpfd)); + if(setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, + (sockopt_val_t)&tmpfd, sizeof(tmpfd))<0) + logp("Error: setsockopt SO_REUSEADDR: %s", + strerror(errno)); } #ifndef HAVE_WIN32 +static void get_status_buf(char *buf, size_t len, const char *client, char phase, const char *path, struct cntr *p1cntr, struct cntr *cntr) +{ + int l=0; + snprintf(buf, len, + "%s\t%c\t%c\t" + "%llu/%llu/%llu/%llu\t" + "%llu/%llu/%llu/%llu\t" + "%llu/%llu/%llu/%llu\t" + "%llu/%llu/%llu/%llu\t" + "%llu/%llu/%llu/%llu\t" + "%llu/%llu/%llu/%llu\t" + "%llu/%llu/%llu/%llu\t" + "%llu/%llu/%llu/%llu\t" + "%llu/%llu/%llu/%llu\t" + "%llu/%llu/%llu/%llu\t" + "%llu\t%llu\t%llu\t%llu\t%llu\t%llu\t%li\t%s\n", + client, STATUS_RUNNING, phase, + + cntr->total, + cntr->total_changed, + cntr->total_same, + p1cntr->total, + + cntr->file, + cntr->file_changed, + cntr->file_same, + p1cntr->file, + + cntr->enc, + cntr->enc_changed, + cntr->enc_same, + p1cntr->enc, + + cntr->meta, + cntr->meta_changed, + cntr->meta_same, + p1cntr->meta, + + cntr->encmeta, + cntr->encmeta_changed, + cntr->encmeta_same, + p1cntr->encmeta, + + cntr->dir, + cntr->dir_changed, + cntr->dir_same, + p1cntr->dir, + + cntr->slink, + cntr->slink_changed, + cntr->slink_same, + p1cntr->slink, + + cntr->hlink, + cntr->hlink_changed, + cntr->hlink_same, + p1cntr->hlink, + + cntr->special, + cntr->special_changed, + cntr->special_same, + p1cntr->special, + + cntr->total, + cntr->total_changed, + cntr->total_same, + p1cntr->total, + + cntr->gtotal, + cntr->warning, + p1cntr->byte, + cntr->byte, + cntr->recvbyte, + cntr->sentbyte, + p1cntr->start, + path?path:""); + + // Make sure there is a new line at the end. + l=strlen(buf); + if(buf[l-1]!='\n') buf[l-1]='\n'; +} + void write_status(const char *client, char phase, const char *path, struct cntr *p1cntr, struct cntr *cntr) { static time_t lasttime=0; if(status_wfd>=0 && client) { - int l; char *w=NULL; time_t now=0; time_t diff=0; @@ -815,83 +926,9 @@ } lasttime=now; - snprintf(wbuf, sizeof(wbuf), - "%s\t%c\t%c\t" - "%llu/%llu/%llu/%llu\t" - "%llu/%llu/%llu/%llu\t" - "%llu/%llu/%llu/%llu\t" - "%llu/%llu/%llu/%llu\t" - "%llu/%llu/%llu/%llu\t" - "%llu/%llu/%llu/%llu\t" - "%llu/%llu/%llu/%llu\t" - "%llu/%llu/%llu/%llu\t" - "%llu/%llu/%llu/%llu\t" - "%llu/%llu/%llu/%llu\t" - "%llu\t%llu\t%llu\t%llu\t%llu\t%llu\t%li\t%s\n", - client, STATUS_RUNNING, phase, - - cntr->total, - cntr->total_changed, - cntr->total_same, - p1cntr->total, - - cntr->file, - cntr->file_changed, - cntr->file_same, - p1cntr->file, - - cntr->enc, - cntr->enc_changed, - cntr->enc_same, - p1cntr->enc, - - cntr->meta, - cntr->meta_changed, - cntr->meta_same, - p1cntr->meta, - - cntr->encmeta, - cntr->encmeta_changed, - cntr->encmeta_same, - p1cntr->encmeta, - - cntr->dir, - cntr->dir_changed, - cntr->dir_same, - p1cntr->dir, - - cntr->slink, - cntr->slink_changed, - cntr->slink_same, - p1cntr->slink, - - cntr->hlink, - cntr->hlink_changed, - cntr->hlink_same, - p1cntr->hlink, - - cntr->special, - cntr->special_changed, - cntr->special_same, - p1cntr->special, - - cntr->total, - cntr->total_changed, - cntr->total_same, - p1cntr->total, - - cntr->gtotal, - cntr->warning, - p1cntr->byte, - cntr->byte, - cntr->recvbyte, - cntr->sentbyte, - p1cntr->start, - path?path:""); - - // Make sure there is a new line at the end. - l=strlen(wbuf); - if(wbuf[l-1]!='\n') wbuf[l-1]='\n'; + get_status_buf(wbuf, sizeof(wbuf), + client, phase, path, p1cntr, cntr); + w=wbuf; while(*w) { @@ -907,14 +944,16 @@ } } -static void log_script_output(FILE **fp, struct cntr *cntr) +static void log_script_output(FILE **fp, struct cntr *cntr, int logfunc) { char buf[256]=""; if(fp && *fp) { if(fgets(buf, sizeof(buf), *fp)) { - logp("%s", buf); + // logc does not print a prefix + if(logfunc) logp("%s", buf); + else logc("%s", buf); if(cntr) logw(cntr, "%s", buf); } if(feof(*fp)) @@ -944,11 +983,10 @@ sigaction(sig, &sa, NULL); } -static int run_script_select(FILE **sout, FILE **serr, struct cntr *cntr) +static int run_script_select(FILE **sout, FILE **serr, struct cntr *cntr, int logfunc) { int mfd=-1; fd_set fsr; - fd_set fse; struct timeval tval; int soutfd=fileno(*sout); int serrfd=fileno(*serr); @@ -961,12 +999,11 @@ { mfd=-1; FD_ZERO(&fsr); - FD_ZERO(&fse); - if(*sout) add_fd_to_sets(soutfd, &fsr, NULL, &fse, &mfd); - if(*serr) add_fd_to_sets(serrfd, &fsr, NULL, &fse, &mfd); + if(*sout) add_fd_to_sets(soutfd, &fsr, NULL, NULL, &mfd); + if(*serr) add_fd_to_sets(serrfd, &fsr, NULL, NULL, &mfd); tval.tv_sec=1; tval.tv_usec=0; - if(select(mfd+1, &fsr, NULL, &fse, &tval)<0) + if(select(mfd+1, &fsr, NULL, NULL, &tval)<0) { if(errno!=EAGAIN && errno!=EINTR) { @@ -975,14 +1012,10 @@ return -1; } } - if(FD_ISSET(soutfd, &fse) - || FD_ISSET(serrfd, &fse)) - { - //logp("error on run_script child fd\n"); - return -1; - } - if(FD_ISSET(soutfd, &fsr)) log_script_output(sout, NULL); - if(FD_ISSET(serrfd, &fsr)) log_script_output(serr, cntr); + if(FD_ISSET(soutfd, &fsr)) + log_script_output(sout, NULL, logfunc); + if(FD_ISSET(serrfd, &fsr)) + log_script_output(serr, cntr, logfunc); if(!*sout && !*serr && got_sigchld) { @@ -999,8 +1032,8 @@ #endif - -int run_script(const char *script, struct strlist **userargs, int userargc, const char *arg1, const char *arg2, const char *arg3, const char *arg4, const char *arg5, struct cntr *cntr, int do_wait) +/* TODO: make arg1..n an array */ +int run_script(const char *script, struct strlist **userargs, int userargc, const char *arg1, const char *arg2, const char *arg3, const char *arg4, const char *arg5, const char *arg6, const char *arg7, const char *arg8, const char *arg9, const char *arg10, struct cntr *cntr, int do_wait, int logfunc) { int a=0; int l=0; @@ -1010,7 +1043,6 @@ char *cmd[64]={ NULL }; #ifndef HAVE_WIN32 int s=0; - int pid_status=0; #endif if(!script) return 0; @@ -1020,6 +1052,11 @@ if(arg3) cmd[l++]=(char *)arg3; if(arg4) cmd[l++]=(char *)arg4; if(arg5) cmd[l++]=(char *)arg5; + if(arg6) cmd[l++]=(char *)arg6; + if(arg7) cmd[l++]=(char *)arg7; + if(arg8) cmd[l++]=(char *)arg8; + if(arg9) cmd[l++]=(char *)arg9; + if(arg10) cmd[l++]=(char *)arg10; for(a=0; apath; cmd[l++]=NULL; @@ -1044,7 +1081,7 @@ // My windows forkchild currently just executes, then returns. return 0; #else - s=run_script_select(&sout, &serr, cntr); + s=run_script_select(&sout, &serr, cntr, logfunc); // Set SIGCHLD back to default. setup_signal(SIGCHLD, SIG_DFL); @@ -1061,9 +1098,9 @@ } else if(WIFSIGNALED(run_script_status)) { - logp("%s terminated on signal %s\n", - script, WTERMSIG(pid_status)); - if(cntr) logw(cntr, "%s terminated on signal %s\n", + logp("%s terminated on signal %d\n", + script, WTERMSIG(run_script_status)); + if(cntr) logw(cntr, "%s terminated on signal %d\n", script, WTERMSIG(run_script_status)); } else @@ -1133,7 +1170,8 @@ } gid=grp->gr_gid; } - if(initgroups(username, gid)) + if(gid!=getgid() // do not do it if we already have the same gid. + && initgroups(username, gid)) { if(grp) logp("could not initgroups for group '%s', user '%s': %s\n", group, user, strerror(errno)); @@ -1145,14 +1183,16 @@ free(username); if(grp) { - if(setgid(gid)) + if(gid!=getgid() // do not do it if we already have the same gid + && setgid(gid)) { logp("could not set group '%s': %s\n", group, strerror(errno)); return -1; } } - if(setuid(uid)) + if(uid!=getuid() // do not do it if we already have the same uid + && setuid(uid)) { logp("could not set specified user '%s': %s\n", username, strerror(errno)); @@ -1206,9 +1246,15 @@ } // Not in dpth.c so that Windows client can see it. -int dpth_is_compressed(const char *datapath) +int dpth_is_compressed(int compressed, const char *datapath) { const char *dp=NULL; + + if(compressed>0) return compressed; + if(compressed==0) return 0; + + /* Legacy - if the compressed value is -1 - that is, it is not set in + the manifest, deduce the value from the datapath. */ if((dp=strrchr(datapath, '.')) && !strcmp(dp, ".gz")) return 1; return 0; } @@ -1255,6 +1301,8 @@ snprintf(buf, len, "Meta data changed"); break; case CMD_METADATA_SAME: snprintf(buf, len, "Meta data unchanged"); break; + case CMD_ENC_METADATA: + snprintf(buf, len, "Encrypted meta data"); break; case CMD_ENC_METADATA_CHANGED: snprintf(buf, len, "Encrypted meta data changed"); break; case CMD_ENC_METADATA_SAME: @@ -1263,6 +1311,12 @@ snprintf(buf, len, "Encrypted file changed"); break; case CMD_ENC_FILE_SAME: snprintf(buf, len, "Encrypted file unchanged"); break; + case CMD_EFS_FILE: + snprintf(buf, len, "Windows EFS file"); break; + case CMD_EFS_FILE_SAME: + snprintf(buf, len, "Windows EFS file changed"); break; + case CMD_EFS_FILE_CHANGED: + snprintf(buf, len, "Windows EFS file unchanged"); break; case CMD_DIRECTORY_CHANGED: snprintf(buf, len, "Directory changed"); break; case CMD_DIRECTORY_SAME: @@ -1300,3 +1354,128 @@ } printf("\n"); } + +void log_restore_settings(struct config *cconf, int srestore) +{ + int i=0; + logp("Restore settings:\n"); + logp("backup = %s\n", cconf->backup); + if(srestore) + { + // This are unknown unless doing a server initiated restore. + logp("overwrite = %d\n", cconf->overwrite); + logp("strip = %d\n", cconf->strip); + } + if(cconf->restoreprefix) + logp("restoreprefix = %s\n", cconf->restoreprefix); + if(cconf->regex) logp("regex = %s\n", cconf->regex); + for(i=0; iiecount; i++) + { + if(cconf->incexcdir[i]->flag) + logp("include = %s\n", cconf->incexcdir[i]->path); + } +} + +long version_to_long(const char *version) +{ + long ret=0; + char *copy=NULL; + char *tok1=NULL; + char *tok2=NULL; + char *tok3=NULL; + if(!version || !*version) return 0; + if(!(copy=strdup(version))) + { + logp("out of memory\n"); + return -1; + } + if(!(tok1=strtok(copy, ".")) + || !(tok2=strtok(NULL, ".")) + || !(tok3=strtok(NULL, "."))) + { + free(copy); + return -1; + } + ret+=atol(tok3); + ret+=atol(tok2)*100; + ret+=atol(tok1)*100*100; + free(copy); + return ret; +} + +/* These receive_a_file() and send_file() functions are for use by extra_comms + and the CA stuff, rather than backups/restores. */ +int receive_a_file(const char *path, struct cntr *p1cntr) +{ + int c=0; + int ret=0; +#ifdef HAVE_WIN32 + BFILE bfd; +#else + FILE *fp=NULL; +#endif + unsigned long long rcvdbytes=0; + unsigned long long sentbytes=0; + +#ifdef HAVE_WIN32 + binit(&bfd, 0); + bfd.use_backup_api=0; + //set_win32_backup(&bfd); + if(bopen(&bfd, path, + O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, + S_IRUSR | S_IWUSR, 0)<=0) + { + berrno be; + logp("Could not open for writing %s: %s\n", + path, be.bstrerror(errno)); + ret=-1; + goto end; + } +#else + if(!(fp=open_file(path, "wb"))) + { + ret=-1; + goto end; + } +#endif + +#ifdef HAVE_WIN32 + ret=transfer_gzfile_in(NULL, path, &bfd, NULL, + &rcvdbytes, &sentbytes, NULL, 0, p1cntr, NULL); + c=bclose(&bfd); +#else + ret=transfer_gzfile_in(NULL, path, NULL, fp, + &rcvdbytes, &sentbytes, NULL, 0, p1cntr, NULL); + c=close_fp(&fp); +#endif +end: + if(c) + { + logp("error closing %s in receive_a_file\n", path); + ret=-1; + } + if(!ret) logp("Received: %s\n", path); + return ret; +} + +/* Windows will use this function, when sending a certificate signing request. + It is not using the Windows API stuff because it needs to arrive on the + server side without any junk in it. */ +int send_a_file(const char *path, struct cntr *p1cntr) +{ + int ret=0; + FILE *fp=NULL; + unsigned long long bytes=0; + if(open_file_for_send(NULL, &fp, path, 0, p1cntr) + || send_whole_file_gz(path, "datapth", 0, &bytes, NULL, + p1cntr, 9, // compression + NULL, fp, NULL, 0)) + { + ret=-1; + goto end; + } + logp("Sent %s\n", path); +end: + close_file_for_send(NULL, &fp); + return ret; +} diff -Nru burp-1.3.0+20120214git/src/handy.h burp-1.3.10/src/handy.h --- burp-1.3.0+20120214git/src/handy.h 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/handy.h 2012-07-27 01:47:33.000000000 +0000 @@ -1,25 +1,24 @@ #ifndef HANDY_H #define HANDY_H +#include "prepend.h" + #include #include #include "bfile.h" extern void close_fd(int *fd); -extern void close_fp(FILE **fp); -extern void gzclose_fp(gzFile *fp); +extern int close_fp(FILE **fp); +extern int gzclose_fp(gzFile *fp); extern int is_dir(const char *path); -extern char *prepend_len(const char *prep, size_t plen, const char *fname, size_t flen, const char *sep, size_t slen, size_t *newlen); -extern char *prepend(const char *prep, const char *fname, size_t len, const char *sep); -extern char *prepend_s(const char *prep, const char *fname, size_t len); extern int mkpath(char **rpath, const char *limit); extern int build_path(const char *datadir, const char *fname, size_t flen, char **rpath, const char *limit); extern int open_file_for_send(BFILE *bfd, FILE **fp, const char *fname, int64_t winattr, struct cntr *cntr); -extern void close_file_for_send(BFILE *bfd, FILE **fp); +extern int close_file_for_send(BFILE *bfd, FILE **fp); extern int send_whole_file_gz(const char *fname, const char *datapth, int quick_read, unsigned long long *bytes, const char *encpassword, struct cntr *cntr, int compression, BFILE *bfd, FILE *fp, const char *extrameta, size_t elen); -extern int send_whole_file(const char *fname, const char *datapth, int quick_read, unsigned long long *bytes, struct cntr *cntr, BFILE *bfd, FILE *fp, const char *extrameta, size_t elen); +extern int send_whole_file(char cmd, const char *fname, const char *datapth, int quick_read, unsigned long long *bytes, struct cntr *cntr, BFILE *bfd, FILE *fp, const char *extrameta, size_t elen); extern int set_non_blocking(int fd); extern int set_blocking(int fd); extern int do_rename(const char *oldpath, const char *newpath); @@ -31,12 +30,12 @@ extern int init_client_socket(const char *host, const char *port); extern void reuseaddr(int fd); extern void write_status(const char *client, char phase, const char *path, struct cntr *p1cntr, struct cntr *cntr); -extern int run_script(const char *script, struct strlist **userargs, int userargc, const char *arg1, const char *arg2, const char *arg3, const char *arg4, const char *arg5, struct cntr *cntr, int do_wait); +extern int run_script(const char *script, struct strlist **userargs, int userargc, const char *arg1, const char *arg2, const char *arg3, const char *arg4, const char *arg5, const char *arg6, const char *arg7, const char *arg8, const char *arg9, const char *arg10, struct cntr *cntr, int do_wait, int logfunc); extern char *comp_level(struct config *conf); extern int chuser_and_or_chgrp(const char *user, const char *group); extern const char *getdatestr(time_t t); extern const char *time_taken(time_t d); -extern int dpth_is_compressed(const char *datapath); +extern int dpth_is_compressed(int compressed, const char *datapath); #ifndef HAVE_WIN32 extern void setup_signal(int sig, void handler(int sig)); #endif @@ -45,5 +44,13 @@ extern int fstype_excluded(struct config *conf, const char *fname, struct cntr *cntr); +extern void log_restore_settings(struct config *cconf, int srestore); + +extern long version_to_long(const char *version); + +/* These receive_a_file() and send_file() functions are for use by extra_comms + and the CA stuff, rather than backups/restores. */ +extern int receive_a_file(const char *path, struct cntr *p1cntr); +extern int send_a_file(const char *path, struct cntr *p1cntr); #endif diff -Nru burp-1.3.0+20120214git/src/incexc_recv.c burp-1.3.10/src/incexc_recv.c --- burp-1.3.0+20120214git/src/incexc_recv.c 1970-01-01 00:00:00.000000000 +0000 +++ burp-1.3.10/src/incexc_recv.c 2012-07-27 00:36:21.000000000 +0000 @@ -0,0 +1,83 @@ +#include "burp.h" +#include "prog.h" +#include "counter.h" +#include "conf.h" +#include "msg.h" +#include "handy.h" +#include "cmd.h" +#include "asyncio.h" +#include "incexc_recv.h" + +static int incexc_recv(char **incexc, const char *reqstr, const char *repstr, const char *endreqstr, const char *endrepstr, struct config *conf, struct cntr *p1cntr) +{ + int ret=-1; + char *tmp=NULL; + char *buf=NULL; + if(async_write_str(CMD_GEN, repstr)) + goto end; + while(1) + { + char cmd; + size_t len=0; + + if(async_read(&cmd, &buf, &len)) + break; + if(cmd==CMD_GEN) + { + if(!strcmp(buf, endreqstr)) + { + if(async_write_str(CMD_GEN, endrepstr)) + goto end; + ret=0; + break; + } + if(!(tmp=prepend(*incexc?:"", buf, strlen(buf), + *incexc?"\n":""))) + goto end; + if(*incexc) free(*incexc); + *incexc=tmp; + } + else + { + logp("unexpected command when receiving %s: %c:%s\n", + reqstr, cmd, buf); + break; + } + if(buf) { free(buf); buf=NULL; } + } + // Need to put another new line at the end. + if(*incexc) + { + if(!(tmp=prepend(*incexc, "\n", 1, ""))) + goto end; + free(*incexc); + *incexc=tmp; + } +end: + if(buf) free(buf); + return ret; +} + +int incexc_recv_client(char **incexc, struct config *conf, struct cntr *p1cntr) +{ + return incexc_recv(incexc, + "sincexc", "sincexc ok", + "sincexc end", "sincexc end ok", + conf, p1cntr); +} + +int incexc_recv_client_restore(char **incexc, struct config *conf, struct cntr *p1cntr) +{ + return incexc_recv(incexc, + "srestore", "srestore ok", + "srestore end", "srestore end ok", + conf, p1cntr); +} + +int incexc_recv_server(char **incexc, struct config *conf, struct cntr *p1cntr) +{ + return incexc_recv(incexc, + "incexc", "incexc ok", + "incexc end", "incexc end ok", + conf, p1cntr); +} diff -Nru burp-1.3.0+20120214git/src/incexc_recv.h burp-1.3.10/src/incexc_recv.h --- burp-1.3.0+20120214git/src/incexc_recv.h 1970-01-01 00:00:00.000000000 +0000 +++ burp-1.3.10/src/incexc_recv.h 2012-07-27 00:36:21.000000000 +0000 @@ -0,0 +1,11 @@ +#ifndef _INCEXC_RECV_H +#define _INCEXC_RECV_H + +extern int incexc_recv_client(char **incexc, + struct config *conf, struct cntr *p1cntr); +extern int incexc_recv_server(char **incexc, + struct config *conf, struct cntr *p1cntr); +extern int incexc_recv_client_restore(char **incexc, + struct config *conf, struct cntr *p1cntr); + +#endif diff -Nru burp-1.3.0+20120214git/src/incexc_recv_server.c burp-1.3.10/src/incexc_recv_server.c --- burp-1.3.0+20120214git/src/incexc_recv_server.c 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/incexc_recv_server.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,57 +0,0 @@ -#include "burp.h" -#include "prog.h" -#include "counter.h" -#include "conf.h" -#include "msg.h" -#include "handy.h" -#include "cmd.h" -#include "asyncio.h" - -int incexc_recv_server(char **incexc, struct config *conf, struct cntr *p1cntr) -{ - int ret=-1; - char *tmp=NULL; - char *buf=NULL; - if(async_write_str(CMD_GEN, "incexc ok")) - goto end; - while(1) - { - char cmd; - size_t len=0; - - if(async_read(&cmd, &buf, &len)) - break; - if(cmd==CMD_GEN) - { - if(!strcmp(buf, "incexc end")) - { - if(async_write_str(CMD_GEN, "incexc end ok")) - goto end; - ret=0; - break; - } - if(!(tmp=prepend(*incexc?:"", buf, strlen(buf), - *incexc?"\n":""))) - goto end; - if(*incexc) free(*incexc); - *incexc=tmp; - } - else - { - logp("unexpected command from client when receiving incexc: %c:%s\n", cmd, buf); - break; - } - if(buf) { free(buf); buf=NULL; } - } - // Need to put another new line at the end. - if(*incexc) - { - if(!(tmp=prepend(*incexc, "\n", 1, ""))) - goto end; - free(*incexc); - *incexc=tmp; - } -end: - if(buf) free(buf); - return ret; -} diff -Nru burp-1.3.0+20120214git/src/incexc_recv_server.h burp-1.3.10/src/incexc_recv_server.h --- burp-1.3.0+20120214git/src/incexc_recv_server.h 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/incexc_recv_server.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -#ifndef _INCEXC_RECV_SERVER_H -#define _INCEXC_RECV_SERVER_H - -extern int incexc_recv_server(char **incexc, struct config *conf, struct cntr *p1cntr); - -#endif diff -Nru burp-1.3.0+20120214git/src/incexc_send.c burp-1.3.10/src/incexc_send.c --- burp-1.3.0+20120214git/src/incexc_send.c 1970-01-01 00:00:00.000000000 +0000 +++ burp-1.3.10/src/incexc_send.c 2012-07-27 00:36:21.000000000 +0000 @@ -0,0 +1,184 @@ +#include "burp.h" +#include "prog.h" +#include "counter.h" +#include "conf.h" +#include "msg.h" +#include "handy.h" +#include "cmd.h" +#include "asyncio.h" +#include "strlist.h" +#include "incexc_send.h" + +static int send_incexc_str(const char *pre, const char *str) +{ + char *tosend=NULL; + if(!str) return 0; + if(!(tosend=prepend(pre, str, strlen(str), " = "))) + return -1; + if(async_write_str(CMD_GEN, tosend)) + { + logp("Error in async_write_str when sending incexc\n"); + return -1; + } + return 0; +} + +static int send_incexc_int(const char *pre, int myint) +{ + char tmp[64]=""; + snprintf(tmp, sizeof(tmp), "%d", myint); + return send_incexc_str(pre, tmp); +} + +static int send_incexc_long(const char *pre, long mylong) +{ + char tmp[32]=""; + snprintf(tmp, sizeof(tmp), "%lu", mylong); + return send_incexc_str(pre, tmp); +} + +static int send_incexc_from_strlist(const char *prepend_on, const char *prepend_off, int count, struct strlist **list) +{ + int i=0; + for(i=0; iflag?prepend_on:prepend_off, + list[i]->path)) + return -1; + } + return 0; +} + +static int do_sends(struct config *conf) +{ + if( send_incexc_from_strlist("include", "exclude", + conf->iecount, conf->incexcdir) + || send_incexc_from_strlist("cross_filesystem", "cross_filesystem", + conf->fscount, conf->fschgdir) + || send_incexc_from_strlist("nobackup", "nobackup", + conf->nbcount, conf->nobackup) + || send_incexc_from_strlist("include_ext", "include_ext", + conf->incount, conf->incext) + || send_incexc_from_strlist("exclude_ext", "exclude_ext", + conf->excount, conf->excext) + || send_incexc_from_strlist("include_regex", "include_regex", + conf->ircount, conf->increg) + || send_incexc_from_strlist("exclude_regex", "exclude_regex", + conf->ercount, conf->excreg) + || send_incexc_from_strlist("exclude_fs", "exclude_fs", + conf->exfscount, conf->excfs) + || send_incexc_from_strlist("read_fifo", "read_fifo", + conf->ffcount, conf->fifos) + || send_incexc_from_strlist("read_blockdev", "read_blockdev", + conf->bdcount, conf->blockdevs) + || send_incexc_int("cross_all_filesystems", + conf->cross_all_filesystems) + || send_incexc_int("read_all_fifos", conf->read_all_fifos) + || send_incexc_long("min_file_size", conf->min_file_size) + || send_incexc_long("max_file_size", conf->max_file_size)) + return -1; + return 0; +} + +static int do_sends_restore(struct config *conf) +{ + if( send_incexc_from_strlist("include", "exclude", + conf->iecount, conf->incexcdir) + || send_incexc_str("backup", conf->backup) + || send_incexc_str("restoreprefix", conf->restoreprefix) + || send_incexc_str("regex", conf->regex) + || send_incexc_int("overwrite", conf->overwrite) + || send_incexc_long("strip", conf->strip)) + return -1; + return 0; +} + +static int do_finish(const char *endreqstr, const char *endrepstr) +{ + int ret=-1; + char cmd='\0'; + char *buf=NULL; + size_t len=0; + if(async_write_str(CMD_GEN, endreqstr)) + goto end; + if(async_read(&cmd, &buf, &len)) + goto end; + if(cmd==CMD_GEN) + { + if(strcmp(buf, endrepstr)) + { + logp("unexpected response to %s: %s\n", endreqstr, + buf); + goto end; + } + } + else + { + logp("unexpected response to %s: %c:%s\n", endreqstr, + cmd, buf); + goto end; + } + ret=0; +end: + if(buf) free(buf); + return ret; +} + +static int do_start(const char *reqstr, const char *repstr) +{ + int ret=-1; + char cmd='\0'; + char *buf=NULL; + size_t len=0; + + if(async_write_str(CMD_GEN, reqstr)) + goto end; + if(async_read(&cmd, &buf, &len)) + goto end; + if(cmd==CMD_GEN) + { + if(strcmp(buf, repstr)) + { + logp("unexpected response to %s: %s\n", reqstr, buf); + goto end; + } + } + else + { + logp("unexpected response to %s: %c:%s\n", reqstr, cmd, buf); + goto end; + } + ret=0; +end: + if(buf) free(buf); + return ret; +} + +int incexc_send_client(struct config *conf, struct cntr *p1cntr) +{ + if(do_start("incexc", "incexc ok") + || do_sends(conf) + || do_finish("incexc end", "incexc end ok")) + return -1; + return 0; +} + +int incexc_send_server(struct config *conf, struct cntr *p1cntr) +{ + /* 'sincexc' and 'sincexc ok' have already been exchanged, + so go straight into doing the sends. */ + if(do_sends(conf) + || do_finish("sincexc end", "sincexc end ok")) + return -1; + return 0; +} + +int incexc_send_server_restore(struct config *conf, struct cntr *p1cntr) +{ + /* 'srestore' and 'srestore ok' have already been exchanged, + so go straight into doing the sends. */ + if(do_sends_restore(conf) + || do_finish("srestore end", "srestore end ok")) + return -1; + return 0; +} diff -Nru burp-1.3.0+20120214git/src/incexc_send.h burp-1.3.10/src/incexc_send.h --- burp-1.3.0+20120214git/src/incexc_send.h 1970-01-01 00:00:00.000000000 +0000 +++ burp-1.3.10/src/incexc_send.h 2012-07-27 00:36:21.000000000 +0000 @@ -0,0 +1,8 @@ +#ifndef _INCEXC_SEND_H +#define _INCEXC_SEND_H + +extern int incexc_send_client(struct config *conf, struct cntr *p1cntr); +extern int incexc_send_server(struct config *conf, struct cntr *p1cntr); +extern int incexc_send_server_restore(struct config *conf, struct cntr *p1cntr); + +#endif diff -Nru burp-1.3.0+20120214git/src/incexc_send_client.c burp-1.3.10/src/incexc_send_client.c --- burp-1.3.0+20120214git/src/incexc_send_client.c 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/incexc_send_client.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,121 +0,0 @@ -#include "burp.h" -#include "prog.h" -#include "counter.h" -#include "conf.h" -#include "msg.h" -#include "handy.h" -#include "cmd.h" -#include "asyncio.h" -#include "strlist.h" - -static int send_incexc_str(const char *pre, const char *str) -{ - char *tosend=NULL; - if(!(tosend=prepend(pre, str, strlen(str), " = "))) - return -1; - if(async_write_str(CMD_GEN, tosend)) - { - logp("Error in async_write_str when sending incexc\n"); - return -1; - } - return 0; -} - -static int send_incexc_int(const char *pre, int myint) -{ - char tmp[64]=""; - snprintf(tmp, sizeof(tmp), "%d", myint); - return send_incexc_str(pre, tmp); -} - -static int send_incexc_long(const char *pre, long mylong) -{ - char tmp[32]=""; - snprintf(tmp, sizeof(tmp), "%lu", mylong); - return send_incexc_str(pre, tmp); -} - -static int send_incexc_from_strlist(const char *prepend_on, const char *prepend_off, int count, struct strlist **list) -{ - int i=0; - for(i=0; iflag?prepend_on:prepend_off, - list[i]->path)) - return -1; - } - return 0; -} - -int incexc_send_client(struct config *conf, struct cntr *p1cntr) -{ - int ret=-1; - char cmd='\0'; - char *buf=NULL; - size_t len=0; - if(async_write_str(CMD_GEN, "incexc")) - goto end; - if(async_read(&cmd, &buf, &len)) - goto end; - if(cmd==CMD_GEN) - { - if(strcmp(buf, "incexc ok")) - { - logp("unexpected response to incexc from server: %s\n", - buf); - goto end; - } - } - else - { - logp("unexpected response to incexc from server: %c:%s\n", - cmd, buf); - goto end; - } - if( - /* send_incexc_from_strlist("include", "exclude", - conf->sdcount, conf->startdir) - || */ send_incexc_from_strlist("include", "exclude", - conf->iecount, conf->incexcdir) - || send_incexc_from_strlist("cross_filesystem", "cross_filesystem", - conf->fscount, conf->fschgdir) - || send_incexc_from_strlist("nobackup", "nobackup", - conf->nbcount, conf->nobackup) - || send_incexc_from_strlist("exclude_ext", "exclude_ext", - conf->excount, conf->excext) - || send_incexc_from_strlist("exclude_fs", "exclude_fs", - conf->exfscount, conf->excfs) - || send_incexc_from_strlist("read_fifo", "read_fifo", - conf->ffcount, conf->fifos) - || send_incexc_int("cross_all_filesystems", - conf->cross_all_filesystems) - || send_incexc_int("read_all_fifos", conf->read_all_fifos) - || send_incexc_long("min_file_size", conf->min_file_size) - || send_incexc_long("max_file_size", conf->max_file_size)) - goto end; - - if(async_write_str(CMD_GEN, "incexc end")) - goto end; - if(buf) { free(buf); buf=NULL; } - if(async_read(&cmd, &buf, &len)) - goto end; - if(cmd==CMD_GEN) - { - if(strcmp(buf, "incexc end ok")) - { - logp("unexpected response to incexc end from server: %s\n", - buf); - goto end; - } - } - else - { - logp("unexpected response to incexc end from server: %c:%s\n", - cmd, buf); - goto end; - } - ret=0; // Everything is OK if we got to here. -end: - if(buf) free(buf); - return ret; -} diff -Nru burp-1.3.0+20120214git/src/incexc_send_client.h burp-1.3.10/src/incexc_send_client.h --- burp-1.3.0+20120214git/src/incexc_send_client.h 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/incexc_send_client.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -#ifndef _INCEXC_SEND_CLIENT_H -#define _INCEXC_SEND_CLIENT_H - -extern int incexc_send_client(struct config *conf, struct cntr *p1cntr); - -#endif diff -Nru burp-1.3.0+20120214git/src/list_client.c burp-1.3.10/src/list_client.c --- burp-1.3.0+20120214git/src/list_client.c 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/list_client.c 2012-07-27 00:36:21.000000000 +0000 @@ -68,7 +68,7 @@ return buf+n; } -static void ls_output(char *buf, const char *fname, struct stat *statp) +void ls_output(char *buf, const char *fname, struct stat *statp) { char *p; const char *f; @@ -78,7 +78,7 @@ p = encode_mode(statp->st_mode, buf); n = sprintf(p, " %2d ", (uint32_t)statp->st_nlink); p += n; - n = sprintf(p, "%4d %4d", + n = sprintf(p, "%5d %5d", (uint32_t)statp->st_uid, (uint32_t)statp->st_gid); p += n; @@ -97,7 +97,7 @@ *p = 0; } -int do_list_client(const char *backup, const char *listregex, enum action act) +int do_list_client(struct config *conf, enum action act) { int ret=0; size_t slen=0; @@ -109,8 +109,12 @@ char *dpth=NULL; //logp("in do_list\n"); - snprintf(msg, sizeof(msg), "list %s:%s", - backup?backup:"", listregex?listregex:""); + if(conf->browsedir) + snprintf(msg, sizeof(msg), "listb %s:%s", + conf->backup?conf->backup:"", conf->browsedir); + else + snprintf(msg, sizeof(msg), "list %s:%s", + conf->backup?conf->backup:"", conf->regex?conf->regex:""); if(async_write_str(CMD_GEN, msg) || async_read_expect(CMD_GEN, "ok")) return -1; @@ -121,6 +125,7 @@ char fcmd; size_t flen=0; int64_t winattr=0; + int compression=-1; char *fname=NULL; if(async_read(&scmd, &statbuf, &slen)) { @@ -131,7 +136,12 @@ { // A backup timestamp, just print it. printf("Backup: %s\n", statbuf); - if(listregex) printf("With regex: %s\n", listregex); + if(conf->browsedir) + printf("Listing directory: %s\n", + conf->browsedir); + if(conf->regex) + printf("With regex: %s\n", + conf->regex); if(statbuf) { free(statbuf); statbuf=NULL; } continue; } @@ -147,7 +157,7 @@ ret=-1; break; } - decode_stat(statbuf, &statp, &winattr); + decode_stat(statbuf, &statp, &winattr, &compression); if(async_read(&fcmd, &fname, &flen)) { @@ -157,6 +167,7 @@ else if(fcmd==CMD_DIRECTORY || fcmd==CMD_FILE || fcmd==CMD_ENC_FILE + || fcmd==CMD_EFS_FILE || fcmd==CMD_SPECIAL) { *ls='\0'; diff -Nru burp-1.3.0+20120214git/src/list_client.h burp-1.3.10/src/list_client.h --- burp-1.3.0+20120214git/src/list_client.h 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/list_client.h 2012-07-27 00:36:21.000000000 +0000 @@ -1,6 +1,7 @@ #ifndef _LIST_CLIENT_H #define _LIST_CLIENT_H -extern int do_list_client(const char *backup, const char *listregex, enum action act); +extern void ls_output(char *buf, const char *fname, struct stat *statp); +extern int do_list_client(struct config *conf, enum action act); #endif // _LIST_CLIENT_H diff -Nru burp-1.3.0+20120214git/src/list_server.c burp-1.3.10/src/list_server.c --- burp-1.3.0+20120214git/src/list_server.c 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/list_server.c 2012-07-27 00:36:21.000000000 +0000 @@ -9,26 +9,87 @@ #include "counter.h" #include "dpth.h" #include "sbuf.h" +#include "regexp.h" #include "list_server.h" #include "current_backups_server.h" -static int list_manifest(const char *fullpath, regex_t *regex, const char *client, struct cntr *p1cntr, struct cntr *cntr) +int check_browsedir(const char *browsedir, char **path, size_t bdlen, char **lastpath) +{ + char *cp=NULL; + char *copy=NULL; +// if(strncmp(browsedir, *path, bdlen) +// || (bdlen && (*path)[bdlen]!='\0' && (*path)[bdlen]!='/')) + if(strncmp(browsedir, *path, bdlen)) + return 0; + if((*path)[bdlen+1]=='\0') return 0; + + /* Lots of messing around related to whether browsedir was '', '/', or + something else. */ + if(*browsedir) + { + if(!strcmp(browsedir, "/")) + { + if(!(copy=strdup((*path)+bdlen))) + goto err; + if((cp=strchr(copy+1, '/'))) *cp='\0'; + } + else + { + if(!(copy=strdup((*path)+bdlen+1))) + goto err; + if((cp=strchr(copy, '/'))) *cp='\0'; + } + } + else + { + if(!(copy=strdup((*path)+bdlen))) + { + logp("out of memory\n"); + return -1; + } + if(*copy=='/') *(copy+1)='\0'; + // Messing around for Windows. + else if(strlen(copy)>2 && copy[1]==':' && copy[2]=='/') + copy[2]='\0'; + } + if(*lastpath && !strcmp(*lastpath, copy)) + { + free(copy); + return 0; + } + free(*path); + *path=copy; + if(*lastpath) free(*lastpath); + if(!(*lastpath=strdup(copy))) + goto err; + return 1; +err: + if(copy) free(copy); + if(*lastpath) free(*lastpath); + logp("out of memory\n"); + return -1; +} + +static int list_manifest(const char *fullpath, regex_t *regex, const char *browsedir, const char *client, struct cntr *p1cntr, struct cntr *cntr) { int ars=0; int ret=0; int quit=0; - gzFile fp=NULL; + gzFile zp=NULL; struct sbuf mb; char *manifest=NULL; + size_t bdlen=0; + char *lastpath=NULL; init_sbuf(&mb); - if(!(manifest=prepend_s(fullpath, "manifest.gz", strlen("manifest.gz")))) + if(!(manifest=prepend_s(fullpath, + "manifest.gz", strlen("manifest.gz")))) { log_and_send("out of memory"); return -1; } - if(!(fp=gzopen_file(manifest, "rb"))) + if(!(zp=gzopen_file(manifest, "rb"))) { log_and_send("could not open manifest"); free(manifest); @@ -36,23 +97,43 @@ } free(manifest); + if(browsedir) bdlen=strlen(browsedir); while(!quit) { + int show=0; //logp("list manifest loop\n"); // Need to parse while sending, to take note of the regex. free_sbuf(&mb); - if((ars=sbuf_fill(NULL, fp, &mb, cntr))) + if((ars=sbuf_fill(NULL, zp, &mb, cntr))) { if(ars<0) ret=-1; // ars==1 means it ended ok. break; } - if(mb.path[mb.plen]=='\n') mb.path[mb.plen]='\0'; + //if(mb.path[mb.plen]=='\n') mb.path[mb.plen]='\0'; write_status(client, STATUS_LISTING, mb.path, p1cntr, cntr); - if(check_regex(regex, mb.path)) + + if(browsedir) + { + int r; + if((r=check_browsedir(browsedir, + &(mb.path), bdlen, &lastpath))<0) + { + quit++; + ret=-1; + } + if(!r) continue; + show++; + } + else + { + if(check_regex(regex, mb.path)) + show++; + } + if(show) { if(async_write(CMD_STAT, mb.statbuf, mb.slen) || async_write(mb.cmd, mb.path, mb.plen)) @@ -62,12 +143,13 @@ { quit++; ret=-1; } } } - gzclose_fp(&fp); + gzclose_fp(&zp); free_sbuf(&mb); + if(lastpath) free(lastpath); return ret; } -int do_list_server(const char *basedir, const char *backup, const char *listregex, const char *client, struct cntr *p1cntr, struct cntr *cntr) +int do_list_server(const char *basedir, const char *backup, const char *listregex, const char *browsedir, const char *client, struct cntr *p1cntr, struct cntr *cntr) { int a=0; int i=0; @@ -99,8 +181,8 @@ found=TRUE; async_write(CMD_TIMESTAMP, arr[i].timestamp, strlen(arr[i].timestamp)); - ret+=list_manifest(arr[i].path, regex, client, - p1cntr, cntr); + ret+=list_manifest(arr[i].path, regex, browsedir, + client, p1cntr, cntr); } // Search or list a particular backup. else if(backup && *backup) @@ -112,8 +194,8 @@ found=TRUE; async_write(CMD_TIMESTAMP, arr[i].timestamp, strlen(arr[i].timestamp)); - ret=list_manifest(arr[i].path, regex, client, - p1cntr, cntr); + ret=list_manifest(arr[i].path, regex, + browsedir, client, p1cntr, cntr); } } // List the backups. diff -Nru burp-1.3.0+20120214git/src/list_server.h burp-1.3.10/src/list_server.h --- burp-1.3.0+20120214git/src/list_server.h 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/list_server.h 2012-07-27 00:36:21.000000000 +0000 @@ -1,6 +1,7 @@ #ifndef _LIST_SERVER_H #define _LIST_SERVER_H -extern int do_list_server(const char *basedir, const char *backup, const char *listregex, const char *client, struct cntr *p1cntr, struct cntr *cntr); +extern int check_browsedir(const char *browsedir, char **path, size_t bdlen, char **lastpath); +extern int do_list_server(const char *basedir, const char *backup, const char *listregex, const char *browsedir, const char *client, struct cntr *p1cntr, struct cntr *cntr); #endif // _LIST_SERVER_H diff -Nru burp-1.3.0+20120214git/src/log.c burp-1.3.10/src/log.c --- burp-1.3.0+20120214git/src/log.c 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/log.c 2012-07-27 00:36:21.000000000 +0000 @@ -1,9 +1,11 @@ #include "burp.h" +#include "conf.h" #include "log.h" static const char *prog="unknown"; static FILE *logfp=NULL; +static int do_syslog=0; void init_log(char *progname) { @@ -34,7 +36,8 @@ vsnprintf(buf, sizeof(buf), fmt, ap); pid=(int)getpid(); fprintf(logfp?logfp:stdout, "%s: %s[%d] %s", gettm(), prog, pid, buf); - syslog(LOG_INFO, "%s: %s[%d] %s", gettm(), prog, pid, buf); + if(do_syslog) + syslog(LOG_INFO, "%s: %s[%d] %s", gettm(), prog, pid, buf); va_end(ap); } @@ -54,13 +57,14 @@ return prog; } -int set_logfp(FILE *fp) +int set_logfp(FILE *fp, struct config *conf) { if(logfp) fclose(logfp); logfp=fp; #ifndef HAVE_WIN32 if(logfp) setlinebuf(logfp); #endif + do_syslog=conf->syslog; return 0; } @@ -69,15 +73,16 @@ return logfp; } -int open_logfile(const char *logfile) +int open_logfile(const char *logfile, struct config *conf) { FILE *fp=NULL; - set_logfp(NULL); // Close the old log, if it is open. + set_logfp(NULL, conf); // Close the old log, if it is open. + if(!logfile || !*logfile) return 0; if(!(fp=fopen(logfile, "ab"))) { logp("error opening logfile %s.\n", logfile); return 1; } - set_logfp(fp); + set_logfp(fp, conf); return 0; } diff -Nru burp-1.3.0+20120214git/src/log.h burp-1.3.10/src/log.h --- burp-1.3.0+20120214git/src/log.h 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/log.h 2012-07-27 00:36:21.000000000 +0000 @@ -5,8 +5,8 @@ extern void logp(const char *fmt, ...); extern void logc(const char *fmt, ...); extern const char *progname(void); -extern int set_logfp(FILE *fp); +extern int set_logfp(FILE *fp, struct config *conf); extern FILE *get_logfp(void); -extern int open_logfile(const char *logfile); +extern int open_logfile(const char *logfile, struct config *conf); #endif diff -Nru burp-1.3.0+20120214git/src/msg.c burp-1.3.10/src/msg.c --- burp-1.3.0+20120214git/src/msg.c 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/msg.c 2012-07-27 00:36:21.000000000 +0000 @@ -4,6 +4,7 @@ #include "counter.h" #include "asyncio.h" #include "handy.h" +#include "sbuf.h" int send_msg_fp(FILE *fp, char cmd, const char *buf, size_t s) { @@ -116,7 +117,70 @@ return 0; } -int transfer_gzfile_in(const char *path, BFILE *bfd, FILE *fp, unsigned long long *rcvd, unsigned long long *sent, const char *encpassword, int enccompressed, struct cntr *cntr, char **metadata) +#ifdef HAVE_WIN32 + +struct winbuf +{ + unsigned long long *rcvd; + unsigned long long *sent; + struct cntr *cntr; +}; + +static DWORD WINAPI read_efs(PBYTE pbData, PVOID pvCallbackContext, PULONG ulLength) +{ + char cmd='\0'; + size_t len=0; + char *buf=NULL; + struct winbuf *mybuf=(struct winbuf *)pvCallbackContext; + + while(1) + { + if(async_read(&cmd, &buf, &len)) + return ERROR_FUNCTION_FAILED; + (*(mybuf->rcvd))+=len; + + switch(cmd) + { + case CMD_APPEND: + memcpy(pbData, buf, len); + *ulLength=(ULONG)len; + (*(mybuf->sent))+=len; + free(buf); + return ERROR_SUCCESS; + case CMD_END_FILE: + *ulLength=0; + free(buf); + return ERROR_SUCCESS; + case CMD_WARNING: + logp("WARNING: %s\n", buf); + do_filecounter(mybuf->cntr, cmd, 0); + free(buf); + continue; + default: + logp("unknown append cmd: %c\n", cmd); + free(buf); + break; + } + } + return ERROR_FUNCTION_FAILED; +} + +static int transfer_efs_in(BFILE *bfd, unsigned long long *rcvd, unsigned long long *sent, struct cntr *cntr) +{ + int ret=0; + struct winbuf mybuf; + mybuf.rcvd=rcvd; + mybuf.sent=sent; + mybuf.cntr=cntr; + if((ret=WriteEncryptedFileRaw((PFE_IMPORT_FUNC)read_efs, + &mybuf, bfd->pvContext))) + logp("WriteEncryptedFileRaw returned %d\n", ret); + return ret; +} + +#endif + +int transfer_gzfile_in(struct sbuf *sb, const char *path, BFILE *bfd, FILE *fp, unsigned long long *rcvd, unsigned long long *sent, const char *encpassword, int enccompressed, struct cntr *cntr, char **metadata) { char cmd; char *buf=NULL; @@ -137,6 +201,12 @@ //unsigned char checksum[MD5_DIGEST_LENGTH+1]; //logp("in transfer_gzfile_in\n"); + +#ifdef HAVE_WIN32 + if(sb && sb->cmd==CMD_EFS_FILE) + return transfer_efs_in(bfd, rcvd, sent, cntr); +#endif + //if(!MD5_Init(&md5)) //{ // logp("MD5_Init() failed"); @@ -173,7 +243,7 @@ inflateEnd(&zstrm); return -1; } - rcvd+=len; + (*rcvd)+=len; //logp("transfer in: %c:%s\n", cmd, buf); switch(cmd) diff -Nru burp-1.3.0+20120214git/src/msg.h burp-1.3.10/src/msg.h --- burp-1.3.0+20120214git/src/msg.h 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/msg.h 2012-07-27 00:36:21.000000000 +0000 @@ -6,7 +6,7 @@ extern int send_msg_fp(FILE *fp, char cmd, const char *buf, size_t s); extern int send_msg_zp(gzFile zp, char cmd, const char *buf, size_t s); -extern int transfer_gzfile_in(const char *path, BFILE *bfd, FILE *fp, unsigned long long *rcvd, unsigned long long *sent, const char *encpassword, int enccompressed, struct cntr *cntr, char **metadata); +extern int transfer_gzfile_in(struct sbuf *sb, const char *path, BFILE *bfd, FILE *fp, unsigned long long *rcvd, unsigned long long *sent, const char *encpassword, int enccompressed, struct cntr *cntr, char **metadata); extern FILE *open_file(const char *fname, const char *mode); extern gzFile gzopen_file(const char *fname, const char *mode); diff -Nru burp-1.3.0+20120214git/src/prepend.c burp-1.3.10/src/prepend.c --- burp-1.3.0+20120214git/src/prepend.c 1970-01-01 00:00:00.000000000 +0000 +++ burp-1.3.10/src/prepend.c 2012-07-27 00:36:21.000000000 +0000 @@ -0,0 +1,54 @@ +#include "burp.h" +#include "prog.h" + +#include "prepend.h" + +/* This may be given binary data, of which we need to already know the length */ +char *prepend_len(const char *prep, size_t plen, const char *fname, size_t flen, const char *sep, size_t slen, size_t *newlen) +{ + size_t l=0; + char *rpath=NULL; + + l+=plen; + l+=flen; + l+=slen; + l+=1; + + if(!(rpath=(char *)malloc(l))) + { + logp("could not malloc for prepend to %s\n", fname); + return NULL; + } + if(plen) memcpy(rpath, prep, plen); + if(slen) memcpy(rpath+plen, sep, slen); + if(flen) memcpy(rpath+plen+slen, fname, flen); + rpath[plen+slen+flen]='\0'; + + if(newlen) (*newlen)+=slen+flen; + return rpath; +} + +char *prepend(const char *prep, const char *fname, size_t len, const char *sep) +{ + return prepend_len(prep, prep?strlen(prep):0, + fname, len, + sep, (sep && *fname)?strlen(sep):0, NULL); +} + +char *prepend_s(const char *prep, const char *fname, size_t len) +{ + if(!prep || !*prep) + { + char *ret=NULL; + if(!(ret=strdup(fname))) + logp("out of memory in prepend_s\n"); + return ret; + } + // Try to avoid getting a double slash in the path. + if(fname && fname[0]=='/') + { + fname++; + len--; + } + return prepend(prep, fname, len, "/"); +} diff -Nru burp-1.3.0+20120214git/src/prepend.h burp-1.3.10/src/prepend.h --- burp-1.3.0+20120214git/src/prepend.h 1970-01-01 00:00:00.000000000 +0000 +++ burp-1.3.10/src/prepend.h 2012-07-27 00:36:21.000000000 +0000 @@ -0,0 +1,8 @@ +#ifndef _PREPEND_H +#define _PREPEND_H + +extern char *prepend_len(const char *prep, size_t plen, const char *fname, size_t flen, const char *sep, size_t slen, size_t *newlen); +extern char *prepend(const char *prep, const char *fname, size_t len, const char *sep); +extern char *prepend_s(const char *prep, const char *fname, size_t len); + +#endif diff -Nru burp-1.3.0+20120214git/src/prog.c burp-1.3.10/src/prog.c --- burp-1.3.0+20120214git/src/prog.c 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/prog.c 2012-07-27 00:36:21.000000000 +0000 @@ -24,14 +24,21 @@ printf("\n"); printf(" Options:\n"); printf(" -a s Run the status monitor.\n"); - printf(" -a S Print the front screen of the status monitor (for reporting).\n"); + printf(" -a S Screen dump of the status monitor (for reporting).\n"); printf(" -c Path to config file (default: %s).\n", get_config_path()); + printf(" -d a single client in the status monitor\n"); printf(" -F Stay in the foreground.\n"); + printf(" -g Generate initial CA certificates and exit.\n"); printf(" -h|-? Print this text and exit.\n"); printf(" -i Print index of symbols and exit\n"); printf(" -l Path to log file.\n"); printf(" -n Do not fork any children (implies '-F').\n"); printf(" -v Print version and exit.\n"); + printf("Options to use with '-a S':\n"); + printf(" -C Show a particular client\n"); + printf(" -b Show listable files in a particular backup (requires -C)\n"); + printf(" -z Dump a particular log file in a backup (requires -C and -b)\n"); + printf(" -d Show a particular path in a backup (requires -C and -b)\n"); printf("\n"); #endif } @@ -51,12 +58,13 @@ printf(" v: verify\n"); printf(" -b Backup number (default: the most recent backup)\n"); printf(" -c Path to config file (default: %s).\n", get_config_path()); - printf(" -d Directory to restore to.\n"); + printf(" -d Directory to restore to, or directory to list\n"); printf(" -f Allow overwrite during restore.\n"); printf(" -h|-? Print this text and exit.\n"); printf(" -i Print index of symbols and exit\n"); printf(" -l Path to log file.\n"); printf(" -r Specify a regular expression.\n"); + printf(" -s Number of leading path components to strip during restore.\n"); printf(" -v Print version and exit.\n"); printf("\n"); #ifndef HAVE_WIN32 @@ -68,23 +76,29 @@ #endif } -int reload(struct config *conf, const char *configfile, char **logfile, bool firsttime, int oldmax_children) +int reload(struct config *conf, const char *configfile, char **logfile, bool firsttime, int oldmax_children, int oldmax_status_children) { if(!firsttime) logp("Reloading config\n"); + + init_config(conf); + // If logfile is defined, use it // Have to do this twice, because init_config uses logp(). - if(*logfile && strlen(*logfile) && open_logfile(*logfile)) - return 1; + if(open_logfile(*logfile, conf)) return 1; - init_config(conf); - if(load_config(configfile, conf, 1)) return 1; + if(load_config(configfile, conf, TRUE)) return 1; /* change umask */ umask(conf->umask); + // Open the second time. This will turn on syslogging which could not + // be turned on before load_config. + if(open_logfile(*logfile, conf)) return 1; + #ifndef HAVE_WIN32 if(conf->mode==MODE_SERVER) - setup_signals(oldmax_children, conf->max_children); + setup_signals(oldmax_children, conf->max_children, + oldmax_status_children, conf->max_status_children); #endif // Do not try to change user or group after the first time. @@ -95,12 +109,26 @@ if(conf->logfile) { *logfile=conf->logfile; - if(open_logfile(*logfile)) return 1; + if(open_logfile(*logfile, conf)) return 1; } return 0; } +static int replace_conf_str(const char *newval, char **dest) +{ + if(newval) + { + if(*dest) free(*dest); + if(!(*dest=strdup(newval))) + { + logp("out of memory\n"); + return -1; + } + } + return 0; +} + static void usage(void) { usage_server(); @@ -114,11 +142,10 @@ { int ret=0; int option=0; -#ifndef HAVE_WIN32 int daemon=1; -#endif int forking=1; int gotlock=0; + int strip=0; char *logfile=NULL; struct config conf; int forceoverwrite=0; @@ -126,12 +153,18 @@ const char *backup=NULL; const char *restoreprefix=NULL; const char *regex=NULL; + const char *browsefile=NULL; + const char *browsedir=NULL; FILE *fp=NULL; const char *configfile=get_config_path(); +#ifndef HAVE_WIN32 + const char *sclient=NULL; + int generate_ca_only=0; +#endif init_log(argv[0]); - while((option=getopt(argc, argv, "a:b:c:d:hfFinr:l:v?"))!=-1) + while((option=getopt(argc, argv, "a:b:c:C:d:ghfFinr:s:l:vz:?"))!=-1) { switch(option) { @@ -166,15 +199,24 @@ case 'c': configfile=optarg; break; + case 'C': +#ifndef HAVE_WIN32 + sclient=optarg; +#endif + break; case 'd': - restoreprefix=optarg; + restoreprefix=optarg; // for restores + browsedir=optarg; // for lists break; case 'f': forceoverwrite=1; break; case 'F': -#ifndef HAVE_WIN32 // keep MINGW64 quiet daemon=0; + break; + case 'g': +#ifndef HAVE_WIN32 + generate_ca_only=1; #endif break; case 'i': @@ -186,12 +228,18 @@ case 'r': regex=optarg; break; + case 's': + strip=atoi(optarg); + break; case 'l': logfile=optarg; break; case 'v': printf("%s-%s\n", progname(), VERSION); return 0; + case 'z': + browsefile=optarg; + break; case 'h': case '?': default: @@ -207,7 +255,9 @@ } if(reload(&conf, configfile, &logfile, - 1 /* first time */, 0 /* no old maxchildren setting */)) return 1; + 1 /* first time */, + 0 /* no oldmax_children setting */, + 0 /* no oldmax_status_children setting */)) return 1; if((act==ACTION_RESTORE || act==ACTION_VERIFY) && !backup) { @@ -233,6 +283,16 @@ gotlock++; } + conf.overwrite=forceoverwrite; + conf.strip=strip; + conf.forking=forking; + conf.daemon=daemon; + if(replace_conf_str(backup, &(conf.backup)) + || replace_conf_str(restoreprefix, &(conf.restoreprefix)) + || replace_conf_str(regex, &(conf.regex)) + || replace_conf_str(browsefile, &(conf.browsefile)) + || replace_conf_str(browsedir, &(conf.browsedir))) + return -1; if(conf.mode==MODE_SERVER) { #ifdef HAVE_WIN32 @@ -242,18 +302,17 @@ { // We are running on the server machine, being a client // of the burp server, getting status information. - ret=status_client(&conf, act); + ret=status_client_ncurses(&conf, act, sclient); } else ret=server(&conf, configfile, - forking, daemon, &logfile); + &logfile, generate_ca_only); #endif } else { logp("before client\n"); - ret=client(&conf, act, backup, - restoreprefix, regex, forceoverwrite); + ret=client(&conf, act); logp("after client\n"); } @@ -262,6 +321,6 @@ // If there was no forking, logfp ends up getting closed before this // and will segfault if we try to do it again. - if(fp && forking) fclose(fp); + if(fp && conf.forking) fclose(fp); return ret; } diff -Nru burp-1.3.0+20120214git/src/prog.h burp-1.3.10/src/prog.h --- burp-1.3.0+20120214git/src/prog.h 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/prog.h 2012-07-27 00:36:21.000000000 +0000 @@ -15,18 +15,17 @@ ACTION_BACKUP_TIMED, ACTION_STATUS, ACTION_STATUS_SNAPSHOT, - ACTION_ESTIMATE + ACTION_ESTIMATE, }; #include "find.h" #include "log.h" -extern int setup_signals(int oldmax_children, int max_children); -extern int reload(struct config *conf, const char *configfile, char **logfile, bool firsttime, int oldmax_children); +extern int setup_signals(int oldmax_children, int max_children, int oldmax_status_children, int max_status_children); +extern int reload(struct config *conf, const char *configfile, char **logfile, bool firsttime, int oldmax_children, int oldmax_status_children); -extern int server(struct config *conf, const char *configfile, int forking, - int daemon, char **logfile); -extern int client(struct config *conf, enum action act, const char *backup, - const char *restoreprefix, const char *regex, int forceoverwrite); +extern int server(struct config *conf, const char *configfile, char **logfile, + int generate_ca_only); +extern int client(struct config *conf, enum action act); #endif // _PROG_H diff -Nru burp-1.3.0+20120214git/src/readwrite.txt burp-1.3.10/src/readwrite.txt --- burp-1.3.0+20120214git/src/readwrite.txt 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/readwrite.txt 2012-07-27 00:36:21.000000000 +0000 @@ -20,4 +20,4 @@ Server make new revfile -> gzip file, file yes Server make new revfile -> file, file yes Server restore file -> file, gzip fd yes -Client restore file -> gzip fd, file no +Client restore file -> gzip fd, file yes diff -Nru burp-1.3.0+20120214git/src/regexp.c burp-1.3.10/src/regexp.c --- burp-1.3.0+20120214git/src/regexp.c 1970-01-01 00:00:00.000000000 +0000 +++ burp-1.3.10/src/regexp.c 2012-07-27 00:36:21.000000000 +0000 @@ -0,0 +1,44 @@ +#include "burp.h" +#include "log.h" +#include "asyncio.h" + +#include + +#if defined(HAVE_PCREPOSIX) +#include +#else +#include +#endif + +int compile_regex(regex_t **regex, const char *str) +{ + if(str && *str) + { + if(!(*regex=(regex_t *)malloc(sizeof(regex_t))) + || regcomp(*regex, str, REG_EXTENDED +#ifdef HAVE_WIN32 +// Give Windows another helping hand and make the regular expressions +// case insensitive. + | REG_ICASE +#endif + )) + { + logp("unable to compile regex\n"); + return -1; + } + } + return 0; +} + +int check_regex(regex_t *regex, const char *buf) +{ + if(!regex) return 1; + switch(regexec(regex, buf, 0, NULL, 0)) + { + case 0: return 1; + case REG_NOMATCH: return 0; + default: return 0; + } +} + + diff -Nru burp-1.3.0+20120214git/src/regexp.h burp-1.3.10/src/regexp.h --- burp-1.3.0+20120214git/src/regexp.h 1970-01-01 00:00:00.000000000 +0000 +++ burp-1.3.10/src/regexp.h 2012-07-27 00:36:21.000000000 +0000 @@ -0,0 +1,7 @@ +#ifndef _REGEXP_H +#define _REGEXP_H + +extern int compile_regex(regex_t **regex, const char *str); +extern int check_regex(regex_t *regex, const char *buf); + +#endif // _REGEXP_H diff -Nru burp-1.3.0+20120214git/src/restore_client.c burp-1.3.10/src/restore_client.c --- burp-1.3.0+20120214git/src/restore_client.c 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/restore_client.c 2012-07-27 01:50:46.000000000 +0000 @@ -28,7 +28,10 @@ // If it is file data, get the server // to interrupt the flow and move on. - if((sb->cmd!=CMD_FILE && sb->cmd!=CMD_ENC_FILE) || !(sb->datapth)) + if((sb->cmd!=CMD_FILE + && sb->cmd!=CMD_ENC_FILE + && sb->cmd!=CMD_EFS_FILE) + || !(sb->datapth)) return 0; if(async_write_str(CMD_INTERRUPT, sb->datapth)) @@ -141,13 +144,13 @@ if(S_ISDIR(sb->statp.st_mode)) { mkdir(rpath, 0777); - bopenret=bopen(&bfd, rpath, O_WRONLY | O_BINARY, 0); + bopenret=bopen(&bfd, rpath, O_WRONLY | O_BINARY, 0, 1); } else bopenret=bopen(&bfd, rpath, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, - S_IRUSR | S_IWUSR); - if(bopenret<0) + S_IRUSR | S_IWUSR, 0); + if(bopenret<=0) { berrno be; char msg[256]=""; @@ -178,7 +181,7 @@ unsigned long long rcvdbytes=0; unsigned long long sentbytes=0; - enccompressed=dpth_is_compressed(sb->datapth); + enccompressed=dpth_is_compressed(sb->compression, sb->datapth); /* printf("%s \n", fname); if(encpassword && !enccompressed) @@ -193,7 +196,7 @@ if(metadata) { - ret=transfer_gzfile_in(fname, NULL, NULL, + ret=transfer_gzfile_in(sb, fname, NULL, NULL, &rcvdbytes, &sentbytes, encpassword, enccompressed, cntr, metadata); *metalen=sentbytes; @@ -203,19 +206,25 @@ } else { + int c=0; #ifdef HAVE_WIN32 - ret=transfer_gzfile_in(fname, &bfd, NULL, + ret=transfer_gzfile_in(sb, fname, &bfd, NULL, &rcvdbytes, &sentbytes, encpassword, enccompressed, cntr, NULL); - bclose(&bfd); + c=bclose(&bfd); #else - ret=transfer_gzfile_in(fname, NULL, fp, + ret=transfer_gzfile_in(sb, fname, NULL, fp, &rcvdbytes, &sentbytes, encpassword, enccompressed, cntr, NULL); - close_fp(&fp); + c=close_fp(&fp); #endif + if(c) + { + logp("error closing %s in restore_file_or_get_meta\n", fname); + ret=-1; + } if(!ret) set_attributes(rpath, sb->cmd, - &(sb->statp), sb->winattr); + &(sb->statp), sb->winattr, cntr); } if(ret) { @@ -271,7 +280,7 @@ } else { - set_attributes(rpath, CMD_SPECIAL, &statp, sb->winattr); + set_attributes(rpath, CMD_SPECIAL, &statp, sb->winattr, cntr); do_filecounter(cntr, CMD_SPECIAL, 1); } } @@ -304,7 +313,7 @@ } else { - set_attributes(rpath, CMD_SPECIAL, &statp, sb->winattr); + set_attributes(rpath, CMD_SPECIAL, &statp, sb->winattr, cntr); do_filecounter(cntr, CMD_SPECIAL, 1); } } @@ -346,7 +355,7 @@ else { set_attributes(rpath, - sb->cmd, &(sb->statp), sb->winattr); + sb->cmd, &(sb->statp), sb->winattr, cntr); } if(!ret) do_filecounter(cntr, sb->cmd, 1); } @@ -384,7 +393,7 @@ else if(!ret) { set_attributes(fname, - sb->cmd, &(sb->statp), sb->winattr); + sb->cmd, &(sb->statp), sb->winattr, cntr); do_filecounter(cntr, sb->cmd, 1); } if(rpath) free(rpath); @@ -427,7 +436,7 @@ // set attributes again, since we just diddled with // the file set_attributes(fname, sb->cmd, - &(sb->statp), sb->winattr); + &(sb->statp), sb->winattr, cntr); do_filecounter(cntr, sb->cmd, 1); } @@ -467,7 +476,46 @@ return ret; } -int do_restore_client(struct config *conf, enum action act, const char *backup, const char *restoreprefix, const char *restoreregex, int forceoverwrite, struct cntr *p1cntr, struct cntr *cntr) +/* Return 1 for ok, -1 for error, 0 for too many components stripped. */ +static int strip_path_components(struct sbuf *sb, char **path, int strip, struct cntr *cntr) +{ + int s=0; + char *tmp=NULL; + char *cp=*path; + char *dp=NULL; + for(s=0; cp && *cp && sbackup?conf->backup:"", conf->regex?conf->regex:""); if(async_write_str(CMD_GEN, msg) || async_read_expect(CMD_GEN, "ok")) return -1; @@ -523,7 +571,26 @@ case CMD_SPECIAL: case CMD_METADATA: case CMD_ENC_METADATA: - if(!(fullpath=prepend_s(restoreprefix, + case CMD_EFS_FILE: + if(conf->strip) + { + int s; + s=strip_path_components(&sb, &(sb.path), + conf->strip, cntr); + if(s<0) // error + { + ret=-1; + quit++; + } + else if(s==0) + { + // Too many components stripped + // - carry on. + continue; + } + // It is OK, sb.path is now stripped. + } + if(!(fullpath=prepend_s(conf->restoreprefix, sb.path, strlen(sb.path)))) { log_and_send("out of memory"); @@ -533,7 +600,7 @@ if(act==ACTION_RESTORE) { strip_invalid_characters(&fullpath); - if(!forceoverwrite + if(!conf->overwrite && !S_ISDIR(sb.statp.st_mode) && sb.cmd!=CMD_METADATA && sb.cmd!=CMD_ENC_METADATA @@ -605,7 +672,7 @@ case CMD_SOFT_LINK: case CMD_HARD_LINK: if(restore_link(&sb, fullpath, - restoreprefix, act, cntr)) + conf->restoreprefix, act, cntr)) { ret=-1; quit++; @@ -634,6 +701,16 @@ quit++; } break; + case CMD_EFS_FILE: + if(restore_file_or_get_meta(&sb, fullpath, act, + NULL, cntr, NULL, NULL)) + { + logp("restore_file error\n"); + ret=-1; + quit++; + } + break; + break; default: logp("unknown cmd: %c\n", sb.cmd); quit++; ret=-1; diff -Nru burp-1.3.0+20120214git/src/restore_client.h burp-1.3.10/src/restore_client.h --- burp-1.3.0+20120214git/src/restore_client.h 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/restore_client.h 2012-07-27 00:36:21.000000000 +0000 @@ -1,6 +1,6 @@ #ifndef _RESTORE_CLIENT_H #define _RESTORE_CLIENT_H -int do_restore_client(struct config *conf, enum action act, const char *backup, const char *restoreprefix, const char *restoreregex, int forceoverwrite, struct cntr *p1cntr, struct cntr *cntr); +int do_restore_client(struct config *conf, enum action act, struct cntr *p1cntr, struct cntr *cntr); #endif // _RESTORE_CLIENT_H diff -Nru burp-1.3.0+20120214git/src/restore_server.c burp-1.3.10/src/restore_server.c --- burp-1.3.0+20120214git/src/restore_server.c 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/restore_server.c 2012-07-27 02:12:14.000000000 +0000 @@ -9,13 +9,14 @@ #include "counter.h" #include "dpth.h" #include "sbuf.h" +#include "regexp.h" #include "current_backups_server.h" #include "restore_server.h" #include // Also used by backup_phase4_server.c -int do_patch(const char *dst, const char *del, const char *upd, bool gzupd, struct cntr *cntr, struct config *cconf) +int do_patch(const char *dst, const char *del, const char *upd, bool gzupd, int compression, struct cntr *cntr, struct config *cconf) { FILE *dstp=NULL; FILE *delfp=NULL; @@ -32,7 +33,7 @@ return -1; } - if(dpth_is_compressed(del)) + if(dpth_is_compressed(compression, del)) delzp=gzopen(del, "rb"); else delfp=fopen(del, "rb"); @@ -63,13 +64,21 @@ fclose(dstp); gzclose_fp(&delzp); close_fp(&delfp); - if(updp) gzclose_fp(&updp); - if(updfp) fclose(updfp); + if(close_fp(&updfp)) + { + logp("error closing %s after rs_patch_gzfile\n", upd); + result=RS_IO_ERROR; + } + if(gzclose_fp(&updp)) + { + logp("error gzclosing %s after rs_patch_gzfile\n", upd); + result=RS_IO_ERROR; + } return result; } -static int inflate_or_link_oldfile(const char *oldpath, const char *infpath) +static int inflate_or_link_oldfile(const char *oldpath, const char *infpath, int compression) { int ret=0; struct stat statp; @@ -80,7 +89,7 @@ return -1; } - if(dpth_is_compressed(oldpath)) + if(dpth_is_compressed(compression, oldpath)) { FILE *source=NULL; FILE *dest=NULL; @@ -113,7 +122,12 @@ logp("zlib_inflate returned: %d\n", ret); close_fp(&source); - close_fp(&dest); + if(close_fp(&dest)) + { + logp("error closing %s in inflate_or_link_oldfile\n", + dest); + return -1; + } } else { @@ -128,7 +142,7 @@ return ret; } -static int send_file(const char *fname, int patches, const char *best, const char *datapth, unsigned long long *bytes, char cmd, int64_t winattr, struct cntr *cntr, struct config *cconf) +static int send_file(const char *fname, int patches, const char *best, const char *datapth, unsigned long long *bytes, char cmd, int64_t winattr, int compression, struct cntr *cntr, struct config *cconf) { int ret=0; FILE *fp=NULL; @@ -149,15 +163,17 @@ // If it was encrypted, it may or may not have been compressed // before encryption. Send it as it as, and let the client // sort it out. - if(cmd==CMD_ENC_FILE || cmd==CMD_ENC_METADATA) + if(cmd==CMD_ENC_FILE + || cmd==CMD_ENC_METADATA + || cmd==CMD_EFS_FILE) { - ret=send_whole_file(best, + ret=send_whole_file(cmd, best, datapth, 1, bytes, cntr, NULL, fp, NULL, 0); } // It might have been stored uncompressed. Gzip it during // the send. If the client knew what kind of file it would be // receiving, this step could disappear. - else if(!dpth_is_compressed(datapth)) + else if(!dpth_is_compressed(compression, datapth)) { ret=send_whole_file_gz(best, datapth, 1, bytes, NULL, cntr, 9, NULL, fp, NULL, 0); @@ -166,7 +182,7 @@ { // If we did not do some patches, the resulting // file might already be gzipped. Send it as it is. - ret=send_whole_file(best, + ret=send_whole_file(cmd, best, datapth, 1, bytes, cntr, NULL, fp, NULL, 0); } } @@ -174,7 +190,7 @@ return ret; } -static int verify_file(const char *fname, int patches, const char *best, const char *datapth, unsigned long long *bytes, const char *endfile, char cmd, struct cntr *cntr) +static int verify_file(const char *fname, int patches, const char *best, const char *datapth, unsigned long long *bytes, const char *endfile, char cmd, int compression, struct cntr *cntr) { MD5_CTX md5; size_t b=0; @@ -194,8 +210,9 @@ logp("MD5_Init() failed\n"); return -1; } - if(patches || cmd==CMD_ENC_FILE || cmd==CMD_ENC_METADATA - || (!patches && !dpth_is_compressed(best))) + if(patches + || cmd==CMD_ENC_FILE || cmd==CMD_ENC_METADATA || cmd==CMD_EFS_FILE + || (!patches && !dpth_is_compressed(compression, best))) { // If we did some patches or encryption, or the compression // was turned off, the resulting file is not gzipped. @@ -272,7 +289,7 @@ // a = length of struct bu array // i = position to restore from -static int restore_file(struct bu *arr, int a, int i, const char *datapth, const char *fname, const char *tmppath1, const char *tmppath2, int act, const char *endfile, char cmd, int64_t winattr, struct cntr *cntr, struct config *cconf) +static int restore_file(struct bu *arr, int a, int i, const char *datapth, const char *fname, const char *tmppath1, const char *tmppath2, int act, const char *endfile, char cmd, int64_t winattr, int compression, struct cntr *cntr, struct config *cconf) { int x=0; char msg[256]=""; @@ -327,7 +344,8 @@ if(!patches) { // Need to gunzip the first one. - if(inflate_or_link_oldfile(best, tmp)) + if(inflate_or_link_oldfile(best, tmp, + compression)) { logp("error when inflating %s\n", best); free(path); @@ -340,8 +358,9 @@ } if(do_patch(best, dpath, tmp, - FALSE /* do not gzip the result */, cntr, - cconf)) + FALSE /* do not gzip the result */, + compression /* from the manifest */, + cntr, cconf)) { char msg[256]=""; snprintf(msg, sizeof(msg), @@ -364,7 +383,8 @@ if(act==ACTION_RESTORE) { if(send_file(fname, patches, best, datapth, - &bytes, cmd, winattr, cntr, cconf)) + &bytes, cmd, winattr, compression, + cntr, cconf)) { free(path); return -1; @@ -374,7 +394,8 @@ else if(act==ACTION_VERIFY) { if(verify_file(fname, patches, best, datapth, - &bytes, endfile, cmd, cntr)) + &bytes, endfile, cmd, compression, + cntr)) { free(path); return -1; @@ -386,9 +407,9 @@ } } - snprintf(msg, sizeof(msg), "restore could not find %s (%s)\n", fname, datapth); - log_and_send(msg); - return -1; + logw(cntr, "restore could not find %s (%s)\n", fname, datapth); + //return -1; + return 0; } static int restore_sbuf(struct sbuf *sb, struct bu *arr, int a, int i, const char *tmppath1, const char *tmppath2, enum action act, const char *client, char status, struct cntr *p1cntr, struct cntr *cntr, struct config *cconf) @@ -403,11 +424,13 @@ else if(sb->cmd==CMD_FILE || sb->cmd==CMD_ENC_FILE || sb->cmd==CMD_METADATA - || sb->cmd==CMD_ENC_METADATA) + || sb->cmd==CMD_ENC_METADATA + || sb->cmd==CMD_EFS_FILE) { return restore_file(arr, a, i, sb->datapth, sb->path, tmppath1, tmppath2, act, - sb->endfile, sb->cmd, sb->winattr, cntr, cconf); + sb->endfile, sb->cmd, sb->winattr, + sb->compression, cntr, cconf); } else { @@ -469,9 +492,87 @@ return ret; } +static int restore_ent(const char *client, struct sbuf *sb, struct sbuf ***sblist, int *scount, struct bu *arr, int a, int i, const char *tmppath1, const char *tmppath2, enum action act, char status, struct config *cconf, struct cntr *cntr, struct cntr *p1cntr) +{ + int s=0; + int ret=0; + // Check if we have any directories waiting to be restored. + for(s=(*scount)-1; s>=0; s--) + { + if(is_subdir((*sblist)[s]->path, sb->path)) + { + // We are still in a subdir. + //printf(" subdir (%s %s)\n", + // (*sblist)[s]->path, sb->path); + break; + } + else + { + // Can now restore sblist[s] because nothing else is + // fiddling in a subdirectory. + if(restore_sbuf((*sblist)[s], arr, a, i, tmppath1, + tmppath2, act, client, status, + p1cntr, cntr, cconf)) + { + ret=-1; + break; + } + else if(del_from_sbuf_arr(sblist, scount)) + { + ret=-1; + break; + } + } + } + + /* If it is a directory, need to remember it and restore it later, so + that the permissions come out right. */ + /* Meta data of directories will also have the stat stuff set to be a + directory, so will also come out at the end. */ + if(!ret && S_ISDIR(sb->statp.st_mode)) + { + if(add_to_sbuf_arr(sblist, sb, scount)) + ret=-1; + + // Wipe out sb, without freeing up all the strings inside it, + // which have been added to sblist. + init_sbuf(sb); + } + else if(!ret && restore_sbuf(sb, arr, a, i, tmppath1, tmppath2, act, + client, status, p1cntr, cntr, cconf)) + ret=-1; + return ret; +} + +static int srestore_matches(struct strlist *s, const char *path) +{ + int r=0; + if(!s->flag) return 0; // Do not know how to do excludes yet. + if((r=strncmp(s->path, path, strlen(s->path)))) return 0; // no match + if(!r) return 1; // exact match + if(*(path+strlen(s->path)+1)=='/') + return 1; // matched directory contents + return 0; // no match +} + +/* Used when restore is initiated from the server. */ +static int check_srestore(struct config *cconf, const char *path) +{ + int i=0; + for(i=0; iiecount; i++) + { + //printf(" %d %s %s\n", + // cconf->incexcdir[i]->flag, cconf->incexcdir[i]->path, + // path); + if(srestore_matches(cconf->incexcdir[i], path)) + return 1; + } + return 0; +} + // a = length of struct bu array // i = position to restore from -static int restore_manifest(struct bu *arr, int a, int i, const char *tmppath1, const char *tmppath2, regex_t *regex, enum action act, const char *client, struct cntr *p1cntr, struct cntr *cntr, struct config *cconf, bool all) +static int restore_manifest(struct bu *arr, int a, int i, const char *tmppath1, const char *tmppath2, regex_t *regex, int srestore, enum action act, const char *client, struct cntr *p1cntr, struct cntr *cntr, struct config *cconf, bool all) { int ret=0; gzFile zp=NULL; @@ -496,7 +597,7 @@ log_and_send("out of memory"); ret=-1; } - else if(!(logfp=open_file(logpath, "ab")) || set_logfp(logfp)) + else if(!(logfp=open_file(logpath, "ab")) || set_logfp(logfp, cconf)) { char msg[256]=""; snprintf(msg, sizeof(msg), @@ -504,7 +605,10 @@ log_and_send(msg); ret=-1; } - else if(!(zp=gzopen_file(manifest, "rb"))) + + log_restore_settings(cconf, srestore); + + if(!ret && !(zp=gzopen_file(manifest, "rb"))) { log_and_send("could not open manifest"); ret=-1; @@ -512,12 +616,12 @@ else { char cmd; + int s=0; int quit=0; size_t len=0; struct sbuf sb; // For out-of-sequence directory restoring so that the // timestamps come out right: - int s=0; int scount=0; struct sbuf **sblist=NULL; @@ -567,64 +671,17 @@ } else { - if(check_regex(regex, sb.path)) + if((!srestore + || check_srestore(cconf, sb.path)) + && check_regex(regex, sb.path) + && restore_ent(client, + &sb, &sblist, &scount, + arr, a, i, tmppath1, tmppath2, + act, status, cconf, + cntr, p1cntr)) { - // Check if we have any directories waiting - // to be restored. - for(s=scount-1; s>=0; s--) - { - if(is_subdir(sblist[s]->path, sb.path)) - { - // We are still in a subdir. - //printf(" subdir (%s %s)\n", sblist[s]->path, sb.path); - break; - } - else - { - // Can now restore sblist[s] - // because nothing else is - // fiddling in a subdirectory. - if(restore_sbuf(sblist[s], arr, - a, i, tmppath1, tmppath2, act, - client, status, - p1cntr, cntr, cconf)) - { - ret=-1; quit++; - break; - } - else if(del_from_sbuf_arr( - &sblist, &scount)) - { - ret=-1; quit++; - break; - } - } - } - - /* If it is a directory, need to remember it - and restore it later, so that the - permissions come out right. */ - /* Meta data of directories will also have - the stat stuff set to be a directory, - so will also come out at the end. */ - if(!ret && S_ISDIR(sb.statp.st_mode)) - { - if(add_to_sbuf_arr(&sblist, &sb, &scount)) - { - ret=-1; quit++; - } - - // Wipe out sb, without freeing up - // all the strings inside it, which - // have been added to sblist. - init_sbuf(&sb); - } - else if(!ret && restore_sbuf(&sb, arr, a, i, - tmppath1, tmppath2, act, client, status, - p1cntr, cntr, cconf)) - { - ret=-1; quit++; - } + ret=-1; + quit++; } } free_sbuf(&sb); @@ -651,7 +708,7 @@ reset_filecounter(p1cntr); reset_filecounter(cntr); } - set_logfp(NULL); + set_logfp(NULL, cconf); compress_file(logpath, logpathz, cconf); if(manifest) free(manifest); if(datadir) free(datadir); @@ -660,7 +717,7 @@ return ret; } -int do_restore_server(const char *basedir, const char *backup, const char *restoreregex, enum action act, const char *client, struct cntr *p1cntr, struct cntr *cntr, struct config *cconf) +int do_restore_server(const char *basedir, enum action act, const char *client, int srestore, struct cntr *p1cntr, struct cntr *cntr, struct config *cconf) { int a=0; int i=0; @@ -675,7 +732,7 @@ logp("in do_restore\n"); - if(compile_regex(®ex, restoreregex)) return -1; + if(compile_regex(®ex, cconf->regex)) return -1; if(!(tmppath1=prepend_s(basedir, "tmp1", strlen("tmp1"))) || !(tmppath2=prepend_s(basedir, "tmp2", strlen("tmp2")))) @@ -693,28 +750,29 @@ return -1; } - if(backup && *backup=='a') + if(cconf->backup && *(cconf->backup)=='a') { all=TRUE; } - else if(!(index=strtoul(backup, NULL, 10)) && a>0) + else if(!(index=strtoul(cconf->backup, NULL, 10)) && a>0) { // No backup specified, do the most recent. ret=restore_manifest(arr, a, a-1, - tmppath1, tmppath2, regex, act, client, + tmppath1, tmppath2, regex, srestore, act, client, p1cntr, cntr, cconf, all); found=TRUE; } if(!found) for(i=0; ibackup) || arr[i].index==index) { found=TRUE; //logp("got: %s\n", arr[i].path); ret|=restore_manifest(arr, a, i, - tmppath1, tmppath2, regex, act, client, + tmppath1, tmppath2, regex, + srestore, act, client, p1cntr, cntr, cconf, all); if(!all) break; } diff -Nru burp-1.3.0+20120214git/src/restore_server.h burp-1.3.10/src/restore_server.h --- burp-1.3.0+20120214git/src/restore_server.h 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/restore_server.h 2012-07-27 00:36:21.000000000 +0000 @@ -1,7 +1,7 @@ #ifndef _RESTORE_SERVER_H #define _RESTORE_SERVER_H -extern int do_patch(const char *dst, const char *del, const char *upd, bool gzupd, struct cntr *cntr, struct config *cconf); -extern int do_restore_server(const char *basedir, const char *backup, const char *restoreregex, enum action act, const char *client, struct cntr *p1cntr, struct cntr *cntr, struct config *cconf); +extern int do_patch(const char *dst, const char *del, const char *upd, bool gzupd, int compression, struct cntr *cntr, struct config *cconf); +extern int do_restore_server(const char *basedir, enum action act, const char *client, int srestore, struct cntr *p1cntr, struct cntr *cntr, struct config *cconf); #endif // _RESTORE_SERVER_H diff -Nru burp-1.3.0+20120214git/src/rs_buf.c burp-1.3.10/src/rs_buf.c --- burp-1.3.0+20120214git/src/rs_buf.c 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/rs_buf.c 2012-07-27 00:36:21.000000000 +0000 @@ -211,7 +211,7 @@ fb->bytes+=len; if(!MD5_Update(&(fb->md5), fb->buf, len)) { - logp("MD5_Update() failed\n"); + logp("rs_infilebuf_fill: MD5_Update() failed\n"); return RS_IO_ERROR; } } @@ -227,14 +227,14 @@ buf->eof_in=1; return RS_DONE; } else { - logp("got return %d when trying to read\n", len); + logp("rs_infilebuf_fill: got return %d when trying to read\n", len); return RS_IO_ERROR; } } fb->bytes+=len; if(!MD5_Update(&(fb->md5), fb->buf, len)) { - logp("MD5_Update() failed\n"); + logp("rs_infilebuf_fill: MD5_Update() failed\n"); return RS_IO_ERROR; } } @@ -249,7 +249,7 @@ buf->eof_in=1; return RS_DONE; } else { - logp("got return %d when trying to read\n", len); + logp("rs_infilebuf_fill: got return %d when trying to read\n", len); return RS_IO_ERROR; } } @@ -263,7 +263,7 @@ */ if(!MD5_Update(&(fb->md5), fb->buf, len)) { - logp("MD5_Update() failed\n"); + logp("rs_infilebuf_fill: MD5_Update() failed\n"); return RS_IO_ERROR; } } diff -Nru burp-1.3.0+20120214git/src/sbuf.c burp-1.3.10/src/sbuf.c --- burp-1.3.0+20120214git/src/sbuf.c 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/sbuf.c 2012-07-27 00:36:21.000000000 +0000 @@ -22,6 +22,7 @@ sb->senddatapth=0; sb->statbuf=NULL; sb->slen=0; + sb->compression=-1; sb->sendstat=0; memset(&(sb->rsbuf), 0, sizeof(sb->rsbuf)); @@ -121,7 +122,8 @@ else if(!phase1 && (sb->cmd==CMD_FILE || sb->cmd==CMD_ENC_FILE || sb->cmd==CMD_METADATA - || sb->cmd==CMD_ENC_METADATA)) + || sb->cmd==CMD_ENC_METADATA + || sb->cmd==CMD_EFS_FILE)) { char cmd; if((ars=async_read_fp(fp, zp, &cmd, @@ -164,7 +166,8 @@ if(write_endfile && (sb->cmd==CMD_FILE || sb->cmd==CMD_ENC_FILE || sb->cmd==CMD_METADATA - || sb->cmd==CMD_ENC_METADATA)) + || sb->cmd==CMD_ENC_METADATA + || sb->cmd==CMD_EFS_FILE)) { if(send_msg_fp(mp, CMD_END_FILE, sb->endfile, sb->elen)) return -1; @@ -189,7 +192,8 @@ if(write_endfile && (sb->cmd==CMD_FILE || sb->cmd==CMD_ENC_FILE || sb->cmd==CMD_METADATA - || sb->cmd==CMD_ENC_METADATA)) + || sb->cmd==CMD_ENC_METADATA + || sb->cmd==CMD_EFS_FILE)) { if(send_msg_zp(zp, CMD_END_FILE, sb->endfile, sb->elen)) return -1; diff -Nru burp-1.3.0+20120214git/src/sbuf.h burp-1.3.10/src/sbuf.h --- burp-1.3.0+20120214git/src/sbuf.h 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/sbuf.h 2012-07-27 00:36:21.000000000 +0000 @@ -22,6 +22,7 @@ struct stat statp; int64_t winattr; size_t slen; + int compression; int sendstat; // flag indicating it needs to be sent rs_buffers_t rsbuf; diff -Nru burp-1.3.0+20120214git/src/server.c burp-1.3.10/src/server.c --- burp-1.3.0+20120214git/src/server.c 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/server.c 2012-07-27 01:39:50.000000000 +0000 @@ -22,7 +22,9 @@ #include "status_server.h" #include "forkchild.h" #include "autoupgrade_server.h" -#include "incexc_recv_server.h" +#include "incexc_recv.h" +#include "incexc_send.h" +#include "ca_server.h" #include #include @@ -30,6 +32,7 @@ static int sfd=-1; // status fd for the main server static int hupreload=0; +static int gentleshutdown=0; /* static void sighandler(int sig) @@ -53,16 +56,30 @@ hupreload=1; } +static void usr2handler(int sig) +{ + logp("will shut down once children have exited\n"); + gentleshutdown=1; +} + static int init_listen_socket(const char *port, int alladdr) { int rfd; int gai_ret; +#ifdef HAVE_IPV6 + int no = 0; + int sockopt_ret = 0; +#endif struct addrinfo hints; struct addrinfo *result=NULL; struct addrinfo *rp=NULL; memset(&hints, 0, sizeof(struct addrinfo)); - hints.ai_family = AF_UNSPEC; +#ifdef HAVE_IPV6 + hints.ai_family = AF_INET6; +#else + hints.ai_family = AF_INET; +#endif /* HAVE_IPV6 */ hints.ai_socktype = SOCK_STREAM; hints.ai_flags = alladdr ? AI_PASSIVE : 0; hints.ai_protocol = IPPROTO_TCP; @@ -72,7 +89,7 @@ if((gai_ret=getaddrinfo(NULL, port, &hints, &result))) { - logp("unable to create listening socket on port %s: %s\n", + logp("unable to getaddrinfo on port %s: %s\n", port, gai_strerror(gai_ret)); return -1; } @@ -80,17 +97,39 @@ for(rp=result; rp; rp=rp->ai_next) { rfd=socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol); - if(rfd<0) continue; + if(rfd<0) + { + logp("unable to create socket on port %s: %s\n", + port, strerror(errno)); + continue; + } if(!bind(rfd, rp->ai_addr, rp->ai_addrlen)) break; + logp("unable to bind socket on port %s: %s\n", + port, strerror(errno)); close(rfd); + rfd=-1; } - freeaddrinfo(result); - if(!rp) + if(!rp || rfd<0) { logp("unable to bind listening socket on port %s\n", port); return -1; } +#ifdef HAVE_IPV6 + if (rp->ai_family == AF_INET6) { + sockopt_ret = setsockopt(rfd, IPPROTO_IPV6, IPV6_V6ONLY, &no, sizeof(no)); + } + + if(!sockopt_ret) + { + logp("unable to change socket option to " + "listen on both IPv4 and IPv6\n"); + return -1; + } +#endif + + freeaddrinfo(result); + reuseaddr(rfd); // Say that we are happy to accept connections. @@ -177,20 +216,22 @@ check_for_exiting_children(); } -extern int setup_signals(int oldmax_children, int max_children) +int setup_signals(int oldmax_children, int max_children, int oldmax_status_children, int max_status_children) { // Ignore SIGPIPE - we are careful with read and write return values. int p=0; + int total_max_children=max_children+max_status_children; + int total_oldmax_children=oldmax_children+oldmax_status_children; signal(SIGPIPE, SIG_IGN); // Get rid of defunct children. if(!(chlds=(struct chldstat *) - realloc(chlds, sizeof(struct chldstat)*(max_children+1)))) + realloc(chlds, sizeof(struct chldstat)*(total_max_children+1)))) { logp("out of memory"); return -1; } - if((p=oldmax_children-1)<0) p=0; - for(; ptimer_script, cconf->timer_arg, cconf->tacount, - client, current, NULL))<0) + client, current, cconf->directory, + NULL))<0) { ret=tret; logp("Error running timer script for %s\n", client); @@ -799,6 +877,15 @@ } logp("Running backup of %s\n", client); } + else + { + if(!conf->client_can_force_backup) + { + logp("Not allowing forced backup of %s\n", client); + async_write_str(CMD_GEN, "Forced backup is not allowed"); + goto end; + } + } buf=NULL; @@ -817,9 +904,14 @@ cconf->nfcount, client, current, working, finishing, - "0", cntr, 1); - else if(!cconf->notify_success_warnings_only - || (p1cntr->warning+cntr->warning)>0) + "0", NULL, NULL, NULL, NULL, + NULL, cntr, 1, 1); + else if((cconf->notify_success_warnings_only + && (p1cntr->warning+cntr->warning)>0) + || (cconf->notify_success_changes_only + && (cntr->total_changed>0)) + || (!cconf->notify_success_warnings_only + && !cconf->notify_success_changes_only)) { char warnings[32]=""; snprintf(warnings, sizeof(warnings), @@ -831,7 +923,8 @@ cconf->nscount, client, current, working, finishing, - warnings, cntr, 1); + warnings, NULL, NULL, NULL, NULL, + NULL, cntr, 1, 1); } } } @@ -839,6 +932,7 @@ && (!strncmp(buf, "restore ", strlen("restore ")) || !strncmp(buf, "verify ", strlen("verify ")))) { + char *cp=NULL; int resume=0; // ignored enum action act; char *backupnostr=NULL; @@ -853,47 +947,96 @@ backupnostr=buf+strlen("verify "); act=ACTION_VERIFY; } + reset_conf_val(backupnostr, &(cconf->backup)); + if((cp=strchr(cconf->backup, ':'))) *cp='\0'; if(get_lock_and_clean(basedir, lockbasedir, lockfile, current, working, - currentdata, finishing, TRUE, &gotlock, cconf, + currentdata, finishing, gotlock, cconf, forward, phase1data, phase2data, unchangeddata, manifest, client, p1cntr, cntr, &resume, incexc)) ret=-1; else { char *restoreregex=NULL; + + if(act==ACTION_RESTORE && !conf->client_can_restore) + { + logp("Not allowing restore of %s\n", client); + async_write_str(CMD_GEN, + "Client restore is not allowed"); + goto end; + } + if(act==ACTION_VERIFY && !conf->client_can_verify) + { + logp("Not allowing verify of %s\n", client); + async_write_str(CMD_GEN, + "Client verify is not allowed"); + goto end; + } + if((restoreregex=strrchr(buf, ':'))) { *restoreregex='\0'; restoreregex++; } + reset_conf_val(restoreregex, &(cconf->regex)); async_write_str(CMD_GEN, "ok"); - ret=do_restore_server(basedir, backupnostr, - restoreregex, act, client, + ret=do_restore_server(basedir, act, client, srestore, p1cntr, cntr, cconf); } } - else if(cmd==CMD_GEN && !strncmp(buf, "list ", strlen("list "))) + else if(cmd==CMD_GEN + && (!strncmp(buf, "list ", strlen("list ")) + || !strncmp(buf, "listb ", strlen("listb ")))) { int resume=0; // ignored if(get_lock_and_clean(basedir, lockbasedir, lockfile, current, working, - currentdata, finishing, FALSE, &gotlock, cconf, + currentdata, finishing, gotlock, cconf, forward, phase1data, phase2data, unchangeddata, manifest, client, p1cntr, cntr, &resume, incexc)) ret=-1; else { + char *backupno=NULL; + char *browsedir=NULL; char *listregex=NULL; - if((listregex=strrchr(buf, ':'))) + + if(!conf->client_can_list) + { + logp("Not allowing list of %s\n", client); + async_write_str(CMD_GEN, + "Client list is not allowed"); + goto end; + } + + if(!strncmp(buf, "list ", strlen("list "))) + { + if((listregex=strrchr(buf, ':'))) + { + *listregex='\0'; + listregex++; + } + backupno=buf+strlen("list "); + } + else if(!strncmp(buf, "listb ", strlen("listb "))) { - *listregex='\0'; - listregex++; + if((browsedir=strrchr(buf, ':'))) + { + *browsedir='\0'; + browsedir++; + } + // strip any trailing slashes + // (unless it is '/'). + if(strcmp(browsedir, "/") + && browsedir[strlen(browsedir)-1]=='/') + browsedir[strlen(browsedir)-1]='\0'; + backupno=buf+strlen("listb "); } async_write_str(CMD_GEN, "ok"); - ret=do_list_server(basedir, buf+strlen("list "), - listregex, client, p1cntr, cntr); + ret=do_list_server(basedir, backupno, + listregex, browsedir, client, p1cntr, cntr); } } else @@ -916,62 +1059,121 @@ if(phase2data) free(phase2data); if(unchangeddata) free(unchangeddata); if(lockbasedir) free(lockbasedir); - if(lockfile) - { - if(gotlock) unlink(lockfile); - free(lockfile); - } + if(lockfile) free(lockfile); return ret; } -static long version_to_long(const char *version) +static int append_to_feat(char **feat, const char *str) { - long ret=0; - char *copy=NULL; - char *tok1=NULL; - char *tok2=NULL; - char *tok3=NULL; - if(!version || !*version) return 0; - if(!(copy=strdup(version))) + char *tmp=NULL; + if(!*feat) { - logp("out of memory\n"); - return -1; + if(!(*feat=strdup(str))) + { + logp("out of memory\n"); + return -1; + } + return 0; } - if(!(tok1=strtok(copy, ".")) - || !(tok2=strtok(NULL, ".")) - || !(tok3=strtok(NULL, "."))) - { - free(copy); + if(!(tmp=prepend(*feat, str, strlen(str), ""))) return -1; - } - ret+=atol(tok3); - ret+=atol(tok2)*100; - ret+=atol(tok1)*100*100; - free(copy); - return ret; + free(*feat); + *feat=tmp; + return 0; } -static int extra_comms(const char *cversion, char **incexc, struct config *conf, struct config *cconf, struct cntr *p1cntr) +static int extra_comms(const char *client, const char *cversion, char **incexc, int *srestore, struct config *conf, struct config *cconf, struct cntr *p1cntr) { int ret=0; char *buf=NULL; long min_ver=0; long cli_ver=0; long ser_ver=0; + long feat_list_ver=0; + long directory_tree_ver=0; + char *restorepath=NULL; + if((min_ver=version_to_long("1.2.7"))<0 || (cli_ver=version_to_long(cversion))<0 - || (ser_ver=version_to_long(VERSION))<0) + || (ser_ver=version_to_long(VERSION))<0 + || (feat_list_ver=version_to_long("1.3.0"))<0 + || (directory_tree_ver=version_to_long("1.3.6"))<0) return -1; + + if(cli_ver < directory_tree_ver) + { + conf->directory_tree=0; + cconf->directory_tree=0; + } + // Clients before 1.2.7 did not know how to do extra comms, so skip // this section for them. if(cli_ver < min_ver) return 0; - if(async_read_expect(CMD_GEN, "extra_comms_begin") - || async_write_str(CMD_GEN, "extra_comms_begin ok")) + if(async_read_expect(CMD_GEN, "extra_comms_begin")) { - logp("problem in extra_comms\n"); + logp("problem reading in extra_comms\n"); return -1; } + // Want to tell the clients the extra comms features that are + // supported, so that new clients are more likely to work with old + // servers. + if(cli_ver==feat_list_ver) + { + // 1.3.0 did not support the feature list. + if(async_write_str(CMD_GEN, "extra_comms_begin ok")) + { + logp("problem writing in extra_comms\n"); + return -1; + } + } + else + { + char *tmp=NULL; + char *feat=NULL; + struct stat statp; + if(append_to_feat(&feat, "extra_comms_begin ok:") + /* clients can autoupgrade */ + || append_to_feat(&feat, "autoupgrade:") + /* clients can give server incexc config so that the + server knows better what to do on resume */ + || append_to_feat(&feat, "incexc:")) + return -1; + + /* Clients can receive restore initiated from the server. */ + if(!(tmp=prepend_s(cconf->directory, client, strlen(client))) + || !(restorepath=prepend_s(tmp, "restore", strlen("restore")))) + { + if(tmp) free(tmp); + if(feat) free(feat); + return -1; + } + free(tmp); + if(!lstat(restorepath, &statp) && S_ISREG(statp.st_mode) + && append_to_feat(&feat, "srestore:")) + { + if(restorepath) free(restorepath); + if(feat) free(feat); + return -1; + } + + /* Clients can receive incexc config from the server. + Only give it as an option if the server has some starting + directory configured in the clientconfdir. */ + if(cconf->sdcount && append_to_feat(&feat, "sincexc:")) + return -1; + + //printf("feat: %s\n", feat); + + if(async_write_str(CMD_GEN, feat)) + { + logp("problem in extra_comms\n"); + free(feat); + if(restorepath) free(restorepath); + return -1; + } + free(feat); + } while(1) { @@ -1006,8 +1208,35 @@ break; } } + else if(!strcmp(buf, "srestore ok")) + { + // Client can accept the restore. + // Load the restore config, then send it. + *srestore=1; + if(parse_incexcs_path(cconf, restorepath) + || incexc_send_server_restore(cconf, p1cntr)) + { + ret=-1; + break; + } + unlink(restorepath); + } + else if(!strcmp(buf, "sincexc ok")) + { + // Client can accept incexc conf from the + // server. + if(incexc_send_server(cconf, p1cntr)) + { + ret=-1; + break; + } + } else if(!strcmp(buf, "incexc")) { + // Client is telling server its incexc + // configuration so that it can better decide + // what to do on resume. + if(*incexc) { free(*incexc); *incexc=NULL; } if(incexc_recv_server(incexc, conf, p1cntr)) { ret=-1; @@ -1033,18 +1262,16 @@ if(buf); free(buf); buf=NULL; } + if(restorepath) free(restorepath); if(buf) free(buf); return ret; } -#define KEYFILE "server.pem" -#define PASSWORD "password" -#define DHFILE "dh1024.pem" - static int run_child(int *rfd, int *cfd, SSL_CTX *ctx, const char *configfile, int forking) { int ret=0; char cmd; + int ca_ret=0; size_t len=0; char *buf=NULL; SSL *ssl=NULL; @@ -1052,6 +1279,8 @@ char *incexc=NULL; char *client=NULL; char *cversion=NULL; + int srestore=0; + char *gotlock=NULL; struct config conf; struct config cconf; @@ -1066,6 +1295,7 @@ // Reload global config, in case things have changed. This means that // the server does not need to be restarted for most config changes. init_config(&conf); + init_config(&cconf); if(load_config(configfile, &conf, 1)) return -1; if(!(sbio=BIO_new_socket(*cfd, BIO_NOCLOSE)) @@ -1077,10 +1307,18 @@ } SSL_set_bio(ssl, sbio, sbio); + /* Do not try to check peer certificate straight away. + Clients can send a certificate signing request when they have + no certificate. + */ + SSL_set_verify(ssl, SSL_VERIFY_PEER + /* | SSL_VERIFY_FAIL_IF_NO_PEER_CERT */, 0); + if((ret=SSL_accept(ssl))<=0) { - logp("SSL_accept: %d\n", ret); - berr_exit("SSL accept error"); + char buf[256]=""; + ERR_error_string_n(ERR_get_error(), buf, sizeof(buf)); + logp("SSL_accept: %s\n", buf); ret=-1; goto finish; } @@ -1100,22 +1338,54 @@ ret=-1; goto finish; } - // Now that the client conf is loaded, we might want to chuser or - // chgrp. - if(chuser_and_or_chgrp(cconf.user, cconf.group)) - { - log_and_send("chuser_and_or_chgrp failed on server"); + + /* At this point, the client might want to get a new certificate + signed. Clients on 1.3.2 or newer can do this. */ + if((ca_ret=ca_server_maybe_sign_client_cert(client, cversion, + &conf, &p1cntr))<0) + { + // Error. + logp("Error signing client certificate request for %s\n", + client); ret=-1; goto finish; } + else if(ca_ret>0) + { + // Certificate signed and sent back. + // Everything is OK, but we will close this instance + // so that the client can start again with a new + // connection and its new certificates. + logp("Signed and returned client certificate request for %s\n", + client); + goto finish; + } + + /* Now it is time to check the certificate. */ if(ssl_check_cert(ssl, &cconf)) { log_and_send("check cert failed on server"); - ret=-1; - goto finish; + return -1; + } + + // Now that the client conf is loaded, we might want to chuser or + // chgrp. + // The main process could have already done this, so we don't want + // to try doing it again if cconf has the same values, because it + // will fail. + if( (!conf.user || (cconf.user && strcmp(conf.user, cconf.user))) + || (!conf.group || (cconf.group && strcmp(conf.group, cconf.group)))) + { + if(chuser_and_or_chgrp(cconf.user, cconf.group)) + { + log_and_send("chuser_and_or_chgrp failed on server"); + ret=-1; + goto finish; + } } - if(extra_comms(cversion, &incexc, &conf, &cconf, &p1cntr)) + if(extra_comms(client, cversion, &incexc, &srestore, + &conf, &cconf, &p1cntr)) { log_and_send("running extra comms failed on server"); ret=-1; @@ -1138,7 +1408,8 @@ client, "reserved4", "reserved5", - &p1cntr, 1)) + NULL, NULL, NULL, NULL, NULL, + &p1cntr, 1, 1)) { log_and_send("server pre script returned an error\n"); ret=-1; @@ -1146,20 +1417,21 @@ // want to run. } - if(!ret) ret=child(&conf, &cconf, client, cversion, incexc, - cmd, buf, &p1cntr, &cntr); + if(!ret) ret=child(&conf, &cconf, client, cversion, incexc, srestore, + cmd, buf, &gotlock, &p1cntr, &cntr); if((!ret || cconf.server_script_post_run_on_fail) && cconf.server_script_post && run_script(cconf.server_script_post, cconf.server_script_post_arg, - cconf.sprecount, + cconf.spostcount, "post", buf?buf:"", client, "reserved4", "reserved5", - &p1cntr, 1)) + NULL, NULL, NULL, NULL, NULL, + &p1cntr, 1, 1)) { log_and_send("server post script returned an error\n"); ret=-1; @@ -1168,6 +1440,11 @@ finish: *cfd=-1; + if(gotlock) + { + unlink(gotlock); + free(gotlock); + } async_free(); // this closes cfd for us. logp("exit child\n"); if(client) free(client); @@ -1189,7 +1466,7 @@ // Reload global config, in case things have changed. This means that // the server does not need to be restarted for most config changes. init_config(&conf); - if(load_config(configfile, &conf, 1)) return -1; + if(load_config(configfile, &conf, TRUE)) return -1; ret=status_server(cfd, &conf); @@ -1202,7 +1479,7 @@ return ret; } -static int process_incoming_client(int rfd, int forking, struct config *conf, SSL_CTX *ctx, const char *configfile, int is_status_server) +static int process_incoming_client(int rfd, struct config *conf, SSL_CTX *ctx, const char *configfile, int is_status_server) { int cfd=-1; socklen_t client_length=0; @@ -1221,21 +1498,50 @@ reuseaddr(cfd); check_for_exiting_children(); - if(forking) + if(conf->forking) { int p=0; int pipe_rfd[2]; int pipe_wfd[2]; pid_t childpid; + int c_count=0; + int sc_count=0; + int total_max_children=conf->max_children+conf->max_status_children; - // Find a spare slot in our pid list for the child. - for(p=0; pmax_children; p++) if(chlds[p].pid<0) break; - if(p==conf->max_children) + /* Need to count status children separately from normal children. */ + for(p=0; p=0) + { + if(chlds[p].status_server) sc_count++; + else c_count++; + } + } + + if(!is_status_server && c_count>=conf->max_children) { logp("Too many child processes. Closing new connection.\n"); close_fd(&cfd); return 0; } + if(is_status_server && sc_count>=conf->max_status_children) + { + logp("Too many status child processes. Closing new connection.\n"); + close_fd(&cfd); + return 0; + } + + // Find a spare slot in our pid list for the child. + for(p=0; p=total_max_children) + { + logp("Too many total child processes. Closing new connection.\n"); + close_fd(&cfd); + return 0; + } if(pipe(pipe_rfd)<0 || pipe(pipe_wfd)<0) { @@ -1273,7 +1579,8 @@ if(is_status_server) ret=run_status_server(&rfd, &cfd, configfile); else - ret=run_child(&rfd, &cfd, ctx, configfile, forking); + ret=run_child(&rfd, &cfd, ctx, + configfile, conf->forking); close_fd(&status_wfd); close_fd(&status_rfd); exit(ret); @@ -1303,7 +1610,8 @@ if(is_status_server) return run_status_server(&rfd, &cfd, configfile); else - return run_child(&rfd, &cfd, ctx, configfile, forking); + return run_child(&rfd, &cfd, ctx, configfile, + conf->forking); } return 0; } @@ -1367,10 +1675,11 @@ return -1; } -static int run_server(struct config *conf, const char *configfile, int forking, int *rfd, const char *oldport, const char *oldstatusport) +static int run_server(struct config *conf, const char *configfile, int *rfd, const char *oldport, const char *oldstatusport) { int ret=0; SSL_CTX *ctx=NULL; + int found_normal_child=0; if(!(ctx=ssl_initialise_ctx(conf))) { @@ -1382,8 +1691,6 @@ logp("error loading dh params\n"); return 1; } - SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER | - SSL_VERIFY_FAIL_IF_NO_PEER_CERT,0); if(!oldport || strcmp(oldport, conf->port)) @@ -1421,9 +1728,22 @@ if(sfd>=0) add_fd_to_sets(sfd, &fsr, NULL, &fse, &mfd); // Add read fds of normal children. + if(gentleshutdown) found_normal_child=0; for(c=0; cmax_children; c++) + { if(!chlds[c].status_server && chlds[c].rfd>=0) + { add_fd_to_sets(chlds[c].rfd, &fsr, NULL, &fse, &mfd); + if(gentleshutdown) found_normal_child++; + } + } + // Leave if we had a SIGUSR1 and there are no children + // running. + if(gentleshutdown && !found_normal_child) + { + logp("all children have exited - shutting down\n"); + break; + } if(select(mfd+1, &fsr, NULL, &fse, &tval)<0) { @@ -1439,7 +1759,7 @@ { // Happens when a client exits. //logp("error on listening socket.\n"); - if(!forking) break; + if(!conf->forking) break; continue; } @@ -1447,14 +1767,14 @@ { // Happens when a client exits. //logp("error on status socket.\n"); - if(!forking) break; + if(!conf->forking) break; continue; } if(FD_ISSET(*rfd, &fsr)) { // A normal client is incoming. - if(process_incoming_client(*rfd, forking, conf, ctx, + if(process_incoming_client(*rfd, conf, ctx, configfile, 0 /* not a status client */)) { ret=1; @@ -1466,7 +1786,7 @@ { // A status client is incoming. //printf("status client?\n"); - if(process_incoming_client(sfd, forking, conf, ctx, + if(process_incoming_client(sfd, conf, ctx, configfile, 1 /* a status client */)) { ret=1; @@ -1586,7 +1906,7 @@ return ret; } -int server(struct config *conf, const char *configfile, int forking, int daemon, char **logfile) +int server(struct config *conf, const char *configfile, char **logfile, int generate_ca_only) { int ret=0; int rfd=-1; // normal client port @@ -1596,19 +1916,26 @@ char *oldport=NULL; char *oldstatusport=NULL; - if(forking && daemon) + if(ca_server_setup(conf)) return 1; + if(generate_ca_only) + { + logp("The '-g' command line option was given. Exiting now.\n"); + return 0; + } + + if(conf->forking && conf->daemon) { if(daemonise() || relock(conf->lockfile)) return 1; } ssl_load_globals(); - while(!ret) + while(!ret && !gentleshutdown) { - ret=run_server(conf, configfile, forking, + ret=run_server(conf, configfile, &rfd, oldport, oldstatusport); if(ret) break; - if(hupreload) + if(hupreload && !gentleshutdown) { if(oldport) free(oldport); if(oldstatusport) free(oldstatusport); @@ -1616,7 +1943,9 @@ oldstatusport=conf->status_port? strdup(conf->status_port):NULL; if(reload(conf, configfile, logfile, - 0 /* not first time */, conf->max_children)) + 0 /* not first time */, + conf->max_children, + conf->max_status_children)) ret=1; } hupreload=0; diff -Nru burp-1.3.0+20120214git/src/ssl.c burp-1.3.10/src/ssl.c --- burp-1.3.0+20120214git/src/ssl.c 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/ssl.c 2012-07-27 00:36:21.000000000 +0000 @@ -5,9 +5,13 @@ static BIO *bio_err=0; static const char *pass=NULL; -SSL_CTX *berr_exit(const char *string) +SSL_CTX *berr_exit(const char *fmt, ...) { - BIO_printf(bio_err, "%s\n", string); + char buf[512]=""; + va_list ap; + va_start(ap, fmt); + vsnprintf(buf, sizeof(buf), fmt, ap); + BIO_printf(bio_err, "%s", buf); ERR_print_errors(bio_err); return NULL; } @@ -19,7 +23,7 @@ if(!(bio=BIO_new_file(conf->ssl_dhfile, "r"))) { - berr_exit("Couldn't open DH file"); + berr_exit("Couldn't open ssl_dhfile: %s\n", conf->ssl_dhfile); return -1; } @@ -54,19 +58,18 @@ } } -SSL_CTX *ssl_initialise_ctx(struct config *conf) +static int ssl_load_keys_and_certs(SSL_CTX *ctx, struct config *conf) { - SSL_CTX *ctx=NULL; - SSL_METHOD *meth=NULL; char *ssl_key=NULL; + struct stat statp; - /* Create our context*/ - meth=(SSL_METHOD *)SSLv23_method(); - ctx=(SSL_CTX *)SSL_CTX_new(meth); - - /* Load our keys and certificates*/ - if(!(SSL_CTX_use_certificate_chain_file(ctx, conf->ssl_cert))) - return berr_exit("Can't read certificate file"); + /* Load our keys and certificates if the path exists. */ + if(conf->ssl_cert && !lstat(conf->ssl_cert, &statp) + && !SSL_CTX_use_certificate_chain_file(ctx, conf->ssl_cert)) + { + berr_exit("Can't read ssl_cert: %s\n", conf->ssl_cert); + return -1; + } pass=conf->ssl_key_password; SSL_CTX_set_default_passwd_cb(ctx, password_cb); @@ -76,12 +79,36 @@ else ssl_key=conf->ssl_cert; - if(!(SSL_CTX_use_PrivateKey_file(ctx,ssl_key,SSL_FILETYPE_PEM))) - return berr_exit("Can't read key file"); + /* Load the key file, if the path exists */ + if(ssl_key && !lstat(ssl_key, &statp) + && !SSL_CTX_use_PrivateKey_file(ctx,ssl_key,SSL_FILETYPE_PEM)) + { + berr_exit("Can't read ssl_key file: %s\n", ssl_key); + return -1; + } + + /* Load the CAs we trust, if the path exists. */ + if(conf->ssl_cert_ca && !lstat(conf->ssl_cert_ca, &statp) + && !SSL_CTX_load_verify_locations(ctx, conf->ssl_cert_ca, 0)) + { + berr_exit("Can't read ssl_cert_ca file: %s\n", + conf->ssl_cert_ca); + return -1; + } + + return 0; +} + +SSL_CTX *ssl_initialise_ctx(struct config *conf) +{ + SSL_CTX *ctx=NULL; + SSL_METHOD *meth=NULL; + + /* Create our context*/ + meth=(SSL_METHOD *)SSLv23_method(); + ctx=(SSL_CTX *)SSL_CTX_new(meth); - /* Load the CAs we trust*/ - if(!(SSL_CTX_load_verify_locations(ctx, conf->ssl_cert_ca, 0))) - return berr_exit("Can't read CA list"); + if(ssl_load_keys_and_certs(ctx, conf)) return NULL; return ctx; } @@ -206,7 +233,7 @@ } if(SSL_get_verify_result(ssl)!=X509_V_OK) { - berr_exit("Certificate doesn't verify"); + berr_exit("Certificate doesn't verify.\n"); return -1; } diff -Nru burp-1.3.0+20120214git/src/ssl.h burp-1.3.10/src/ssl.h --- burp-1.3.0+20120214git/src/ssl.h 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/ssl.h 2012-07-27 00:36:21.000000000 +0000 @@ -4,7 +4,7 @@ extern SSL_CTX *ssl_initialise_ctx(struct config *conf); extern void ssl_destroy_ctx(SSL_CTX *ctx); extern int ssl_load_dh_params(SSL_CTX *ctx, struct config *conf); -extern SSL_CTX *berr_exit(const char *string); +extern SSL_CTX *berr_exit(const char *fmt, ...); extern void ssl_load_globals(void); extern int ssl_check_cert(SSL *ssl, struct config *conf); diff -Nru burp-1.3.0+20120214git/src/status_client.c burp-1.3.10/src/status_client.c --- burp-1.3.0+20120214git/src/status_client.c 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/status_client.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,827 +0,0 @@ -/* Client of the server status. Runs on the server machine and connects to the - burp server to get status information. */ - -#include "burp.h" -#include "prog.h" -#include "handy.h" -#include "lock.h" -#include "cmd.h" -#include "current_backups_server.h" - -#ifdef HAVE_NCURSES_H -#include "ncurses.h" -// So that the sighandler can call endwin(): -static enum action actg=ACTION_STATUS; -#endif - -#define LEFT_SPACE 3 -#define TOP_SPACE 2 - -static void print_line(const char *string, int row, int col) -{ - int k=0; - const char *cp=NULL; -#ifdef HAVE_NCURSES_H - if(actg==ACTION_STATUS) - { - while(k2) - snprintf(msg, sizeof(msg), - "%-14.14s %-14s last backup: %s", - toks[0], "idle", - get_backup_str(toks[2], TRUE)); - else - snprintf(msg, sizeof(msg), "%-14.14s %-14s", - toks[0], "idle"); - } - if(*(toks[1])==STATUS_SERVER_CRASHED) - { - if(t>2) - snprintf(msg, sizeof(msg), - "%-14.14s %-14s last backup: %s", - toks[0], "server crashed", - get_backup_str(toks[2], TRUE)); - else - snprintf(msg, sizeof(msg), "%-14.14s %-14s", - toks[0], "server crashed"); - } - if(*(toks[1])==STATUS_CLIENT_CRASHED) - { - if(t>2) - snprintf(msg, sizeof(msg), - "%-14.14s %-14s last backup: %s", - toks[0], "client crashed", - get_backup_str(toks[2], TRUE)); - else - snprintf(msg, sizeof(msg), "%-14.14s %-14s", - toks[0], "client crashed"); - } - if(*(toks[1])==STATUS_RUNNING) - { - char f[64]=""; - char b[64]=""; - const char *s=""; - if(t<3) return 0; - s=running_status_to_text(*(toks[2])); - if(t>3 && *(toks[3])) - { - unsigned long long a=0; - unsigned long long b=0; - unsigned long long c=0; - unsigned long long d=0; - unsigned long long t=0; - unsigned long long p=0; - if(!extract_ul(toks[3], &a, &b, &c, &d, &t)) - { - if(d) p=(t*100)/d; - snprintf(f, sizeof(f), "%llu/%llu %llu%%", - t, d, p); - } - } - if(t>16 && *(toks[16]) && strcmp(toks[16], "0")) - { - //snprintf(b, sizeof(b), "%s bytes%s", toks[14], - // bytes_to_human_str(toks[14])); - snprintf(b, sizeof(b), "%s", - bytes_to_human_str(toks[16])); - } - snprintf(msg, sizeof(msg), "%-14.14s %-14s %s%s", - toks[0], s, f, b); - } - if(*msg) - { - print_line(msg, count, col); - return 1; - } - return 0; -} - -static void show_all_backups(char *toks[], int t, int *x, int col) -{ - int i=2; - char msg[256]=""; - for(; i4) print_detail("Files", toks[4], &x, col, 0); - if(t>5) print_detail("Encrypted files", toks[5], &x, col, 0); - if(t>6) print_detail("Meta data", toks[6], &x, col, 0); - if(t>7) print_detail("Encrypted meta data", toks[7], &x, col, 0); - if(t>8) print_detail("Directories", toks[8], &x, col, 0); - if(t>9) print_detail("Soft links", toks[9], &x, col, 0); - if(t>10) print_detail("Hard links", toks[10], &x, col, 0); - if(t>11) print_detail("Special files", toks[11], &x, col, 0); - if(t>12) - { - print_detail("Total", toks[12], &x, col, 1); - } - print_line("", x++, col); - if(t>14) print_detail2("Warnings", toks[14], "", &x, col); - - if(t>15) - { - tmp=bytes_to_human_str(toks[15]); - print_detail2("Bytes expected", toks[15], tmp, &x, col); - } - if(t>16) - { - tmp=bytes_to_human_str(toks[16]); - print_detail2("Bytes in backup", toks[16], tmp, &x, col); - } - if(t>17) - { - tmp=bytes_to_human_str(toks[17]); - print_detail2("Bytes received", toks[17], tmp, &x, col); - } - if(t>18) - { - tmp=bytes_to_human_str(toks[18]); - print_detail2("Bytes sent", toks[18], tmp, &x, col); - } - if(t>19) - { - long start=0; - time_t now=0; - time_t diff=0; - now=time(NULL); - start=atol(toks[19]); - diff=now-start; - - print_detail2("Start time", getdatestr(start), " ", &x, col); - print_detail2("Time taken", time_taken(diff), " ", &x, col); - - if(diff>0) - { - unsigned long long bytesleft=0; - unsigned long long byteswant=0; - unsigned long long bytesgot=0; - float bytespersec=0; - byteswant=strtoull(toks[15], NULL, 10); - bytesgot=strtoull(toks[16], NULL, 10); - bytespersec=(float)(bytesgot/diff); - bytesleft=byteswant-bytesgot; - if(bytespersec>0) - { - time_t timeleft=0; - timeleft=bytesleft/bytespersec; - print_detail2("Time left", - time_taken(timeleft), " ", &x, col); - } - } - } - if(t>20 && toks[20]) - { -#ifdef HAVE_NCURSES_H - if(actg==ACTION_STATUS) - { - printw("\n%s\n", toks[20]); - return; - } -#else - printf("\n%s\n", toks[20]); -#endif - } -} - -static void blank_screen(int row, int col) -{ - int c=0; - int l=0; - const char *date=NULL; - time_t t=time(NULL); - date=getdatestr(t); - l=strlen(date); -#ifdef HAVE_NCURSES_H - if(actg==ACTION_STATUS) - { - char v[32]=""; - for(c=0; c2 - && rbuf[rbuflen-1]=='\n' - && rbuf[rbuflen-2]=='\n') - { - int row=24; - int col=80; -#ifdef HAVE_NCURSES_H - if(actg==ACTION_STATUS) getmaxyx(stdscr, row, col); -#endif - if(parse_rbuf(rbuf, conf, row, col, sel, count, details)) - return -1; - if(sel>=*count) sel=(*count)-1; - if(!details) print_star(sel); -#ifdef HAVE_NCURSES_H - if(actg==ACTION_STATUS) refresh(); -#endif - return 1; - } - return 0; -} - -static int request_status(int fd, int sel) -{ - int l; - char buf[256]=""; - if(sel>=0) snprintf(buf, sizeof(buf), "%d\n", sel); - else snprintf(buf, sizeof(buf), "\n"); - l=strlen(buf); - if(write(fd, buf, l)<0) return -1; - return 0; -} - -static void sighandler(int sig) -{ -#ifdef HAVE_NCURSES_H - if(actg==ACTION_STATUS) endwin(); -#endif - logp("got signal: %d\n", sig); - logp("exiting\n"); - exit(1); -} - -static void setup_signals(void) -{ - signal(SIGABRT, &sighandler); - signal(SIGTERM, &sighandler); - signal(SIGINT, &sighandler); - signal(SIGPIPE, &sighandler); -} - -int status_client(struct config *conf, enum action act) -{ - int fd=0; - int ret=0; - int sel=0; - char *rbuf=NULL; - char buf[512]=""; - int count=0; - int details=0; - char *last_rbuf=NULL; - int srbr=0; - -#ifdef HAVE_NCURSES_H - int stdinfd=fileno(stdin); - actg=act; // So that the sighandler can call endwin(). -#else - if(act==ACTION_STATUS) - { - printf("To use the live status monitor, you need to recompile with ncurses support.\n"); - return -1; - } -#endif - - setup_signals(); - - /* NULL == ::1 or 127.0.0.1 */ - if((fd=init_client_socket(NULL, conf->status_port))<0) - return -1; - set_non_blocking(fd); - -#ifdef HAVE_NCURSES_H - if(actg==ACTION_STATUS) - { - initscr(); - start_color(); - init_pair(1, COLOR_WHITE, COLOR_BLACK); - init_pair(2, COLOR_WHITE, COLOR_BLACK); - init_pair(3, COLOR_WHITE, COLOR_BLACK); - raw(); - keypad(stdscr, TRUE); - noecho(); - curs_set(0); - halfdelay(3); - } -#endif - - while(!ret) - { - int l; - int mfd=-1; - fd_set fsr; - fd_set fse; - struct timeval tval; - - if(need_status()) - { - int req=-1; - if(details) req=sel; - if(request_status(fd, req)) - { - ret=-1; - break; - } - } - - FD_ZERO(&fsr); - FD_ZERO(&fse); - - tval.tv_sec=1; - tval.tv_usec=0; - - add_fd_to_sets(fd, &fsr, NULL, &fse, &mfd); -#ifdef HAVE_NCURSES_H - if(actg==ACTION_STATUS) - add_fd_to_sets(stdinfd, &fsr, NULL, &fse, &mfd); -#endif - - if(select(mfd+1, &fsr, NULL, &fse, &tval)<0) - { - if(errno!=EAGAIN && errno!=EINTR) - { - logp("select error: %s\n", - strerror(errno)); - ret=-1; - break; - } - } - - if(FD_ISSET(fd, &fse)) - { - ret=-1; - break; - } - -#ifdef HAVE_NCURSES_H - if(actg==ACTION_STATUS) - { - if(FD_ISSET(stdinfd, &fse)) - { - ret=-1; - break; - } - if(FD_ISSET(stdinfd, &fsr)) - { - int x; - int quit=0; - switch((x=getch())) - { - case 'q': - case 'Q': - quit++; - break; - case KEY_UP: - case 'k': - case 'K': - if(details) break; - sel--; - break; - case KEY_DOWN: - case 'j': - case 'J': - if(details) break; - sel++; - break; - case KEY_ENTER: - case '\n': - case ' ': - if(details) details=0; - else details++; - break; - case KEY_LEFT: - case 'h': - case 'H': - details=0; - break; - case KEY_RIGHT: - case 'l': - case 'L': - details++; - break; - case KEY_NPAGE: - { - int row=0, col=0; - getmaxyx(stdscr, row, col); - sel+=row-TOP_SPACE; - break; - } - case KEY_PPAGE: - { - int row=0, col=0; - getmaxyx(stdscr, row, col); - sel-=row-TOP_SPACE; - break; - } - } - if(quit) break; - - if(sel<0) sel=0; - if(sel>=count) sel=count-1; - - // Attempt to print stuff to the screen right - // now, to give the impression of key strokes - // being responsive. - if(!details) - { - if((srbr=show_rbuf(last_rbuf, - conf, sel, &count, details))<0) - { - ret=-1; - break; - } - if(!details) print_star(sel); - - refresh(); - } - } - } -#endif - - if(FD_ISSET(fd, &fsr)) - { - // ready to read. - if((l=read(fd, buf, sizeof(buf)-1))>0) - { - size_t r=0; - buf[l]='\0'; - if(rbuf) r=strlen(rbuf); - rbuf=(char *)realloc(rbuf, r+l+1); - if(!r) *rbuf='\0'; - strcat(rbuf+r, buf); - } - if(l<0) - { - ret=-1; - break; - } - } - - if((srbr=show_rbuf(rbuf, conf, sel, &count, details))<0) - { - ret=-1; - break; - } - else if(srbr) - { - // Remember it, so that we can present the detailed - // screen without delay, above. - if(last_rbuf) free(last_rbuf); - last_rbuf=rbuf; - rbuf=NULL; - } - - usleep(20000); -#ifdef HAVE_NCURSES_H - if(actg==ACTION_STATUS) - { - flushinp(); - continue; - } -#endif - if(count) - { - printf("\n"); - break; - } - } -#ifdef HAVE_NCURSES_H - if(actg==ACTION_STATUS) endwin(); -#endif - close_fd(&fd); - if(last_rbuf) free(last_rbuf); - if(rbuf) free(rbuf); - return ret; -} diff -Nru burp-1.3.0+20120214git/src/status_client.h burp-1.3.10/src/status_client.h --- burp-1.3.0+20120214git/src/status_client.h 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/status_client.h 2012-07-27 00:36:21.000000000 +0000 @@ -1,6 +1,6 @@ #ifndef STATUS_CLIENT_H #define STATUS_CLIENT_H -extern int status_client(struct config *conf, enum action act); +extern int status_client_ncurses(struct config *conf, enum action act, const char *sclient); #endif diff -Nru burp-1.3.0+20120214git/src/status_client_ncurses.c burp-1.3.10/src/status_client_ncurses.c --- burp-1.3.0+20120214git/src/status_client_ncurses.c 1970-01-01 00:00:00.000000000 +0000 +++ burp-1.3.10/src/status_client_ncurses.c 2012-07-27 00:36:21.000000000 +0000 @@ -0,0 +1,930 @@ +/* Client of the server status. Runs on the server machine and connects to the + burp server to get status information. */ + +#include "burp.h" +#include "prog.h" +#include "handy.h" +#include "lock.h" +#include "cmd.h" +#include "current_backups_server.h" + +#ifdef HAVE_NCURSES_H +#include "ncurses.h" +// So that the sighandler can call endwin(): +static enum action actg=ACTION_STATUS; +#endif + +#define LEFT_SPACE 3 +#define TOP_SPACE 2 + +//#define DBFP 1 +#ifdef DBFP +static FILE *dbfp=NULL; +#endif + +static void print_line(const char *string, int row, int col) +{ + int k=0; + const char *cp=NULL; +#ifdef HAVE_NCURSES_H + if(actg==ACTION_STATUS) + { + while(k2) + snprintf(msg, sizeof(msg), + "%-14.14s %-14s last backup: %s", + toks[0], "idle", + get_backup_str(toks[2], TRUE)); + else + snprintf(msg, sizeof(msg), "%-14.14s %-14s", + toks[0], "idle"); + } + if(*(toks[1])==STATUS_SERVER_CRASHED) + { + if(t>2) + snprintf(msg, sizeof(msg), + "%-14.14s %-14s last backup: %s", + toks[0], "server crashed", + get_backup_str(toks[2], TRUE)); + else + snprintf(msg, sizeof(msg), "%-14.14s %-14s", + toks[0], "server crashed"); + } + if(*(toks[1])==STATUS_CLIENT_CRASHED) + { + if(t>2) + snprintf(msg, sizeof(msg), + "%-14.14s %-14s last backup: %s", + toks[0], "client crashed", + get_backup_str(toks[2], TRUE)); + else + snprintf(msg, sizeof(msg), "%-14.14s %-14s", + toks[0], "client crashed"); + } + if(*(toks[1])==STATUS_RUNNING) + { + char f[64]=""; + char b[64]=""; + const char *s=""; + if(t<3) return 0; + s=running_status_to_text(*(toks[2])); + if(t>3 && *(toks[3])) + { + unsigned long long a=0; + unsigned long long b=0; + unsigned long long c=0; + unsigned long long d=0; + unsigned long long t=0; + unsigned long long p=0; + if(!extract_ul(toks[3], &a, &b, &c, &d, &t)) + { + if(d) p=(t*100)/d; + snprintf(f, sizeof(f), "%llu/%llu %llu%%", + t, d, p); + } + } + if(t>16 && *(toks[16]) && strcmp(toks[16], "0")) + { + //snprintf(b, sizeof(b), "%s bytes%s", toks[14], + // bytes_to_human_str(toks[14])); + snprintf(b, sizeof(b), "%s", + bytes_to_human_str(toks[16])); + } + snprintf(msg, sizeof(msg), "%-14.14s %-14s %s%s", + toks[0], s, f, b); + } + if(*msg) + { + print_line(msg, count, col); + return 1; + } + return 0; +} + +static void show_all_backups(char *toks[], int t, int *x, int col) +{ + int i=2; + char msg[256]=""; + for(; i4) print_detail("Files", toks[4], &x, col, 0); + if(t>5) print_detail("Encrypted files", toks[5], &x, col, 0); + if(t>6) print_detail("Meta data", toks[6], &x, col, 0); + if(t>7) print_detail("Encrypted meta data", toks[7], &x, col, 0); + if(t>8) print_detail("Directories", toks[8], &x, col, 0); + if(t>9) print_detail("Soft links", toks[9], &x, col, 0); + if(t>10) print_detail("Hard links", toks[10], &x, col, 0); + if(t>11) print_detail("Special files", toks[11], &x, col, 0); + if(t>12) + { + print_detail("Total", toks[12], &x, col, 1); + } + print_line("", x++, col); + if(t>14) print_detail2("Warnings", toks[14], "", &x, col); + + if(t>15) + { + tmp=bytes_to_human_str(toks[15]); + print_detail2("Bytes expected", toks[15], tmp, &x, col); + } + if(t>16) + { + tmp=bytes_to_human_str(toks[16]); + print_detail2("Bytes in backup", toks[16], tmp, &x, col); + } + if(t>17) + { + tmp=bytes_to_human_str(toks[17]); + print_detail2("Bytes received", toks[17], tmp, &x, col); + } + if(t>18) + { + tmp=bytes_to_human_str(toks[18]); + print_detail2("Bytes sent", toks[18], tmp, &x, col); + } + if(t>19) + { + long start=0; + time_t now=0; + time_t diff=0; + now=time(NULL); + start=atol(toks[19]); + diff=now-start; + + print_detail2("Start time", getdatestr(start), " ", &x, col); + print_detail2("Time taken", time_taken(diff), " ", &x, col); + + if(diff>0) + { + unsigned long long bytesleft=0; + unsigned long long byteswant=0; + unsigned long long bytesgot=0; + float bytespersec=0; + byteswant=strtoull(toks[15], NULL, 10); + bytesgot=strtoull(toks[16], NULL, 10); + bytespersec=(float)(bytesgot/diff); + bytesleft=byteswant-bytesgot; + if(bytespersec>0) + { + time_t timeleft=0; + timeleft=(time_t)(bytesleft/bytespersec); + print_detail2("Time left", + time_taken(timeleft), " ", &x, col); + } + } + } + if(t>20 && toks[20]) + { +#ifdef HAVE_NCURSES_H + if(actg==ACTION_STATUS) + { + printw("\n%s\n", toks[20]); + return; + } +#else + printf("\n%s\n", toks[20]); +#endif + } +} + +static void blank_screen(int row, int col) +{ + int c=0; + int l=0; + const char *date=NULL; + time_t t=time(NULL); + date=getdatestr(t); + l=strlen(date); +#ifdef HAVE_NCURSES_H + if(actg==ACTION_STATUS) + { + char v[32]=""; + clear(); + snprintf(v, sizeof(v), " burp monitor %s", VERSION); + mvprintw(0, 0, v); + mvprintw(0, col-l-1, date); + return; + } +#endif + + printf("\n burp status"); + for(c=0; c<(int)(col-strlen(" burp status")-l-1); c++) printf(" "); + printf("%s\n\n", date); +} + +static int parse_rbuf(const char *rbuf, struct config *conf, int row, int col, int sel, char **client, int *count, int details, const char *sclient) +{ + //int c=0; + char *cp=NULL; + char *dp=NULL; + char *copyall=NULL; + + if(!(copyall=strdup(rbuf))) + { + logp("out of memory\n"); + return -1; + } + + dp=copyall; + *count=0; + + // First, blank the whole screen. + blank_screen(row, col); + while((cp=strchr(dp, '\n'))) + { + int t=1; + char *copy=NULL; + char **toks=NULL; + *cp='\0'; + + if(!(toks=(char **)realloc(toks, t*sizeof(char *)))) + { + logp("out of memory"); + return -1; + } + + if(!(copy=strdup(dp))) + { + logp("out of memory\n"); + free(copyall); + free(toks); + return -1; + } + + if((toks[0]=strtok(copy, "\t\n"))) + { + char *tmp=NULL; + while(1) + { + if(!(tmp=strtok(NULL, "\t\n"))) + break; + if(!(toks=(char **)realloc(toks, + (t+1)*sizeof(char *)))) + { + logp("out of memory"); + free(copyall); + free(copy); + return -1; + } + toks[t++]=tmp; + } + } + + if(t<2) + { + free(toks); + free(copy); + continue; + } + + if(details) + { + if(*count==sel || sclient) + { + if(toks[0] + && (!*client || strcmp(toks[0], *client))) + { + if(*client) free(*client); + *client=strdup(toks[0]); + } + if(!sclient || !strcmp(toks[0], sclient)) + detail(toks, t, conf, 0, col); + } + } + else + { + summary(toks, t, *count, row, col); + } + (*count)++; + + dp=cp+1; + free(copy); + free(toks); + } + if(copyall) free(copyall); + return 0; +} + +static int need_status(void) +{ + static time_t lasttime=0; + time_t now=0; + time_t diff=0; + + // Only ask for an update every second. + now=time(NULL); + diff=now-lasttime; + if(diff<1) + { + // In case they fiddled their clock back in time. + if(diff<0) lasttime=now; + return 0; + } + lasttime=now; + return 1; +} + +static void print_star(int sel) +{ +#ifdef HAVE_NCURSES_H + if(actg==ACTION_STATUS) + { + mvprintw(sel+TOP_SPACE, 1, "*"); + return; + } +#endif +} + +// Return 1 if it was shown, -1 on error, 0 otherwise. +static int show_rbuf(const char *rbuf, struct config *conf, int sel, char **client, int *count, int details, const char *sclient) +{ + int rbuflen=0; + if(!rbuf) return 0; + rbuflen=strlen(rbuf); +#ifdef DBFP + if(dbfp) { fprintf(dbfp, "%s\n", rbuf); fflush(dbfp); } +#endif + + if(rbuflen>2 + && rbuf[rbuflen-1]=='\n' + && rbuf[rbuflen-2]=='\n') + { + int row=24; + int col=80; +#ifdef HAVE_NCURSES_H + if(actg==ACTION_STATUS) getmaxyx(stdscr, row, col); +#endif + if(parse_rbuf(rbuf, conf, row, col, + sel, client, count, details, sclient)) + return -1; + if(sel>=*count) sel=(*count)-1; + if(!details) print_star(sel); +#ifdef HAVE_NCURSES_H + if(actg==ACTION_STATUS) refresh(); +#endif + return 1; + } + return 0; +} + +static int request_status(int fd, const char *client, struct config *conf) +{ + int l; + char buf[256]=""; + if(client) + { + if(conf->backup) + { + if(conf->browsedir) + { + snprintf(buf, sizeof(buf), "c:%s:b:%s:p:%s\n", + client, conf->backup, conf->browsedir); + } + else if(conf->browsefile) + { + snprintf(buf, sizeof(buf), "c:%s:b:%s:f:%s\n", + client, conf->backup, conf->browsefile); + } + else + { + snprintf(buf, sizeof(buf), "c:%s:b:%s\n", + client, conf->backup); + } + } + else + { + snprintf(buf, sizeof(buf), "c:%s\n", client); + } + } + else snprintf(buf, sizeof(buf), "\n"); +#ifdef DBFP +fprintf(dbfp, "request: %s\n", buf); fflush(dbfp); +#endif + l=strlen(buf); + if(write(fd, buf, l)<0) return -1; + return 0; +} + +static void sighandler(int sig) +{ +#ifdef HAVE_NCURSES_H + if(actg==ACTION_STATUS) endwin(); +#endif + logp("got signal: %d\n", sig); + if(sig==SIGPIPE) logp("Server may have too many active status clients.\n"); + logp("exiting\n"); + exit(1); +} + +static void setup_signals(void) +{ + signal(SIGABRT, &sighandler); + signal(SIGTERM, &sighandler); + signal(SIGINT, &sighandler); + signal(SIGPIPE, &sighandler); +} + +int status_client_ncurses(struct config *conf, enum action act, const char *sclient) +{ + int fd=0; + int ret=0; + int sel=0; + char *rbuf=NULL; + char buf[512]=""; + int count=0; + int details=0; + char *last_rbuf=NULL; + int srbr=0; + char *client=NULL; + int enterpressed=0; +// int loop=0; + int reqdone=0; + +#ifdef HAVE_NCURSES_H + int stdinfd=fileno(stdin); + actg=act; // So that the sighandler can call endwin(). +#else + if(act==ACTION_STATUS) + { + printf("To use the live status monitor, you need to recompile with ncurses support.\n"); + return -1; + } +#endif + + setup_signals(); + + /* NULL == ::1 or 127.0.0.1 */ + if((fd=init_client_socket(NULL, conf->status_port))<0) + return -1; + set_non_blocking(fd); + +#ifdef HAVE_NCURSES_H + if(actg==ACTION_STATUS) + { + initscr(); + start_color(); + init_pair(1, COLOR_WHITE, COLOR_BLACK); + init_pair(2, COLOR_WHITE, COLOR_BLACK); + init_pair(3, COLOR_WHITE, COLOR_BLACK); + raw(); + keypad(stdscr, TRUE); + noecho(); + curs_set(0); + halfdelay(3); + //nodelay(stdscr, TRUE); + } +#endif +#ifdef DBFP + dbfp=fopen("/tmp/dbfp", "w"); +#endif + + while(!ret) + { + int l; + int mfd=-1; + fd_set fsr; + fd_set fse; + struct timeval tval; + + // Failsafe to prevent the snapshot ever getting permanently + // stuck. + //if(act==ACTION_STATUS_SNAPSHOT && loop++>10000) + // break; + + if(sclient && !client) + { + client=strdup(sclient); + details=1; + } + + if((enterpressed || need_status()) && !reqdone) + { + char *req=NULL; + if(details && client) req=client; + if(request_status(fd, req, conf)) + { + ret=-1; + break; + } + enterpressed=0; + if(act==ACTION_STATUS_SNAPSHOT) + reqdone++; + } + + FD_ZERO(&fsr); + FD_ZERO(&fse); + + tval.tv_sec=1; + tval.tv_usec=0; + + add_fd_to_sets(fd, &fsr, NULL, &fse, &mfd); +#ifdef HAVE_NCURSES_H + if(actg==ACTION_STATUS) + add_fd_to_sets(stdinfd, &fsr, NULL, &fse, &mfd); +#endif + + if(select(mfd+1, &fsr, NULL, &fse, &tval)<0) + { + if(errno!=EAGAIN && errno!=EINTR) + { + logp("select error: %s\n", + strerror(errno)); + ret=-1; + break; + } + continue; + } + + if(FD_ISSET(fd, &fse)) + { + ret=-1; + break; + } + +#ifdef HAVE_NCURSES_H + if(actg==ACTION_STATUS) + { + if(FD_ISSET(stdinfd, &fse)) + { + ret=-1; + break; + } + if(FD_ISSET(stdinfd, &fsr)) + { + int quit=0; + + switch(getch()) + { + case 'q': + case 'Q': + quit++; + break; + case KEY_UP: + case 'k': + case 'K': + if(details) break; + sel--; + break; + case KEY_DOWN: + case 'j': + case 'J': + if(details) break; + sel++; + break; + case KEY_ENTER: + case '\n': + case ' ': + if(details) details=0; + else details++; + enterpressed++; + break; + case KEY_LEFT: + case 'h': + case 'H': + details=0; + break; + case KEY_RIGHT: + case 'l': + case 'L': + details++; + break; + case KEY_NPAGE: + { + int row=0, col=0; + getmaxyx(stdscr, row, col); + sel+=row-TOP_SPACE; + break; + } + case KEY_PPAGE: + { + int row=0, col=0; + getmaxyx(stdscr, row, col); + sel-=row-TOP_SPACE; + break; + } + } + if(quit) break; + + if(sel<0) sel=0; + if(sel>=count) sel=count-1; + + // Attempt to print stuff to the screen right + // now, to give the impression of key strokes + // being responsive. + if(!details && !sclient) + { + if((srbr=show_rbuf(last_rbuf, + conf, sel, &client, + &count, details, sclient))<0) + { + ret=-1; + break; + } + if(!details) print_star(sel); + + refresh(); + } + } + } +#endif + + if(FD_ISSET(fd, &fsr)) + { + // ready to read. + if((l=read(fd, buf, sizeof(buf)-1))>0) + { + size_t r=0; + buf[l]='\0'; + if(rbuf) r=strlen(rbuf); + rbuf=(char *)realloc(rbuf, r+l+1); + if(!r) *rbuf='\0'; + strcat(rbuf+r, buf); + } + else + break; + + if(act==ACTION_STATUS_SNAPSHOT) + { + if(rbuf) + { + if(!strcmp(rbuf, "\n")) + { + // This happens when there are + // no backup clients. + break; + } + if(strstr(rbuf, "\n-list end-\n")) + { + printf("%s", rbuf); + break; + } + } + continue; + } + + //if(rbuf) printf("rbuf: %s\n", rbuf); +/* + if(l<0) + { + ret=-1; + break; + } +*/ + } + + if((srbr=show_rbuf(rbuf, conf, + sel, &client, &count, details, sclient))<0) + { + ret=-1; + break; + } + else if(srbr) + { + // Remember it, so that we can present the detailed + // screen without delay, above. + if(last_rbuf) free(last_rbuf); + last_rbuf=rbuf; + rbuf=NULL; + } + + if(sclient) details++; + + usleep(20000); +#ifdef HAVE_NCURSES_H + if(actg==ACTION_STATUS) + { + flushinp(); + continue; + } +#endif + if(count) + { + printf("\n"); + break; + } + } +#ifdef HAVE_NCURSES_H + if(actg==ACTION_STATUS) endwin(); +#endif + close_fd(&fd); + if(last_rbuf) free(last_rbuf); + if(rbuf) free(rbuf); +#ifdef DBFP + if(dbfp) fclose(dbfp); +#endif + return ret; +} diff -Nru burp-1.3.0+20120214git/src/status_server.c burp-1.3.10/src/status_server.c --- burp-1.3.0+20120214git/src/status_server.c 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/status_server.c 2012-07-27 00:36:21.000000000 +0000 @@ -5,8 +5,11 @@ #include "handy.h" #include "asyncio.h" #include "counter.h" +#include "sbuf.h" #include "current_backups_server.h" #include "status_server.h" +#include "list_client.h" +#include "list_server.h" struct cstat { @@ -35,6 +38,8 @@ if(!*x && !*y) return 0; if(!*x) return -1; if(!*y) return 1; + if(!(*x)->name) return -1; + if(!(*y)->name) return 1; return strcmp((*x)->name, (*y)->name); } @@ -323,6 +328,12 @@ cstat_blank((*clist)[q]); continue; } + // Allow directories to exist in the conf dir. + if(!S_ISREG(statp.st_mode)) + { + cstat_blank((*clist)[q]); + continue; + } if(statp.st_mtime==(*clist)[q]->conf_mtime) { // conf file has not changed - no need to do anything. @@ -331,8 +342,8 @@ (*clist)[q]->conf_mtime=statp.st_mtime; init_config(&cconf); - if(set_client_global_config(conf, &cconf) - || load_config((*clist)[q]->conffile, &cconf, 0)) + if(set_client_global_config(conf, &cconf, (*clist)[q]->name) + || load_config((*clist)[q]->conffile, &cconf, FALSE)) { free_config(&cconf); cstat_blank((*clist)[q]); @@ -391,31 +402,84 @@ return ret; } -static int send_data_to_client(int cfd, const char *data) +static int send_data_to_client(int cfd, const char *data, size_t len) { + int ret=0; const char *w=data; - while(w && *w) +//printf("need to write: %d\n", len); + while(len>0) { - size_t wl=0; - if((wl=write(cfd, w, strlen(w)))<0) + ssize_t wl=0; + int mfd=-1; + fd_set fsw; + fd_set fse; + struct timeval tval; + + FD_ZERO(&fsw); + FD_ZERO(&fse); + + tval.tv_sec=1; + tval.tv_usec=0; + + add_fd_to_sets(cfd, NULL, &fsw, &fse, &mfd); + + if(select(mfd+1, NULL, &fsw, &fse, &tval)<0) + { + if(errno!=EAGAIN && errno!=EINTR) + { + logp("select error: %s\n", strerror(errno)); + ret=-1; + break; + } + continue; + } + + if(FD_ISSET(cfd, &fse)) { + // Client exited? + logp("exception on client fd when writing\n"); + break; + } + if(!FD_ISSET(cfd, &fsw)) continue; + + if((wl=write(cfd, w, len))<=0) + { + if(errno==EPIPE) + { + ret=-1; + goto end; + } if(errno!=EINTR) { - //logp("error writing in send_data_to_client(): %s\n", strerror(errno)); - return -1; + logp("error writing in send_data_to_client(): %s\n", strerror(errno)); + ret=-1; + goto end; } +// printf("got EINTR\n"); + } + else if(wl>0) + { + w+=wl; + len-=wl; } - w+=wl; +// printf("wrote: %d left: %d\n", wl, len); } - return 0; +end: + return ret; } -static int send_summaries_to_client(int cfd, struct cstat **clist, int clen, int sel_client) +static int send_summaries_to_client(int cfd, struct cstat **clist, int clen, const char *sel_client) { int q=0; + + // If there are no backup clients to list, just give a new line. + // Without this, the status client will stay in a loop trying to read + // data when in snapshot mode. + if(!clen) send_data_to_client(cfd, "\n", 1); + for(q=0; qrunning_detail; } - else if(sel_client==q + else if(sel_client && !strcmp(sel_client, clist[q]->name) && (clist[q]->status==STATUS_IDLE || clist[q]->status==STATUS_CLIENT_CRASHED || clist[q]->status==STATUS_SERVER_CRASHED)) @@ -442,7 +506,7 @@ struct bu *arr=NULL; if(get_current_backups(clist[q]->basedir, &arr, &a, 0)) { - logp("error when looking up current backups\n"); + //logp("error when looking up current backups\n"); tosend=clist[q]->summary; } else if(a>0) @@ -481,8 +545,10 @@ } } else tosend=clist[q]->summary; + + if(!tosend || !*tosend) tosend="\n"; //printf("send summary: %s (%s)\n", clist[q]->name, tosend); - if(send_data_to_client(cfd, tosend)) return -1; + if(send_data_to_client(cfd, tosend, strlen(tosend))) return -1; } return 0; @@ -500,7 +566,8 @@ tosend=clist[q]->running_detail; else tosend=clist[q]->summary; - if(send_data_to_client(cfd, tosend)) return -1; + if(send_data_to_client(cfd, tosend, strlen(tosend))) + return -1; break; } } @@ -580,11 +647,319 @@ return 0; } +static cstat *get_cstat_by_client_name(struct cstat **clist, int clen, const char *client) +{ + int c=0; + for(c=0; cname && !strcmp(clist[c]->name, client)) + return clist[c]; + } + return NULL; +} + +static int list_backup_file_name(int cfd, const char *dir, const char *file) +{ + int ret=0; + char *path=NULL; + char msg[256]=""; + struct stat statp; + if(!(path=prepend_s(dir, file, strlen(file)))) + return -1; + if(lstat(path, &statp) || !S_ISREG(statp.st_mode)) + { + free(path); + return 0; + } + snprintf(msg, sizeof(msg), "%s\n", file); + ret=send_data_to_client(cfd, msg, strlen(msg)); + free(path); + return ret; +} + +static int browse_manifest(int cfd, gzFile zp, const char *browse) +{ + int ars=0; + int ret=0; + char ls[1024]=""; + struct sbuf sb; + struct cntr cntr; + size_t blen=0; + char *lastpath=NULL; + reset_filecounter(&cntr); + init_sbuf(&sb); + if(browse) blen=strlen(browse); + while(1) + { + int r; + free_sbuf(&sb); + if((ars=sbuf_fill(NULL, zp, &sb, &cntr))) + { + if(ars<0) ret=-1; + // ars==1 means it ended ok. + break; + } + if((r=check_browsedir(browse, &sb.path, blen, &lastpath))<0) + { + ret=-1; + break; + } + if(!r) continue; + + ls_output(ls, sb.path, &(sb.statp)); + + if(send_data_to_client(cfd, ls, strlen(ls)) + || send_data_to_client(cfd, "\n", 1)) + { + ret=-1; + break; + } + } + free_sbuf(&sb); + if(lastpath) free(lastpath); + return ret; +} + +static int list_backup_file_contents(int cfd, const char *dir, const char *file, const char *browse) +{ + int ret=0; + size_t l=0; + gzFile zp=NULL; + char *path=NULL; + char buf[256]=""; + if(!(path=prepend_s(dir, file, strlen(file)))) + return -1; + if(!(zp=gzopen_file(path, "rb"))) + { + free(path); + return -1; + } + + if(send_data_to_client(cfd, "-list begin-\n", strlen("-list begin-\n"))) + { + ret=-1; + goto end; + } + + if(!strcmp(file, "manifest.gz")) + { + ret=browse_manifest(cfd, zp, browse?:""); + } + else + { + while((l=gzread(zp, buf, sizeof(buf)))>0) + { + if(send_data_to_client(cfd, buf, l)) + { + ret=-1; + break; + } + } + } + if(send_data_to_client(cfd, "-list end-\n", strlen("-list end-\n"))) + { + ret=-1; + goto end; + } +end: + gzclose_fp(&zp); + return ret; +} + +static int list_backup_dir(int cfd, struct cstat *cli, unsigned long bno) +{ + int a=0; + int ret=0; + struct bu *arr=NULL; + if(get_current_backups(cli->basedir, &arr, &a, 0)) + { + //logp("error when looking up current backups\n"); + return -1; + } + if(a>0) + { + int i=0; + for(i=0; i0) free_current_backups(&arr, a); + return ret; +} + +static int list_backup_file(int cfd, struct cstat *cli, unsigned long bno, const char *file, const char *browse) +{ + int a=0; + struct bu *arr=NULL; + if(get_current_backups(cli->basedir, &arr, &a, 0)) + { + //logp("error when looking up current backups\n"); + return -1; + } + if(a>0) + { + int i=0; + for(i=0; i1 && browse[strlen(browse)-1]=='/') + browse[strlen(browse)-1]='\0'; + } + + if(client) + { + if(!(cli=get_cstat_by_client_name(clist, clen, client))) + goto end; + } + if(backup) + { + if(!(bno=strtoul(backup, NULL, 10))) + goto end; + } + if(file) + { + if(strcmp(file, "manifest.gz") + && strcmp(file, "log.gz") + && strcmp(file, "restorelog.gz") + && strcmp(file, "verifylog.gz")) + goto end; + } +/* + printf("client: %s\n", client?:""); + printf("backup: %s\n", backup?:""); + printf("file: %s\n", file?:""); +*/ + if(client) + { + if(bno) + { + if(file || browse) + { + printf("list file %s of backup %lu of client '%s'\n", + file, bno, client); + if(browse) printf("browse '%s'\n", browse); + list_backup_file(cfd, cli, bno, file, browse); + } + else + { + printf("list backup %lu of client '%s'\n", + bno, client); + printf("basedir: %s\n", cli->basedir); + list_backup_dir(cfd, cli, bno); + } + } + else + { + //printf("detail request: %s\n", rbuf); + if(send_summaries_to_client(cfd, clist, clen, client)) + { + ret=-1; + goto end; + } + } + } + else + { + //printf("summaries request\n"); + if(send_summaries_to_client(cfd, clist, clen, NULL)) + { + ret=-1; + goto end; + } + } + + // Kludge - exit straight away if doing snapshot type stuff. +/* + if(backup || file || browse) + { + ret=-1; + goto end; + } +*/ +end: + if(client) free(client); + if(backup) free(backup); + if(file) free(file); + if(browse) free(browse); + return ret; +} + /* Incoming status request */ int status_server(int *cfd, struct config *conf) { int l; int ret=0; + char *rbuf=NULL; char buf[512]=""; int clen=0; struct cstat **clist=NULL; @@ -629,6 +1004,7 @@ ret=-1; break; } + continue; } if(status_rfd>=0 && FD_ISSET(status_rfd, &fse)) @@ -673,44 +1049,48 @@ if(FD_ISSET(*cfd, &fsr)) { + char *cp=NULL; + ssize_t total=0; //logp("status server stuff to read from client\n"); - if((l=read(*cfd, buf, sizeof(buf)-2))<0) + while((l=read(*cfd, buf, sizeof(buf)))>0) { - logp("read error\n"); - ret=-1; - break; + size_t r=0; + buf[l]='\0'; + if(rbuf) r=strlen(buf); + rbuf=(char *)realloc(rbuf, r+l+1); + if(!r) *rbuf='\0'; + strcat(rbuf+r, buf); + total+=l; } - else if(!l) + if(!total) { - // client went away + // client went away? + if(rbuf) + { + free(rbuf); + rbuf=NULL; + } break; } // If we did not get a full read, do // not worry, just throw it away. - if(buf[l-1]=='\n') + if(rbuf && (cp=strrchr(rbuf, '\n'))) { - buf[l-1]='\0'; - if(!*buf) - { - //printf("summaries request\n"); - if(send_summaries_to_client(*cfd, - clist, clen, -1)) - { - ret=-1; - break; - } - } - else + *cp='\0'; + // Also get rid of '\r'. I think telnet adds + // this. + if((cp=strrchr(rbuf, '\r'))) *cp='\0'; + + if(parse_rbuf(rbuf, *cfd, clist, clen)) { - //printf("detail request: %s\n", buf); - if(send_summaries_to_client(*cfd, - clist, clen, atoi(buf))) - { - ret=-1; - break; - } + ret=-1; + free(rbuf); + rbuf=NULL; + break; } - if(send_data_to_client(*cfd, "\n")) + free(rbuf); + rbuf=NULL; + if(send_data_to_client(*cfd, "\n", 1)) return -1; } // continue; diff -Nru burp-1.3.0+20120214git/src/strlist.h burp-1.3.10/src/strlist.h --- burp-1.3.0+20120214git/src/strlist.h 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/strlist.h 2012-07-27 00:36:21.000000000 +0000 @@ -1,12 +1,19 @@ #ifndef _STRLIST_H #define _STRLIST_H +#if defined(HAVE_PCREPOSIX) +#include +#else +#include +#endif + typedef struct strlist strlist_t; struct strlist { long flag; char *path; + regex_t *re; }; extern void strlists_free(struct strlist **bd, int count); diff -Nru burp-1.3.0+20120214git/src/version.h burp-1.3.10/src/version.h --- burp-1.3.0+20120214git/src/version.h 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/version.h 2012-07-27 19:30:57.000000000 +0000 @@ -1,2 +1,2 @@ #undef VERSION -#define VERSION "1.3.1" +#define VERSION "1.3.10" diff -Nru burp-1.3.0+20120214git/src/win32/Makefile.inc.in burp-1.3.10/src/win32/Makefile.inc.in --- burp-1.3.0+20120214git/src/win32/Makefile.inc.in 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/win32/Makefile.inc.in 2012-07-27 00:36:21.000000000 +0000 @@ -87,6 +87,9 @@ LIBS_RSYNC := \ $(DEPKGS)/lib/librsync.a +LIBS_PCRE := \ + $(DEPKGS)/lib/libpcreposix.dll.a + LIBS_BURP := \ $(LIBDIR)/libburp.a @@ -95,3 +98,4 @@ -DHAVE_ZLIB_H \ -DHAVE_LIBZ \ -DHAVE_OPENSSL \ + -DHAVE_PCREPOSIX \ diff -Nru burp-1.3.0+20120214git/src/win32/Makefile.installer.in burp-1.3.10/src/win32/Makefile.installer.in --- burp-1.3.0+20120214git/src/win32/Makefile.installer.in 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/win32/Makefile.installer.in 2012-07-27 00:36:21.000000000 +0000 @@ -21,19 +21,20 @@ BURP_BINARIES := \ burp.dll \ - burp.exe + burp.exe \ + burp_ca.bat DEPKGS_BINARIES := \ zlib1.dll \ libeay32.dll \ ssleay32.dll \ + libpcre-1.dll \ + libpcreposix-0.dll \ + openssl.exe MINGW_LIBS := \ libgcc_s_sjlj-1.dll -SSL_FILES := \ -# openssl.cnf - DOC_FILES := ########################################################################## @@ -84,7 +85,7 @@ cp ../installer/ConfigPage2.ini . cp ../installer/DumpLog.nsh . -$(INSTALL_EXE): winburp.nsi $(addprefix release@BITS@/,$(BURP_BINARIES) $(DEPKGS_BINARIES) $(MINGW_LIBS) $(SSL_FILES)) +$(INSTALL_EXE): winburp.nsi $(addprefix release@BITS@/,$(BURP_BINARIES) $(DEPKGS_BINARIES) $(MINGW_LIBS)) NSISDIR=$(NSIS_DIR) \ $(NSIS_DIR)/makensis -V3 $(DEFINES) winburp.nsi diff -Nru burp-1.3.0+20120214git/src/win32/burp/Makefile burp-1.3.10/src/win32/burp/Makefile --- burp-1.3.0+20120214git/src/win32/burp/Makefile 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/win32/burp/Makefile 2012-07-27 00:36:21.000000000 +0000 @@ -37,6 +37,7 @@ $(OBJDIR)/base64.o \ $(OBJDIR)/berrno.o \ $(OBJDIR)/bfile.o \ + $(OBJDIR)/ca_client.o \ $(OBJDIR)/client.o \ $(OBJDIR)/client_vss.o \ $(OBJDIR)/conf.o \ @@ -44,15 +45,17 @@ $(OBJDIR)/extrameta.o \ $(OBJDIR)/find.o \ $(OBJDIR)/forkchild.o \ - $(OBJDIR)/incexc_recv_server.o \ - $(OBJDIR)/incexc_send_client.o \ + $(OBJDIR)/incexc_recv.o \ + $(OBJDIR)/incexc_send.o \ $(OBJDIR)/list_client.o \ $(OBJDIR)/handy.o \ $(OBJDIR)/lock.o \ $(OBJDIR)/log.o \ $(OBJDIR)/main.o \ $(OBJDIR)/msg.o \ + $(OBJDIR)/prepend.o \ $(OBJDIR)/prog.o \ + $(OBJDIR)/regexp.o \ $(OBJDIR)/restore_client.o \ $(OBJDIR)/rs_buf.o \ $(OBJDIR)/sbuf.o \ @@ -73,6 +76,7 @@ $(LIBS_ZLIB) \ $(LIBS_NETWORK) \ $(LIBS_RSYNC) \ + $(LIBS_PCRE) \ -lole32 \ -loleaut32 \ -luuid \ @@ -84,7 +88,7 @@ .PHONY: all clean -all: $(BINDIR)/burp.exe +all: $(BINDIR)/burp.exe $(BINDIR)/burp_ca.bat clean: @echo "Cleaning `pwd`" @@ -99,6 +103,9 @@ $(BINDIR)/burp.exe: $(FILED_OBJS) $(LIBS_BURP) $(call link_conapp,$(FILED_LIBS)) +$(BINDIR)/burp_ca.bat: + cp $(MAINDIR)/configs/certs/CA/burp_ca.bat $(BINDIR) + $(OBJDIR)/winres.res: ../libwin32/winres.rc @echo "Compiling $(WINDRES) $@" $(call checkdir,$@) diff -Nru burp-1.3.0+20120214git/src/win32/compat/compat.cpp burp-1.3.10/src/win32/compat/compat.cpp --- burp-1.3.0+20120214git/src/win32/compat/compat.cpp 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/win32/compat/compat.cpp 2012-07-27 00:36:21.000000000 +0000 @@ -1175,6 +1175,8 @@ opendir(const char *path) { ssize_t len=0; + char *tspec=NULL; + /* enough space for VSS !*/ int max_len = strlen(path) + MAX_PATH; _dir *rval = NULL; @@ -1183,11 +1185,14 @@ return NULL; } - rval = (_dir *)malloc(sizeof(_dir)); + if(!(rval = (_dir *)malloc(sizeof(_dir)))) + return NULL; memset (rval, 0, sizeof (_dir)); - if (rval == NULL) return NULL; - char *tspec = (char *)malloc(max_len); - if (tspec == NULL) return NULL; + if(!(tspec = (char *)malloc(max_len))) + { + free(rval); + return NULL; + } conv_unix_to_win32_path(path, tspec, max_len); @@ -2072,3 +2077,54 @@ { return do_forkchild(sin, sout, serr, path, argv, 0 /* do not wait */); } + +int win32_utime(const char *fname, struct utimbuf *times) +{ + FILETIME acc, mod; + char tmpbuf[5000]; + + conv_unix_to_win32_path(fname, tmpbuf, 5000); + + cvt_utime_to_ftime(times->actime, acc); + cvt_utime_to_ftime(times->modtime, mod); + + HANDLE h = INVALID_HANDLE_VALUE; + + if (p_CreateFileW) { + char* pwszBuf = sm_get_pool_memory(PM_FNAME); + make_win32_path_UTF8_2_wchar(&pwszBuf, tmpbuf); + + h = p_CreateFileW((LPCWSTR)pwszBuf, + FILE_WRITE_ATTRIBUTES, + FILE_SHARE_WRITE|FILE_SHARE_READ|FILE_SHARE_DELETE, + NULL, + OPEN_EXISTING, + FILE_FLAG_BACKUP_SEMANTICS, // required for directories + NULL); + + sm_free_pool_memory(pwszBuf); + } else if (p_CreateFileA) { + h = p_CreateFileA(tmpbuf, + FILE_WRITE_ATTRIBUTES, + FILE_SHARE_WRITE|FILE_SHARE_READ|FILE_SHARE_DELETE, + NULL, + OPEN_EXISTING, + FILE_FLAG_BACKUP_SEMANTICS, // required for directories + NULL); + } + + if (h == INVALID_HANDLE_VALUE) { + const char *err = errorString(); + fprintf(stderr, "Cannot open %s for utime(): ERR=%s\n", tmpbuf, err); + LocalFree((void *)err); + errno = b_errno_win32; + return -1; + } + + int rval = SetFileTime(h, NULL, &acc, &mod) ? 0 : -1; + CloseHandle(h); + if (rval == -1) { + errno = b_errno_win32; + } + return rval; +} diff -Nru burp-1.3.0+20120214git/src/win32/compat/compat.h burp-1.3.10/src/win32/compat/compat.h --- burp-1.3.0+20120214git/src/win32/compat/compat.h 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/win32/compat/compat.h 2012-07-27 00:36:21.000000000 +0000 @@ -325,6 +325,7 @@ #define ffs __builtin_ffs #endif +int win32_utime(const char *fname, struct utimbuf *times); int win32_ftruncate(int fd, int64_t length); diff -Nru burp-1.3.0+20120214git/src/win32/compat/winapi.c burp-1.3.10/src/win32/compat/winapi.c --- burp-1.3.0+20120214git/src/win32/compat/winapi.c 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/win32/compat/winapi.c 2012-07-27 00:36:21.000000000 +0000 @@ -44,12 +44,6 @@ t_OpenEncryptedFileRawA p_OpenEncryptedFileRawA = NULL; t_OpenEncryptedFileRawW p_OpenEncryptedFileRawW = NULL; -t_CloseEncryptedFileRawA p_CloseEncryptedFileRawA = NULL; -t_CloseEncryptedFileRawW p_CloseEncryptedFileRawW = NULL; -t_ReadEncryptedFileRawA p_ReadEncryptedFileRawA = NULL; -t_ReadEncryptedFileRawW p_ReadEncryptedFileRawW = NULL; -t_WriteEncryptedFileRawA p_WriteEncryptedFileRawA = NULL; -t_WriteEncryptedFileRawW p_WriteEncryptedFileRawW = NULL; t_wunlink p_wunlink = NULL; t_wmkdir p_wmkdir = NULL; @@ -115,11 +109,6 @@ p_CreateFileA = (t_CreateFileA)GetProcAddress(hLib, "CreateFileA"); p_CreateDirectoryA = (t_CreateDirectoryA)GetProcAddress(hLib, "CreateDirectoryA"); - p_OpenEncryptedFileRawA = (t_OpenEncryptedFileRawA)GetProcAddress(hLib, "OpenEncryptedFileRawA"); - p_CloseEncryptedFileRawA = (t_CloseEncryptedFileRawA)GetProcAddress(hLib, "CloseEncryptedFileRawA"); - p_ReadEncryptedFileRawA = (t_ReadEncryptedFileRawA)GetProcAddress(hLib, "ReadEncryptedFileRawA"); - p_WriteEncryptedFileRawA = (t_WriteEncryptedFileRawA)GetProcAddress(hLib, "WriteEncryptedFileRawA"); - /* attribute calls */ p_GetFileAttributesA = (t_GetFileAttributesA)GetProcAddress(hLib, "GetFileAttributesA"); p_GetFileAttributesExA = (t_GetFileAttributesExA)GetProcAddress(hLib, "GetFileAttributesExA"); @@ -151,15 +140,6 @@ p_CreateDirectoryW = (t_CreateDirectoryW) GetProcAddress(hLib, "CreateDirectoryW"); - p_OpenEncryptedFileRawW = (t_OpenEncryptedFileRawW) - GetProcAddress(hLib, "OpenEncryptedFileRawW"); - p_CloseEncryptedFileRawW = (t_CloseEncryptedFileRawW) - GetProcAddress(hLib, "CloseEncryptedFileRawW"); - p_ReadEncryptedFileRawW = (t_ReadEncryptedFileRawW) - GetProcAddress(hLib, "ReadEncryptedFileRawW"); - p_WriteEncryptedFileRawW = (t_WriteEncryptedFileRawW) - GetProcAddress(hLib, "WriteEncryptedFileRawW"); - /* backup calls */ p_BackupRead = (t_BackupRead)GetProcAddress(hLib, "BackupRead"); p_BackupWrite = (t_BackupWrite)GetProcAddress(hLib, "BackupWrite"); @@ -210,6 +190,11 @@ GetProcAddress(hLib, "AdjustTokenPrivileges"); p_LookupPrivilegeValue = (t_LookupPrivilegeValue) GetProcAddress(hLib, "LookupPrivilegeValueA"); + + p_OpenEncryptedFileRawA = (t_OpenEncryptedFileRawA) + GetProcAddress(hLib, "OpenEncryptedFileRawA"); + p_OpenEncryptedFileRawW = (t_OpenEncryptedFileRawW) + GetProcAddress(hLib, "OpenEncryptedFileRawW"); } } diff -Nru burp-1.3.0+20120214git/src/win32/installer/ConfigPage2.ini burp-1.3.10/src/win32/installer/ConfigPage2.ini --- burp-1.3.0+20120214git/src/win32/installer/ConfigPage2.ini 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/win32/installer/ConfigPage2.ini 2012-07-27 00:36:21.000000000 +0000 @@ -19,7 +19,7 @@ [Field 3] Type=Label -Text=Enter the poll frequency in minutes. +Text=Enter the poll frequency in minutes. '0' skips installation of the scheduled task. Left=0 Right=-1 Top=15 diff -Nru burp-1.3.0+20120214git/src/win32/installer/winburp.nsi burp-1.3.10/src/win32/installer/winburp.nsi --- burp-1.3.0+20120214git/src/win32/installer/winburp.nsi 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/win32/installer/winburp.nsi 2012-07-27 00:36:21.000000000 +0000 @@ -179,7 +179,7 @@ StrCpy $ConfigClientInstallService "$OptService" StrCpy $ConfigClientStartService "$OptStart" - StrCpy $ConfigServerAddress "10.253.0.100" + StrCpy $ConfigServerAddress "10.0.0.1" StrCpy $ConfigServerPort "4971" StrCpy $ConfigClientName "clientname" StrCpy $ConfigPassword "password" @@ -190,6 +190,8 @@ File "/oname=$PLUGINSDIR\libeay32.dll" "${SRC_DIR}\libeay32.dll" File "/oname=$PLUGINSDIR\ssleay32.dll" "${SRC_DIR}\ssleay32.dll" + File "/oname=$PLUGINSDIR\libpcre-1.dll" "${SRC_DIR}\libpcre-1.dll" + File "/oname=$PLUGINSDIR\libpcreposix-0.dll" "${SRC_DIR}\libpcreposix-0.dll" !InsertMacro MUI_INSTALLOPTIONS_EXTRACT "ConfigPage1.ini" !InsertMacro MUI_INSTALLOPTIONS_EXTRACT "ConfigPage2.ini" @@ -235,11 +237,17 @@ File "${SRC_DIR}\libeay32.dll" File "${SRC_DIR}\ssleay32.dll" + File "${SRC_DIR}\libpcreposix-0.dll" + File "${SRC_DIR}\libpcre-1.dll" File "${SRC_DIR}\zlib1.dll" File "${SRC_DIR}\libgcc_s_sjlj-1.dll" File "${SRC_DIR}\burp.dll" + File "${SRC_DIR}\openssl.exe" + + File "${SRC_DIR}\burp_ca.bat" + StrCpy $CommonFilesDone 1 ${EndIf} FunctionEnd @@ -267,19 +275,10 @@ CreateDirectory "$INSTDIR" CreateDirectory "$INSTDIR\bin" - CreateDirectory "$APPDATA\Burp" - CreateDirectory "$APPDATA\Burp\Work" - CreateDirectory "$APPDATA\Burp\Spool" + CreateDirectory "$INSTDIR\CA" SetOutPath "$INSTDIR" - IfFileExists $INSTDIR\ssl_cert-client.pem endssl_cert - File "..\..\..\configs\certs\ssl_cert-client.pem" -endssl_cert: - IfFileExists $INSTDIR\ssl_cert_ca.pem endssl_cert_ca - File "..\..\..\configs\certs\ssl_cert_ca.pem" -endssl_cert_ca: - IfFileExists $INSTDIR\burp.conf end FileOpen $R1 $INSTDIR\burp.conf w @@ -309,10 +308,13 @@ ${EndIf} FileWrite $R1 "nobackup = .nobackup$\r$\n" FileWrite $R1 "lockfile = C:/Program Files/Burp/lockfile$\r$\n" - FileWrite $R1 "ssl_cert = C:/Program Files/Burp/ssl_cert-client.pem$\r$\n" + FileWrite $R1 "ca_burp_ca = C:/Program Files/Burp/bin/burp_ca.bat$\r$\n" + FileWrite $R1 "ca_csr_dir = C:/Program Files/Burp/CA$\r$\n" FileWrite $R1 "ssl_cert_ca = C:/Program Files/Burp/ssl_cert_ca.pem$\r$\n" + FileWrite $R1 "ssl_cert = C:/Program Files/Burp/ssl_cert-client.pem$\r$\n" + FileWrite $R1 "ssl_key = C:/Program Files/Burp/ssl_cert-client.key$\r$\n" FileWrite $R1 "ssl_key_password = password$\r$\n" - FileWrite $R1 "ssl_peer_cn = grkeserver$\r$\n" + FileWrite $R1 "ssl_peer_cn = burpserver$\r$\n" !if "${BITS}" == "32" FileWrite $R1 "autoupgrade_os = win32$\r$\n" !endif @@ -328,6 +330,10 @@ FileClose $R1 + ${If} $ConfigPoll != 0 + nsExec::ExecToLog 'schtasks /CREATE /RU SYSTEM /TN "burp cron" /TR "\"C:\Program Files\Burp\bin\burp.exe\" -a t" /SC MINUTE /MO $ConfigPoll' + ${EndIf} + end: DetailPrint "$INSTDIR\burp.conf already exists. Not overwriting." @@ -347,15 +353,6 @@ Section "-Finish" Push $R0 - ${If} $OsIsNT = 1 - nsExec::ExecToLog 'cmd.exe /C echo Y|cacls "$INSTDIR" /T /G SYSTEM:F Administrators:F' - nsExec::ExecToLog 'cmd.exe /C echo Y|cacls "$APPDATA\Burp" /T /G SYSTEM:F Administrators:F' - ${EndIf} - - ${If} $ConfigPoll != 0 - nsExec::ExecToLog 'schtasks /CREATE /RU SYSTEM /TN "burp cron" /TR "\"C:\Program Files\Burp\bin\burp.exe\" -a t" /SC MINUTE /MO $ConfigPoll' - ${EndIf} - ; Write the uninstall keys for Windows & create Start Menu entry WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Burp" "DisplayName" "Burp" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Burp" "InstallLocation" "$INSTDIR" @@ -426,7 +423,7 @@ nsExec::Exec 'schtasks /DELETE /TN "burp cron" /F' Delete /REBOOTOK "$PLUGINSDIR\burp*.conf" -; Delete /REBOOTOK "$PLUGINSDIR\openssl.exe" + Delete /REBOOTOK "$PLUGINSDIR\openssl.exe" Delete /REBOOTOK "$PLUGINSDIR\libeay32.dll" Delete /REBOOTOK "$PLUGINSDIR\ssleay32.dll" diff -Nru burp-1.3.0+20120214git/src/win32/lib/burp32.def burp-1.3.10/src/win32/lib/burp32.def --- burp-1.3.0+20120214git/src/win32/lib/burp32.def 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/win32/lib/burp32.def 2012-07-27 00:36:21.000000000 +0000 @@ -2,6 +2,7 @@ EXPORTS ; compat.o +_Z11win32_utimePKcP7utimbuf _Z11strncasecmpPKcS0_i _Z11win32_cgetsPci _Z11win32_chdirPKc diff -Nru burp-1.3.0+20120214git/src/win32/lib/burp64.def burp-1.3.10/src/win32/lib/burp64.def --- burp-1.3.0+20120214git/src/win32/lib/burp64.def 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/win32/lib/burp64.def 2012-07-27 00:36:21.000000000 +0000 @@ -2,6 +2,7 @@ EXPORTS ; compat.o +_Z11win32_utimePKcP7utimbuf _Z11strncasecmpPKcS0_i _Z11win32_cgetsPci _Z11win32_chdirPKc diff -Nru burp-1.3.0+20120214git/src/win32/winapi.h burp-1.3.10/src/win32/winapi.h --- burp-1.3.0+20120214git/src/win32/winapi.h 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/src/win32/winapi.h 2012-07-27 00:36:21.000000000 +0000 @@ -65,13 +65,7 @@ typedef DWORD (WINAPI *PFE_IMPORT_FUNC)(PBYTE pbData,PVOID pvCallbackContext,PULONG ulLength); typedef DWORD (WINAPI * t_OpenEncryptedFileRawA)(LPCSTR, ULONG, PVOID); -typedef DWORD (WINAPI * t_OpenEncryptedFileRawW)(LPCSTR, ULONG, PVOID); -typedef void (WINAPI * t_CloseEncryptedFileRawA)(PVOID); -typedef void (WINAPI * t_CloseEncryptedFileRawW)(PVOID); -typedef DWORD (WINAPI * t_ReadEncryptedFileRawA)(PFE_EXPORT_FUNC, PVOID, PVOID); -typedef DWORD (WINAPI * t_ReadEncryptedFileRawW)(PFE_EXPORT_FUNC, PVOID, PVOID); -typedef DWORD (WINAPI * t_WriteEncryptedFileRawA)(PFE_IMPORT_FUNC, PVOID, PVOID); -typedef DWORD (WINAPI * t_WriteEncryptedFileRawW)(PFE_IMPORT_FUNC, PVOID, PVOID); +typedef DWORD (WINAPI * t_OpenEncryptedFileRawW)(LPCWSTR, ULONG, PVOID); typedef HANDLE (WINAPI * t_CreateFileA) (LPCSTR, DWORD ,DWORD, LPSECURITY_ATTRIBUTES, DWORD , DWORD, HANDLE); @@ -134,12 +128,6 @@ extern t_OpenEncryptedFileRawA DLL_IMP_EXP p_OpenEncryptedFileRawA; extern t_OpenEncryptedFileRawW DLL_IMP_EXP p_OpenEncryptedFileRawW; -extern t_CloseEncryptedFileRawA DLL_IMP_EXP p_CloseEncryptedFileRawA; -extern t_CloseEncryptedFileRawW DLL_IMP_EXP p_CloseEncryptedFileRawW; -extern t_ReadEncryptedFileRawA DLL_IMP_EXP p_ReadEncryptedFileRawA; -extern t_ReadEncryptedFileRawW DLL_IMP_EXP p_ReadEncryptedFileRawW; -extern t_WriteEncryptedFileRawA DLL_IMP_EXP p_WriteEncryptedFileRawA; -extern t_WriteEncryptedFileRawW DLL_IMP_EXP p_WriteEncryptedFileRawW; extern t_GetFileAttributesA DLL_IMP_EXP p_GetFileAttributesA; extern t_GetFileAttributesW DLL_IMP_EXP p_GetFileAttributesW; diff -Nru burp-1.3.0+20120214git/test/run_test burp-1.3.10/test/run_test --- burp-1.3.0+20120214git/test/run_test 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/test/run_test 2012-07-27 00:36:21.000000000 +0000 @@ -74,9 +74,14 @@ # target. makedir "$target" cdir "$build" + make clean #./configure --prefix="$target" --datarootdir="$target"/usr/share --sysconfdir="$target"/etc/burp || fail "configure failed" ./configure || fail "configure failed" make || fail "make failed" + # For some reason, make is not returning an error code. + # Look for important binaries before carrying on. + [ -f src/burp ] || fail "make failed" + [ -f src/bedup ] || fail "make failed" make install DESTDIR="$target" || fail "make install failed" } @@ -94,7 +99,7 @@ run_bedup() { echo "Starting test bedup" - ./sbin/bedup -c $serverconf -l >> "$beduplog" 2>&1 \ + ./usr/sbin/bedup -c $serverconf -l >> "$beduplog" 2>&1 \ || fail "bedup returned $?" } @@ -106,14 +111,15 @@ SLEEPTIME=2 echo "Starting test client backup" - ./sbin/burp -c $clientconf -a b >> "$clientlog" 2>&1 \ + ./usr/sbin/burp -c $clientconf -a b >> "$clientlog" 2>&1 \ || fail "client backup returned $?" # Repeatedly check to see whether the server has finished, rather # than just sleeping some length of time. while true ; do sleep $SLEEPTIME - [ ! -e "$working" -a ! -e "$finishing" ] && break + [ ! -e "$working" -a ! -e "$finishing" ] \ + && sleep $SLEEPTIME && break waited=$((waited+$SLEEPTIME)) [ "$waited" -gt 120 ] && \ fail "client backup seemed to be complete after 2 minutes" @@ -124,8 +130,8 @@ { local num="$1" echo "Starting test client verify of backup $num" - ./sbin/burp -c $clientconf -a v -b "$num" \ - >> "$clientlog" 2>&1 || fail "client backup returned $?" + ./usr/sbin/burp -c $clientconf -a v -b "$num" \ + >> "$clientlog" 2>&1 || fail "client verify returned $?" } run_restore() @@ -134,7 +140,7 @@ local dir="$2" echo "Starting test client restore of backup $num" makedir "$dir" - ./sbin/burp -c $clientconf -a r -b "$num" -d "$dir" \ + ./usr/sbin/burp -c $clientconf -a r -b "$num" -d "$dir" \ >>"$clientlog" 2>&1 || fail "client restore returned $?" } @@ -252,6 +258,28 @@ echo "include = $includedir" >> $clientconf } +include_ext_off() +{ + sed_rep 's/^include_ext = c//g' $clientconf +} + +include_ext_on() +{ + include_ext_off + echo "include_ext = c" >> $clientconf +} + +exclude_ext_off() +{ + sed_rep 's/^exclude_ext = c//g' $clientconf +} + +exclude_ext_on() +{ + exclude_ext_off + echo "exclude_ext = c" >> $clientconf +} + normal_settings() { compression_on @@ -260,6 +288,8 @@ min_file_size_off exclude_off include_on + include_ext_off + exclude_ext_off } build_and_install @@ -270,9 +300,10 @@ # Tweak the example configuration files by removing the leading '/' from all # the paths, and changing the port numbers. -sed_rep_both 's/= \//= /g' +sed_rep_both "s#= /#= $target/#g" sed_rep_both 's/port = 4971/port = 4998/g' sed_rep_both 's/port = 4972/port = 4999/g' +sed_rep "s#^CA_DIR.*#CA_DIR = $target/etc/burp/CA#g" "$target/etc/burp/CA.cnf" echo echo "Starting tests" @@ -285,9 +316,14 @@ echo "$target/var/spool/burp/testclient/" echo +echo "Initialising server certificate authority" +# Need to do this outside of the server, because it might take a long time. +./usr/sbin/burp -c "$serverconf" -g >> "$serveroutputlog" 2>&1 || fail "Initialising server certificate authority failed" +echo + # Start up the server echo "Starting test server" -./sbin/burp -c $serverconf -l "$serversystemlog" -F >> "$serveroutputlog" 2>&1 & +./usr/sbin/burp -c "$serverconf" -l "$serversystemlog" -F >> "$serveroutputlog" 2>&1 & serverpid=$! # Be kind, and wait a little for it to start. @@ -436,10 +472,34 @@ run_backup run_verify all run_restore 10 "$restoredir"10 -[ -d "$restoredir"10/$excludedir ] && fail "$excludedir should not have been restored! -[ ! -d "$restoredir"10/$includedir ] && fail "$includedir should have been restored! +[ -d "$restoredir"10/$excludedir ] && fail "$excludedir should not have been restored!" +[ ! -d "$restoredir"10/$includedir ] && fail "$includedir should have been restored!" end_test 10 +# ----- Test 11 ----- +start_test 11 "Exclude extension, backup/restore comparison" +normal_settings +exclude_ext_on +run_backup +run_verify all +run_restore 11 "$restoredir"11 +f=$(find "$restoredir"11 -type f -name '*.c') +[ -n "$f" ] && fail "$restoredir11 should not contain any '.c' files" +end_test 11 + +# ----- Test 12 ----- +start_test 12 "Include extension, backup/restore comparison" +normal_settings +include_ext_on +run_backup +run_verify all +run_restore 12 "$restoredir"12 +f=$(find "$restoredir"12 -type f -name '*.h') +[ -n "$f" ] && fail "$restoredir12 should not contain any '.h' files" +f=$(find "$restoredir"12 -type f -name '*.c') +[ -z "$f" ] && fail "$restoredir12 should contain '.c' files" +end_test 12 + echo echo "All tests succeeded" echo diff -Nru burp-1.3.0+20120214git/uthash/README burp-1.3.10/uthash/README --- burp-1.3.0+20120214git/uthash/README 1970-01-01 00:00:00.000000000 +0000 +++ burp-1.3.10/uthash/README 2012-07-27 00:36:21.000000000 +0000 @@ -0,0 +1,6 @@ +Some distributions (debian, ubuntu) include a uthash-dev package. +I believe that some don't (redhat, suse). +The configure script will detect if there is a uthash.h already installed +(it will probably be in /usr/include). +If there is, the installed one will be used. If there isn't, the uthash.h +included in the burp source will be used. diff -Nru burp-1.3.0+20120214git/uthash/uthash.h burp-1.3.10/uthash/uthash.h --- burp-1.3.0+20120214git/uthash/uthash.h 1970-01-01 00:00:00.000000000 +0000 +++ burp-1.3.10/uthash/uthash.h 2012-07-27 00:36:21.000000000 +0000 @@ -0,0 +1,927 @@ +/* +Copyright (c) 2003-2009, Troy D. Hanson http://uthash.sourceforge.net +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifndef UTHASH_H +#define UTHASH_H + +#include /* memcmp,strlen */ +#include /* ptrdiff_t */ +#include /* uint32_t etc */ + +#define UTHASH_VERSION 1.8 + +/* C++ requires extra stringent casting */ +#if defined __cplusplus +#define TYPEOF(x) (typeof(x)) +#else +#define TYPEOF(x) +#endif + + +#define uthash_fatal(msg) exit(-1) /* fatal error (out of memory,etc) */ +#define uthash_malloc(sz) malloc(sz) /* malloc fcn */ +#define uthash_free(ptr) free(ptr) /* free fcn */ + +#define uthash_noexpand_fyi(tbl) /* can be defined to log noexpand */ +#define uthash_expand_fyi(tbl) /* can be defined to log expands */ + +/* initial number of buckets */ +#define HASH_INITIAL_NUM_BUCKETS 32 /* initial number of buckets */ +#define HASH_INITIAL_NUM_BUCKETS_LOG2 5 /* lg2 of initial number of buckets */ +#define HASH_BKT_CAPACITY_THRESH 10 /* expand when bucket count reaches */ + +/* calculate the element whose hash handle address is hhe */ +#define ELMT_FROM_HH(tbl,hhp) ((void*)(((char*)hhp) - (tbl)->hho)) + +#define HASH_FIND(hh,head,keyptr,keylen,out) \ +do { \ + unsigned _hf_bkt,_hf_hashv; \ + out=TYPEOF(out)NULL; \ + if (head) { \ + HASH_FCN(keyptr,keylen, (head)->hh.tbl->num_buckets, _hf_hashv, _hf_bkt); \ + if (HASH_BLOOM_TEST((head)->hh.tbl, _hf_hashv)) { \ + HASH_FIND_IN_BKT((head)->hh.tbl, hh, (head)->hh.tbl->buckets[ _hf_bkt ], \ + keyptr,keylen,out); \ + } \ + } \ +} while (0) + +#ifdef HASH_BLOOM +#define HASH_BLOOM_BITLEN (1ULL << HASH_BLOOM) +#define HASH_BLOOM_BYTELEN (HASH_BLOOM_BITLEN/8) + ((HASH_BLOOM_BITLEN%8) ? 1:0) +#define HASH_BLOOM_MAKE(tbl) \ +do { \ + (tbl)->bloom_nbits = HASH_BLOOM; \ + (tbl)->bloom_bv = (uint8_t*)uthash_malloc(HASH_BLOOM_BYTELEN); \ + if (!((tbl)->bloom_bv)) { uthash_fatal( "out of memory"); } \ + memset((tbl)->bloom_bv, 0, HASH_BLOOM_BYTELEN); \ + (tbl)->bloom_sig = HASH_BLOOM_SIGNATURE; \ +} while (0); + +#define HASH_BLOOM_FREE(tbl) \ +do { \ + uthash_free((tbl)->bloom_bv); \ +} while (0); + +#define HASH_BLOOM_BITSET(bv,idx) (bv[(idx)/8] |= (1U << ((idx)%8))) +#define HASH_BLOOM_BITTEST(bv,idx) (bv[(idx)/8] & (1U << ((idx)%8))) + +#define HASH_BLOOM_ADD(tbl,hashv) \ + HASH_BLOOM_BITSET((tbl)->bloom_bv, (hashv & (uint32_t)((1ULL << (tbl)->bloom_nbits) - 1))) + +#define HASH_BLOOM_TEST(tbl,hashv) \ + HASH_BLOOM_BITTEST((tbl)->bloom_bv, (hashv & (uint32_t)((1ULL << (tbl)->bloom_nbits) - 1))) + +#else +#define HASH_BLOOM_MAKE(tbl) +#define HASH_BLOOM_FREE(tbl) +#define HASH_BLOOM_ADD(tbl,hashv) +#define HASH_BLOOM_TEST(tbl,hashv) (1) +#endif + +#define HASH_MAKE_TABLE(hh,head) \ +do { \ + (head)->hh.tbl = (UT_hash_table*)uthash_malloc( \ + sizeof(UT_hash_table)); \ + if (!((head)->hh.tbl)) { uthash_fatal( "out of memory"); } \ + memset((head)->hh.tbl, 0, sizeof(UT_hash_table)); \ + (head)->hh.tbl->tail = &((head)->hh); \ + (head)->hh.tbl->num_buckets = HASH_INITIAL_NUM_BUCKETS; \ + (head)->hh.tbl->log2_num_buckets = HASH_INITIAL_NUM_BUCKETS_LOG2; \ + (head)->hh.tbl->hho = (char*)(&(head)->hh) - (char*)(head); \ + (head)->hh.tbl->buckets = (UT_hash_bucket*)uthash_malloc( \ + HASH_INITIAL_NUM_BUCKETS*sizeof(struct UT_hash_bucket)); \ + if (! (head)->hh.tbl->buckets) { uthash_fatal( "out of memory"); } \ + memset((head)->hh.tbl->buckets, 0, \ + HASH_INITIAL_NUM_BUCKETS*sizeof(struct UT_hash_bucket)); \ + HASH_BLOOM_MAKE((head)->hh.tbl); \ + (head)->hh.tbl->signature = HASH_SIGNATURE; \ +} while(0) + +#define HASH_ADD(hh,head,fieldname,keylen_in,add) \ + HASH_ADD_KEYPTR(hh,head,&add->fieldname,keylen_in,add) + +#define HASH_ADD_KEYPTR(hh,head,keyptr,keylen_in,add) \ +do { \ + unsigned _ha_bkt; \ + (add)->hh.next = NULL; \ + (add)->hh.key = (char*)keyptr; \ + (add)->hh.keylen = keylen_in; \ + if (!(head)) { \ + head = (add); \ + (head)->hh.prev = NULL; \ + HASH_MAKE_TABLE(hh,head); \ + } else { \ + (head)->hh.tbl->tail->next = (add); \ + (add)->hh.prev = ELMT_FROM_HH((head)->hh.tbl, (head)->hh.tbl->tail); \ + (head)->hh.tbl->tail = &((add)->hh); \ + } \ + (head)->hh.tbl->num_items++; \ + (add)->hh.tbl = (head)->hh.tbl; \ + HASH_FCN(keyptr,keylen_in, (head)->hh.tbl->num_buckets, \ + (add)->hh.hashv, _ha_bkt); \ + HASH_ADD_TO_BKT((head)->hh.tbl->buckets[_ha_bkt],&(add)->hh); \ + HASH_BLOOM_ADD((head)->hh.tbl,(add)->hh.hashv); \ + HASH_EMIT_KEY(hh,head,keyptr,keylen_in); \ + HASH_FSCK(hh,head); \ +} while(0) + +#define HASH_TO_BKT( hashv, num_bkts, bkt ) \ +do { \ + bkt = ((hashv) & ((num_bkts) - 1)); \ +} while(0) + +/* delete "delptr" from the hash table. + * "the usual" patch-up process for the app-order doubly-linked-list. + * The use of _hd_hh_del below deserves special explanation. + * These used to be expressed using (delptr) but that led to a bug + * if someone used the same symbol for the head and deletee, like + * HASH_DELETE(hh,users,users); + * We want that to work, but by changing the head (users) below + * we were forfeiting our ability to further refer to the deletee (users) + * in the patch-up process. Solution: use scratch space in the table to + * copy the deletee pointer, then the latter references are via that + * scratch pointer rather than through the repointed (users) symbol. + */ +#define HASH_DELETE(hh,head,delptr) \ +do { \ + unsigned _hd_bkt; \ + struct UT_hash_handle *_hd_hh_del; \ + if ( ((delptr)->hh.prev == NULL) && ((delptr)->hh.next == NULL) ) { \ + uthash_free((head)->hh.tbl->buckets ); \ + HASH_BLOOM_FREE((head)->hh.tbl); \ + uthash_free((head)->hh.tbl); \ + head = NULL; \ + } else { \ + _hd_hh_del = &((delptr)->hh); \ + if ((delptr) == ELMT_FROM_HH((head)->hh.tbl,(head)->hh.tbl->tail)) { \ + (head)->hh.tbl->tail = \ + (UT_hash_handle*)((char*)((delptr)->hh.prev) + \ + (head)->hh.tbl->hho); \ + } \ + if ((delptr)->hh.prev) { \ + ((UT_hash_handle*)((char*)((delptr)->hh.prev) + \ + (head)->hh.tbl->hho))->next = (delptr)->hh.next; \ + } else { \ + head = TYPEOF(head)((delptr)->hh.next); \ + } \ + if (_hd_hh_del->next) { \ + ((UT_hash_handle*)((char*)_hd_hh_del->next + \ + (head)->hh.tbl->hho))->prev = \ + _hd_hh_del->prev; \ + } \ + HASH_TO_BKT( _hd_hh_del->hashv, (head)->hh.tbl->num_buckets, _hd_bkt); \ + HASH_DEL_IN_BKT(hh,(head)->hh.tbl->buckets[_hd_bkt], _hd_hh_del); \ + (head)->hh.tbl->num_items--; \ + } \ + HASH_FSCK(hh,head); \ +} while (0) + + +/* convenience forms of HASH_FIND/HASH_ADD/HASH_DEL */ +#define HASH_FIND_STR(head,findstr,out) \ + HASH_FIND(hh,head,findstr,strlen(findstr),out) +#define HASH_ADD_STR(head,strfield,add) \ + HASH_ADD(hh,head,strfield,strlen(add->strfield),add) +#define HASH_FIND_INT(head,findint,out) \ + HASH_FIND(hh,head,findint,sizeof(int),out) +#define HASH_ADD_INT(head,intfield,add) \ + HASH_ADD(hh,head,intfield,sizeof(int),add) +#define HASH_DEL(head,delptr) \ + HASH_DELETE(hh,head,delptr) + +/* HASH_FSCK checks hash integrity on every add/delete when HASH_DEBUG is defined. + * This is for uthash developer only; it compiles away if HASH_DEBUG isn't defined. + */ +#ifdef HASH_DEBUG +#define HASH_OOPS(...) do { fprintf(stderr,__VA_ARGS__); exit(-1); } while (0) +#define HASH_FSCK(hh,head) \ +do { \ + unsigned _bkt_i; \ + unsigned _count, _bkt_count; \ + char *_prev; \ + struct UT_hash_handle *_thh; \ + if (head) { \ + _count = 0; \ + for( _bkt_i = 0; _bkt_i < (head)->hh.tbl->num_buckets; _bkt_i++) { \ + _bkt_count = 0; \ + _thh = (head)->hh.tbl->buckets[_bkt_i].hh_head; \ + _prev = NULL; \ + while (_thh) { \ + if (_prev != (char*)(_thh->hh_prev)) { \ + HASH_OOPS("invalid hh_prev %p, actual %p\n", \ + _thh->hh_prev, _prev ); \ + } \ + _bkt_count++; \ + _prev = (char*)(_thh); \ + _thh = _thh->hh_next; \ + } \ + _count += _bkt_count; \ + if ((head)->hh.tbl->buckets[_bkt_i].count != _bkt_count) { \ + HASH_OOPS("invalid bucket count %d, actual %d\n", \ + (head)->hh.tbl->buckets[_bkt_i].count, _bkt_count); \ + } \ + } \ + if (_count != (head)->hh.tbl->num_items) { \ + HASH_OOPS("invalid hh item count %d, actual %d\n", \ + (head)->hh.tbl->num_items, _count ); \ + } \ + /* traverse hh in app order; check next/prev integrity, count */ \ + _count = 0; \ + _prev = NULL; \ + _thh = &(head)->hh; \ + while (_thh) { \ + _count++; \ + if (_prev !=(char*)(_thh->prev)) { \ + HASH_OOPS("invalid prev %p, actual %p\n", \ + _thh->prev, _prev ); \ + } \ + _prev = (char*)ELMT_FROM_HH((head)->hh.tbl, _thh); \ + _thh = ( _thh->next ? (UT_hash_handle*)((char*)(_thh->next) + \ + (head)->hh.tbl->hho) : NULL ); \ + } \ + if (_count != (head)->hh.tbl->num_items) { \ + HASH_OOPS("invalid app item count %d, actual %d\n", \ + (head)->hh.tbl->num_items, _count ); \ + } \ + } \ +} while (0) +#else +#define HASH_FSCK(hh,head) +#endif + +/* When compiled with -DHASH_EMIT_KEYS, length-prefixed keys are emitted to + * the descriptor to which this macro is defined for tuning the hash function. + * The app can #include to get the prototype for write(2). */ +#ifdef HASH_EMIT_KEYS +#define HASH_EMIT_KEY(hh,head,keyptr,fieldlen) \ +do { \ + unsigned _klen = fieldlen; \ + write(HASH_EMIT_KEYS, &_klen, sizeof(_klen)); \ + write(HASH_EMIT_KEYS, keyptr, fieldlen); \ +} while (0) +#else +#define HASH_EMIT_KEY(hh,head,keyptr,fieldlen) +#endif + +/* default to Jenkin's hash unless overridden e.g. DHASH_FUNCTION=HASH_SAX */ +#ifdef HASH_FUNCTION +#define HASH_FCN HASH_FUNCTION +#else +#define HASH_FCN HASH_JEN +#endif + +/* The Bernstein hash function, used in Perl prior to v5.6 */ +#define HASH_BER(key,keylen,num_bkts,hashv,bkt) \ +do { \ + unsigned _hb_keylen=keylen; \ + char *_hb_key=(char*)key; \ + (hashv) = 0; \ + while (_hb_keylen--) { (hashv) = ((hashv) * 33) + *_hb_key++; } \ + bkt = (hashv) & (num_bkts-1); \ +} while (0) + + +/* SAX/FNV/OAT/JEN hash functions are macro variants of those listed at + * http://eternallyconfuzzled.com/tuts/algorithms/jsw_tut_hashing.aspx */ +#define HASH_SAX(key,keylen,num_bkts,hashv,bkt) \ +do { \ + unsigned _sx_i; \ + char *_hs_key=(char*)key; \ + hashv = 0; \ + for(_sx_i=0; _sx_i < keylen; _sx_i++) \ + hashv ^= (hashv << 5) + (hashv >> 2) + _hs_key[_sx_i]; \ + bkt = hashv & (num_bkts-1); \ +} while (0) + +#define HASH_FNV(key,keylen,num_bkts,hashv,bkt) \ +do { \ + unsigned _fn_i; \ + char *_hf_key=(char*)key; \ + hashv = 2166136261UL; \ + for(_fn_i=0; _fn_i < keylen; _fn_i++) \ + hashv = (hashv * 16777619) ^ _hf_key[_fn_i]; \ + bkt = hashv & (num_bkts-1); \ +} while(0); + +#define HASH_OAT(key,keylen,num_bkts,hashv,bkt) \ +do { \ + unsigned _ho_i; \ + char *_ho_key=(char*)key; \ + hashv = 0; \ + for(_ho_i=0; _ho_i < keylen; _ho_i++) { \ + hashv += _ho_key[_ho_i]; \ + hashv += (hashv << 10); \ + hashv ^= (hashv >> 6); \ + } \ + hashv += (hashv << 3); \ + hashv ^= (hashv >> 11); \ + hashv += (hashv << 15); \ + bkt = hashv & (num_bkts-1); \ +} while(0) + +#define HASH_JEN_MIX(a,b,c) \ +do { \ + a -= b; a -= c; a ^= ( c >> 13 ); \ + b -= c; b -= a; b ^= ( a << 8 ); \ + c -= a; c -= b; c ^= ( b >> 13 ); \ + a -= b; a -= c; a ^= ( c >> 12 ); \ + b -= c; b -= a; b ^= ( a << 16 ); \ + c -= a; c -= b; c ^= ( b >> 5 ); \ + a -= b; a -= c; a ^= ( c >> 3 ); \ + b -= c; b -= a; b ^= ( a << 10 ); \ + c -= a; c -= b; c ^= ( b >> 15 ); \ +} while (0) + +#define HASH_JEN(key,keylen,num_bkts,hashv,bkt) \ +do { \ + unsigned _hj_i,_hj_j,_hj_k; \ + char *_hj_key=(char*)key; \ + hashv = 0xfeedbeef; \ + _hj_i = _hj_j = 0x9e3779b9; \ + _hj_k = keylen; \ + while (_hj_k >= 12) { \ + _hj_i += (_hj_key[0] + ( (unsigned)_hj_key[1] << 8 ) \ + + ( (unsigned)_hj_key[2] << 16 ) \ + + ( (unsigned)_hj_key[3] << 24 ) ); \ + _hj_j += (_hj_key[4] + ( (unsigned)_hj_key[5] << 8 ) \ + + ( (unsigned)_hj_key[6] << 16 ) \ + + ( (unsigned)_hj_key[7] << 24 ) ); \ + hashv += (_hj_key[8] + ( (unsigned)_hj_key[9] << 8 ) \ + + ( (unsigned)_hj_key[10] << 16 ) \ + + ( (unsigned)_hj_key[11] << 24 ) ); \ + \ + HASH_JEN_MIX(_hj_i, _hj_j, hashv); \ + \ + _hj_key += 12; \ + _hj_k -= 12; \ + } \ + hashv += keylen; \ + switch ( _hj_k ) { \ + case 11: hashv += ( (unsigned)_hj_key[10] << 24 ); \ + case 10: hashv += ( (unsigned)_hj_key[9] << 16 ); \ + case 9: hashv += ( (unsigned)_hj_key[8] << 8 ); \ + case 8: _hj_j += ( (unsigned)_hj_key[7] << 24 ); \ + case 7: _hj_j += ( (unsigned)_hj_key[6] << 16 ); \ + case 6: _hj_j += ( (unsigned)_hj_key[5] << 8 ); \ + case 5: _hj_j += _hj_key[4]; \ + case 4: _hj_i += ( (unsigned)_hj_key[3] << 24 ); \ + case 3: _hj_i += ( (unsigned)_hj_key[2] << 16 ); \ + case 2: _hj_i += ( (unsigned)_hj_key[1] << 8 ); \ + case 1: _hj_i += _hj_key[0]; \ + } \ + HASH_JEN_MIX(_hj_i, _hj_j, hashv); \ + bkt = hashv & (num_bkts-1); \ +} while(0) + +/* The Paul Hsieh hash function */ +#undef get16bits +#if (defined(__GNUC__) && defined(__i386__)) || defined(__WATCOMC__) \ + || defined(_MSC_VER) || defined (__BORLANDC__) || defined (__TURBOC__) +#define get16bits(d) (*((const uint16_t *) (d))) +#endif + +#if !defined (get16bits) +#define get16bits(d) ((((uint32_t)(((const uint8_t *)(d))[1])) << 8) \ + +(uint32_t)(((const uint8_t *)(d))[0]) ) +#endif +#define HASH_SFH(key,keylen,num_bkts,hashv,bkt) \ +do { \ + char *_sfh_key=(char*)key; \ + uint32_t _sfh_tmp, _sfh_len = keylen; \ + \ + int _sfh_rem = _sfh_len & 3; \ + _sfh_len >>= 2; \ + hashv = 0xcafebabe; \ + \ + /* Main loop */ \ + for (;_sfh_len > 0; _sfh_len--) { \ + hashv += get16bits (_sfh_key); \ + _sfh_tmp = (get16bits (_sfh_key+2) << 11) ^ hashv; \ + hashv = (hashv << 16) ^ _sfh_tmp; \ + _sfh_key += 2*sizeof (uint16_t); \ + hashv += hashv >> 11; \ + } \ + \ + /* Handle end cases */ \ + switch (_sfh_rem) { \ + case 3: hashv += get16bits (_sfh_key); \ + hashv ^= hashv << 16; \ + hashv ^= _sfh_key[sizeof (uint16_t)] << 18; \ + hashv += hashv >> 11; \ + break; \ + case 2: hashv += get16bits (_sfh_key); \ + hashv ^= hashv << 11; \ + hashv += hashv >> 17; \ + break; \ + case 1: hashv += *_sfh_key; \ + hashv ^= hashv << 10; \ + hashv += hashv >> 1; \ + } \ + \ + /* Force "avalanching" of final 127 bits */ \ + hashv ^= hashv << 3; \ + hashv += hashv >> 5; \ + hashv ^= hashv << 4; \ + hashv += hashv >> 17; \ + hashv ^= hashv << 25; \ + hashv += hashv >> 6; \ + bkt = hashv & (num_bkts-1); \ +} while(0); + +#ifdef HASH_USING_NO_STRICT_ALIASING +/* The MurmurHash exploits some CPU's (e.g. x86) tolerance for unaligned reads. + * For other types of CPU's (e.g. Sparc) an unaligned read causes a bus error. + * So MurmurHash comes in two versions, the faster unaligned one and the slower + * aligned one. We only use the faster one on CPU's where we know it's safe. + * + * Note the preprocessor built-in defines can be emitted using: + * + * gcc -m64 -dM -E - < /dev/null (on gcc) + * cc -## a.c (where a.c is a simple test file) (Sun Studio) + */ +#if (defined(__i386__) || defined(__x86_64__)) +#define HASH_MUR HASH_MUR_UNALIGNED +#else +#define HASH_MUR HASH_MUR_ALIGNED +#endif + +/* Appleby's MurmurHash fast version for unaligned-tolerant archs like i386 */ +#define HASH_MUR_UNALIGNED(key,keylen,num_bkts,hashv,bkt) \ +do { \ + const unsigned int _mur_m = 0x5bd1e995; \ + const int _mur_r = 24; \ + hashv = 0xcafebabe ^ keylen; \ + char *_mur_key = (char *)key; \ + uint32_t _mur_tmp, _mur_len = keylen; \ + \ + for (;_mur_len >= 4; _mur_len-=4) { \ + _mur_tmp = *(uint32_t *)_mur_key; \ + _mur_tmp *= _mur_m; \ + _mur_tmp ^= _mur_tmp >> _mur_r; \ + _mur_tmp *= _mur_m; \ + hashv *= _mur_m; \ + hashv ^= _mur_tmp; \ + _mur_key += 4; \ + } \ + \ + switch(_mur_len) \ + { \ + case 3: hashv ^= _mur_key[2] << 16; \ + case 2: hashv ^= _mur_key[1] << 8; \ + case 1: hashv ^= _mur_key[0]; \ + hashv *= _mur_m; \ + }; \ + \ + hashv ^= hashv >> 13; \ + hashv *= _mur_m; \ + hashv ^= hashv >> 15; \ + \ + bkt = hashv & (num_bkts-1); \ +} while(0) + +/* Appleby's MurmurHash version for alignment-sensitive archs like Sparc */ +#define HASH_MUR_ALIGNED(key,keylen,num_bkts,hashv,bkt) \ +do { \ + const unsigned int _mur_m = 0x5bd1e995; \ + const int _mur_r = 24; \ + hashv = 0xcafebabe ^ keylen; \ + char *_mur_key = (char *)key; \ + uint32_t _mur_len = keylen; \ + int _mur_align = (int)_mur_key & 3; \ + \ + if (_mur_align && (_mur_len >= 4)) { \ + unsigned _mur_t = 0, _mur_d = 0; \ + switch(_mur_align) { \ + case 1: _mur_t |= _mur_key[2] << 16; \ + case 2: _mur_t |= _mur_key[1] << 8; \ + case 3: _mur_t |= _mur_key[0]; \ + } \ + _mur_t <<= (8 * _mur_align); \ + _mur_key += 4-_mur_align; \ + _mur_len -= 4-_mur_align; \ + int _mur_sl = 8 * (4-_mur_align); \ + int _mur_sr = 8 * _mur_align; \ + \ + for (;_mur_len >= 4; _mur_len-=4) { \ + _mur_d = *(unsigned *)_mur_key; \ + _mur_t = (_mur_t >> _mur_sr) | (_mur_d << _mur_sl); \ + unsigned _mur_k = _mur_t; \ + _mur_k *= _mur_m; \ + _mur_k ^= _mur_k >> _mur_r; \ + _mur_k *= _mur_m; \ + hashv *= _mur_m; \ + hashv ^= _mur_k; \ + _mur_t = _mur_d; \ + _mur_key += 4; \ + } \ + _mur_d = 0; \ + if(_mur_len >= _mur_align) { \ + switch(_mur_align) { \ + case 3: _mur_d |= _mur_key[2] << 16; \ + case 2: _mur_d |= _mur_key[1] << 8; \ + case 1: _mur_d |= _mur_key[0]; \ + } \ + unsigned _mur_k = (_mur_t >> _mur_sr) | (_mur_d << _mur_sl); \ + _mur_k *= _mur_m; \ + _mur_k ^= _mur_k >> _mur_r; \ + _mur_k *= _mur_m; \ + hashv *= _mur_m; \ + hashv ^= _mur_k; \ + _mur_k += _mur_align; \ + _mur_len -= _mur_align; \ + \ + switch(_mur_len) \ + { \ + case 3: hashv ^= _mur_key[2] << 16; \ + case 2: hashv ^= _mur_key[1] << 8; \ + case 1: hashv ^= _mur_key[0]; \ + hashv *= _mur_m; \ + } \ + } else { \ + switch(_mur_len) \ + { \ + case 3: _mur_d ^= _mur_key[2] << 16; \ + case 2: _mur_d ^= _mur_key[1] << 8; \ + case 1: _mur_d ^= _mur_key[0]; \ + case 0: hashv ^= (_mur_t >> _mur_sr) | (_mur_d << _mur_sl); \ + hashv *= _mur_m; \ + } \ + } \ + \ + hashv ^= hashv >> 13; \ + hashv *= _mur_m; \ + hashv ^= hashv >> 15; \ + } else { \ + for (;_mur_len >= 4; _mur_len-=4) { \ + unsigned _mur_k = *(unsigned*)_mur_key; \ + _mur_k *= _mur_m; \ + _mur_k ^= _mur_k >> _mur_r; \ + _mur_k *= _mur_m; \ + hashv *= _mur_m; \ + hashv ^= _mur_k; \ + _mur_key += 4; \ + } \ + switch(_mur_len) \ + { \ + case 3: hashv ^= _mur_key[2] << 16; \ + case 2: hashv ^= _mur_key[1] << 8; \ + case 1: hashv ^= _mur_key[0]; \ + hashv *= _mur_m; \ + } \ + \ + hashv ^= hashv >> 13; \ + hashv *= _mur_m; \ + hashv ^= hashv >> 15; \ + } \ + bkt = hashv & (num_bkts-1); \ +} while(0) +#endif /* HASH_USING_NO_STRICT_ALIASING */ + +/* key comparison function; return 0 if keys equal */ +#define HASH_KEYCMP(a,b,len) memcmp(a,b,len) + +/* iterate over items in a known bucket to find desired item */ +#define HASH_FIND_IN_BKT(tbl,hh,head,keyptr,keylen_in,out) \ +out = TYPEOF(out)((head.hh_head) ? ELMT_FROM_HH(tbl,head.hh_head) : NULL); \ +while (out) { \ + if (out->hh.keylen == keylen_in) { \ + if ((HASH_KEYCMP(out->hh.key,keyptr,keylen_in)) == 0) break; \ + } \ + out= TYPEOF(out)((out->hh.hh_next) ? \ + ELMT_FROM_HH(tbl,out->hh.hh_next) : NULL); \ +} + +/* add an item to a bucket */ +#define HASH_ADD_TO_BKT(head,addhh) \ +do { \ + head.count++; \ + (addhh)->hh_next = head.hh_head; \ + (addhh)->hh_prev = NULL; \ + if (head.hh_head) { (head).hh_head->hh_prev = (addhh); } \ + (head).hh_head=addhh; \ + if (head.count >= ((head.expand_mult+1) * HASH_BKT_CAPACITY_THRESH) \ + && (addhh)->tbl->noexpand != 1) { \ + HASH_EXPAND_BUCKETS((addhh)->tbl); \ + } \ +} while(0) + +/* remove an item from a given bucket */ +#define HASH_DEL_IN_BKT(hh,head,hh_del) \ + (head).count--; \ + if ((head).hh_head == hh_del) { \ + (head).hh_head = hh_del->hh_next; \ + } \ + if (hh_del->hh_prev) { \ + hh_del->hh_prev->hh_next = hh_del->hh_next; \ + } \ + if (hh_del->hh_next) { \ + hh_del->hh_next->hh_prev = hh_del->hh_prev; \ + } + +/* Bucket expansion has the effect of doubling the number of buckets + * and redistributing the items into the new buckets. Ideally the + * items will distribute more or less evenly into the new buckets + * (the extent to which this is true is a measure of the quality of + * the hash function as it applies to the key domain). + * + * With the items distributed into more buckets, the chain length + * (item count) in each bucket is reduced. Thus by expanding buckets + * the hash keeps a bound on the chain length. This bounded chain + * length is the essence of how a hash provides constant time lookup. + * + * The calculation of tbl->ideal_chain_maxlen below deserves some + * explanation. First, keep in mind that we're calculating the ideal + * maximum chain length based on the *new* (doubled) bucket count. + * In fractions this is just n/b (n=number of items,b=new num buckets). + * Since the ideal chain length is an integer, we want to calculate + * ceil(n/b). We don't depend on floating point arithmetic in this + * hash, so to calculate ceil(n/b) with integers we could write + * + * ceil(n/b) = (n/b) + ((n%b)?1:0) + * + * and in fact a previous version of this hash did just that. + * But now we have improved things a bit by recognizing that b is + * always a power of two. We keep its base 2 log handy (call it lb), + * so now we can write this with a bit shift and logical AND: + * + * ceil(n/b) = (n>>lb) + ( (n & (b-1)) ? 1:0) + * + */ +#define HASH_EXPAND_BUCKETS(tbl) \ +do { \ + unsigned _he_bkt; \ + unsigned _he_bkt_i; \ + struct UT_hash_handle *_he_thh, *_he_hh_nxt; \ + UT_hash_bucket *_he_new_buckets, *_he_newbkt; \ + _he_new_buckets = (UT_hash_bucket*)uthash_malloc( \ + 2 * tbl->num_buckets * sizeof(struct UT_hash_bucket)); \ + if (!_he_new_buckets) { uthash_fatal( "out of memory"); } \ + memset(_he_new_buckets, 0, \ + 2 * tbl->num_buckets * sizeof(struct UT_hash_bucket)); \ + tbl->ideal_chain_maxlen = \ + (tbl->num_items >> (tbl->log2_num_buckets+1)) + \ + ((tbl->num_items & ((tbl->num_buckets*2)-1)) ? 1 : 0); \ + tbl->nonideal_items = 0; \ + for(_he_bkt_i = 0; _he_bkt_i < tbl->num_buckets; _he_bkt_i++) \ + { \ + _he_thh = tbl->buckets[ _he_bkt_i ].hh_head; \ + while (_he_thh) { \ + _he_hh_nxt = _he_thh->hh_next; \ + HASH_TO_BKT( _he_thh->hashv, tbl->num_buckets*2, _he_bkt); \ + _he_newbkt = &(_he_new_buckets[ _he_bkt ]); \ + if (++(_he_newbkt->count) > tbl->ideal_chain_maxlen) { \ + tbl->nonideal_items++; \ + _he_newbkt->expand_mult = _he_newbkt->count / \ + tbl->ideal_chain_maxlen; \ + } \ + _he_thh->hh_prev = NULL; \ + _he_thh->hh_next = _he_newbkt->hh_head; \ + if (_he_newbkt->hh_head) _he_newbkt->hh_head->hh_prev = \ + _he_thh; \ + _he_newbkt->hh_head = _he_thh; \ + _he_thh = _he_hh_nxt; \ + } \ + } \ + tbl->num_buckets *= 2; \ + tbl->log2_num_buckets++; \ + uthash_free( tbl->buckets ); \ + tbl->buckets = _he_new_buckets; \ + tbl->ineff_expands = (tbl->nonideal_items > (tbl->num_items >> 1)) ? \ + (tbl->ineff_expands+1) : 0; \ + if (tbl->ineff_expands > 1) { \ + tbl->noexpand=1; \ + uthash_noexpand_fyi(tbl); \ + } \ + uthash_expand_fyi(tbl); \ +} while(0) + + +/* This is an adaptation of Simon Tatham's O(n log(n)) mergesort */ +/* Note that HASH_SORT assumes the hash handle name to be hh. + * HASH_SRT was added to allow the hash handle name to be passed in. */ +#define HASH_SORT(head,cmpfcn) HASH_SRT(hh,head,cmpfcn) +#define HASH_SRT(hh,head,cmpfcn) \ +do { \ + unsigned _hs_i; \ + unsigned _hs_looping,_hs_nmerges,_hs_insize,_hs_psize,_hs_qsize; \ + struct UT_hash_handle *_hs_p, *_hs_q, *_hs_e, *_hs_list, *_hs_tail; \ + if (head) { \ + _hs_insize = 1; \ + _hs_looping = 1; \ + _hs_list = &((head)->hh); \ + while (_hs_looping) { \ + _hs_p = _hs_list; \ + _hs_list = NULL; \ + _hs_tail = NULL; \ + _hs_nmerges = 0; \ + while (_hs_p) { \ + _hs_nmerges++; \ + _hs_q = _hs_p; \ + _hs_psize = 0; \ + for ( _hs_i = 0; _hs_i < _hs_insize; _hs_i++ ) { \ + _hs_psize++; \ + _hs_q = (UT_hash_handle*)((_hs_q->next) ? \ + ((void*)((char*)(_hs_q->next) + \ + (head)->hh.tbl->hho)) : NULL); \ + if (! (_hs_q) ) break; \ + } \ + _hs_qsize = _hs_insize; \ + while ((_hs_psize > 0) || ((_hs_qsize > 0) && _hs_q )) { \ + if (_hs_psize == 0) { \ + _hs_e = _hs_q; \ + _hs_q = (UT_hash_handle*)((_hs_q->next) ? \ + ((void*)((char*)(_hs_q->next) + \ + (head)->hh.tbl->hho)) : NULL); \ + _hs_qsize--; \ + } else if ( (_hs_qsize == 0) || !(_hs_q) ) { \ + _hs_e = _hs_p; \ + _hs_p = (UT_hash_handle*)((_hs_p->next) ? \ + ((void*)((char*)(_hs_p->next) + \ + (head)->hh.tbl->hho)) : NULL); \ + _hs_psize--; \ + } else if (( \ + cmpfcn(TYPEOF(head)(ELMT_FROM_HH((head)->hh.tbl,_hs_p)), \ + TYPEOF(head)(ELMT_FROM_HH((head)->hh.tbl,_hs_q))) \ + ) <= 0) { \ + _hs_e = _hs_p; \ + _hs_p = (UT_hash_handle*)((_hs_p->next) ? \ + ((void*)((char*)(_hs_p->next) + \ + (head)->hh.tbl->hho)) : NULL); \ + _hs_psize--; \ + } else { \ + _hs_e = _hs_q; \ + _hs_q = (UT_hash_handle*)((_hs_q->next) ? \ + ((void*)((char*)(_hs_q->next) + \ + (head)->hh.tbl->hho)) : NULL); \ + _hs_qsize--; \ + } \ + if ( _hs_tail ) { \ + _hs_tail->next = ((_hs_e) ? \ + ELMT_FROM_HH((head)->hh.tbl,_hs_e) : NULL); \ + } else { \ + _hs_list = _hs_e; \ + } \ + _hs_e->prev = ((_hs_tail) ? \ + ELMT_FROM_HH((head)->hh.tbl,_hs_tail) : NULL); \ + _hs_tail = _hs_e; \ + } \ + _hs_p = _hs_q; \ + } \ + _hs_tail->next = NULL; \ + if ( _hs_nmerges <= 1 ) { \ + _hs_looping=0; \ + (head)->hh.tbl->tail = _hs_tail; \ + (head) = TYPEOF(head)ELMT_FROM_HH((head)->hh.tbl, _hs_list); \ + } \ + _hs_insize *= 2; \ + } \ + HASH_FSCK(hh,head); \ + } \ +} while (0) + +/* This function selects items from one hash into another hash. + * The end result is that the selected items have dual presence + * in both hashes. There is no copy of the items made; rather + * they are added into the new hash through a secondary hash + * hash handle that must be present in the structure. */ +#define HASH_SELECT(hh_dst, dst, hh_src, src, cond) \ +do { \ + unsigned _src_bkt, _dst_bkt; \ + void *_last_elt=NULL, *_elt; \ + UT_hash_handle *_src_hh, *_dst_hh, *_last_elt_hh=NULL; \ + ptrdiff_t _dst_hho = ((char*)(&(dst)->hh_dst) - (char*)(dst)); \ + if (src) { \ + for(_src_bkt=0; _src_bkt < (src)->hh_src.tbl->num_buckets; _src_bkt++) { \ + for(_src_hh = (src)->hh_src.tbl->buckets[_src_bkt].hh_head; \ + _src_hh; \ + _src_hh = _src_hh->hh_next) { \ + _elt = ELMT_FROM_HH((src)->hh_src.tbl, _src_hh); \ + if (cond(_elt)) { \ + _dst_hh = (UT_hash_handle*)(((char*)_elt) + _dst_hho); \ + _dst_hh->key = _src_hh->key; \ + _dst_hh->keylen = _src_hh->keylen; \ + _dst_hh->hashv = _src_hh->hashv; \ + _dst_hh->prev = _last_elt; \ + _dst_hh->next = NULL; \ + if (_last_elt_hh) { _last_elt_hh->next = _elt; } \ + if (!dst) { \ + dst = TYPEOF(dst)_elt; \ + HASH_MAKE_TABLE(hh_dst,dst); \ + } else { \ + _dst_hh->tbl = (dst)->hh_dst.tbl; \ + } \ + HASH_TO_BKT(_dst_hh->hashv, _dst_hh->tbl->num_buckets, _dst_bkt); \ + HASH_ADD_TO_BKT(_dst_hh->tbl->buckets[_dst_bkt],_dst_hh); \ + (dst)->hh_dst.tbl->num_items++; \ + _last_elt = _elt; \ + _last_elt_hh = _dst_hh; \ + } \ + } \ + } \ + } \ + HASH_FSCK(hh_dst,dst); \ +} while (0) + +#define HASH_CLEAR(hh,head) \ +do { \ + if (head) { \ + uthash_free((head)->hh.tbl->buckets ); \ + uthash_free((head)->hh.tbl); \ + (head)=NULL; \ + } \ +} while(0) + +/* obtain a count of items in the hash */ +#define HASH_COUNT(head) HASH_CNT(hh,head) +#define HASH_CNT(hh,head) (head?(head->hh.tbl->num_items):0) + +typedef struct UT_hash_bucket { + struct UT_hash_handle *hh_head; + unsigned count; + + /* expand_mult is normally set to 0. In this situation, the max chain length + * threshold is enforced at its default value, HASH_BKT_CAPACITY_THRESH. (If + * the bucket's chain exceeds this length, bucket expansion is triggered). + * However, setting expand_mult to a non-zero value delays bucket expansion + * (that would be triggered by additions to this particular bucket) + * until its chain length reaches a *multiple* of HASH_BKT_CAPACITY_THRESH. + * (The multiplier is simply expand_mult+1). The whole idea of this + * multiplier is to reduce bucket expansions, since they are expensive, in + * situations where we know that a particular bucket tends to be overused. + * It is better to let its chain length grow to a longer yet-still-bounded + * value, than to do an O(n) bucket expansion too often. + */ + unsigned expand_mult; + +} UT_hash_bucket; + +/* random signature used only to find hash tables in external analysis */ +#define HASH_SIGNATURE 0xa0111fe1 +#define HASH_BLOOM_SIGNATURE 0xb12220f2 + +typedef struct UT_hash_table { + UT_hash_bucket *buckets; + unsigned num_buckets, log2_num_buckets; + unsigned num_items; + struct UT_hash_handle *tail; /* tail hh in app order, for fast append */ + ptrdiff_t hho; /* hash handle offset (byte pos of hash handle in element */ + + /* in an ideal situation (all buckets used equally), no bucket would have + * more than ceil(#items/#buckets) items. that's the ideal chain length. */ + unsigned ideal_chain_maxlen; + + /* nonideal_items is the number of items in the hash whose chain position + * exceeds the ideal chain maxlen. these items pay the penalty for an uneven + * hash distribution; reaching them in a chain traversal takes >ideal steps */ + unsigned nonideal_items; + + /* ineffective expands occur when a bucket doubling was performed, but + * afterward, more than half the items in the hash had nonideal chain + * positions. If this happens on two consecutive expansions we inhibit any + * further expansion, as it's not helping; this happens when the hash + * function isn't a good fit for the key domain. When expansion is inhibited + * the hash will still work, albeit no longer in constant time. */ + unsigned ineff_expands, noexpand; + + uint32_t signature; /* used only to find hash tables in external analysis */ +#ifdef HASH_BLOOM + uint32_t bloom_sig; /* used only to test bloom exists in external analysis */ + uint8_t *bloom_bv; + char bloom_nbits; +#endif + +} UT_hash_table; + +typedef struct UT_hash_handle { + struct UT_hash_table *tbl; + void *prev; /* prev element in app order */ + void *next; /* next element in app order */ + struct UT_hash_handle *hh_prev; /* previous hh in bucket order */ + struct UT_hash_handle *hh_next; /* next hh in bucket order */ + void *key; /* ptr to enclosing struct's key */ + unsigned keylen; /* enclosing struct's key len */ + unsigned hashv; /* result of hash-fcn(key) */ +} UT_hash_handle; + +#endif /* UTHASH_H */ diff -Nru burp-1.3.0+20120214git/website/content/about/oldnews.about burp-1.3.10/website/content/about/oldnews.about --- burp-1.3.0+20120214git/website/content/about/oldnews.about 1970-01-01 00:00:00.000000000 +0000 +++ burp-1.3.10/website/content/about/oldnews.about 2012-07-27 00:36:21.000000000 +0000 @@ -0,0 +1,267 @@ +

This page lists old news

+ + + + + + + + + + + +
+
+

+2011-09-09: burp-1.2.0 is released. +

+Changes in burp-1.2.0:
+  * Improvements to the counters and status monitor - remember the phase1
+    scan counters for later phases to use for things like estimated times.
+  * Add 'working_dir_recovery_method = resume' option, which continues a
+    backup from the point it was interrupted.
+  * Add a useful message about options when run with '-h' or '-?'.
+  * Get the client to pass its version to the server. The minimum version the
+    client needs to be is now this release.
+  * Get the server to warn when the client is on a different version.
+  * Put the number of warnings in the subject of the notification emails.
+  * Allow config file location to be changed via configure (Michael Roland's
+    suggestions).
+  * Implement main server process config reload functionality on SIGHUP.
+  * Uncomment the reload lines in the Debian init script.
+  * Add logrotate file for Debian.
+  * Add ability to send a regular snapshot of the status summary screen in an
+        email ("daily backup summary" feature).
+  * Add simple 'exclude_ext =' feature.
+  * Add Windows 7 bare metal restore instructions.
+
+ +

+ +

+2011-09-01: In the UK, a nice half-page review of burp has appeared in the October edition of 'Linux Format' magazine, in their 'Hot Picks' section. + +

+ +

+2011-07-26: burp-1.1.70 is released. +

+Changes in burp-1.1.70:
+  * FreeBSD xattr support.
+  * FreeBSD ACL support.
+  * Handle Windows junction points.
+  * Add 'nobackup = [file name]' option. If this file system entry exists, the
+    directory containing it will not be backed up.
+  * Set librsync signature block size based on the old file size.
+  * Small bug fixes to the status monitor.
+  * Fixed working directory recovery bug where it couldn't find the manifest.gz
+    file due to it being called manifest.gz.tmp.
+  * Get rid of the stupidly complicated 'find_files' callback mechanism
+    inherited from bacula. Just call all the functions directly.
+  * Fix compiler warnings and '-ldl' linker error on FreeBSD 8.2.
+  * When down to 'C:' in mkpath() on Windows restore, strip the ':'.
+  * Run ERR_clear_error() before SSL_read/write.
+
+ +

+ + +

+2011-06-27: burp-1.1.65 is released. +

+Changes in burp-1.1.65:
+  * Add mechanism for backing up and restoring extra meta data.
+  * Linux acl support.
+  * Linux xattr support.
+  * Add option to set the umask on the server.
+  * Added option to specify the clientconfdir password in passwd format.
+  * Allow user and group options to be placed in the server clientconfdir files,
+    so that different client backups can be owned by different users.
+  * Add Patrick's burp_ca patches and README.CA.
+  * Sanitised magic characters by defining them in a new cmd.h file.
+  * Fixed 'ret OK, but zstream not finished: 0' when refusing to restore over
+    existing files.
+  * Fixed bug that made clients disappear from the status monitor.
+  * Bug fix the client_lockdir option.
+  * On the server, be more cautious about creating directories that don't exist.
+  * Remove link kludge in async_read_stat().
+
+ +

+ +

+2011-06-14: burp-1.1.57 is released. +

+Changes in burp-1.1.57:
+  * Add options to run as a different user and group.
+  * Add Patrick Koppen's burp_ca script.
+  * Get the client restore to use the sbuf functions, remove related kludges.
+  * Fix possible client segfault when refusing to restore over existing files.
+  * Make a failure to restore over a busy file not cause the whole restore to
+    fail.
+  * Print byte count as well as human readable byte count in the status summary
+    screen.
+  * Include backup numbers with the backup list in the status summary.
+  * Don't close the server read fd when running in non-forking mode.
+  * Add ssl_key options so that the cert and key can be in separate files.
+  * Add ssl_key_password, a synonym for ssl_cert_password.
+
+ +

+ +

+2011-05-13: burp-1.1.55 is released. +

+Changes in burp-1.1.55:
+  * Make the status monitor use ncurses.
+  * Fixed two bugs that could drastically slow down the server if a file
+    disappeared on a client after the initial scan (to get these two bug fixes,
+    you need to upgrade your clients).
+  * IPv6 patches.
+  * Ability to specify the location of the client lockfiles on the server.
+  * Make the server fork into the background by default. Use '-F' to stay in
+    the foreground.
+  * Add option to specify a log file.
+
+ +

+ +

+2011-04-14: burp-1.1.51 is released. +

+Changes in burp-1.1.51:
+  * Added a script for backing up zfs snapshots with 'zfs send'.
+  * Added the ability to set the level of compression.
+  * Added the ability to turn off compression.
+  * Added an option to define the poll interval in the Windows installer.
+  * Added the ability to turn off librsync delta differencing.
+  * Added the ability to give arguments to backup/restore/pre/post scripts.
+  * Make configure/make work better on Solaris.
+
+ +

+ +

+2011-04-02: burp-1.1.40 is released. +

+Changes in burp-1.1.40:
+  * Ability to run client pre/post backup/restore scripts.
+  * Ability to read data from fifos (and restore to them).
+  * Fixed a bug when restoring the first link in a directory.
+  * Fixed a bug that prevented giving a backup number when using the verify option.
+
+ +

+ +

+2011-03-28: git repository added. + +

+ +

+2011-03-27: burp-1.1.30 is released. +

+Changes in burp-1.1.30:
+  * First pass at having a live status monitor.
+  * Fixed a bug that meant you couldn't restore links.
+  * Fixed a bug when freeing structs at the end of a restore.
+
+ +

+ +

+2011-03-18: burp-1.1.22 is released. +

+Changes in burp-1.1.22:
+  * Added scheduling.
+  * Added email notifications.
+  * Fixed autoconf. Programs like ccache should now work.
+  * Strip whitespace from end of conf lines, ignore quotes around conf lines.
+  * Updated the Windows build tools.
+
+ +

+ +

+2011-03-10: burp-1.1.14 is released. +

+Changes in burp-1.1.14:
+  * Added client-side blowfish file encryption. See the man page for details.
+  * Byte counters also give counts in KB/MB/GB/etc as appropriate.
+  * Restore directories after their contents so that the access times are
+    correct.
+  * Updated the win32 build tools.
+
+ +

+ +

+2011-03-02: burp-1.1.5 is released. +

+Changes in burp-1.1.5:
+  * Added a 'verify' command. See the man page for details.
+  * Improved the include/exclude path functionality.
+  * Added the ability to define mount points to cross.
+  * Fixed a crash on 64bit Windows when exiting.
+
+ +

+ +

+2011-02-27: burp-1.1.0 is released. +

+Changes in burp-1.1.0:
+  * Added openssl.
+  * Added byte counters and checksums to the backup manifest files, in
+    anticipation of a 'verify' command.
+
+    IMPORTANT IF YOU ARE UPGRADING FROM AN OLDER VERSION OF BURP:
+    a) Your previous backups will no longer work, due to changes in the
+    manifest files. You will also need to move old backups aside in order to
+    continue to make new backups.
+    b) Your old config files will need some fields to do with SSL added to them.
+    See the man page and the examples in the 'configs' directory for help.
+
+    IMPORTANT FOR MY ENCOURAGEMENT AND THE FUTURE OF BURP:
+    If you have tried burp, I really want to hear from you to find out what 
+    you like about it, what you don't like, what new features you would like,
+    how you have been using it, whether it has helped you, or anything that
+    you would like to tell me. I am currently working in the dark!
+
+ +

+ +

+2011-02-16: burp-1.0.31 is released. +

+ +

+2011-02-02: burp-1.0.11 is released. +

+ +

+2011-02-02: burp-1.0.10 is released. +

+ +

+2011-01-30: burp-1.0.9 is released. +

+ +

+2011-01-25: burp-1.0.5 is released. +

+

+2011-01-25: mailling list created. +

+

+2011-01-23: burp-1.0.3 is released. +

+

+2011-01-22: burp-1.0.0 is released. +

+

+2011-01-22: Web site created. + +

+ +
diff -Nru burp-1.3.0+20120214git/website/content/html/download.content burp-1.3.10/website/content/html/download.content --- burp-1.3.0+20120214git/website/content/html/download.content 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/website/content/html/download.content 2012-07-27 00:36:21.000000000 +0000 @@ -14,12 +14,21 @@

-Or, if you are very keen there is now a git repository: +Or, if you are very keen, there is a git repository:

 git clone git://github.com/grke/burp.git (read-only)
 

+

+ +Packages are also available in: +

+Debian sid http://packages.debian.org/sid/burp.
+Ubuntu precise http://packages.ubuntu.com/precise/burp.
+
+ +

diff -Nru burp-1.3.0+20120214git/website/content/html/faq.content burp-1.3.10/website/content/html/faq.content --- burp-1.3.0+20120214git/website/content/html/faq.content 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/website/content/html/faq.content 2012-07-27 00:36:21.000000000 +0000 @@ -69,6 +69,8 @@
  • Network rate limiting.
  • Storage data deduplication (in versions > 1.2.2)
  • Automatic client upgrade (for server and client >= 1.3.0) +
  • EFS support on Windows. +
  • Automatic certificate authority and client certificate signing.

    @@ -81,21 +83,7 @@

    -A. The following items are on my TODO list (for the full list so the TODO file -in the top level directory of the source): -

      -
    • Add extra ways of deciding when to delete old backups - e.g, by time, or -by space. -
    • Add acl/xattr support for Solaris. -
    • Server-side file encryption option, so that network deltas can still be - done if you have file encryption turned on. -
    • Improve the status monitor. -
    • Add include/exclude wildcards. -
    • Start thinking about how to make a client-side gui for doing things like - restores. -
    • Get EFS backup/restore working on Windows. -
    • Add a mechanism that can make clients upgrade automatically. -
    +A. For the list of things to do, please see https://github.com/grke/burp/issues.


    @@ -323,6 +311,112 @@

    +
    + +

    + +Q. How does the automatic certificate authority and client certificate signing +work? + +

    + +

    + +A. There is documentation here. + +

    + +
    + +

    + +Q. Can you use librsync to do rsync feature X? + +

    + +

    + +A. No, rsync has nothing to do with librsync other than them both using the +same algorithm. Put another way, rsync does not use librsync. + +

    + +
    + +

    + +Q. What is the purpose of the shuffle operation at the end of the backup? + +

    + +

    + +A. Once all the files and bits of files have been transferred to the server, +it needs to assemble them into the final backup.
    +By default, this includes hardlinking files that haven't changed since the +immediately previous backup into place, patching the ones that have changed +with the new deltas, generating reverse deltas to be able to recreate the +previous files that change, and deleting the files that changed from the +previous backup. +
    +

    + +
    + +

    + +Q. Is there a way to speed up this process? + +

    + +

    + +A. Yes, you can stop it from generating the reverse deltas and deleting the +original files by setting hardlinked_archive=1, which means that a complete +copy of every version of each file will be kept. This also has the benefit of +speeding up restores for older backups, because no reverse deltas need to be +applied, but it has the disadvantage of taking up more disk space. +
    +You can also set librsync=0, which turns off librsync so that, if a file has +changed, the whole file is transferred from the client. This means that +deltas don't have to be applied to the previously backed up files. So, if the +speed of your network beats the speed of being able to apply deltas, you might +want to set librsync=0. +
    +You can set both those options globally in the server burp.conf, or for +individual clients in the server clientconfdir files. +
    +

    + +
    + +

    + +Q. I have more questions about shuffling, librsync=[0|1] and +hardlinked_archive=[0|1]. + +

    + +

    + +A. Perhaps the man page, or this file can help +you. + +

    + +
    + +

    + +Q. My Windows client is crashing, help! + +

    + +

    + +A. In order to debug it, please follow the instructions here. + +

    diff -Nru burp-1.3.0+20120214git/website/content/html/howto.content burp-1.3.10/website/content/html/howto.content --- burp-1.3.0+20120214git/website/content/html/howto.content 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/website/content/html/howto.content 2012-07-27 19:36:24.000000000 +0000 @@ -15,7 +15,7 @@ Make sure that you have openssl, zlib and librsync libraries and development libraries installed. With debian or ubuntu, this command should install them for you: -apt-get install librsync-dev libz-dev libssl-dev +apt-get install librsync-dev libz-dev libssl-dev uthash-dev Change to the burp source directory and run "./configure", then "make". All being well, burp will compile successfully. @@ -44,7 +44,7 @@ it is yet time for a new backup. It is probably a good idea to change the numbers for each client, in order to spread the load a bit: MAILTO= -7,27,47 * * * * root /sbin/burp -a t +7,27,47 * * * * root /usr/sbin/burp -a t WINDOWS CLIENT @@ -92,7 +92,7 @@ SERVER OPTIONS - -c path + -c [path] Short for 'config file'. The argument is a path to the config file. The default is /etc/burp/burp.conf. @@ -103,43 +103,63 @@ -F Foreground mode. The server will fork into the background and run as a daemon if you do not give this option. + -g Generate initial CA keys and certificates, and then exit. + + -i Print an index table of symbols that humans may see burp pro‐ + duce, and exit. + + -l [path] + Path to log file. The default is stdout. This option overrides + the logfile option in the config file. Use /dev/null to deacti‐ + vate or '' to reactivate output. + -a s Run this to connect to a running server to get a live monitor of - the status of all your backup clients. If your server config + the status of all your backup clients. If your server config file is not in the default location, you will also need to spec‐ - ify the path with the '-c' option. The live monitor requires + ify the path with the '-c' option. The live monitor requires ncurses support at compile time. -a S Similar to '-a s', but it prints the main status monitor summary - screen to stdout. The intention is that a script can run this - and email an administrator the output on a cron job. This - doesn't require ncurses support. + screen to stdout. The intention is that a script can run this + and email an administrator the output on a cron job. This + doesn't require ncurses support. There are additional options + that can be given with '-a S', listed below. These enable logs + and contents of backups to be listed whilst logged in on the + server machine. + + ADDITIONAL SERVER OPTIONS TO USE WITH '-a S' - -i Print an index table of symbols that humans may see burp pro‐ - duce, and exit. + -C [client] + Limit the output to a single client. - -l [path] - Path to log file. The default is stdout. This option overrides - the logfile option in the config file. Use /dev/null to deacti‐ - vate or '' to reactivate output. + -b [number] + Show listable files in a particular backup (requires -C). + + -z [file] + Dump a particular log file in a backup (requires -C and -b). + + -d [path] + Show a particular path in a backup (requires -C and -b). CLIENT OPTIONS -a [b|t|r|l|L|v|e] - Short for 'action'. The arguments mean backup, timed backup, + Short for 'action'. The arguments mean backup, timed backup, restore, list, long list, verify, or estimate, respectively. -b [number|a] - Short for 'backup number'. The argument is a number, or 'a' to + Short for 'backup number'. The argument is a number, or 'a' to select all backups. -c [path] - Short for 'config file'. The argument is a path to the config - file. The default is /etc/burp/burp.conf, or C:\Program + Short for 'config file'. The argument is a path to the config + file. The default is /etc/burp/burp.conf, or C:\Program Files\Burp\burp.conf on Windows. -d [path] - Short for 'directory'. The argument is a path to an alternative - directory to restore to. + Short for 'directory'. When restoring, the argument is a path to + an alternative directory to restore to. When listing, the argu‐ + ment is the directory to list. -f [path] Short for 'force overwrite'. Without this option set, a restore @@ -159,6 +179,10 @@ in the config file. Use /dev/null to deactivate or '' to reacti‐ vate output. + -s [number] + For use with restores - strip a number of leading path compo‐ + nents. + EXAMPLES burp -a b @@ -177,7 +201,7 @@ Lists all the files in all the backups. burp -a l -b 1 -r myregex - Lists all the files in backup number 1 that match the regular + Lists all the files in backup number 1 that match the regular expression 'myregex'. burp -a L -b 1 -r myregex @@ -186,18 +210,20 @@ burp -a r -b 1 -r myregex Restores all the files in backup number 1 that match the regular - expression 'myregex' back to their original location. You won't - be given a warning if the files already exist there, so use with - caution. + expression 'myregex' back to their original location. burp -a r -b 1 -r myregex -d /tmp/restoredir Restores all the files in backup number 1 that match the regular expression 'myregex' into the directory /tmp/restoredir. + burp -a r -b 1 -r myregex -d /tmp/restoredir -s 2 + Restores all the files in backup number 1 that match the regular + expression 'myregex' into the directory /tmp/restoredir and + strip 2 leading path components. + burp -a r Restores all the files in the most recent backup to their origi‐ - nal location. You won't be given a warning if the files already - exist there, so use with caution. + nal location. burp -a v Verifies the most recent backup. @@ -213,8 +239,19 @@ short interval, and that the server will decide when it is time for a new backup. + burp -a L -b 1 -d '' + Long list the top level directory of backup 1. + + burp -a L -b 1 -d '/home/graham' + Long list the /home/graham directory of backup 1. These '-d' + versions of the list function provide the ability to 'browse' + backups. + SERVER CONFIGURATION FILE OPTIONS + . [path] + Read an additional configuration file. + mode=server Required to run in server mode. @@ -225,9 +262,25 @@ Defines the TCP port that the server listens on for status requests. + daemon=[0|1] + Whether to daemonise. The default is 1. + + fork=[0|1] + Whether to fork children. The default is 1. + directory=[path] Path to the directory in which to store backups. + directory_tree=[0|1] + When turned on (which is the default) and the client is on ver‐ + sion 1.3.6 or greater, the structure of the storage directory + will mimic that of the original filesystem on the client. + + timestamp_format=[strftime format] + This allows you to tweak the format of the timestamps of indi‐ + vidual backups. See 'man strftime' to see available substitu‐ + tions. If this option is unset, burp uses "%Y-%m-%d %H:%M:%S". + clientconfdir=[path] Path to the directory that contains client configuration files. @@ -241,6 +294,9 @@ logfile=[path] Path to the logfile. + syslog=[0|1] + Log to syslog. + keep=[number] Number of backups to keep. This can be overriddden by the client configuration files in clientconfdir on the server. Specify mul‐ @@ -278,7 +334,7 @@ The default is 1. This option can be overridden by the client configuration files in clientconfdif on the server. - compression=[gzip0-9] + compression=gzip[0-9] Choose the level of gzip compression. Setting 0 or gzip0 turns compression off. The default is gzip9. This option can be over‐ ridden by the client configuration files in clientconfdif on the @@ -321,12 +377,34 @@ use: Convert the working directory into a complete backup. resume: Simply continue the previous backup from the point at which it - left off. + left off. NOTE: If the client has changed its include/exclude configu‐ + ration since the backup was interrupted, the recovery method will auto‐ + matically switch to 'use'. + + client_can_force_backup=[0|1] + Turn this off to prevent clients from forcing backups with the + '-a b' option. Timed backups will still work. The default is + that clients can force backups. + + client_can_list=[0|1] + Turn this off to prevent clients from listing backups with the + '-a l' option. The default is that clients can list backups. + + client_can_restore=[0|1] + Turn this off to prevent clients from initiating restores with + the '-a r' option. The default is that clients can initiate + restores. + + client_can_verify=[0|1] + Turn this off to prevent clients from initiating a verify job + with the '-a v' option. The default is that clients can initiate + a verify job. ssl_cert_ca=[path] - The path to the SSL CA certificate. This file will probably be + The path to the SSL CA certificate. This file will probably be the same on both the server and the client. The file should con‐ - tain just the certificate in PEM format + tain just the certificate in PEM format. For more information on + this, and the other ssl_* options, please see docs/burp_ca.txt. ssl_cert=[path] The path to the server SSL certificate. It works for me when the @@ -351,6 +429,11 @@ Defines the number of child processes to fork (the number of clients that can simultaneously connect. The default is 5. + max_status_children=[number] + Defines the number of status child processes to fork (the number + of status clients that can simultaneously connect. The default + is 5. + max_storage_subdirs=[number] Defines the number of subdirectories in the data storage areas. The maximum number of subdirectories that ext3 allows is 32000. @@ -385,9 +468,14 @@ the server. notify_success_warnings_only=[0|1] - Set to 1 to send success notifications only when there were - warnings. Leave unset or set to 0 to send success notifications - for every backup. + Set to 1 to send success notifications when there were warnings. + If this and notify_success_changes_only are not turned on, suc‐ + cess notifications are always sent. + + notify_success_changes_only=[0|1] + Set to 1 to send success notifications when there were new or + changed files. If this and notify_success_warnings_only are not + turned on, success notifications are always sent. notify_failure_script=[path] The same as notify_success_script, but for backups that failed. @@ -449,8 +537,32 @@ clients. Please see docs/autoupgrade.txt in the source package for more help with this option. + ca_conf=[path] + Path to certificate authority configuration file. The CA config‐ + uration file will usually be /etc/burp/CA.cnf. The CA directory + indicated by CA.cnf will usually be /etc/burp/CA. If ca_conf is + set and the CA directory does not exist, the server will create, + populate it, and the paths indicated by ssl_cert_ca, ssl_cert, + ssl_key and ssl_dhfile will be overwritten. For more detailed + information on this and the other ca_* options, please see + docs/burp_ca.txt. + + ca_name=[name] + Name of the CA that the server will generate when using the + ca_conf option. + + ca_server_name=[name] + The name that the server will put into its own SSL certficates + when using the ca_conf option. + + ca_burp_ca=[path] + Path to the burp_ca script when using the ca_conf option. + CLIENT CONFIGURATION FILE OPTIONS + . [path] + Read an additional configuration file. + mode=client Required to run in client mode. @@ -476,6 +588,9 @@ logfile=[path] Path to the logfile. + syslog=[0|1] + Log to syslog. + user=[username] Run as a particular user (not supported on Windows). @@ -483,65 +598,31 @@ Run as a particular group (not supported on Windows). ratelimit=[Mb/s] - Set the network send rate limit, in Mb/s. If this option is not + Set the network send rate limit, in Mb/s. If this option is not given, burp will send data as fast as it can. network_timeout=[s] - Set the network timeout in seconds. If no data is sent or - received over a period of this length, burp will give up. The + Set the network timeout in seconds. If no data is sent or + received over a period of this length, burp will give up. The default is 7200 seconds (2 hours). - include=[path] - Path to include in the backup. You can have multiple include - lines. Use forward slashes '/', not backslashes '\' as path - delimiters. - - exclude=[path] - Path to exclude from the backup. You can have multiple exclude - lines. Use forward slashes '/', not backslashes '\' as path - delimiters. - - exclude_ext=[extension] - Extensions to exclude from the backup. Case insensitive. You can - have multiple exclude extension lines. For example, set 'vdi' to - exclude VirtualBox disk images. - - min_file_size=[b/Kb/Mb/Gb] - Do not back up files that are less than the specified size. - Example: 'min_file_size = 10Mb'. Set to 0 (the default) to have - no limit. - - max_file_size=[b/Kb/Mb/Gb] - Do not back up files that are greater than the specified size. - Example: 'max_file_size = 10Mb'. Set to 0 (the default) to have - no limit. - - cross_filesystem=[path] - Allow backups to cross a particular filesystem mountpoint. - - cross_all_filesystems=[0|1] - Allow backups to cross all filesystem mountpoints. - - nobackup=[file name] - If this file system entry exists, the directory containing it - will not be backed up. - - read_fifo=[path] - Do not back up the given fifo itself, but open it for reading - and back up the contents as if it were a regular file. - - read_all_fifos=[0|1] - Open all fifos for reading and back up the contents as if they - were regular files. + ca_burp_ca=[path] + Path to the burp_ca script (burp_ca.bat on Windows). For more + information on this, please see docs/burp_ca.txt. + + ca_csr_dir=[path] + Directory where certificate signing requests are generated. For + more information on this, please see docs/burp_ca.txt. ssl_cert_ca=[path] The path to the SSL CA certificate. This file will probably be the same on both the server and the client. The file should con‐ - tain just the certificate in PEM format + tain just the certificate in PEM format. For more information on + this and the other ssl_* options, please see docs/burp_ca.txt. ssl_cert=[path] The path to the client SSL certificate. It works for me when the - file contains the concatenation of the certificate and private + file contains the concatenation of the certificate and private key in PEM format. ssl_key=[path] @@ -553,26 +634,31 @@ ssl_cert_password=[password] Synonym for ssl_key_password. + ssl_peer_cn=[string] + Must match the common name in the SSL certificate that the + server gives when it connects. If ssl_peer_cn is not set, the + server name will be used instead. + encryption_password=[password] - Set this to enable client side file Blowfish encryption. If you - do not want encryption, leave this field out of your config - file. IMPORTANT: Configuring this renders delta differencing - pointless, since the smallest real change to a file will make + Set this to enable client side file Blowfish encryption. If you + do not want encryption, leave this field out of your config + file. IMPORTANT: Configuring this renders delta differencing + pointless, since the smallest real change to a file will make the whole file look different. Therefore, activating this option - turns off delta differencing so that whenever a client file + turns off delta differencing so that whenever a client file changes, the whole new file will be uploaded on the next backup. - ALSO IMPORTANT: If you manage to lose your encryption password, - you will not be able to unencrypt your files. You should there‐ - fore think about having a copy of the encryption password some‐ - where off-box, in case of your client hard disk failing. + ALSO IMPORTANT: If you manage to lose your encryption password, + you will not be able to unencrypt your files. You should there‐ + fore think about having a copy of the encryption password some‐ + where off-box, in case of your client hard disk failing. FINALLY: If you change your encryption password, you will end up - with a mixture of files on the server with different encryption - and it may become tricky to restore more than one file at a - time. For this reason, if you change your encryption password, - you may want to start a fresh chain of backups (by moving the + with a mixture of files on the server with different encryption + and it may become tricky to restore more than one file at a + time. For this reason, if you change your encryption password, + you may want to start a fresh chain of backups (by moving the original set aside, for example). Burp will cope fine with turn‐ ing the same encryption password on and off between backups, and - will restore a backup of mixed encrypted and unencrypted files + will restore a backup of mixed encrypted and unencrypted files without a problem. backup_script_pre=[path] @@ -585,74 +671,152 @@ many of these. backup_script_post=[path] - Path to a script to run after a backup. The arguments to it are - 'post', [0|1] if the backup failed or succeeded, 'reserved3' to - 'reserved5', and then arguments defined by + Path to a script to run after a backup. The arguments to it are + 'post', [0|1] if the backup failed or succeeded, 'reserved3' to + 'reserved5', and then arguments defined by backup_script_post_arg. backup_script_post_arg=[string] - A user-definable argument to the backup post script. You can + A user-definable argument to the backup post script. You can have many of these. backup_script_post_run_on_fail=[0|1] - If this is set to 1, backup_script_post will be run whether the - backup succeeds or not. The default is 0, which means that + If this is set to 1, backup_script_post will be run whether the + backup succeeds or not. The default is 0, which means that backup_script_post will only be run if the backup succeeds. restore_script_pre=[path] - Path to a script to run before a restore. The arguments to it + Path to a script to run before a restore. The arguments to it are 'pre', 'reserved2' to 'reserved5', and then arguments defined by restore_script_pre_arg. restore_script_pre_arg=[string] - A user-definable argument to the restore pre script. You can + A user-definable argument to the restore pre script. You can have many of these. restore_script_post=[path] Path to a script to run after a restore. The arguments to it are 'post', [0|1] if the restore failed or succeeded, 'reserved3' to - 'reserved5', and then arguments defined by + 'reserved5', and then arguments defined by restore_script_post_arg. restore_script_post_arg=[string] - A user-definable argument to the restore post script. You can + A user-definable argument to the restore post script. You can have many of these. restore_script_post_run_on_fail=[0|1] If this is set to 1, restore_script_post will be run whether the - restore succeeds or not. The default is 0, which means that + restore succeeds or not. The default is 0, which means that restore_script_post will only be run if the restore succeeds. backup_script=[path] You can use this to save space in your config file when you want - to run the same script before and after a backup. It overrides + to run the same script before and after a backup. It overrides backup_script_pre and backup_script_post. backup_script_arg=[path] - Goes with backup_script and overrides backup_script_pre_arg and + Goes with backup_script and overrides backup_script_pre_arg and backup_script_post_arg. restore_script=[path] You can use this to save space in your config file when you want - to run the same script before and after a restore. It overrides + to run the same script before and after a restore. It overrides restore_script_pre and restore_script_post. restore_script_arg=[path] - Goes with restore_script and overrides restore_script_pre_arg + Goes with restore_script and overrides restore_script_pre_arg and restore_script_post_arg. autoupgrade_dir=[path] - Path to autoupgrade directory into which upgrades are down‐ - loaded. Please see docs/autoupgrade.txt in the source package - for more help with this option. If you do not want your client + Path to autoupgrade directory into which upgrades are down‐ + loaded. Please see docs/autoupgrade.txt in the source package + for more help with this option. If you do not want your client to autoupgrade, do not set this option. autoupgrade_os=[string] - Name of the client operating system. Should match a directory - name in the server's autoupgrade_dir. If you do not want your + Name of the client operating system. Should match a directory + name in the server's autoupgrade_dir. If you do not want your client to autoupgrade, do not set this option. +INCLUDES / EXCLUDES + The following options specify exactly what is backed up. The client can + specify these options, or if you include at least one 'include=' in the + client configuration files on the server, the server will override them + all. + + include=[path] + Path to include in the backup. You can have multiple include + lines. Use forward slashes '/', not backslashes '\' as path + delimiters. + + exclude=[path] + Path to exclude from the backup. You can have multiple exclude + lines. Use forward slashes '/', not backslashes '\' as path + delimiters. + + include_regex=[regular expression] + Not implemented. + + exclude_regex=[regular expression] + Exclude paths that match the regular expression. + + include_ext=[extension] + Extensions to include in the backup. Case insensitive. Nothing + else will be included in the backup. You can have multiple + include extension lines. For example, set 'txt' to include files + that end in '.txt'. You need to specify an 'include' line so + that burp knows where to start looking. + + exclude_ext=[extension] + Extensions to exclude from the backup. Case insensitive. You can + have multiple exclude extension lines. For example, set 'vdi' to + exclude VirtualBox disk images. + + exclude_fs=[fstype] + File systems to exclude from the backup. Case insensitive. You + can have multiple exclude file system lines. For example, set + 'tmpfs' to exclude tmpfs. Burp has an internal mapping of file + system names to file system IDs. If you know the file system ID, + you can use that instead. For example, 'exclude_fs = 0x01021994' + will also exclude tmpfs. + + min_file_size=[b/Kb/Mb/Gb] + Do not back up files that are less than the specified size. + Example: 'min_file_size = 10Mb'. Set to 0 (the default) to have + no limit. + + max_file_size=[b/Kb/Mb/Gb] + Do not back up files that are greater than the specified size. + Example: 'max_file_size = 10Mb'. Set to 0 (the default) to have + no limit. + + cross_filesystem=[path] + Allow backups to cross a particular filesystem mountpoint. + + cross_all_filesystems=[0|1] + Allow backups to cross all filesystem mountpoints. + + nobackup=[file name] + If this file system entry exists, the directory containing it + will not be backed up. + + read_fifo=[path] + Do not back up the given fifo itself, but open it for reading + and back up the contents as if it were a regular file. + + read_all_fifos=[0|1] + Open all fifos for reading and back up the contents as if they + were regular files. + + read_blockdev=[path] + Do not back up the given block device itself, but open it for + reading and back up the contents as if it were a regular file. + + read_all_blockdevs=[0|1] + Open all block devices for reading and back up the contents as + if they were regular files. + SERVER CLIENTCONFDIR FILE For the server to know about clients that can contact it, you need to @@ -660,58 +824,120 @@ The file name must match the name in the 'cname' field on the client. - ssl_peer_cn=[string] must also be set and match the common name in the - SSL certificate that the client gives when it connects. - - The file needs to contain a line like password=[password] that matches - the same field on the client, or passwd=[encrypted password] - where - the plain text password on the client will be tested against an + ssl_peer_cn=[string] must match the common name in the SSL certificate + that the client gives when it connects. If ssl_peer_cn is not set, the + client name will be used instead (the clientconfdir file name). + + The file needs to contain a line like password=[password] that matches + the same field on the client, or passwd=[encrypted password] - where + the plain text password on the client will be tested against an encrypted password of the kind you might find in /etc/passwd. - Additionally, the following options can be overridden here for each + Additionally, the following options can be overridden here for each client: - directory keep working_dir_recovery_method librsync compression - timer_script timer_arg notify_success_script notify_success_arg - notify_success_warnings_only notify_failure_script notify_fail‐ - ure_arg dedup_group server_script_pre server_script_pre_arg - server_script_post server_script_post_arg server_script + directory directory_tree timestamp_format keep work‐ + ing_dir_recovery_method librsync syslog client_can_force_backup + client_can_list client_can_restore client_can_verify compression + timer_script timer_arg notify_success_script notify_success_arg + notify_success_warnings_only notify_failure_script notify_fail‐ + ure_arg dedup_group server_script_pre server_script_pre_arg + server_script_post server_script_post_arg server_script server_script_arg server_script_post_run_on_fail + Additionally, the includes and excludes can be overridden here, as + described in the section above. + + As with the other configuration files, extra configuration can be + included with the '. path/to/config/file' syntax. + Some notes on SSL certificates - The burp example configs come with example SSL certificates and keys. + The burp example configs come with example SSL certificates and keys. You can use these and burp will work. But if you are worried about net‐ - work security, you should generate your own certificates and keys and - point your config files to them. To create the example files, I used a - handy interface to openssl, called 'tinyca' (http://tinyca.sm- - zone.net/). If you are using Debian, you can run 'apt-get install + work security, you should generate your own certificates and keys and + point your config files to them. To create the example files, I used a + handy interface to openssl, called 'tinyca' (http://tinyca.sm- + zone.net/). If you are using Debian, you can run 'apt-get install tinyca' to get it. There is also the option of using burp_ca, which you can find in the source distribution, courtesy of Patrick Koppen. Examining backups - As well as using the client list options described above, you can go - directly to the storage directory on the server. The backups for a - client are in the directory named after the client. Inside each backup + As well as using the client list options described above, you can go + directly to the storage directory on the server. The backups for a + client are in the directory named after the client. Inside each backup directory is a file called manifest.gz. - This contains a list of all the files in the backup, and where they + This contains a list of all the files in the backup, and where they originally came from on the client. - There is also a 'log.gz' file in the backup directory, which contains + There is also a 'log.gz' file in the backup directory, which contains the output generated by the server during the backup. The 'data' directory contains complete backup files. - The 'deltas.reverse' directory contains reverse deltas that can be - applied to the data from the next backup in the sequence (indicated by + The 'deltas.reverse' directory contains reverse deltas that can be + applied to the data from the next backup in the sequence (indicated by the contents of the 'forward' file). - Anything with a .gz suffix is compressed in gzip format. You can use - standard tools, such as zcat, zless or cp, to view them or copy them + Anything with a .gz suffix is compressed in gzip format. You can use + standard tools, such as zcat, zless or cp, to view them or copy them elsewhere. +Server initiated backups + You can queue a backup on the server, to be performed when the client + next makes contact. To do this, you put a file called 'backup' into the + top level of the client storage directory. The contents of the file are + ignored. + + +Server initiated restores + You can queue a restore on the server, to be performed when the client + next makes contact. To do this, you put a file called 'restore' into + the top level of the client storage directory. Valid fields to include + in the restore file are: + + backup=[number|a] + The number of the backup to restore from. Equivalent to '-b' + when initiating a restore from the client. + + overwrite=[0|1] + Whether to overwrite existing files. Equivalent to '-f' when + initiating a restore from the client. + + strip=[number] + Number of leading path components to strip. Equivalent to '-s' + when initiating a restore from the client. + + restoreprefix=[path] + Prefix to the restore path. Equivalent to '-d' when initiating a + restore from the client. + + regex=[regular expression] + Only restore files matching the regular expression. Equivalent + to '-r' when initiating a restore from the client. + + include=[path] + Restore directories and files that match the path. If it is a + directory, the contents of the directory will be restored. You + can have multiple 'include' lines. There is no equivalent when + initiating a restore from the client. + + As a minimum, the 'restore' file needs to contain a 'backup' option, + and one 'regex' or 'include' line. + + +SIGNALS + Sending signal 1 (HUP) to the main server process will cause it to + reload. For the vast majority of configuration changes, a reload is + unnecessary as the server will pick up changes "on-the-fly". Sending + signal 12 (USR2) to the main server process will cause it to wait until + there are no longer any child processes, and then exit. The intention + is to help with upgrades without interrupting current backups. if you + are running upstart, a new burp server process will start up when the + old one exits. + BUGS If you find bugs, please report them to the email list. See the website diff -Nru burp-1.3.0+20120214git/website/content/html/index.content burp-1.3.10/website/content/html/index.content --- burp-1.3.0+20120214git/website/content/html/index.content 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/website/content/html/index.content 2012-07-27 19:36:23.000000000 +0000 @@ -40,7 +40,8 @@


    -

    Current stable version: 1.2.2

    +

    Current stable version: 1.3.0

    +

    Old stable version: 1.2.2


    NEWS

    @@ -52,7 +53,245 @@

    -2012-01-27: burp-1.30 is released. +2012-07-28: +
    +Many thanks to the following donors for financially supporting burp during +June and July: +

    +  *  £16.00 Talma J.
    +
    + +

    + +

    +2012-07-28: burp-1.3.10 is released. +

    +Changes in burp-1.3.10:
    +  * Added Tony Cheneau's IPv6 fixes.
    +  * Fixed bug to do with directory_tree=1 that would stop resume working.
    +  * Stop status monitor exiting on terminal resize.
    +  * Small man page corrections about overwriting existing files.
    +  * Don't use mingw64's utime() to set Windows file times, because it doesn't
    +    work on read-only files.
    +  * Tweak to timer_script to let it run with slightly older versions of 'date',
    +    plus the FreeBSD version of 'date'.
    +  * "burp -a l" should say that a backup is finalising.
    +  * Upgraded Windows to gcc-4.6.3.
    +  * Upgraded Windows to zlib-1.2.7.
    +  * Upgraded Windows to openssl-1.0.0j.
    +  * Added pcre-8.31 to Windows.
    +  * Added Gonéri Le Bouder's exclude_regex option.
    +  * Add a gentle shutdown server option - send signal 12 to the main process.
    +  * Make librsync errors in phase4 non-fatal.
    +  * Check for errors on gzclose() and fclose().
    +
    + +

    + + +

    +2012-06-08: burp-1.3.8 is released. If you have been +using 1.3.6 on the server side, it is advised that you upgrade the server side +straight away. +

    +Changes in burp-1.3.8:
    +  * Fix bug introduced in the new storage directory structure stuff that had
    +    the potential to corrupt backups.
    +  * Force directory_tree = 0 for clients on less than version 1.3.6.
    +  * Escape '-' symbols in man pages.
    +  * Save received certs as temporary files and then rename them, to avoid
    +    accidently truncating the current ones.
    +  * If Windows VSS snapshot fails, do not continue.
    +  * 32bit mingw64 has difficulty printf-ing multiple %llu items and sometimes
    +    even segfaults, so split the counters into individual printfs.
    +
    + +

    + +

    +2012-05-28: +
    +Many thanks to the following donors for financially supporting burp during +May: +

    +  * £100.00 Tomppa
    +  *  £64.00 Baker J.
    +
    + +

    + +

    +2012-05-28: burp-1.3.6 is released. +

    +Changes in burp-1.3.6:
    +  * Store files in a directory structure like that of the original client.
    +  * Fix 'ERROR: Please use absolute include/exclude paths' when setting paths
    +    on the server side.
    +  * Add configure test for uthash.h. If it doesn't exist, use the uthash.h
    +    included with the burp source.
    +  * Make top level excludes not be a fatal error.
    +  * Make syslogging begin sooner.
    +  * Unhide warning messages originally hidden by bacula when having errors
    +    when setting things like file times.
    +  * Fix bug where file times were not getting set on Windows directories.
    +  * Remove openssl "can't open config file" warning when generating
    +    certificates on Windows.
    +  * Set IPTOS_THROUGHPUT bulk packet flag for linux backups. Windows/mingw64
    +    appears not to be able to do this.
    +
    + +

    + +

    +2012-04-27: +
    +Many thanks to the following donors for financially supporting burp during +April: +

    +  * £10.00 Calogero L.
    +  * Server hosting from 6sync.com
    +
    + +

    + +

    +2012-04-27: burp-1.3.4 is released. +

    +Changes in burp-1.3.4:
    +  * Bug fix for Windows backups where it had stopped using the Windows backup
    +    API in 1.3.2.
    +  * Automatically convert backslashes to forward slashes for includes/excludes
    +    on Windows clients.
    +  * Bug fix: pass the path to the CA conf file whenever running burp_ca (fixes
    +    problems with the test scripts).
    +  * Remove whitespace that was causing the burp_ca '--crl' option not to work.
    +  * Have separate CA directories for the client and server. Make 'make install'
    +    create the directory /etc/burp/CA-client.
    +  * Make compile succeed when there is no libncurses library.
    +  * Add 'client_can_force_backup' option, defaulted to on. Turning it off means
    +    that only timed backups are allowed. Also add similar 'client_can_list',
    +    'client_can_restore' and 'client_can_verify' options.
    +  * Remove getopt from burp_ca, allowing it to work on Macs.
    +  * Make an unknown exclude_fs a non-fatal error.
    +  * Add ability to trigger a backup on the server side by placing a file called
    +    'backup' in the client's storage directory.
    +  * Fix bug where block device nodes were not backed up. Add 'read_blockdev'
    +    and 'read_all_blockdevs' options that work the same as the equivalent
    +    fifo options.
    +  * Add 'notify_success_changes_only' option, which means that success
    +    notifications only get sent if there were new or changed files.
    +  * Added Ruben Kerkhof's fixes to make run_script() work on OSX.
    +  * For each file, store the compression setting in the manifest.
    +  * Stop clients connecting twice when a timed backup is rejected.
    +
    + +

    + +

    +2012-03-31: +
    +Many thanks to the following donors for financially supporting burp during +March: +

    +  * £5.00 Łukasz P.
    +
    + +

    + +

    +2012-03-31: burp-1.3.2 is released. +

    +Changes in burp-1.3.2:
    +  * Add options for the client to automatically generate a certificate signing
    +    request, have the server sign and return it, and have the client use the
    +    new certificate. Remove old default SSL certificates because they should
    +    no longer be needed.
    +    See docs/burp_ca.txt for more information.
    +  * Add ability for conf files to point to more conf files to read.
    +  * Fix status server segfault when deleting files from clientconfdir.
    +  * Allow directories in clientconfdir.
    +  * Add the ability for the server to set the client include/excludes.
    +  * Simulate browsing backups with the use of "-a l/L -d path".
    +  * Add ability to set up a restore on the server side.
    +  * Add ability to specify child processes separately to status child process
    +    with new max_status_children option.
    +  * Status monitor - make keypresses more responsive.
    +  * Fix bug where old clients that didn't leave an incexc file on the server
    +    meant that resume would not start.
    +  * Add 'include_ext' option, which excludes all files unless their names end
    +    in the given extension.
    +  * Fall back to using the client or server name if ssl_peer_cn is unset on the
    +    server or client.
    +  * Don't try to chuser/chgrp in the child if the user/group settings are the
    +    same as the parent (fixes bug where setting user/group in the server
    +    wouldn't work, because it would try to chuser/chgrp twice).
    +  * Windows installer: add comment about poll interval '0' means that the
    +    scheduled job isn't installed.
    +  * Windows installer: don't install the scheduled task when doing an upgrade.
    +  * Unlock the client directory after server_script_post has run instead of
    +    before.
    +  * Fix bug where the wrong arg count was being given to the server post
    +    script.
    +  * Make sure status snapshot exits when there are no backup clients.
    +  * Ability to dump logs and paths in backups using '-a S' (useful for making
    +    a gui that browses backup contents).
    +  * Bug fixes to ssl_extra_checks_script.
    +  * Bug fix: initialise network_timeout properly.
    +  * Fix typos in docs/burp_ca.txt.
    +  * Add 'export LANG=C' to the timer script, so that timer_arg days are always
    +    expected in English.
    +  * Add config file option to turn syslog logging on/off.
    +  * Bug fix for 'compression = gzip[0-9]'.
    +  * Pass the server version to the client.
    +
    + +

    + +

    +2012-01-27: This month marks one year of burp! +
    +Many thanks to the following donors for financially supporting burp during +the last year: +

    +  * £250.00 Robert L.
    +  *  £50.00 Sebastiano P.
    +  *  £10.00 Tim R.
    +  *  £10.00 Patryk D.
    +
    + +

    + +

    +2012-01-27: burp-1.3.1 is released. +

    +Changes in burp-1.3.1:
    +  * EFS support on Windows.
    +  * Move to using mingw-w64 for both 32bit and 64bit Windows builds.
    +  * Add 'exclude_fs =' option for Linux so that you can skip partitions
    +    types (for example, tmpfs) without generating warnings.
    +  * If recovery method 'resume' is set, but the includes/excludes change,
    +    switch to 'use', then start a new backup.
    +  * In the tests, check to see whether it looks like the server has finished
    +    the backup before moving on, rather than just waiting a set amount of time.
    +  * Add man pages for bedup and burp_ca.
    +  * Remove embedded uthash code. It will need to be installed as a dependency.
    +    For example, in Debian, you might run 'apt-get install uthash-dev'.
    +  * Add Bas van den Dikkenberg's tweaks for getting burp into official Debian
    +    and Ubuntu repositories. Burp is now in debian sid and ubuntu precise.
    +  * Make the server tell the client what extra_comms features it supports, so
    +    that, in future, old servers are more likely to work with new clients.
    +  * Improve 'make clean'.
    +  * Add option to strip off leading path components on restore.
    +  * Fix segfault that was happening on the server when SSL_accept() failed.
    +  * Move burp and bedup to /usr/sbin (you need to check that any cron jobs
    +    are pointing there too).
    +  * Moved list of things to do to https://github.com/grke/burp/issues
    +
    + +

    + +

    +2012-01-27: burp-1.3.0 is released.

     Changes in burp-1.3.0:
       * Add a mechanism for automatically upgrading clients.
    @@ -154,255 +393,7 @@
     

    -2011-09-09: burp-1.2.0 is released. -

    -Changes in burp-1.2.0:
    -  * Improvements to the counters and status monitor - remember the phase1
    -    scan counters for later phases to use for things like estimated times.
    -  * Add 'working_dir_recovery_method = resume' option, which continues a
    -    backup from the point it was interrupted.
    -  * Add a useful message about options when run with '-h' or '-?'.
    -  * Get the client to pass its version to the server. The minimum version the
    -    client needs to be is now this release.
    -  * Get the server to warn when the client is on a different version.
    -  * Put the number of warnings in the subject of the notification emails.
    -  * Allow config file location to be changed via configure (Michael Roland's
    -    suggestions).
    -  * Implement main server process config reload functionality on SIGHUP.
    -  * Uncomment the reload lines in the Debian init script.
    -  * Add logrotate file for Debian.
    -  * Add ability to send a regular snapshot of the status summary screen in an
    -        email ("daily backup summary" feature).
    -  * Add simple 'exclude_ext =' feature.
    -  * Add Windows 7 bare metal restore instructions.
    -
    - -

    - -

    -2011-09-01: In the UK, a nice half-page review of burp has appeared in the October edition of 'Linux Format' magazine, in their 'Hot Picks' section. - -

    - -

    -2011-07-26: burp-1.1.70 is released. -

    -Changes in burp-1.1.70:
    -  * FreeBSD xattr support.
    -  * FreeBSD ACL support.
    -  * Handle Windows junction points.
    -  * Add 'nobackup = [file name]' option. If this file system entry exists, the
    -    directory containing it will not be backed up.
    -  * Set librsync signature block size based on the old file size.
    -  * Small bug fixes to the status monitor.
    -  * Fixed working directory recovery bug where it couldn't find the manifest.gz
    -    file due to it being called manifest.gz.tmp.
    -  * Get rid of the stupidly complicated 'find_files' callback mechanism
    -    inherited from bacula. Just call all the functions directly.
    -  * Fix compiler warnings and '-ldl' linker error on FreeBSD 8.2.
    -  * When down to 'C:' in mkpath() on Windows restore, strip the ':'.
    -  * Run ERR_clear_error() before SSL_read/write.
    -
    - -

    - - -

    -2011-06-27: burp-1.1.65 is released. -

    -Changes in burp-1.1.65:
    -  * Add mechanism for backing up and restoring extra meta data.
    -  * Linux acl support.
    -  * Linux xattr support.
    -  * Add option to set the umask on the server.
    -  * Added option to specify the clientconfdir password in passwd format.
    -  * Allow user and group options to be placed in the server clientconfdir files,
    -    so that different client backups can be owned by different users.
    -  * Add Patrick's burp_ca patches and README.CA.
    -  * Sanitised magic characters by defining them in a new cmd.h file.
    -  * Fixed 'ret OK, but zstream not finished: 0' when refusing to restore over
    -    existing files.
    -  * Fixed bug that made clients disappear from the status monitor.
    -  * Bug fix the client_lockdir option.
    -  * On the server, be more cautious about creating directories that don't exist.
    -  * Remove link kludge in async_read_stat().
    -
    - -

    - -

    -2011-06-14: burp-1.1.57 is released. -

    -Changes in burp-1.1.57:
    -  * Add options to run as a different user and group.
    -  * Add Patrick Koppen's burp_ca script.
    -  * Get the client restore to use the sbuf functions, remove related kludges.
    -  * Fix possible client segfault when refusing to restore over existing files.
    -  * Make a failure to restore over a busy file not cause the whole restore to
    -    fail.
    -  * Print byte count as well as human readable byte count in the status summary
    -    screen.
    -  * Include backup numbers with the backup list in the status summary.
    -  * Don't close the server read fd when running in non-forking mode.
    -  * Add ssl_key options so that the cert and key can be in separate files.
    -  * Add ssl_key_password, a synonym for ssl_cert_password.
    -
    - -

    - -

    -2011-05-13: burp-1.1.55 is released. -

    -Changes in burp-1.1.55:
    -  * Make the status monitor use ncurses.
    -  * Fixed two bugs that could drastically slow down the server if a file
    -    disappeared on a client after the initial scan (to get these two bug fixes,
    -    you need to upgrade your clients).
    -  * IPv6 patches.
    -  * Ability to specify the location of the client lockfiles on the server.
    -  * Make the server fork into the background by default. Use '-F' to stay in
    -    the foreground.
    -  * Add option to specify a log file.
    -
    - -

    - -

    -2011-04-14: burp-1.1.51 is released. -

    -Changes in burp-1.1.51:
    -  * Added a script for backing up zfs snapshots with 'zfs send'.
    -  * Added the ability to set the level of compression.
    -  * Added the ability to turn off compression.
    -  * Added an option to define the poll interval in the Windows installer.
    -  * Added the ability to turn off librsync delta differencing.
    -  * Added the ability to give arguments to backup/restore/pre/post scripts.
    -  * Make configure/make work better on Solaris.
    -
    - -

    - -

    -2011-04-02: burp-1.1.40 is released. -

    -Changes in burp-1.1.40:
    -  * Ability to run client pre/post backup/restore scripts.
    -  * Ability to read data from fifos (and restore to them).
    -  * Fixed a bug when restoring the first link in a directory.
    -  * Fixed a bug that prevented giving a backup number when using the verify option.
    -
    - -

    - -

    -2011-03-28: git repository added. - -

    - -

    -2011-03-27: burp-1.1.30 is released. -

    -Changes in burp-1.1.30:
    -  * First pass at having a live status monitor.
    -  * Fixed a bug that meant you couldn't restore links.
    -  * Fixed a bug when freeing structs at the end of a restore.
    -
    - -

    - -

    -2011-03-18: burp-1.1.22 is released. -

    -Changes in burp-1.1.22:
    -  * Added scheduling.
    -  * Added email notifications.
    -  * Fixed autoconf. Programs like ccache should now work.
    -  * Strip whitespace from end of conf lines, ignore quotes around conf lines.
    -  * Updated the Windows build tools.
    -
    - -

    - -

    -2011-03-10: burp-1.1.14 is released. -

    -Changes in burp-1.1.14:
    -  * Added client-side blowfish file encryption. See the man page for details.
    -  * Byte counters also give counts in KB/MB/GB/etc as appropriate.
    -  * Restore directories after their contents so that the access times are
    -    correct.
    -  * Updated the win32 build tools.
    -
    - -

    - -

    -2011-03-02: burp-1.1.5 is released. -

    -Changes in burp-1.1.5:
    -  * Added a 'verify' command. See the man page for details.
    -  * Improved the include/exclude path functionality.
    -  * Added the ability to define mount points to cross.
    -  * Fixed a crash on 64bit Windows when exiting.
    -
    - -

    - -

    -2011-02-27: burp-1.1.0 is released. -

    -Changes in burp-1.1.0:
    -  * Added openssl.
    -  * Added byte counters and checksums to the backup manifest files, in
    -    anticipation of a 'verify' command.
    -
    -    IMPORTANT IF YOU ARE UPGRADING FROM AN OLDER VERSION OF BURP:
    -    a) Your previous backups will no longer work, due to changes in the
    -    manifest files. You will also need to move old backups aside in order to
    -    continue to make new backups.
    -    b) Your old config files will need some fields to do with SSL added to them.
    -    See the man page and the examples in the 'configs' directory for help.
    -
    -    IMPORTANT FOR MY ENCOURAGEMENT AND THE FUTURE OF BURP:
    -    If you have tried burp, I really want to hear from you to find out what 
    -    you like about it, what you don't like, what new features you would like,
    -    how you have been using it, whether it has helped you, or anything that
    -    you would like to tell me. I am currently working in the dark!
    -
    - -

    - -

    -2011-02-16: burp-1.0.31 is released. -

    - -

    -2011-02-02: burp-1.0.11 is released. -

    - -

    -2011-02-02: burp-1.0.10 is released. -

    - -

    -2011-01-30: burp-1.0.9 is released. -

    - -

    -2011-01-25: burp-1.0.5 is released. -

    -

    -2011-01-25: mailling list created. -

    -

    -2011-01-23: burp-1.0.3 is released. -

    -

    -2011-01-22: burp-1.0.0 is released. -

    -

    -2011-01-22: Web site created. - +Older news

    diff -Nru burp-1.3.0+20120214git/website/content/html/why.content burp-1.3.10/website/content/html/why.content --- burp-1.3.0+20120214git/website/content/html/why.content 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/website/content/html/why.content 2012-07-27 00:36:21.000000000 +0000 @@ -44,6 +44,7 @@
  • Retention configuration - it is just impossible to configure a sensible retention policy. Here is my explanation why, sent to the bacula-users mailing list. +
  • No Windows EFS support - EFS files are silently ignored. The main advantage that Bacula has over other open source offerings is that diff -Nru burp-1.3.0+20120214git/website/content/main.template burp-1.3.10/website/content/main.template --- burp-1.3.0+20120214git/website/content/main.template 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/website/content/main.template 2012-07-27 19:31:34.000000000 +0000 @@ -88,7 +88,9 @@ -Last updated: February 2012 +Last updated: July 2012 +
    +Hosted by 6sync
    diff -Nru burp-1.3.0+20120214git/website/fixscript burp-1.3.10/website/fixscript --- burp-1.3.0+20120214git/website/fixscript 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/website/fixscript 2012-07-27 00:36:21.000000000 +0000 @@ -41,6 +41,7 @@ man ../manpages/burp.8 | col -b >> $howto print_bottom "$howto" +mkdir -p html/txt cp -v ../docs/*.txt html/txt go_for_it() @@ -109,7 +110,7 @@ if ! [ $x = "html" ] ; then rmdir $root/$x ; fi else case "$i" in - *.content|*.howto|*.faq|*.html) + *.content|*.howto|*.faq|*.html|*.about) go_for_it "$i" "$dir" ;; *.template|*.jpg|*.rtf|*.png) diff -Nru burp-1.3.0+20120214git/website/html/contact.html burp-1.3.10/website/html/contact.html --- burp-1.3.0+20120214git/website/html/contact.html 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/website/html/contact.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,118 +0,0 @@ - - - - - - -BURP - BackUp and Restore Program - - - - - - - - - - - -
    - - - - -

    - -BURP - BackUp and Restore Program - - -
    - - - - - - - - - -
    indexwhyfaqhowtodownloadcontact
    -
    - -

    - - - -The best way to contact me or to ask for help is to send a message to the -mailing list. Use the link below to subscribe. -
    -
    -https://lists.sourceforge.net/lists/listinfo/burp-users -
    -
    -However, I would appreciate any kind of feedback at all on this software. -
    -If you would to send me a quick message, -you can use this page -on my personal website. -
    -
    -
    -
    -
    -
    -
    -
    - - - - - - - - - -
    -
    - - - - -
    -
    -

    - -Burp is open and free software. I work on it in my spare time. -If you would like this work to continue, please consider making a small -donation. - -

    -
    -
    - -
    -
    -
    - -
    - -Burp, don't suck. - - - -Last updated: February 2012 - -
    - - - - - diff -Nru burp-1.3.0+20120214git/website/html/download.html burp-1.3.10/website/html/download.html --- burp-1.3.0+20120214git/website/html/download.html 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/website/html/download.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,132 +0,0 @@ - - - - - - -BURP - BackUp and Restore Program - - - - - - - - - - - -
    - - - - -

    - -BURP - BackUp and Restore Program - - -
    - - - - - - - - - -
    indexwhyfaqhowtodownloadcontact
    -
    - -

    - - - - - - - - - - - - - -
    -

    - -For downloads, please visit the -burp sourceforge page. - -

    -

    - -Or, if you are very keen there is now a git repository: -

    -git clone git://github.com/grke/burp.git (read-only)
    -
    - -

    - -
    - -
    -
    -
    -
    -
    -
    - - - - - - - - - -
    -
    - - - - -
    -
    -

    - -Burp is open and free software. I work on it in my spare time. -If you would like this work to continue, please consider making a small -donation. - -

    -
    -
    - -
    -
    -
    - -
    - -Burp, don't suck. - - - -Last updated: February 2012 - -
    - - - - - diff -Nru burp-1.3.0+20120214git/website/html/faq/licence.html burp-1.3.10/website/html/faq/licence.html --- burp-1.3.0+20120214git/website/html/faq/licence.html 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/website/html/faq/licence.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,970 +0,0 @@ - - - - - - -BURP - BackUp and Restore Program - - - - - - - - - - - -
    - - - - -

    - -BURP - BackUp and Restore Program - - -
    - - - - - - - - - -
    indexwhyfaqhowtodownloadcontact
    -
    - -

    - - - - - - - - - - - - - -
    -
    - - -

    - -The following is the Burp LICENCE file. - -

    -Burp started life as an extremely cut down and tweaked version of the Bacula
    -code.
    -The intention was to cut out everything except for the Windows VSS API parts
    -and to combine that with librsync to make a new backup program.
    -As well as the Windows VSS API parts these things remain:
    -Some of src/findlib remain.
    -A fragment of src/lib/berrno.c.
    -Some Makefiles and configure scripts.
    -
    -The new Burp code is Copyright Graham Keeling.
    -The license for the new Burp code continues to be AGPLv3.
    -
    -What follows are the original Bacula LICENSE declarations (stripped of
    -references to deleted files), from bacula-5.0.3.
    -They continue to be applicable.
    -
    -
    -History:
    -The original Bacula code was Copyright Kern Sibbald and John Walker.
    -After November 2004, it became Copyright Kern Sibbald, and finally,
    -the copyright was transferred to the Free Software Foundation Europe
    -on 15 November 2006. The license was changed from GPLv2 to AGPLv3
    -on 24 July 2010.
    -
    -Trademark:
    -The name Bacula is a registered trademark of Kern Sibbald.
    -
    -===================================
    -
    -License:
    -For the most part, Bacula is licensed under the AGPL version 3. This
    -code is listed under Copyright Free Software Foundation Europe e.V.
    -What follows is the addition(s) to the AGPL version 3 license, that
    -applies to code that is copyrighted by the Free Software Foundation
    -Europe e.V.
    -
    -Linking: 
    -As a special exception to the AGPLv3, the Bacula Project gives
    -permission to link the code of its release of Bacula with the OpenSSL
    -project's "OpenSSL" library (or with modified versions of it that use
    -the same license as the "OpenSSL" library), and distribute the linked
    -executables.  You must obey the GNU Affero General Public License in all
    -respects for all of the code used other than "OpenSSL".
    -
    -As a special exception to the AGPLv3, the Bacula Project gives
    -permission to link the code of its release of the Bacula Win32 File
    -daemon with the Microsoft supplied Volume Shadow Copy (VSS) libraries
    -and distribute the linked executables.  You must obey the GNU General
    -Public License in all respects for all of the code used other than for
    -the Microsoft VSS code, where you must obey their license terms.
    -
    -The Bacula Project gives permission for plugins with AGPLv3 compatible
    -licenses to be loaded and distributed with the Bacula executables as
    -long as the combined work is distributed under the terms listed in the 
    -Bacula LICENSE file.  A full list of AGPLv3 compatible licenses can be
    -found at: http://www.fsf.org/licensing/licenses/.  If you wish to load
    -or distribute plugins with different licensing terms please contact
    -the Bacula Project at: license@bacula.org
    -             
    -===================================
    -
    -
    -What follows is information from the authors of the code:
    -
    -License:
    -To the best of our knowledge, all code used in Bacula, which is 
    -copyrighted by a third party, has licenses that are compatible
    -with the OpenSSL license, and so given the exception that we have 
    -made to the AGPLv3 above, Bacula can be freely linked and distributed
    -with the OpenSSL libraries.
    -
    -Intellectual Property rights:
    -Recipient understands that although each Contributor to Bacula grants
    -the licenses to its Contributions set forth herein, no assurances are
    -provided by any Contributor that the Program does not infringe the
    -patent or other intellectual property rights of any other entity.
    -Each Contributor disclaims any liability to Recipient for claims
    -brought by any other entity based on infringement of intellectual
    -property rights or otherwise.  As a condition to exercising the rights
    -and licenses granted hereunder, each Recipient hereby assumes sole
    -responsibility to secure any other intellectual property rights
    -needed, if any.  For example, if a third party patent license is
    -required to allow Recipient to distribute the Program, it is
    -Recipient's responsibility to acquire that license before distributing
    -the Program.
    -
    -Copyrights:
    -Each Contributor to Bacula represents that to its knowledge it has
    -sufficient copyright rights in its Contribution, if any, to grant
    -the copyright license set forth in this Agreement.
    -
    -Code falling under the above conditions will be marked as follows:
    -
    -   Bacula® - The Network Backup Solution
    -
    -   Copyright (C) 2000-2010 Free Software Foundation Europe e.V.
    -
    -   The main author of Bacula is Kern Sibbald, with contributions from
    -   many others, a complete list can be found in the file AUTHORS.
    -   This program is Free Software; you can redistribute it and/or
    -   modify it under the terms of version three of the GNU Affero General Public
    -   License as published by the Free Software Foundation plus additions
    -   that are listed in the file LICENSE.
    -
    -   This program is distributed in the hope that it will be useful, but
    -   WITHOUT ANY WARRANTY; without even the implied warranty of
    -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    -   General Public License for more details.
    -
    -   You should have received a copy of the GNU Affero General Public License
    -   along with this program; if not, write to the Free Software
    -   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    -   02110-1301, USA.
    -
    -   Bacula® is a registered trademark of Kern Sibbald.
    -
    -   The licensor of Bacula is the Free Software Foundation Europe
    -   (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
    -   Switzerland, email:ftf@fsfeurope.org.
    -
    -
    -Windows:
    -Certain source code used to build the Windows version of the
    -Bacula File daemon is copyrighted and or trademarked by Microsoft
    -and may contain Microsoft intellectual property (examples:
    -Microsoft VC++, the source to the VSS libraries, the Microsoft C
    -runtime libraries).  As such we cannot and do not distribute that
    -software.  We are permitted however to distribute Bacula with the
    -necessary Microsoft libraries in binary form.
    -
    -You may obtain the parts that we cannot distribute as follows.  The
    -Microsoft compiler available for purchase, and Microsoft provides a free
    -version of the compiler.  The source code and libraries are available for
    -download from Microsoft public Web servers.  We have documented in the
    -src/win32 directory the URLs from which we obtained the library source, and
    -how we build the Windows File daemon and many users have succeeded in doing
    -so themselves.  Our intention is to respect as closely as possible Open
    -Source practices while maintaining full respect for proprietary and
    -copyrighted code.
    -
    -3 clause BSD License notice for inclusion with the binary:              
    -
    - src/win32/compat/getopt.c
    -   "... licensed under IBM copyrights to use the IBM-provided source code 
    -   in any way he or she deems fit ..."
    -
    - src/win32/compat/sys/mtio.h (LGPL)
    -   Copyright (C) 1996, 1997 Free Software Foundation, Inc.
    -
    -Bacula can be enabled with data encryption and/or communications
    -encryption. If this is the case, you will be including OpenSSL code that
    -that contains cryptographic software written by Eric Young
    -(eay@cryptsoft.com) and also software written by Tim Hudson
    -(tjh@cryptsoft.com).
    -
    -There are parts of Bacula that are licensed under the LGPL so
    -that those files may be used in proprietary code to interface with
    -Bacula.
    -
    -Finally there are parts of Bacula that are in the public domain.
    -             
    -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
    -IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
    -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
    -PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
    -OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
    -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
    -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
    -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
    -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    -
    -=====================================
    -
    -
    -The entire AGPL is reproduced below, in the manuals distributed with the
    -Bacula documentation and can also be found online on the GNU web site
    -as well as at www.bacula.org. You may also obtain a copy of the
    -AGPL (or LGPL) by writing to: Free Software Foundation, Inc.,
    -51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
    -
    -
    -                    GNU AFFERO GENERAL PUBLIC LICENSE
    -                       Version 3, 19 November 2007
    -
    - Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
    - Everyone is permitted to copy and distribute verbatim copies
    - of this license document, but changing it is not allowed.
    -
    -                            Preamble
    -
    -  The GNU Affero General Public License is a free, copyleft license for
    -software and other kinds of works, specifically designed to ensure
    -cooperation with the community in the case of network server software.
    -
    -  The licenses for most software and other practical works are designed
    -to take away your freedom to share and change the works.  By contrast,
    -our General Public Licenses are intended to guarantee your freedom to
    -share and change all versions of a program--to make sure it remains free
    -software for all its users.
    -
    -  When we speak of free software, we are referring to freedom, not
    -price.  Our General Public Licenses are designed to make sure that you
    -have the freedom to distribute copies of free software (and charge for
    -them if you wish), that you receive source code or can get it if you
    -want it, that you can change the software or use pieces of it in new
    -free programs, and that you know you can do these things.
    -
    -  Developers that use our General Public Licenses protect your rights
    -with two steps: (1) assert copyright on the software, and (2) offer
    -you this License which gives you legal permission to copy, distribute
    -and/or modify the software.
    -
    -  A secondary benefit of defending all users' freedom is that
    -improvements made in alternate versions of the program, if they
    -receive widespread use, become available for other developers to
    -incorporate.  Many developers of free software are heartened and
    -encouraged by the resulting cooperation.  However, in the case of
    -software used on network servers, this result may fail to come about.
    -The GNU General Public License permits making a modified version and
    -letting the public access it on a server without ever releasing its
    -source code to the public.
    -
    -  The GNU Affero General Public License is designed specifically to
    -ensure that, in such cases, the modified source code becomes available
    -to the community.  It requires the operator of a network server to
    -provide the source code of the modified version running there to the
    -users of that server.  Therefore, public use of a modified version, on
    -a publicly accessible server, gives the public access to the source
    -code of the modified version.
    -
    -  An older license, called the Affero General Public License and
    -published by Affero, was designed to accomplish similar goals.  This is
    -a different license, not a version of the Affero GPL, but Affero has
    -released a new version of the Affero GPL which permits relicensing under
    -this license.
    -
    -  The precise terms and conditions for copying, distribution and
    -modification follow.
    -
    -                       TERMS AND CONDITIONS
    -
    -  0. Definitions.
    -
    -  "This License" refers to version 3 of the GNU Affero General Public License.
    -
    -  "Copyright" also means copyright-like laws that apply to other kinds of
    -works, such as semiconductor masks.
    -
    -  "The Program" refers to any copyrightable work licensed under this
    -License.  Each licensee is addressed as "you".  "Licensees" and
    -"recipients" may be individuals or organizations.
    -
    -  To "modify" a work means to copy from or adapt all or part of the work
    -in a fashion requiring copyright permission, other than the making of an
    -exact copy.  The resulting work is called a "modified version" of the
    -earlier work or a work "based on" the earlier work.
    -
    -  A "covered work" means either the unmodified Program or a work based
    -on the Program.
    -
    -  To "propagate" a work means to do anything with it that, without
    -permission, would make you directly or secondarily liable for
    -infringement under applicable copyright law, except executing it on a
    -computer or modifying a private copy.  Propagation includes copying,
    -distribution (with or without modification), making available to the
    -public, and in some countries other activities as well.
    -
    -  To "convey" a work means any kind of propagation that enables other
    -parties to make or receive copies.  Mere interaction with a user through
    -a computer network, with no transfer of a copy, is not conveying.
    -
    -  An interactive user interface displays "Appropriate Legal Notices"
    -to the extent that it includes a convenient and prominently visible
    -feature that (1) displays an appropriate copyright notice, and (2)
    -tells the user that there is no warranty for the work (except to the
    -extent that warranties are provided), that licensees may convey the
    -work under this License, and how to view a copy of this License.  If
    -the interface presents a list of user commands or options, such as a
    -menu, a prominent item in the list meets this criterion.
    -
    -  1. Source Code.
    -
    -  The "source code" for a work means the preferred form of the work
    -for making modifications to it.  "Object code" means any non-source
    -form of a work.
    -
    -  A "Standard Interface" means an interface that either is an official
    -standard defined by a recognized standards body, or, in the case of
    -interfaces specified for a particular programming language, one that
    -is widely used among developers working in that language.
    -
    -  The "System Libraries" of an executable work include anything, other
    -than the work as a whole, that (a) is included in the normal form of
    -packaging a Major Component, but which is not part of that Major
    -Component, and (b) serves only to enable use of the work with that
    -Major Component, or to implement a Standard Interface for which an
    -implementation is available to the public in source code form.  A
    -"Major Component", in this context, means a major essential component
    -(kernel, window system, and so on) of the specific operating system
    -(if any) on which the executable work runs, or a compiler used to
    -produce the work, or an object code interpreter used to run it.
    -
    -  The "Corresponding Source" for a work in object code form means all
    -the source code needed to generate, install, and (for an executable
    -work) run the object code and to modify the work, including scripts to
    -control those activities.  However, it does not include the work's
    -System Libraries, or general-purpose tools or generally available free
    -programs which are used unmodified in performing those activities but
    -which are not part of the work.  For example, Corresponding Source
    -includes interface definition files associated with source files for
    -the work, and the source code for shared libraries and dynamically
    -linked subprograms that the work is specifically designed to require,
    -such as by intimate data communication or control flow between those
    -subprograms and other parts of the work.
    -
    -  The Corresponding Source need not include anything that users
    -can regenerate automatically from other parts of the Corresponding
    -Source.
    -
    -  The Corresponding Source for a work in source code form is that
    -same work.
    -
    -  2. Basic Permissions.
    -
    -  All rights granted under this License are granted for the term of
    -copyright on the Program, and are irrevocable provided the stated
    -conditions are met.  This License explicitly affirms your unlimited
    -permission to run the unmodified Program.  The output from running a
    -covered work is covered by this License only if the output, given its
    -content, constitutes a covered work.  This License acknowledges your
    -rights of fair use or other equivalent, as provided by copyright law.
    -
    -  You may make, run and propagate covered works that you do not
    -convey, without conditions so long as your license otherwise remains
    -in force.  You may convey covered works to others for the sole purpose
    -of having them make modifications exclusively for you, or provide you
    -with facilities for running those works, provided that you comply with
    -the terms of this License in conveying all material for which you do
    -not control copyright.  Those thus making or running the covered works
    -for you must do so exclusively on your behalf, under your direction
    -and control, on terms that prohibit them from making any copies of
    -your copyrighted material outside their relationship with you.
    -
    -  Conveying under any other circumstances is permitted solely under
    -the conditions stated below.  Sublicensing is not allowed; section 10
    -makes it unnecessary.
    -
    -  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
    -
    -  No covered work shall be deemed part of an effective technological
    -measure under any applicable law fulfilling obligations under article
    -11 of the WIPO copyright treaty adopted on 20 December 1996, or
    -similar laws prohibiting or restricting circumvention of such
    -measures.
    -
    -  When you convey a covered work, you waive any legal power to forbid
    -circumvention of technological measures to the extent such circumvention
    -is effected by exercising rights under this License with respect to
    -the covered work, and you disclaim any intention to limit operation or
    -modification of the work as a means of enforcing, against the work's
    -users, your or third parties' legal rights to forbid circumvention of
    -technological measures.
    -
    -  4. Conveying Verbatim Copies.
    -
    -  You may convey verbatim copies of the Program's source code as you
    -receive it, in any medium, provided that you conspicuously and
    -appropriately publish on each copy an appropriate copyright notice;
    -keep intact all notices stating that this License and any
    -non-permissive terms added in accord with section 7 apply to the code;
    -keep intact all notices of the absence of any warranty; and give all
    -recipients a copy of this License along with the Program.
    -
    -  You may charge any price or no price for each copy that you convey,
    -and you may offer support or warranty protection for a fee.
    -
    -  5. Conveying Modified Source Versions.
    -
    -  You may convey a work based on the Program, or the modifications to
    -produce it from the Program, in the form of source code under the
    -terms of section 4, provided that you also meet all of these conditions:
    -
    -    a) The work must carry prominent notices stating that you modified
    -    it, and giving a relevant date.
    -
    -    b) The work must carry prominent notices stating that it is
    -    released under this License and any conditions added under section
    -    7.  This requirement modifies the requirement in section 4 to
    -    "keep intact all notices".
    -
    -    c) You must license the entire work, as a whole, under this
    -    License to anyone who comes into possession of a copy.  This
    -    License will therefore apply, along with any applicable section 7
    -    additional terms, to the whole of the work, and all its parts,
    -    regardless of how they are packaged.  This License gives no
    -    permission to license the work in any other way, but it does not
    -    invalidate such permission if you have separately received it.
    -
    -    d) If the work has interactive user interfaces, each must display
    -    Appropriate Legal Notices; however, if the Program has interactive
    -    interfaces that do not display Appropriate Legal Notices, your
    -    work need not make them do so.
    -
    -  A compilation of a covered work with other separate and independent
    -works, which are not by their nature extensions of the covered work,
    -and which are not combined with it such as to form a larger program,
    -in or on a volume of a storage or distribution medium, is called an
    -"aggregate" if the compilation and its resulting copyright are not
    -used to limit the access or legal rights of the compilation's users
    -beyond what the individual works permit.  Inclusion of a covered work
    -in an aggregate does not cause this License to apply to the other
    -parts of the aggregate.
    -
    -  6. Conveying Non-Source Forms.
    -
    -  You may convey a covered work in object code form under the terms
    -of sections 4 and 5, provided that you also convey the
    -machine-readable Corresponding Source under the terms of this License,
    -in one of these ways:
    -
    -    a) Convey the object code in, or embodied in, a physical product
    -    (including a physical distribution medium), accompanied by the
    -    Corresponding Source fixed on a durable physical medium
    -    customarily used for software interchange.
    -
    -    b) Convey the object code in, or embodied in, a physical product
    -    (including a physical distribution medium), accompanied by a
    -    written offer, valid for at least three years and valid for as
    -    long as you offer spare parts or customer support for that product
    -    model, to give anyone who possesses the object code either (1) a
    -    copy of the Corresponding Source for all the software in the
    -    product that is covered by this License, on a durable physical
    -    medium customarily used for software interchange, for a price no
    -    more than your reasonable cost of physically performing this
    -    conveying of source, or (2) access to copy the
    -    Corresponding Source from a network server at no charge.
    -
    -    c) Convey individual copies of the object code with a copy of the
    -    written offer to provide the Corresponding Source.  This
    -    alternative is allowed only occasionally and noncommercially, and
    -    only if you received the object code with such an offer, in accord
    -    with subsection 6b.
    -
    -    d) Convey the object code by offering access from a designated
    -    place (gratis or for a charge), and offer equivalent access to the
    -    Corresponding Source in the same way through the same place at no
    -    further charge.  You need not require recipients to copy the
    -    Corresponding Source along with the object code.  If the place to
    -    copy the object code is a network server, the Corresponding Source
    -    may be on a different server (operated by you or a third party)
    -    that supports equivalent copying facilities, provided you maintain
    -    clear directions next to the object code saying where to find the
    -    Corresponding Source.  Regardless of what server hosts the
    -    Corresponding Source, you remain obligated to ensure that it is
    -    available for as long as needed to satisfy these requirements.
    -
    -    e) Convey the object code using peer-to-peer transmission, provided
    -    you inform other peers where the object code and Corresponding
    -    Source of the work are being offered to the general public at no
    -    charge under subsection 6d.
    -
    -  A separable portion of the object code, whose source code is excluded
    -from the Corresponding Source as a System Library, need not be
    -included in conveying the object code work.
    -
    -  A "User Product" is either (1) a "consumer product", which means any
    -tangible personal property which is normally used for personal, family,
    -or household purposes, or (2) anything designed or sold for incorporation
    -into a dwelling.  In determining whether a product is a consumer product,
    -doubtful cases shall be resolved in favor of coverage.  For a particular
    -product received by a particular user, "normally used" refers to a
    -typical or common use of that class of product, regardless of the status
    -of the particular user or of the way in which the particular user
    -actually uses, or expects or is expected to use, the product.  A product
    -is a consumer product regardless of whether the product has substantial
    -commercial, industrial or non-consumer uses, unless such uses represent
    -the only significant mode of use of the product.
    -
    -  "Installation Information" for a User Product means any methods,
    -procedures, authorization keys, or other information required to install
    -and execute modified versions of a covered work in that User Product from
    -a modified version of its Corresponding Source.  The information must
    -suffice to ensure that the continued functioning of the modified object
    -code is in no case prevented or interfered with solely because
    -modification has been made.
    -
    -  If you convey an object code work under this section in, or with, or
    -specifically for use in, a User Product, and the conveying occurs as
    -part of a transaction in which the right of possession and use of the
    -User Product is transferred to the recipient in perpetuity or for a
    -fixed term (regardless of how the transaction is characterized), the
    -Corresponding Source conveyed under this section must be accompanied
    -by the Installation Information.  But this requirement does not apply
    -if neither you nor any third party retains the ability to install
    -modified object code on the User Product (for example, the work has
    -been installed in ROM).
    -
    -  The requirement to provide Installation Information does not include a
    -requirement to continue to provide support service, warranty, or updates
    -for a work that has been modified or installed by the recipient, or for
    -the User Product in which it has been modified or installed.  Access to a
    -network may be denied when the modification itself materially and
    -adversely affects the operation of the network or violates the rules and
    -protocols for communication across the network.
    -
    -  Corresponding Source conveyed, and Installation Information provided,
    -in accord with this section must be in a format that is publicly
    -documented (and with an implementation available to the public in
    -source code form), and must require no special password or key for
    -unpacking, reading or copying.
    -
    -  7. Additional Terms.
    -
    -  "Additional permissions" are terms that supplement the terms of this
    -License by making exceptions from one or more of its conditions.
    -Additional permissions that are applicable to the entire Program shall
    -be treated as though they were included in this License, to the extent
    -that they are valid under applicable law.  If additional permissions
    -apply only to part of the Program, that part may be used separately
    -under those permissions, but the entire Program remains governed by
    -this License without regard to the additional permissions.
    -
    -  When you convey a copy of a covered work, you may at your option
    -remove any additional permissions from that copy, or from any part of
    -it.  (Additional permissions may be written to require their own
    -removal in certain cases when you modify the work.)  You may place
    -additional permissions on material, added by you to a covered work,
    -for which you have or can give appropriate copyright permission.
    -
    -  Notwithstanding any other provision of this License, for material you
    -add to a covered work, you may (if authorized by the copyright holders of
    -that material) supplement the terms of this License with terms:
    -
    -    a) Disclaiming warranty or limiting liability differently from the
    -    terms of sections 15 and 16 of this License; or
    -
    -    b) Requiring preservation of specified reasonable legal notices or
    -    author attributions in that material or in the Appropriate Legal
    -    Notices displayed by works containing it; or
    -
    -    c) Prohibiting misrepresentation of the origin of that material, or
    -    requiring that modified versions of such material be marked in
    -    reasonable ways as different from the original version; or
    -
    -    d) Limiting the use for publicity purposes of names of licensors or
    -    authors of the material; or
    -
    -    e) Declining to grant rights under trademark law for use of some
    -    trade names, trademarks, or service marks; or
    -
    -    f) Requiring indemnification of licensors and authors of that
    -    material by anyone who conveys the material (or modified versions of
    -    it) with contractual assumptions of liability to the recipient, for
    -    any liability that these contractual assumptions directly impose on
    -    those licensors and authors.
    -
    -  All other non-permissive additional terms are considered "further
    -restrictions" within the meaning of section 10.  If the Program as you
    -received it, or any part of it, contains a notice stating that it is
    -governed by this License along with a term that is a further
    -restriction, you may remove that term.  If a license document contains
    -a further restriction but permits relicensing or conveying under this
    -License, you may add to a covered work material governed by the terms
    -of that license document, provided that the further restriction does
    -not survive such relicensing or conveying.
    -
    -  If you add terms to a covered work in accord with this section, you
    -must place, in the relevant source files, a statement of the
    -additional terms that apply to those files, or a notice indicating
    -where to find the applicable terms.
    -
    -  Additional terms, permissive or non-permissive, may be stated in the
    -form of a separately written license, or stated as exceptions;
    -the above requirements apply either way.
    -
    -  8. Termination.
    -
    -  You may not propagate or modify a covered work except as expressly
    -provided under this License.  Any attempt otherwise to propagate or
    -modify it is void, and will automatically terminate your rights under
    -this License (including any patent licenses granted under the third
    -paragraph of section 11).
    -
    -  However, if you cease all violation of this License, then your
    -license from a particular copyright holder is reinstated (a)
    -provisionally, unless and until the copyright holder explicitly and
    -finally terminates your license, and (b) permanently, if the copyright
    -holder fails to notify you of the violation by some reasonable means
    -prior to 60 days after the cessation.
    -
    -  Moreover, your license from a particular copyright holder is
    -reinstated permanently if the copyright holder notifies you of the
    -violation by some reasonable means, this is the first time you have
    -received notice of violation of this License (for any work) from that
    -copyright holder, and you cure the violation prior to 30 days after
    -your receipt of the notice.
    -
    -  Termination of your rights under this section does not terminate the
    -licenses of parties who have received copies or rights from you under
    -this License.  If your rights have been terminated and not permanently
    -reinstated, you do not qualify to receive new licenses for the same
    -material under section 10.
    -
    -  9. Acceptance Not Required for Having Copies.
    -
    -  You are not required to accept this License in order to receive or
    -run a copy of the Program.  Ancillary propagation of a covered work
    -occurring solely as a consequence of using peer-to-peer transmission
    -to receive a copy likewise does not require acceptance.  However,
    -nothing other than this License grants you permission to propagate or
    -modify any covered work.  These actions infringe copyright if you do
    -not accept this License.  Therefore, by modifying or propagating a
    -covered work, you indicate your acceptance of this License to do so.
    -
    -  10. Automatic Licensing of Downstream Recipients.
    -
    -  Each time you convey a covered work, the recipient automatically
    -receives a license from the original licensors, to run, modify and
    -propagate that work, subject to this License.  You are not responsible
    -for enforcing compliance by third parties with this License.
    -
    -  An "entity transaction" is a transaction transferring control of an
    -organization, or substantially all assets of one, or subdividing an
    -organization, or merging organizations.  If propagation of a covered
    -work results from an entity transaction, each party to that
    -transaction who receives a copy of the work also receives whatever
    -licenses to the work the party's predecessor in interest had or could
    -give under the previous paragraph, plus a right to possession of the
    -Corresponding Source of the work from the predecessor in interest, if
    -the predecessor has it or can get it with reasonable efforts.
    -
    -  You may not impose any further restrictions on the exercise of the
    -rights granted or affirmed under this License.  For example, you may
    -not impose a license fee, royalty, or other charge for exercise of
    -rights granted under this License, and you may not initiate litigation
    -(including a cross-claim or counterclaim in a lawsuit) alleging that
    -any patent claim is infringed by making, using, selling, offering for
    -sale, or importing the Program or any portion of it.
    -
    -  11. Patents.
    -
    -  A "contributor" is a copyright holder who authorizes use under this
    -License of the Program or a work on which the Program is based.  The
    -work thus licensed is called the contributor's "contributor version".
    -
    -  A contributor's "essential patent claims" are all patent claims
    -owned or controlled by the contributor, whether already acquired or
    -hereafter acquired, that would be infringed by some manner, permitted
    -by this License, of making, using, or selling its contributor version,
    -but do not include claims that would be infringed only as a
    -consequence of further modification of the contributor version.  For
    -purposes of this definition, "control" includes the right to grant
    -patent sublicenses in a manner consistent with the requirements of
    -this License.
    -
    -  Each contributor grants you a non-exclusive, worldwide, royalty-free
    -patent license under the contributor's essential patent claims, to
    -make, use, sell, offer for sale, import and otherwise run, modify and
    -propagate the contents of its contributor version.
    -
    -  In the following three paragraphs, a "patent license" is any express
    -agreement or commitment, however denominated, not to enforce a patent
    -(such as an express permission to practice a patent or covenant not to
    -sue for patent infringement).  To "grant" such a patent license to a
    -party means to make such an agreement or commitment not to enforce a
    -patent against the party.
    -
    -  If you convey a covered work, knowingly relying on a patent license,
    -and the Corresponding Source of the work is not available for anyone
    -to copy, free of charge and under the terms of this License, through a
    -publicly available network server or other readily accessible means,
    -then you must either (1) cause the Corresponding Source to be so
    -available, or (2) arrange to deprive yourself of the benefit of the
    -patent license for this particular work, or (3) arrange, in a manner
    -consistent with the requirements of this License, to extend the patent
    -license to downstream recipients.  "Knowingly relying" means you have
    -actual knowledge that, but for the patent license, your conveying the
    -covered work in a country, or your recipient's use of the covered work
    -in a country, would infringe one or more identifiable patents in that
    -country that you have reason to believe are valid.
    -
    -  If, pursuant to or in connection with a single transaction or
    -arrangement, you convey, or propagate by procuring conveyance of, a
    -covered work, and grant a patent license to some of the parties
    -receiving the covered work authorizing them to use, propagate, modify
    -or convey a specific copy of the covered work, then the patent license
    -you grant is automatically extended to all recipients of the covered
    -work and works based on it.
    -
    -  A patent license is "discriminatory" if it does not include within
    -the scope of its coverage, prohibits the exercise of, or is
    -conditioned on the non-exercise of one or more of the rights that are
    -specifically granted under this License.  You may not convey a covered
    -work if you are a party to an arrangement with a third party that is
    -in the business of distributing software, under which you make payment
    -to the third party based on the extent of your activity of conveying
    -the work, and under which the third party grants, to any of the
    -parties who would receive the covered work from you, a discriminatory
    -patent license (a) in connection with copies of the covered work
    -conveyed by you (or copies made from those copies), or (b) primarily
    -for and in connection with specific products or compilations that
    -contain the covered work, unless you entered into that arrangement,
    -or that patent license was granted, prior to 28 March 2007.
    -
    -  Nothing in this License shall be construed as excluding or limiting
    -any implied license or other defenses to infringement that may
    -otherwise be available to you under applicable patent law.
    -
    -  12. No Surrender of Others' Freedom.
    -
    -  If conditions are imposed on you (whether by court order, agreement or
    -otherwise) that contradict the conditions of this License, they do not
    -excuse you from the conditions of this License.  If you cannot convey a
    -covered work so as to satisfy simultaneously your obligations under this
    -License and any other pertinent obligations, then as a consequence you may
    -not convey it at all.  For example, if you agree to terms that obligate you
    -to collect a royalty for further conveying from those to whom you convey
    -the Program, the only way you could satisfy both those terms and this
    -License would be to refrain entirely from conveying the Program.
    -
    -  13. Remote Network Interaction; Use with the GNU General Public License.
    -
    -  Notwithstanding any other provision of this License, if you modify the
    -Program, your modified version must prominently offer all users
    -interacting with it remotely through a computer network (if your version
    -supports such interaction) an opportunity to receive the Corresponding
    -Source of your version by providing access to the Corresponding Source
    -from a network server at no charge, through some standard or customary
    -means of facilitating copying of software.  This Corresponding Source
    -shall include the Corresponding Source for any work covered by version 3
    -of the GNU General Public License that is incorporated pursuant to the
    -following paragraph.
    -
    -  Notwithstanding any other provision of this License, you have
    -permission to link or combine any covered work with a work licensed
    -under version 3 of the GNU General Public License into a single
    -combined work, and to convey the resulting work.  The terms of this
    -License will continue to apply to the part which is the covered work,
    -but the work with which it is combined will remain governed by version
    -3 of the GNU General Public License.
    -
    -  14. Revised Versions of this License.
    -
    -  The Free Software Foundation may publish revised and/or new versions of
    -the GNU Affero General Public License from time to time.  Such new versions
    -will be similar in spirit to the present version, but may differ in detail to
    -address new problems or concerns.
    -
    -  Each version is given a distinguishing version number.  If the
    -Program specifies that a certain numbered version of the GNU Affero General
    -Public License "or any later version" applies to it, you have the
    -option of following the terms and conditions either of that numbered
    -version or of any later version published by the Free Software
    -Foundation.  If the Program does not specify a version number of the
    -GNU Affero General Public License, you may choose any version ever published
    -by the Free Software Foundation.
    -
    -  If the Program specifies that a proxy can decide which future
    -versions of the GNU Affero General Public License can be used, that proxy's
    -public statement of acceptance of a version permanently authorizes you
    -to choose that version for the Program.
    -
    -  Later license versions may give you additional or different
    -permissions.  However, no additional obligations are imposed on any
    -author or copyright holder as a result of your choosing to follow a
    -later version.
    -
    -  15. Disclaimer of Warranty.
    -
    -  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
    -APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
    -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
    -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
    -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    -PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
    -IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
    -ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
    -
    -  16. Limitation of Liability.
    -
    -  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
    -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
    -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
    -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
    -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
    -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
    -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
    -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
    -SUCH DAMAGES.
    -
    -  17. Interpretation of Sections 15 and 16.
    -
    -  If the disclaimer of warranty and limitation of liability provided
    -above cannot be given local legal effect according to their terms,
    -reviewing courts shall apply local law that most closely approximates
    -an absolute waiver of all civil liability in connection with the
    -Program, unless a warranty or assumption of liability accompanies a
    -copy of the Program in return for a fee.
    -
    -                     END OF TERMS AND CONDITIONS
    -
    -            How to Apply These Terms to Your New Programs
    -
    -  If you develop a new program, and you want it to be of the greatest
    -possible use to the public, the best way to achieve this is to make it
    -free software which everyone can redistribute and change under these terms.
    -
    -  To do so, attach the following notices to the program.  It is safest
    -to attach them to the start of each source file to most effectively
    -state the exclusion of warranty; and each file should have at least
    -the "copyright" line and a pointer to where the full notice is found.
    -
    -    <one line to give the program's name and a brief idea of what it does.>
    -    Copyright (C) <year>  <name of author>
    -
    -    This program is free software: you can redistribute it and/or modify
    -    it under the terms of the GNU Affero General Public License as published by
    -    the Free Software Foundation, either version 3 of the License, or
    -    (at your option) any later version.
    -
    -    This program is distributed in the hope that it will be useful,
    -    but WITHOUT ANY WARRANTY; without even the implied warranty of
    -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    -    GNU Affero General Public License for more details.
    -
    -    You should have received a copy of the GNU Affero General Public License
    -    along with this program.  If not, see http://www.gnu.org/licenses/.
    -
    -Also add information on how to contact you by electronic and paper mail.
    -
    -  If your software can interact with users remotely through a computer
    -network, you should also make sure that it provides a way for users to
    -get its source.  For example, if your program is a web application, its
    -interface could display a "Source" link that leads users to an archive
    -of the code.  There are many ways you could offer source, and different
    -solutions will be better for different programs; see section 13 for the
    -specific requirements.
    -
    -  You should also get your employer (if you work as a programmer) or school,
    -if any, to sign a "copyright disclaimer" for the program, if necessary.
    -For more information on this, and how to apply and follow the GNU AGPL, see
    -http://www.gnu.org/licenses/.
    -
    -===========================================
    -
    - -

    - -
    - -
    - - - - - - - - - -
    -
    - - - - -
    -
    -

    - -Burp is open and free software. I work on it in my spare time. -If you would like this work to continue, please consider making a small -donation. - -

    -
    -
    - -
    -
    -
    - -
    - -Burp, don't suck. - - - -Last updated: February 2012 - -
    - - - - - diff -Nru burp-1.3.0+20120214git/website/html/faq.html burp-1.3.10/website/html/faq.html --- burp-1.3.0+20120214git/website/html/faq.html 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/website/html/faq.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,428 +0,0 @@ - - - - - - -BURP - BackUp and Restore Program - - - - - - - - - - - -
    - - - - -

    - -BURP - BackUp and Restore Program - - -
    - - - - - - - - - -
    indexwhyfaqhowtodownloadcontact
    -
    - -

    - - - - - - - - - - - - - -
    -
    - - -
    - -

    - -Q. Why? - -

    -

    - -A. Please go to the WHY page. - -

    -
    - -

    - -Q. What operating systems do I need to be running? - -

    -

    - -The burp server (where the backups are stored) needs to run on a Linux-style -operating system. Personally, I use Debian. -The burp client (from which backups are taken) can run on Linux or Windows. - -

    - -

    - -Q. What are the main features? What works? - -

    -

    - -A. At the time of writing, the following features work: -

      -
    • Server mode runs on Unix-based systems. -
    • Client mode runs on Windows and Unix-based systems. -
    • Windows Volume Shadow Copy Service (VSS) support (Windows XP R2 and newer). -
    • Windows 32bit and 64bit support. -
    • Delta differencing with librsync. -
    • Network backups. -
    • Backs up and restores files, directories, symlinks, hardlinks, fifos and -nodes. -
    • Storage and network compression using zlib. -
    • Ability to continue interrupted backups. -
    • Client/server communications encryption with SSL. -
    • Client side file encryption - (note: this turns off delta differencing). -
    • Scheduling. -
    • Email backup success/failure notifications. -
    • A single daily backup summary email. -
    • A live ncurses monitor on the server. -
    • Fifo read/write support. -
    • Pre/post backup/restore client scripts. -
    • Backups of Solaris ZFS snapshot send/receives. -
    • Linux and FreeBSD acl/xattr support. -
    • Multiple retention periods (e.g, keep 1 backup per day for 7 days, 1 backup per week for 4 weeks, 1 backup per 4 weeks for a year). -
    • Network rate limiting. -
    • Storage data deduplication (in versions > 1.2.2) -
    • Automatic client upgrade (for server and client >= 1.3.0) -
    - -

    -
    - -

    - -Q. What is on the roadmap? What doesn't work? - -

    -

    - -A. The following items are on my TODO list (for the full list so the TODO file -in the top level directory of the source): -

      -
    • Add extra ways of deciding when to delete old backups - e.g, by time, or -by space. -
    • Add acl/xattr support for Solaris. -
    • Server-side file encryption option, so that network deltas can still be - done if you have file encryption turned on. -
    • Improve the status monitor. -
    • Add include/exclude wildcards. -
    • Start thinking about how to make a client-side gui for doing things like - restores. -
    • Get EFS backup/restore working on Windows. -
    • Add a mechanism that can make clients upgrade automatically. -
    - -

    -
    - -

    - -Q. What are the main dependencies? - -

    -

    - -A. They are: -

      -
    • librsync -
    • openssl -
    • zlib (>=1.2.5 is recommended) -
    - -

    - -
    - -

    - -Q. Do I need to install cygwin on Windows? - -

    -

    - -No. - -

    - -
    - -

    - -Q. How do I build the Windows client? - -

    -

    - -This is slightly complicated. You might want to go to the DOWNLOAD page and -get a prebuilt binary. If you really want to build it yourself, follow the -instructions in the README file in the src/win32 directory of the burp source. - -

    - -
    - -

    - -Q. How do I build a static Linux binary? - -

    -

    - -Use the --enable-static and --disable-libtool configure script options. - -

    - -
    -

    - -Q. What licence does Burp use? - -

    - -

    - -A. It is open source free software (where 'free' means both that you do not have -to pay for it, and that you have freedom to do what you want with it) released -under the AGPLv3 licence. Refer to the Burp -LICENCE file for more details. - -

    - -
    - -

    - -Q. How can I do a "bare metal" restore? - -

    - -

    - -A. There are instructions for Windows 7. -
    -If anybody wants to contribute instructions for any other operating system, -please feel free. -
    -

    - -
    -

    - -Q. I get errors like "/0000/0000/1ACA.gz: File too large" in my log. - -

    - -

    - -A. This is burp trying to open a backed up file on the burp server. -Older versions of zlib can have problems opening large files. Try upgrading -zlib to at least version 1.2.5. - -

    - -
    -

    - -Q. Are you going to do data deduplication on the server side? - -

    - -

    - -Yes, new in version 1.2.4. -Note, that there are file systems (like btrfs, zfs and btrfs) coming along that -will do data deduplication automatically, and probably better than burp. - -

    - -
    -

    - -Q. What is the best file system to use on the server? - -

    - -

    - -So far, I have done all my testing on ext3, and it works for me. The main -concern is not to run out of file system inodes. You can configure the number -of inodes when you create the ext3 file system, but you cannot change the -number later without reformatting. -
    -
    -One of my test clients has over a million files. Because I had used -the ext3 optimisation option for large files on the storage device (having -previously been using it for bacula), I initially ran out of inodes. -Reformatting the file system to have more inodes has solved the problem. -
    -
    -To see how many inodes I have, I use the command 'df -i' -
    -
    -Here is a helpful 10-year old mailing list post about ext3 inodes: -http://markmail.org/message/ergkrg6thswonkgo -
    -
    -(ignore the recommendation for reiserfs - I believe that ext3 has moved on more -than reiserfs over the last 10 years!) -
    -

    - -
    -

    - -Q. I specified LDFLAGS="-L /opt/somepath" to build burp, but when I run it, it uses the system libraries instead of the libraries I installed in /opt/somepath! - -

    - -

    - -Try this: LDFLAGS="-L /opt/somepath -R /opt/somepath" - -

    - -
    - -

    - -Q. On Windows, the client exits with a message like: -"Could not open 'C:/Documents and Settings/Administrator/NTUSER.DAT': The file is in use by another process." -Why? - -

    - -

    - -On newer versions of Windows, things called 'junction points' have been added. -In the example given, 'include = C:/Documents and Settings' was set in the -client burp.conf, but 'C:/Documents and Settings' is a junction point and the -real path is 'C:/Users'. -
    -Pointing burp at the junction point means that it goes outside of the VSS -snapshot, and hence cannot open files that other processes have open. -Use the real path instead. -
    -

    - -
    - -

    - -Q. My backup fails with the message 'error in async_rw'. Why? - -

    - -

    - -This normally means that the other side of the connection went away. -For example, it happens to me when I close my laptop lid, or when my laptop -goes into hibernate mode, or when I pull the network cable out. -
    -Otherwise, if you are seeing this message on the server, it is worth running -the backup by hand from a console on the client (if you are not already doing -so), as it may give you more information to work with. -
    -

    - -
    - -

    - -Q. How can I automatically upgrade burp clients? - -

    - -

    - -A. There are instructions here. - -

    - - -
    - - - - - - - - - -
    -
    - - - - -
    -
    -

    - -Burp is open and free software. I work on it in my spare time. -If you would like this work to continue, please consider making a small -donation. - -

    -
    -
    - -
    -
    -
    - -
    - -Burp, don't suck. - - - -Last updated: February 2012 - -
    - - - - - diff -Nru burp-1.3.0+20120214git/website/html/howto/wincompile.html burp-1.3.10/website/html/howto/wincompile.html --- burp-1.3.0+20120214git/website/html/howto/wincompile.html 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/website/html/howto/wincompile.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,92 +0,0 @@ - - - - - - -BURP - BackUp and Restore Program - - - - - - - - - - - -
    - - - - -

    - -BURP - BackUp and Restore Program - - -
    - - - - - - - - - -
    indexwhyfaqhowtodownloadcontact
    -
    - -

    - - -dsf - - - - - - - - - -
    -
    - - - - -
    -
    -

    - -Burp is open and free software. I work on it in my spare time. -If you would like this work to continue, please consider making a small -donation. - -

    -
    -
    - -
    -
    -
    - -Late updated: February 2011 - -
    - - - - - diff -Nru burp-1.3.0+20120214git/website/html/howto.html burp-1.3.10/website/html/howto.html --- burp-1.3.0+20120214git/website/html/howto.html 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/website/html/howto.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,836 +0,0 @@ - - - - - - -BURP - BackUp and Restore Program - - - - - - - - - - - -
    - - - - -

    - -BURP - BackUp and Restore Program - - -
    - - - - - - - - - -
    indexwhyfaqhowtodownloadcontact
    -
    - -

    - - - - - - - - - - - - -
    -
    -

    - -

    -QUICK START
    -
    -You need to compile burp on a unix-based operating system first.
    -Make sure that you have openssl, zlib and librsync libraries and development
    -libraries installed. With debian or ubuntu, this command should install them
    -for you:
    -apt-get install librsync-dev libz-dev libssl-dev
    -Change to the burp source directory and run "./configure",
    -then "make".
    -All being well, burp will compile successfully.
    -Then run "make install" as root to install.
    -
    -Start the burp server with this command:
    -burp -c /etc/burp/burp-server.conf
    -
    -By default, the server will fork into the background and run as a daemon. To
    -stay in the foreground, add the '-F' option.
    -
    -UNIX CLIENT
    -
    -The example client configuration file is /etc/burp/burp.conf.
    -It will backup /home by default.
    -
    -A cron job for the client is installed to /etc/cron.d/burp and will run every
    -20 minutes. Whether or not this results in an actual backup depends upon the
    -timer settings in the server config files.
    -
    -You can either force a backup by hand:
    -burp -a b
    - 
    -Or add a regular cron job like the following to /etc/cron.d/burp (or
    -equivalent). This makes the client ask the server every twenty minutes whether
    -it is yet time for a new backup. It is probably a good idea to change the
    -numbers for each client, in order to spread the load a bit:
    -MAILTO=
    -7,27,47 * * * * root    /sbin/burp -a t
    -
    -WINDOWS CLIENT
    -
    -Pick the 32-bit or 64-bit Burp installer as appropriate - visit
    -http://burp.grke.net/ to find one of them.
    -Compilation instructions can be found at src/win32/README in the source package.
    -The Windows installer will ask you for the address of your server, the client
    -name, and the client password. Burp will then install its files to:
    -C:/Program Files/Burp
    -If you need to change client configuration settings, the file can be found at:
    -C:/Program Files/Burp/burp.conf
    -It will be configured to backup "C:/Documents and Settings".
    -
    -A Windows Scheduler task will have been installed and will be configured to
    -run every 20 minutes from the time of the installation. Whether or not this
    -results in an actual backup depends upon the timer settings in the server
    -config files.
    -
    -To force a backup by hand, start the burp client from within its directory:
    -cd "C:\Program Files\Burp\bin"
    -burp.exe -a b
    -If you are running Windows 7, you might need to start the command prompt with
    -"Run as Administrator".
    -
    -
    -
    -For more help, see the man page - type 'man burp'.
    -
    -
    -For the benefit of the website, the man page now follows.
    -
    -
    -Burp(8) 							       Burp(8)
    -
    -
    -
    -NAME
    -       Burp - BackUp and Restore Program
    -
    -SYNOPSIS
    -       burp [OPTIONS]
    -
    -DESCRIPTION
    -       BackUp and Restore Program.
    -
    -
    -SERVER OPTIONS
    -       -c path
    -	      Short  for  'config  file'. The argument is a path to the config
    -	      file. The default is /etc/burp/burp.conf.
    -
    -       -n     No forking mode. The program will accept a  single  query,  deal
    -	      with  it,  and  then exit. This is useful for debugging. Implies
    -	      '-F'.
    -
    -       -F     Foreground mode. The server will fork into  the  background  and
    -	      run as a daemon if you do not give this option.
    -
    -       -a s   Run this to connect to a running server to get a live monitor of
    -	      the status of all your backup clients.  If  your	server	config
    -	      file is not in the default location, you will also need to spec‐
    -	      ify the path with the '-c' option.  The  live  monitor  requires
    -	      ncurses support at compile time.
    -
    -       -a S   Similar to '-a s', but it prints the main status monitor summary
    -	      screen to stdout. The intention is that a script	can  run  this
    -	      and  email  an  administrator  the  output  on  a cron job. This
    -	      doesn't require ncurses support.
    -
    -       -i     Print an index table of symbols that humans may  see  burp  pro‐
    -	      duce, and exit.
    -
    -       -l [path]
    -	      Path  to	log file. The default is stdout. This option overrides
    -	      the logfile option in the config file. Use /dev/null to  deacti‐
    -	      vate or '' to reactivate output.
    -
    -
    -CLIENT OPTIONS
    -       -a [b|t|r|l|L|v|e]
    -	      Short  for  'action'.  The  arguments mean backup, timed backup,
    -	      restore, list, long list, verify, or estimate, respectively.
    -
    -       -b [number|a]
    -	      Short for 'backup number'. The argument is a number, or  'a'  to
    -	      select all backups.
    -
    -       -c [path]
    -	      Short  for  'config  file'. The argument is a path to the config
    -	      file.  The  default  is	/etc/burp/burp.conf,   or   C:\Program
    -	      Files\Burp\burp.conf on Windows.
    -
    -       -d [path]
    -	      Short  for 'directory'. The argument is a path to an alternative
    -	      directory to restore to.
    -
    -       -f [path]
    -	      Short for 'force overwrite'. Without this option set, a  restore
    -	      will not overwrite existing files.
    -
    -       -i     Print  an  index	table of symbols that humans may see burp pro‐
    -	      duce, and exit.
    -
    -       -r [regex]
    -	      Short for  'regular  expression'.  The  argument	is  a  regular
    -	      expression  with	which  to match backup files. Use it for lists
    -	      and restores.
    -
    -       -l [path]
    -	      Short for 'log file'. The argument is a path to  the  log  file.
    -	      The  default is stdout. This option overrides the logfile option
    -	      in the config file. Use /dev/null to deactivate or '' to reacti‐
    -	      vate output.
    -
    -
    -EXAMPLES
    -       burp -a b
    -	      Runs a backup.
    -
    -       burp -a l
    -	      Lists the available backups and dates.
    -
    -       burp -a l -b 1
    -	      Lists all the files in backup number 1.
    -
    -       burp -a l -b 1 -l /dev/null
    -	      Lists all the files in backup number 1 without extra debug info.
    -
    -       burp -a l -b a
    -	      Lists all the files in all the backups.
    -
    -       burp -a l -b 1 -r myregex
    -	      Lists  all  the  files in backup number 1 that match the regular
    -	      expression 'myregex'.
    -
    -       burp -a L -b 1 -r myregex
    -	      Long lists all the files in backup number 1 that match the regu‐
    -	      lar expression 'myregex'. This is like doing an 'ls -l'.
    -
    -       burp -a r -b 1 -r myregex
    -	      Restores all the files in backup number 1 that match the regular
    -	      expression 'myregex' back to their original location. You  won't
    -	      be given a warning if the files already exist there, so use with
    -	      caution.
    -
    -       burp -a r -b 1 -r myregex -d /tmp/restoredir
    -	      Restores all the files in backup number 1 that match the regular
    -	      expression 'myregex' into the directory /tmp/restoredir.
    -
    -       burp -a r
    -	      Restores all the files in the most recent backup to their origi‐
    -	      nal location. You won't be given a warning if the files  already
    -	      exist there, so use with caution.
    -
    -       burp -a v
    -	      Verifies the most recent backup.
    -
    -       burp -a v -b 1 -r myregex
    -	      Verifies	everything in backup number 1 that matches the regular
    -	      expression 'myregex'.
    -
    -       burp -a t
    -	      Timed backup. The same as 'burp -a b', except that a  script  is
    -	      run  on the server before deciding to go ahead. The intention is
    -	      that this command will be run on a repeating  cron  job  with  a
    -	      short  interval, and that the server will decide when it is time
    -	      for a new backup.
    -
    -
    -SERVER CONFIGURATION FILE OPTIONS
    -       mode=server
    -	      Required to run in server mode.
    -
    -       port=[port number]
    -	      Defines the main TCP port that the server listens on.
    -
    -       status_port=[port number]
    -	      Defines the TCP port that  the  server  listens  on  for	status
    -	      requests.
    -
    -       directory=[path]
    -	      Path to the directory in which to store backups.
    -
    -       clientconfdir=[path]
    -	      Path to the directory that contains client configuration files.
    -
    -       lockfile=[path]
    -	      Path to the lockfile that ensures that two server processes can‐
    -	      not run simultaneously.
    -
    -       pidfile=[path]
    -	      Synonym for lockfile.
    -
    -       logfile=[path]
    -	      Path to the logfile.
    -
    -       keep=[number]
    -	      Number of backups to keep. This can be overriddden by the client
    -	      configuration files in clientconfdir on the server. Specify mul‐
    -	      tiple 'keep' entries on separate lines in order to keep multiple
    -	      periods  of  backups. For example, assuming that you are doing a
    -	      backup a day, keep=7 keep=4 keep=6 (on separate lines) will keep
    -	      7 daily backups, 4 weekly backups (7x4=28), and 6 multiples of 4
    -	      weeks (7x4x6=168) - roughly 6 monthly backups. Effectively,  you
    -	      will  be	guaranteed  to	be able to restore up to 168 days ago,
    -	      with the number of available backups exponentially decreasing as
    -	      you  go  back  in time to that point. In this example, every 7th
    -	      backup will be hardlinked to allow burp to safely delete	inter‐
    -	      mediate  backups	when  necessary.  You  can have as many 'keep'
    -	      lines as you like, as long as they don't	exceed	52560000  when
    -	      multiplied  together.  That  is,	a  backup every minute for 100
    -	      years.
    -
    -       hardlinked_archive=[0|1]
    -	      On the server, defines whether to keep hardlinked files  in  the
    -	      backups,	or  whether  to generate reverse deltas and delete the
    -	      original files. Can be set to either 0 (off) or 1  (on).	Disad‐
    -	      vantage:	More  disk space will be used Advantage: Restores will
    -	      be faster, and since no reverse deltas need to be generated, the
    -	      time  and  effort  the  server  needs  at the end of a backup is
    -	      reduced.
    -
    -       max_hardlinks=[number]
    -	      On the server, the number of times that a  single  file  can  be
    -	      hardlinked.  The	bedup  program	also  obeys  this setting. The
    -	      default is 10000.
    -
    -       librsync=[0|1]
    -	      When set to 0, delta differencing will not take place. That  is,
    -	      when a file changes, the server will request the whole new file.
    -	      The default is 1. This option can be overridden  by  the	client
    -	      configuration files in clientconfdif on the server.
    -
    -       compression=[gzip0-9]
    -	      Choose  the  level of gzip compression. Setting 0 or gzip0 turns
    -	      compression off. The default is gzip9. This option can be  over‐
    -	      ridden by the client configuration files in clientconfdif on the
    -	      server.
    -
    -       client_lockdir=[path]
    -	      Path to the directory in which to keep per-client lock files. By
    -	      default,	this  is  set  to  the	path  given by the 'directory'
    -	      option.
    -
    -       user=[username]
    -	      Run as a particular user. This can be overridden by  the	client
    -	      configuration files in clientconfdir on the server.
    -
    -       group=[groupname]
    -	      Run  as a particular group. This can be overridden by the client
    -	      configuration files in clientconfdir on the server.
    -
    -       umask=[umask]
    -	      Set the file creation umask. Default is 0022.
    -
    -       ratelimit=[Mb/s]
    -	      Set the network send rate limit, in Mb/s. If this option is  not
    -	      given, burp will send data as fast as it can.
    -
    -       network_timeout=[s]
    -	      Set  the	network  timeout  in  seconds.	If  no data is sent or
    -	      received over a period of this length, burp will	give  up.  The
    -	      default is 7200 seconds (2 hours).
    -
    -       working_dir_recovery_method=[resume|use|delete]
    -	      This  option tells the server what to do when it finds the work‐
    -	      ing directory of an interrupted backup (perhaps somebody	pulled
    -	      the plug on the server, or something). This can be overridden by
    -	      the client configurations files in clientconfdir on the  server.
    -	      Options are...
    -
    -       delete: Just delete the old working directory.
    -
    -       use: Convert the working directory into a complete backup.
    -
    -       resume:	Simply continue the previous backup from the point at which it
    -       left off.
    -
    -       ssl_cert_ca=[path]
    -	      The path to the SSL CA certificate. This file will  probably  be
    -	      the same on both the server and the client. The file should con‐
    -	      tain just the certificate in PEM format
    -
    -       ssl_cert=[path]
    -	      The path to the server SSL certificate. It works for me when the
    -	      file  contains  the concatenation of the certificate and private
    -	      key in PEM format.
    -
    -       ssl_key=[path]
    -	      The path to the server SSL private key in PEM format.
    -
    -       ssl_key_password=[password]
    -	      The SSL key password.
    -
    -       ssl_cert_password=[password]
    -	      Synonym for ssl_key_password.
    -
    -       ssl_dhfile=[path]
    -	      Path to Diffie-Hellman parameter	file.  To  generate  one  with
    -	      openssl,	 use   a  command  like  this:	openssl  dhparam  -out
    -	      dhfile.pem -5 1024
    -
    -       max_children=[number]
    -	      Defines the number of child processes to	fork  (the  number  of
    -	      clients that can simultaneously connect. The default is 5.
    -
    -       max_storage_subdirs=[number]
    -	      Defines  the number of subdirectories in the data storage areas.
    -	      The maximum number of subdirectories that ext3 allows is	32000.
    -	      If you do not set this option, it defaults to 30000.
    -
    -       timer_script=[path]
    -	      Path  to the script to run when a client connects with the timed
    -	      backup option. If the script exits with code 0,  a  backup  will
    -	      run. The first two arguments are the client name and the path to
    -	      the 'current' storage directory. The next  three	arguments  are
    -	      reserved, and user arguments are appended after that. An example
    -	      timer script is provided. The timer_script option can  be  over‐
    -	      riddden  by  the	client configuration files in clientconfdir on
    -	      the server.
    -
    -       timer_arg=[string]
    -	      A user-definable argument to the timer script. You can have many
    -	      of these. The timer_arg options can be overriddden by the client
    -	      configuration files in clientconfdir on the server.
    -
    -       notify_success_script=[path]
    -	      Path to the script to run when a backup succeeds. User arguments
    -	      are appended after the first five reserved arguments. An example
    -	      notify script is provided. The notify_success_script option  can
    -	      be  overriddden  by  the	client	configuration files in client‐
    -	      confdir on the server.
    -
    -       notify_success_arg=[string]
    -	      A user-definable argument to the notify success script. You  can
    -	      have  many of these. The notify_success_arg options can be over‐
    -	      riddden by the client configuration files  in  clientconfdir  on
    -	      the server.
    -
    -       notify_success_warnings_only=[0|1]
    -	      Set  to  1  to  send  success notifications only when there were
    -	      warnings. Leave unset or set to 0 to send success  notifications
    -	      for every backup.
    -
    -       notify_failure_script=[path]
    -	      The same as notify_success_script, but for backups that failed.
    -
    -       notify_failure_arg=[string]
    -	      The same as notify_failure_arg, but for backups that failed.
    -
    -       dedup_group=[string]
    -	      Enables  you  to	group  clients together for file deduplication
    -	      purposes. For example, you might want  to  set  'dedup_group=xp'
    -	      for  each Windows XP client, and then run the bedup program on a
    -	      cron job every other day with the option '-g xp'.
    -
    -       server_script_pre=[path]
    -	      Path to a script to run on the server  after  each  successfully
    -	      authenticated connection but before any work is carried out. The
    -	      arguments to it are 'pre', '(client  command)',  'reserved3'  to
    -	      'reserved5',	and	 then	  arguments	defined     by
    -	      server_script_pre_arg. If the script returns non-zero, the  task
    -	      asked  for  by  the  client  will  not  be run. This command and
    -	      related options can be overriddden by the  client  configuration
    -	      files in clientconfdir on the server.
    -
    -       server_script_pre_arg=[string]
    -	      A user-definable argument to the server pre script. You can have
    -	      many of these.
    -
    -       server_script_post=[path]
    -	      Path to a script to run on the server before the client  discon‐
    -	      nects.  The  arguments  to  it  are  'post', '(client command)',
    -	      'reserved3'  to  'reserved5',  and  then	arguments  defined  by
    -	      server_script_post_arg.  This command and related options can be
    -	      overriddden by the client configuration files  in  clientconfdir
    -	      on the server.
    -
    -       server_script_post_arg=[string]
    -	      A  user-definable  argument  to  the server post script. You can
    -	      have many of these.
    -
    -       server_script=[path]
    -	      You can use this to save space in your config file when you want
    -	      to   run	 the   same   server   script	twice.	 It  overrides
    -	      server_script_pre  and  server_script_post.  This  command   and
    -	      related  options	can be overriddden by the client configuration
    -	      files in clientconfdir on the server.
    -
    -       server_script_arg=[path]
    -	      Goes with server_script and overrides server_script_pre_arg  and
    -	      server_script_post_arg.
    -
    -       server_script_post_run_on_fail=[0|1]
    -	      If  this is set to 1, server_script_post will always be run. The
    -	      default is 0, which means that if the  task  asked  for  by  the
    -	      client fails, server_script_post will not be run.
    -
    -       autoupgrade_dir=[path]
    -	      Path  to	autoupgrade  directory	from  which upgrades are down‐
    -	      loaded. The option can be left unset in order not to autoupgrade
    -	      clients.	Please	see docs/autoupgrade.txt in the source package
    -	      for more help with this option.
    -
    -
    -CLIENT CONFIGURATION FILE OPTIONS
    -       mode=client
    -	      Required to run in client mode.
    -
    -       server=[IP address or hostname]
    -	      Defines the server to connect to.
    -
    -       port=[port number]
    -	      Defines the TCP port that the server is listening on.
    -
    -       cname=[password]
    -	      Defines the client name to identify as to the server.
    -
    -       password=[password]
    -	      Defines the password to send to the server.
    -
    -       lockfile=[path]
    -	      Path to the lockfile that ensures that two client processes can‐
    -	      not run simultaneously (this currently doesn't work on Windows).
    -
    -       pidfile=[path]
    -	      Synonym for lockfile.
    -
    -       logfile=[path]
    -	      Path to the logfile.
    -
    -       user=[username]
    -	      Run as a particular user (not supported on Windows).
    -
    -       group=[groupname]
    -	      Run as a particular group (not supported on Windows).
    -
    -       ratelimit=[Mb/s]
    -	      Set  the network send rate limit, in Mb/s. If this option is not
    -	      given, burp will send data as fast as it can.
    -
    -       network_timeout=[s]
    -	      Set the network timeout in  seconds.  If	no  data  is  sent  or
    -	      received	over  a  period of this length, burp will give up. The
    -	      default is 7200 seconds (2 hours).
    -
    -       include=[path]
    -	      Path to include in the backup. You  can  have  multiple  include
    -	      lines.  Use  forward  slashes  '/',  not backslashes '\' as path
    -	      delimiters.
    -
    -       exclude=[path]
    -	      Path to exclude from the backup. You can have  multiple  exclude
    -	      lines.  Use  forward  slashes  '/',  not backslashes '\' as path
    -	      delimiters.
    -
    -       exclude_ext=[extension]
    -	      Extensions to exclude from the backup. Case insensitive. You can
    -	      have multiple exclude extension lines. For example, set 'vdi' to
    -	      exclude VirtualBox disk images.
    -
    -       min_file_size=[b/Kb/Mb/Gb]
    -	      Do not back up files that are  less  than  the  specified  size.
    -	      Example:	'min_file_size = 10Mb'. Set to 0 (the default) to have
    -	      no limit.
    -
    -       max_file_size=[b/Kb/Mb/Gb]
    -	      Do not back up files that are greater than the  specified  size.
    -	      Example:	'max_file_size = 10Mb'. Set to 0 (the default) to have
    -	      no limit.
    -
    -       cross_filesystem=[path]
    -	      Allow backups to cross a particular filesystem mountpoint.
    -
    -       cross_all_filesystems=[0|1]
    -	      Allow backups to cross all filesystem mountpoints.
    -
    -       nobackup=[file name]
    -	      If this file system entry exists, the  directory	containing  it
    -	      will not be backed up.
    -
    -       read_fifo=[path]
    -	      Do  not  back  up the given fifo itself, but open it for reading
    -	      and back up the contents as if it were a regular file.
    -
    -       read_all_fifos=[0|1]
    -	      Open all fifos for reading and back up the contents as  if  they
    -	      were regular files.
    -
    -       ssl_cert_ca=[path]
    -	      The  path  to the SSL CA certificate. This file will probably be
    -	      the same on both the server and the client. The file should con‐
    -	      tain just the certificate in PEM format
    -
    -       ssl_cert=[path]
    -	      The path to the client SSL certificate. It works for me when the
    -	      file contains the concatenation of the certificate  and  private
    -	      key in PEM format.
    -
    -       ssl_key=[path]
    -	      The path to the client SSL private key in PEM format.
    -
    -       ssl_key_password=[password]
    -	      The SSL key password.
    -
    -       ssl_cert_password=[password]
    -	      Synonym for ssl_key_password.
    -
    -       encryption_password=[password]
    -	      Set  this to enable client side file Blowfish encryption. If you
    -	      do not want encryption, leave this  field  out  of  your	config
    -	      file.  IMPORTANT:  Configuring  this  renders delta differencing
    -	      pointless, since the smallest real change to a  file  will  make
    -	      the whole file look different. Therefore, activating this option
    -	      turns off delta differencing so  that  whenever  a  client  file
    -	      changes, the whole new file will be uploaded on the next backup.
    -	      ALSO IMPORTANT: If you manage to lose your encryption  password,
    -	      you  will not be able to unencrypt your files. You should there‐
    -	      fore think about having a copy of the encryption password  some‐
    -	      where  off-box,  in  case  of  your  client  hard  disk failing.
    -	      FINALLY: If you change your encryption password, you will end up
    -	      with  a mixture of files on the server with different encryption
    -	      and it may become tricky to restore more	than  one  file  at  a
    -	      time.  For  this reason, if you change your encryption password,
    -	      you may want to start a fresh chain of backups  (by  moving  the
    -	      original set aside, for example). Burp will cope fine with turn‐
    -	      ing the same encryption password on and off between backups, and
    -	      will  restore  a backup of mixed encrypted and unencrypted files
    -	      without a problem.
    -
    -       backup_script_pre=[path]
    -	      Path to a script to run before a backup. The arguments to it are
    -	      'pre', 'reserved2' to 'reserved5', and then arguments defined by
    -	      backup_script_pre_arg.
    -
    -       backup_script_pre_arg=[string]
    -	      A user-definable argument to the backup pre script. You can have
    -	      many of these.
    -
    -       backup_script_post=[path]
    -	      Path  to a script to run after a backup. The arguments to it are
    -	      'post', [0|1] if the backup failed or succeeded, 'reserved3'  to
    -	      'reserved5',	and	 then	  arguments	defined     by
    -	      backup_script_post_arg.
    -
    -       backup_script_post_arg=[string]
    -	      A user-definable argument to the backup  post  script.  You  can
    -	      have many of these.
    -
    -       backup_script_post_run_on_fail=[0|1]
    -	      If  this is set to 1, backup_script_post will be run whether the
    -	      backup succeeds or not. The  default  is	0,  which  means  that
    -	      backup_script_post will only be run if the backup succeeds.
    -
    -       restore_script_pre=[path]
    -	      Path  to	a  script to run before a restore. The arguments to it
    -	      are  'pre',  'reserved2'	to  'reserved5',  and  then  arguments
    -	      defined by restore_script_pre_arg.
    -
    -       restore_script_pre_arg=[string]
    -	      A  user-definable  argument  to  the restore pre script. You can
    -	      have many of these.
    -
    -       restore_script_post=[path]
    -	      Path to a script to run after a restore. The arguments to it are
    -	      'post', [0|1] if the restore failed or succeeded, 'reserved3' to
    -	      'reserved5',     and     then	arguments      defined	    by
    -	      restore_script_post_arg.
    -
    -       restore_script_post_arg=[string]
    -	      A  user-definable  argument  to the restore post script. You can
    -	      have many of these.
    -
    -       restore_script_post_run_on_fail=[0|1]
    -	      If this is set to 1, restore_script_post will be run whether the
    -	      restore  succeeds  or  not.  The	default is 0, which means that
    -	      restore_script_post will only be run if the restore succeeds.
    -
    -       backup_script=[path]
    -	      You can use this to save space in your config file when you want
    -	      to  run  the same script before and after a backup. It overrides
    -	      backup_script_pre and backup_script_post.
    -
    -       backup_script_arg=[path]
    -	      Goes with backup_script and overrides backup_script_pre_arg  and
    -	      backup_script_post_arg.
    -
    -       restore_script=[path]
    -	      You can use this to save space in your config file when you want
    -	      to run the same script before and after a restore. It  overrides
    -	      restore_script_pre and restore_script_post.
    -
    -       restore_script_arg=[path]
    -	      Goes  with  restore_script  and overrides restore_script_pre_arg
    -	      and restore_script_post_arg.
    -
    -       autoupgrade_dir=[path]
    -	      Path to autoupgrade directory  into  which  upgrades  are  down‐
    -	      loaded.  Please  see  docs/autoupgrade.txt in the source package
    -	      for more help with this option. If you do not want  your	client
    -	      to autoupgrade, do not set this option.
    -
    -       autoupgrade_os=[string]
    -	      Name  of	the  client operating system. Should match a directory
    -	      name in the server's autoupgrade_dir. If you do  not  want  your
    -	      client to autoupgrade, do not set this option.
    -
    -
    -
    -SERVER CLIENTCONFDIR FILE
    -       For  the  server to know about clients that can contact it, you need to
    -       place a file named after the client in clientconfdir.
    -
    -       The file name must match the name in the 'cname' field on the client.
    -
    -       ssl_peer_cn=[string] must also be set and match the common name in  the
    -       SSL certificate that the client gives when it connects.
    -
    -       The  file needs to contain a line like password=[password] that matches
    -       the same field on the client, or passwd=[encrypted  password]  -  where
    -       the  plain  text  password  on  the  client  will  be tested against an
    -       encrypted password of the kind you might find in /etc/passwd.
    -
    -       Additionally, the following options can be  overridden  here  for  each
    -       client:
    -	      directory  keep working_dir_recovery_method librsync compression
    -	      timer_script timer_arg notify_success_script  notify_success_arg
    -	      notify_success_warnings_only  notify_failure_script notify_fail‐
    -	      ure_arg  dedup_group   server_script_pre	 server_script_pre_arg
    -	      server_script_post      server_script_post_arg	 server_script
    -	      server_script_arg server_script_post_run_on_fail
    -
    -
    -Some notes on SSL certificates
    -       The burp example configs come with example SSL certificates  and  keys.
    -       You can use these and burp will work. But if you are worried about net‐
    -       work security, you should generate your own certificates and  keys  and
    -       point  your config files to them. To create the example files, I used a
    -       handy  interface  to  openssl,	called	 'tinyca'   (http://tinyca.sm-
    -       zone.net/).  If	you  are  using  Debian,  you can run 'apt-get install
    -       tinyca' to get it. There is also the option of using burp_ca, which you
    -       can find in the source distribution, courtesy of Patrick Koppen.
    -
    -
    -Examining backups
    -       As  well  as  using the client list options described above, you can go
    -       directly to the storage directory on the  server.  The  backups	for  a
    -       client  are in the directory named after the client. Inside each backup
    -       directory is a file called manifest.gz.
    -
    -       This contains a list of all the files in the  backup,  and  where  they
    -       originally came from on the client.
    -
    -       There  is  also a 'log.gz' file in the backup directory, which contains
    -       the output generated by the server during the backup.
    -
    -       The 'data' directory contains complete backup files.
    -
    -       The 'deltas.reverse' directory contains	reverse  deltas  that  can  be
    -       applied	to the data from the next backup in the sequence (indicated by
    -       the contents of the 'forward' file).
    -
    -       Anything with a .gz suffix is compressed in gzip format.  You  can  use
    -       standard  tools,  such  as zcat, zless or cp, to view them or copy them
    -       elsewhere.
    -
    -
    -
    -BUGS
    -       If you find bugs, please report them to the email list. See the website
    -        for details.
    -
    -
    -AUTHOR
    -       The main author of Burp is Graham Keeling.
    -
    -
    -COPYRIGHT
    -       See the LICENCE file included with the source distribution.
    -
    -
    -
    -				     Burp			       Burp(8)
    -
    - -

    - -
    - - - - - - - - - -
    -
    - - - - -
    -
    -

    - -Burp is open and free software. I work on it in my spare time. -If you would like this work to continue, please consider making a small -donation. - -

    -
    -
    - -
    -
    -
    - -
    - -Burp, don't suck. - - - -Last updated: February 2012 - -
    - - - - - diff -Nru burp-1.3.0+20120214git/website/html/images/index.html burp-1.3.10/website/html/images/index.html --- burp-1.3.0+20120214git/website/html/images/index.html 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/website/html/images/index.html 2012-07-27 19:36:25.000000000 +0000 @@ -88,7 +88,9 @@ -Last updated: February 2012 +Last updated: July 2012 +
    +Hosted by 6sync
    diff -Nru burp-1.3.0+20120214git/website/html/index.html burp-1.3.10/website/html/index.html --- burp-1.3.0+20120214git/website/html/index.html 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/website/html/index.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,509 +0,0 @@ - - - - - - -BURP - BackUp and Restore Program - - - - - - - - - - - -
    - - - - -

    - -BURP - BackUp and Restore Program - - -
    - - - - - - - - - -
    indexwhyfaqhowtodownloadcontact
    -
    - -

    - - - - - - - - - - - - - - - - -
    -
    -

    - -Burp is a network backup and restore program. It uses librsync in order to -save network traffic and to save on the amount of space that is used by each -backup. -It also uses VSS (Volume Shadow Copy Service) to make snapshots when backing -up Windows computers. - -

    - -

    - -It is open source free software (where 'free' means both that you do not have -to pay for it, and that you have freedom to do what you want with it) released -under the AGPLv3 licence. See the FAQ for more information. - -

    - -

    - -Finally, as with the vast majority of open software, Burp comes with -absolutely no warranty. You are responsible for testing it and ensuring that -it works for you. -Please see the FAQ page for more information on this. - -

    - -

    - -The main author of Burp is Graham Keeling. - -

    - -
    -

    Current stable version: 1.2.2

    -
    - -

    NEWS

    - -
    - -

    -2012-01-27: burp-1.30 is released. -

    -Changes in burp-1.3.0:
    -  * Add a mechanism for automatically upgrading clients.
    -  * Fix bug where attributes on Windows directories were not getting read
    -    properly.
    -  * Fix rounding problem in remaining time estimation in the status monitor.
    -  * Don't backup the whole file if only ctime changed.
    -  * Include the client name in arguments to server scripts.
    -  * Do not log a message in the server SIGCHLD handler, as this appeared to
    -    be causing an occasional lock up on a Ubuntu server.
    -  * Upgrade Windows depkgs to latest versions of openssl.
    -  * Make Windows uninstall work.
    -  * Add 'allow autoupgrade' option to a second screen on the Windows installer.
    -  * Add 'max_storage_subdirs' option, and default it to 30000.
    -
    - -

    - -

    -2011-12-30: burp-1.2.7 is released. -

    -Changes in burp-1.2.7:
    -  * Add an automated test script.
    -  * Fix bugs with uncompressed encrypted backup/restore.
    -  * Get verify all backups for a client (-a v -b a) to work.
    -  * Return non-zero if there were warnings on verify or restore.
    -  * Add 'min_file_size' option, fix 'max_file_size' option.
    -  * Add generic server-side pre/post scripts that can run on every connection
    -    after authentication and before disconnecting.
    -  * Set environment variables from SSL cert details so that the server-side
    -    scripts can see them.
    -  * Add Jason Haar's server script for doing extra SSL certificate checks.
    -  * Add 'max_hardlinks' option, which limits the number of times a single file
    -    is hardlinked in storage. Default is 10000.
    -  * Add '-i' option: print an index table of symbols that humans may see burp
    -    produce, and exit.
    -  * Let backups carry on when files cannot be opened.
    -  * Spot Windows EFS directories and files and warn about them.
    -  * Add an 'estimate' option (-a e), which does a scan of the file system to
    -    be backed up, and prints counters, without contacting the server.
    -  * Strip out 744 lines of unused Windows code.
    -  * Fix possible segfault when backup directory forward paths don't match.
    -  * Removed working_dir_recovery_method=merge. Use 'resume' instead.
    -  * Add a flexible way of passing new fields from the client to the server so
    -    that clients are less likely to have to upgrade.
    -
    - -

    - -

    -2011-11-26: burp-1.2.5 is released. -

    -Changes in burp-1.2.5:
    -  * IMPORTANT: Fixed critical path comparison typo bug. If you have been using
    -	1.2.4 either as a server or as a client, you need to upgrade
    -	immediately! Backups made with 1.2.4 should be treated as suspicious.
    -  * Add a 'max_file_size' option.
    -  * Store windows file attributes in a separate field to the standard unix ones.
    -
    - -

    - -

    -2011-11-22: burp-1.2.4 is released. -

    -Changes in burp-1.2.4:
    -  * Add a file deduplication program, "bedup".
    -  * Add a network_timeout parameter. Default is 7200 seconds (2 hours).
    -  * Add option to send success notifications only if there were warnings.
    -  * Try to create the pidfile directory if it doesn't exist.
    -  * Restore times on Windows files.
    -  * Restore readonly/hidden attributes on Windows.
    -  * Fix bug in 'keep' mechanism where setting 'keep=2' would delete both
    -        backups.
    -  * Only install clientconfdir/testclient with 'make install' if clientconfdir
    -    didn't previously exist.
    -  * Fix possible segfault when resume mode triggers with nothing to resume.
    -
    - -

    - -

    -2011-09-29: burp-1.2.2 is released. -

    -Changes in burp-1.2.2:
    -  * Multiple retention periods (e.g, keep 1 backup per day for 7 days, 1
    -    backup per week for 4 weeks, 1 backup per 4 weeks for a year). See the
    -    'keep' option in the man page.
    -  * Make sure the client version warning message appears in the backup log.
    -  * Network send rate-limiting feature (both client and server).
    -  * Change pidfile paths to /var/run/burp instead of /var/lock/burp.
    -  * Get pre backup scripts running reliably again. Also, send script messages
    -    on stderr to the server backup log.
    -  * Fix 'Warnings' line on the status monitor.
    -  * Fix resume mode bug to do with potentially partially written entries at
    -    the end of the phase2 file.
    -
    - -

    - -

    -2011-09-09: burp-1.2.0 is released. -

    -Changes in burp-1.2.0:
    -  * Improvements to the counters and status monitor - remember the phase1
    -    scan counters for later phases to use for things like estimated times.
    -  * Add 'working_dir_recovery_method = resume' option, which continues a
    -    backup from the point it was interrupted.
    -  * Add a useful message about options when run with '-h' or '-?'.
    -  * Get the client to pass its version to the server. The minimum version the
    -    client needs to be is now this release.
    -  * Get the server to warn when the client is on a different version.
    -  * Put the number of warnings in the subject of the notification emails.
    -  * Allow config file location to be changed via configure (Michael Roland's
    -    suggestions).
    -  * Implement main server process config reload functionality on SIGHUP.
    -  * Uncomment the reload lines in the Debian init script.
    -  * Add logrotate file for Debian.
    -  * Add ability to send a regular snapshot of the status summary screen in an
    -        email ("daily backup summary" feature).
    -  * Add simple 'exclude_ext =' feature.
    -  * Add Windows 7 bare metal restore instructions.
    -
    - -

    - -

    -2011-09-01: In the UK, a nice half-page review of burp has appeared in the October edition of 'Linux Format' magazine, in their 'Hot Picks' section. - -

    - -

    -2011-07-26: burp-1.1.70 is released. -

    -Changes in burp-1.1.70:
    -  * FreeBSD xattr support.
    -  * FreeBSD ACL support.
    -  * Handle Windows junction points.
    -  * Add 'nobackup = [file name]' option. If this file system entry exists, the
    -    directory containing it will not be backed up.
    -  * Set librsync signature block size based on the old file size.
    -  * Small bug fixes to the status monitor.
    -  * Fixed working directory recovery bug where it couldn't find the manifest.gz
    -    file due to it being called manifest.gz.tmp.
    -  * Get rid of the stupidly complicated 'find_files' callback mechanism
    -    inherited from bacula. Just call all the functions directly.
    -  * Fix compiler warnings and '-ldl' linker error on FreeBSD 8.2.
    -  * When down to 'C:' in mkpath() on Windows restore, strip the ':'.
    -  * Run ERR_clear_error() before SSL_read/write.
    -
    - -

    - - -

    -2011-06-27: burp-1.1.65 is released. -

    -Changes in burp-1.1.65:
    -  * Add mechanism for backing up and restoring extra meta data.
    -  * Linux acl support.
    -  * Linux xattr support.
    -  * Add option to set the umask on the server.
    -  * Added option to specify the clientconfdir password in passwd format.
    -  * Allow user and group options to be placed in the server clientconfdir files,
    -    so that different client backups can be owned by different users.
    -  * Add Patrick's burp_ca patches and README.CA.
    -  * Sanitised magic characters by defining them in a new cmd.h file.
    -  * Fixed 'ret OK, but zstream not finished: 0' when refusing to restore over
    -    existing files.
    -  * Fixed bug that made clients disappear from the status monitor.
    -  * Bug fix the client_lockdir option.
    -  * On the server, be more cautious about creating directories that don't exist.
    -  * Remove link kludge in async_read_stat().
    -
    - -

    - -

    -2011-06-14: burp-1.1.57 is released. -

    -Changes in burp-1.1.57:
    -  * Add options to run as a different user and group.
    -  * Add Patrick Koppen's burp_ca script.
    -  * Get the client restore to use the sbuf functions, remove related kludges.
    -  * Fix possible client segfault when refusing to restore over existing files.
    -  * Make a failure to restore over a busy file not cause the whole restore to
    -    fail.
    -  * Print byte count as well as human readable byte count in the status summary
    -    screen.
    -  * Include backup numbers with the backup list in the status summary.
    -  * Don't close the server read fd when running in non-forking mode.
    -  * Add ssl_key options so that the cert and key can be in separate files.
    -  * Add ssl_key_password, a synonym for ssl_cert_password.
    -
    - -

    - -

    -2011-05-13: burp-1.1.55 is released. -

    -Changes in burp-1.1.55:
    -  * Make the status monitor use ncurses.
    -  * Fixed two bugs that could drastically slow down the server if a file
    -    disappeared on a client after the initial scan (to get these two bug fixes,
    -    you need to upgrade your clients).
    -  * IPv6 patches.
    -  * Ability to specify the location of the client lockfiles on the server.
    -  * Make the server fork into the background by default. Use '-F' to stay in
    -    the foreground.
    -  * Add option to specify a log file.
    -
    - -

    - -

    -2011-04-14: burp-1.1.51 is released. -

    -Changes in burp-1.1.51:
    -  * Added a script for backing up zfs snapshots with 'zfs send'.
    -  * Added the ability to set the level of compression.
    -  * Added the ability to turn off compression.
    -  * Added an option to define the poll interval in the Windows installer.
    -  * Added the ability to turn off librsync delta differencing.
    -  * Added the ability to give arguments to backup/restore/pre/post scripts.
    -  * Make configure/make work better on Solaris.
    -
    - -

    - -

    -2011-04-02: burp-1.1.40 is released. -

    -Changes in burp-1.1.40:
    -  * Ability to run client pre/post backup/restore scripts.
    -  * Ability to read data from fifos (and restore to them).
    -  * Fixed a bug when restoring the first link in a directory.
    -  * Fixed a bug that prevented giving a backup number when using the verify option.
    -
    - -

    - -

    -2011-03-28: git repository added. - -

    - -

    -2011-03-27: burp-1.1.30 is released. -

    -Changes in burp-1.1.30:
    -  * First pass at having a live status monitor.
    -  * Fixed a bug that meant you couldn't restore links.
    -  * Fixed a bug when freeing structs at the end of a restore.
    -
    - -

    - -

    -2011-03-18: burp-1.1.22 is released. -

    -Changes in burp-1.1.22:
    -  * Added scheduling.
    -  * Added email notifications.
    -  * Fixed autoconf. Programs like ccache should now work.
    -  * Strip whitespace from end of conf lines, ignore quotes around conf lines.
    -  * Updated the Windows build tools.
    -
    - -

    - -

    -2011-03-10: burp-1.1.14 is released. -

    -Changes in burp-1.1.14:
    -  * Added client-side blowfish file encryption. See the man page for details.
    -  * Byte counters also give counts in KB/MB/GB/etc as appropriate.
    -  * Restore directories after their contents so that the access times are
    -    correct.
    -  * Updated the win32 build tools.
    -
    - -

    - -

    -2011-03-02: burp-1.1.5 is released. -

    -Changes in burp-1.1.5:
    -  * Added a 'verify' command. See the man page for details.
    -  * Improved the include/exclude path functionality.
    -  * Added the ability to define mount points to cross.
    -  * Fixed a crash on 64bit Windows when exiting.
    -
    - -

    - -

    -2011-02-27: burp-1.1.0 is released. -

    -Changes in burp-1.1.0:
    -  * Added openssl.
    -  * Added byte counters and checksums to the backup manifest files, in
    -    anticipation of a 'verify' command.
    -
    -    IMPORTANT IF YOU ARE UPGRADING FROM AN OLDER VERSION OF BURP:
    -    a) Your previous backups will no longer work, due to changes in the
    -    manifest files. You will also need to move old backups aside in order to
    -    continue to make new backups.
    -    b) Your old config files will need some fields to do with SSL added to them.
    -    See the man page and the examples in the 'configs' directory for help.
    -
    -    IMPORTANT FOR MY ENCOURAGEMENT AND THE FUTURE OF BURP:
    -    If you have tried burp, I really want to hear from you to find out what 
    -    you like about it, what you don't like, what new features you would like,
    -    how you have been using it, whether it has helped you, or anything that
    -    you would like to tell me. I am currently working in the dark!
    -
    - -

    - -

    -2011-02-16: burp-1.0.31 is released. -

    - -

    -2011-02-02: burp-1.0.11 is released. -

    - -

    -2011-02-02: burp-1.0.10 is released. -

    - -

    -2011-01-30: burp-1.0.9 is released. -

    - -

    -2011-01-25: burp-1.0.5 is released. -

    -

    -2011-01-25: mailling list created. -

    -

    -2011-01-23: burp-1.0.3 is released. -

    -

    -2011-01-22: burp-1.0.0 is released. -

    -

    -2011-01-22: Web site created. - -

    - -
    - - - - - - - - - -
    -
    - - - - -
    -
    -

    - -Burp is open and free software. I work on it in my spare time. -If you would like this work to continue, please consider making a small -donation. - -

    -
    -
    - -
    -
    -
    - -
    - -Burp, don't suck. - - - -Last updated: February 2012 - -
    - - - - - diff -Nru burp-1.3.0+20120214git/website/html/txt/autoupgrade.txt burp-1.3.10/website/html/txt/autoupgrade.txt --- burp-1.3.0+20120214git/website/html/txt/autoupgrade.txt 2012-02-13 13:13:39.000000000 +0000 +++ burp-1.3.10/website/html/txt/autoupgrade.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,74 +0,0 @@ -How to set up autoupgrades --------------------------- - -Clients need to be on version 1.3.0 or newer to have the ability to -autoupgrade. Also, the server needs to be newer than 1.3.0. - -On the client machines, you need to have fields in burp.conf that look like -this: - -autoupgrade_os = win32 -autoupgrade_dir = C:/Program Files/Burp/autoupgrade -or -autoupgrade_os = some_os -autoupgrade_dir = /etc/burp/autoupgrade/client - -The 'os' values match a directory component on the server. -The directories given need to exist. - - -On the server, you need to have a field in the burp.conf that looks like this: -autoupgrade_dir = /etc/burp/autoupgrade/server - -The directory needs to exist on the server. -Subdirectories need to exist for the 'autoupgrade_os' values on the client, -with further subdirectories named after the current server version. -For example: -/etc/burp/autoupgrade/server/win32/1.3.1 -/etc/burp/autoupgrade/server/some_os/1.3.1 - -The version directory needs to contain two files called "script" and "package". -If all your packages are going to be installed the same way for a particular -OS, you may also place "script" at the top level for that OS. Like this, for -example: -/etc/burp/autoupgrade/server/win32/script - - -Given all the above, then when the client version is 1.3.0 or newer, and the -server version is greater than the client version, the next time the client -connects, it will download the two files, execute the "script" file, and then -exit. - -Examples of "script" files are given in the source package, in -configs/server/autoupgrade. - -The "package" file is the new package to be installed. - - - -I shall explain once more, by example. - -Scenario: -You have a 32 bit Windows client called 'win2k8' that is currently on 1.3.0. -You have a Debian server that is currently on 1.3.1. -You want to automatically upgrade the Windows client to 1.3.1. -You have a Windows burp installer called burp-win32-installer-1.3.1.exe. - -Make sure this is in the client burp.conf file: -autoupgrade_os = win32 -autoupgrade_dir = C:/Program Files/Burp/autoupgrade - -Make sure this is in the server burp.conf file: -autoupgrade_dir = /etc/burp/autoupgrade/server - -Make sure this directory exists on the server: -/etc/burp/autoupgrade/server/win32/1.3.1 - -Copy an appropriate script file to the OS directory (and rename it "script"): -cp burp/configs/autoupgrade/windows.script \ - /etc/burp/autoupgrade/server/win32/script -Copy the installer to the version directory (and rename it "package"): -cp burp-win32-installer-1.3.1.exe \ - /etc/burp/autoupgrade/server/win32/1.3.1/package - -The client should now automatically upgrade to 1.3.1 when it next connects. diff -Nru burp-1.3.0+20120214git/website/html/txt/baremetal-windows2008.txt burp-1.3.10/website/html/txt/baremetal-windows2008.txt --- burp-1.3.0+20120214git/website/html/txt/baremetal-windows2008.txt 2012-02-13 13:13:40.000000000 +0000 +++ burp-1.3.10/website/html/txt/baremetal-windows2008.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -Windows 2008 bare metal restore steps -------------------------------------- - -Unfortunately, I have not yet completed a Windows 2008 bare metal restore. -The process should be nearly identical to the Windows 7 steps, but I get stuck -at the point of making the new disk bootable. - -TODO: Have another go at this. Perhaps I need to create a different version -of the WinPE disk. diff -Nru burp-1.3.0+20120214git/website/html/txt/baremetal-windows7.txt burp-1.3.10/website/html/txt/baremetal-windows7.txt --- burp-1.3.0+20120214git/website/html/txt/baremetal-windows7.txt 2012-02-13 13:13:40.000000000 +0000 +++ burp-1.3.10/website/html/txt/baremetal-windows7.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,103 +0,0 @@ -Windows 7 bare metal restore steps ----------------------------------- - -Thanks to: -Wai Keong Phan, who first completed a bare metal restore, wrote up the - first draft and provided help when I was stuck. -Michael Da Cova, who also provided help when I was stuck. - - -a) Install the burp client on Windows 7. - -b) Make a burp backup of your C: drive (plus any others you want to keep). -That means that 'include = C:/' should be in the client burp.conf. -You may also 'exclude = C:/pagefile.sys', because it is known to be pointless -to backup that file. - -c) Download MS Win AIK via this link (at the time of writing): - http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=5753 - -d) Install MS Win AIK - -e) Run a command prompt with administrator privileges, and execute these - commands: - > copype.cmd amd64 c:\winpe_amd64 - > cd c:\winpe_amd64 - > copy winpe.wim iso\sources\boot.wim - > dism /mount-wim /wimfile:iso\sources\boot.wim /index:1 /mountdir:mount - - (at this point, I found it easiest to copy the whole 'C:\Program Files\Burp' - directory to mount\windows, although you may just install it on the target - machine via a file server later) - - > dism /unmount-wim /mountdir:mount /commit - > oscdimg -n -betfsboot.com iso winpe_amd64.iso - -f) Make a bootable CD with the iso image. - -g) With a new or reprovisioned machine, boot the machine up with WinPE. It - will go to a command prompt that looks like 'X:\windows\system32>' - -h) Create a new 'C:' partition by executing these commands: - > select disk 0 - > create partition primary - > active - > assign letter=C - - You can change 'ntfs' to something else in the following command: - - > format fs=ntfs quick - - To verify disk status: - - > detail disk - -i) At this point, you can grab the burp client installer from your file server, - if you did not but it on the WinPE disk in step (e). Make sure the - appropriate burp server name, burp client name and password are entered - during the installer. - -j) Start the restore by executing the following command: - - > "cd C:\Program Files\Burp\bin" - > burp.exe -a r -f - -k) Shutdown the machine. - -l) Reboot from a Windows 7 installation disk. - -m) Select a language, a time and currency, and a keyboard or input method, and - click next. It doesn't matter what you choose here, as long as you can - continue to provide input. - -n) Select 'Repair your computer'. - -o) Follow the menus to a command prompt. You need to run diskpart again to - make the 'C:' partition active, and then rebuild the boot sector. - - > select disk 0 - > select partition primary - > active - > bootrec /rebuildbcd - -p) Reboot into the Windows 7 installation disk twice more, selecting 'Repair - your computer' both times. - -q) Windows 7 should now boot from the disk by itself. - -Unresolved issues: - -There is something a bit weird about the entries in the top level of the -file system, though. I have these odd directories: - -C:\$Recycle.Bin -C:\Documents and Settings -C:\System Volume Information -C:\Temp -C:\C: <- Very odd because ':' is not a valid character in Windows names. - -I think most of these exist on the original system, but are somehow hidden. - - -It has also given me a new small E:\ partition. Perhaps that was something -to do with the recovery via the installation disk. diff -Nru burp-1.3.0+20120214git/website/html/txt/burp_ca.txt burp-1.3.10/website/html/txt/burp_ca.txt --- burp-1.3.0+20120214git/website/html/txt/burp_ca.txt 2012-02-13 13:13:40.000000000 +0000 +++ burp-1.3.10/website/html/txt/burp_ca.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,85 +0,0 @@ -CA and cert HOWTO: - -Setup the server: - -1) generate Diffie-Hellman Parameters - - openssl dhparam -out /etc/burp/dhfile.pem 1024 - chmod 600 /etc/burp/dhfile.pem - -2) Initialise CA - - burp_ca --init --ca myCA - - This creates /etc/burp/CA, generate private key for CA and self signed - certificates. - -3) Generate server key and cert signing request - - burp_ca --key --request --name myServer - -4) Sign request - - burp_ca --sign --ca myCA --name myServer --batch - -5) Link or copy cert and key to /etc/burp - - ln -s CA/CA_myCA.crt /etc/burp/ssl_cert_ca.pem - ln -s CA/myServer.crt /etc/burp/ssl_cert-server.pem - ln -s CA/myServer,key /etc/burp/ssl_cert-server.key - - (use the ssl_cert and ssl_key options in burp-server.conf !) - - -Setup the client (the easy way - unsecure): - -1) Generate client key and cert __on the server__ - - burp_ca --name myClient --ca myCA --key --request --sign --batch - -2) on the client you dont need a CA, so just - - mkdir /etc/burp/CA - chmod 700 /etc/burp/CA - -3) copy key and certs from server to client - - server:/etc/burp/ssl_cert_ca.pem -> client:/etc/burp/ssl_cert_ca.pem - server:/etc/burp/CA/myClient.crt -> client:/etc/burp/ssl_cert-client.crt - server:/etc/burp/CA/myClient.key -> client:/etc/burp/ssl_cert-client.key - chmod 600 /etc/burp/ssl_cert-client.key - - (use the ssl_cert and ssl_key options in burp.conf !) - - -Setup the client (the usual way) - -1) on the client you dont need a CA, so just - - mkdir /etc/burp/CA - chmod 700 /etc/burp/CA - -2) Generate client key and cert signing request - - burp_ca --key --request --name myClient - -3) copy the request from client to the server - - client:/etc/burp/CA/myClient.csr -> server:/etc/burp/ssl/myClient.csr - -4) sign the request __on the server__ - - burp_ca --name myClient --ca myCA --key --request --sign --batch - -5) copy the certs back to the client - - server:/etc/burp/CA/CA_myCA.crt -> client:/etc/burp/CA/CA_myCA.crt - server:/etc/burp/CA/myClient.crt -> client:/etc/burp/CA/myClient.crt - -6) link or copy the files - - ln -s CA/CA_myCA.crt /etc/burp/ssl_cert_ca.pem - ln -s CA/myClient.crt /etc/burp/ssl_cert-client.pem - ln -s CA/myClient,key /etc/burp/ssl_cert-client.key - - (use the ssl_cert and ssl_key options in burp.conf !) diff -Nru burp-1.3.0+20120214git/website/html/why.html burp-1.3.10/website/html/why.html --- burp-1.3.0+20120214git/website/html/why.html 2012-02-13 13:13:40.000000000 +0000 +++ burp-1.3.10/website/html/why.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,157 +0,0 @@ - - - - - - -BURP - BackUp and Restore Program - - - - - - - - - - - -
    - - - - -

    - -BURP - BackUp and Restore Program - - -
    - - - - - - - - - -
    indexwhyfaqhowtodownloadcontact
    -
    - -

    - - - - - - - - - - - - - -
    -
    -

    - -I started writing Burp when I had become frustrated with the complexity and -drawbacks of Bacula. I am in no way trying to -denigrate the work of its authors - after all, it is also free software that -the authors have very kindly provided. It also saved a lot of my wife's -data when her laptop harddrive crashed one day (thank you, Bacula!). -But here is a list of Bacula disadvantages I perceive that I hope to avoid with -Burp. - -

      -
    • Complexity to configure - Bacula is just too complicated. It has four -separate main components, each with their own configuration files. -
    • Complexity to code/debug - Kern Sibbald, the main author of Bacula admits -that there is a distinct lack of community contribution to the code. I believe -that this is partly due to the difficulty in understanding its complexity. -They also have the need to continue to support, or provide continuity with -the way things have gone before, which makes for slow development. -
    • Works badly with disk storage - Bacula's mentality is very highly geared -towards tape usage and therefore it works poorly with disks. -
    • Stores the catalog separately to the backups - This causes a massive -maintenance headache. For example, you now have to think about backups of your -catalog. Additionally, changes to your configuration files might not take -effect because some of the previous configuration gets written to the catalog, -and then it is not easy to make the changes take effect. Furthermore, you -end up needing to be a mysql or postgres database expert. -
    • Does not do delta differencing - Bacula backs up the whole file even if -only a few bytes in it have changed. -
    • Relies far too heavily on clock accuracy - Bacula goes very badly wrong -if your computer's clock somehow gets skewed. In fact, it relies so heavily -on the clock and timestamps that it does not actually track which backup -another was based on. -
    • Laptop backups are difficult to schedule. -
    • Cannot resume an interrupted backup. -
    • Retention configuration - it is just impossible to configure a sensible -retention policy. -Here is my explanation why, sent to the bacula-users mailing list. -
    - -The main advantage that Bacula has over other open source offerings is that -it supports Windows Volume Shadow Copy Service (VSS). This means that it is -hard to use programs like rsync or rdiff-backup on Windows computers. - - -

    - -
    - - - - - - - - - -
    -
    - - - - -
    -
    -

    - -Burp is open and free software. I work on it in my spare time. -If you would like this work to continue, please consider making a small -donation. - -

    -
    -
    - -
    -
    -
    - -
    - -Burp, don't suck. - - - -Last updated: February 2012 - -
    - - - - -