From: Kern Sibbald Date: Mon, 13 Nov 2006 18:00:58 +0000 (+0000) Subject: kes Replace () by {} in configure.in for proper HP configuration. X-Git-Tag: Release-7.0.0~7420 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1ee7f23c03673e46bd30aac9c585b2045719a34f;p=bacula%2Fbacula kes Replace () by {} in configure.in for proper HP configuration. kes Shorten some lines over 80 characters in filed/backup.c kes Cast sizeof() in filed/backup.c to avoid compiler warning. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3613 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/autoconf/config.h.in b/bacula/autoconf/config.h.in index efc3e757e7..0600da0a77 100644 --- a/bacula/autoconf/config.h.in +++ b/bacula/autoconf/config.h.in @@ -149,9 +149,6 @@ /* LOCALEDIR */ #undef LOCALEDIR -/* Set to value of --sysconfdir option */ -#undef SYSCONFDIR - /* Define if you have zlib */ #undef HAVE_LIBZ @@ -791,9 +788,9 @@ /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ #undef STACK_DIRECTION /* Define to 1 if the `S_IS*' macros in do not work properly. */ @@ -802,6 +799,9 @@ /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS +/* Directory for configuration files */ +#undef SYSCONFDIR + /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME diff --git a/bacula/autoconf/configure.in b/bacula/autoconf/configure.in index e4f6eba188..a6ef0c821c 100644 --- a/bacula/autoconf/configure.in +++ b/bacula/autoconf/configure.in @@ -146,7 +146,7 @@ sysconfdir=`eval echo ${sysconfdir}` datadir=`eval echo ${datadir}` localedir=`eval echo ${datadir}/locale` AC_DEFINE_UNQUOTED(LOCALEDIR, "$localedir") -AC_DEFINE_UNQUOTED(SYSCONFDIR, "$sysconfdir") +AC_DEFINE_UNQUOTED(SYSCONFDIR, "$sysconfdir") # ------------------------------------------------------------------------- # If the user has not set --exec-prefix, we default to ${prefix} @@ -774,10 +774,10 @@ if test "x$with_openssl_directory" != "x"; then OPENSSL_INC="-I$with_openssl_directory/include $OPENSSL_INC" fi - saved_LIBS="$LIBS" - saved_CFLAGS="$CFLAGS" - LIBS="$saved_LIBS $OPENSSL_LIBS" - CFLAGS="$saved_CFLAGS $OPENSSL_INC" + saved_LIBS="${LIBS}" + saved_CFLAGS="${CFLAGS}" + LIBS="${saved_LIBS} ${OPENSSL_LIBS}" + CFLAGS="${saved_CFLAGS} ${OPENSSL_INC}" AC_TRY_LINK([ #include ], [ CRYPTO_set_id_callback(NULL); ], @@ -794,8 +794,8 @@ if test "x$with_openssl_directory" != "x"; then [ ac_cv_openssl_sha2="no" ] ) - LIBS="$saved_LIBS" - CFLAGS="$saved_CFLAGS" + LIBS="${saved_LIBS}" + CFLAGS="${saved_CFLAGS}" if test "$support_tls" = "yes"; then AC_DEFINE(HAVE_OPENSSL, 1, [Define if OpenSSL library is available]) @@ -1779,7 +1779,7 @@ freebsd) ;; hpux) PSCMD="UNIX95=1 ps -e -o pid,comm" - CFLAGS="$(CFLAGS) -D_XOPEN_SOURCE_EXTENDED=1" + CFLAGS="${CFLAGS} -D_XOPEN_SOURCE_EXTENDED=1" DISTVER=`uname -r` TAPEDRIVE="/dev/rmt/0hnb" PTHREAD_LIB="-lpthread" diff --git a/bacula/configure b/bacula/configure index 4bebc8dfc3..a73913e712 100755 --- a/bacula/configure +++ b/bacula/configure @@ -15871,10 +15871,10 @@ if test "x$with_openssl_directory" != "x"; then OPENSSL_INC="-I$with_openssl_directory/include $OPENSSL_INC" fi - saved_LIBS="$LIBS" - saved_CFLAGS="$CFLAGS" - LIBS="$saved_LIBS $OPENSSL_LIBS" - CFLAGS="$saved_CFLAGS $OPENSSL_INC" + saved_LIBS="${LIBS}" + saved_CFLAGS="${CFLAGS}" + LIBS="${saved_LIBS} ${OPENSSL_LIBS}" + CFLAGS="${saved_CFLAGS} ${OPENSSL_INC}" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -15975,8 +15975,8 @@ fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LIBS="$saved_LIBS" - CFLAGS="$saved_CFLAGS" + LIBS="${saved_LIBS}" + CFLAGS="${saved_CFLAGS}" if test "$support_tls" = "yes"; then @@ -29793,7 +29793,7 @@ freebsd) ;; hpux) PSCMD="UNIX95=1 ps -e -o pid,comm" - CFLAGS="$(CFLAGS) -D_XOPEN_SOURCE_EXTENDED=1" + CFLAGS="${CFLAGS} -D_XOPEN_SOURCE_EXTENDED=1" DISTVER=`uname -r` TAPEDRIVE="/dev/rmt/0hnb" PTHREAD_LIB="-lpthread" diff --git a/bacula/kernstodo b/bacula/kernstodo index 61433f8bfb..db177e3f1d 100644 --- a/bacula/kernstodo +++ b/bacula/kernstodo @@ -1,5 +1,5 @@ Kern's ToDo List - 25 August 2006 + 12 November 2006 Major development: Project Developer @@ -41,19 +41,17 @@ Document: Priority: -- Arno's reservation deadlock. -- Doc items +- Migration Volume span bug +- Rescue release - Bug reports -- Eric's SD patch +- Test FIFO backup/restore -- make regression +- Doc items - Add encryption regression tests - Test Volume compatibility between machine architectures - Encryption documentation -- Migration Volume span bug - Wrong jobbytes with query 12 (todo) - bacula-1.38.2-ssl.patch - Bare-metal recovery Windows (todo) -- Rescue release -- Test FIFO backup/restore -- make regression - Document need for UTF-8 format @@ -1728,3 +1726,5 @@ Block Position: 0 - Restore of a raw drive should not try to check the volume size. - Lock tape drive door when open() - Make release unload any autochanger. +- Arno's reservation deadlock. +- Eric's SD patch diff --git a/bacula/src/filed/backup.c b/bacula/src/filed/backup.c index 1fca1ec2ff..d811abe5d4 100644 --- a/bacula/src/filed/backup.c +++ b/bacula/src/filed/backup.c @@ -579,7 +579,8 @@ static int save_file(FF_PKT *ff_pkt, void *vjcr, bool top_level) * Currently this is not a problem as the only other stream, resource forks, * are not handled as sparse files. */ -int send_data(JCR *jcr, int stream, FF_PKT *ff_pkt, DIGEST *digest, DIGEST *signing_digest) +int send_data(JCR *jcr, int stream, FF_PKT *ff_pkt, DIGEST *digest, + DIGEST *signing_digest) { BSOCK *sd = jcr->store_bsock; uint64_t fileAddr = 0; /* file address */ @@ -603,7 +604,8 @@ int send_data(JCR *jcr, int stream, FF_PKT *ff_pkt, DIGEST *digest, DIGEST *sign Dmsg1(300, "Saving data, type=%d\n", ff_pkt->type); #ifdef HAVE_LIBZ - uLong compress_len, max_compress_len = 0; + uLong compress_len = 0; + uLong max_compress_len = 0; const Bytef *cbuf = NULL; int zstat; @@ -626,7 +628,8 @@ int send_data(JCR *jcr, int stream, FF_PKT *ff_pkt, DIGEST *digest, DIGEST *sign if (((z_stream*)jcr->pZLIB_compress_workset)->total_in == 0) { /* set gzip compression level - must be done per file */ - if ((zstat=deflateParams((z_stream*)jcr->pZLIB_compress_workset, ff_pkt->GZIP_level, Z_DEFAULT_STRATEGY)) != Z_OK) { + if ((zstat=deflateParams((z_stream*)jcr->pZLIB_compress_workset, + ff_pkt->GZIP_level, Z_DEFAULT_STRATEGY)) != Z_OK) { Jmsg(jcr, M_FATAL, 0, _("Compression deflateParams error: %d\n"), zstat); set_jcr_job_status(jcr, JS_ErrorTerminated); goto err; @@ -639,7 +642,8 @@ int send_data(JCR *jcr, int stream, FF_PKT *ff_pkt, DIGEST *digest, DIGEST *sign if (ff_pkt->flags & FO_ENCRYPT) { /* Allocate the cipher context */ - if ((cipher_ctx = crypto_cipher_new(jcr->pki_session, true, &cipher_block_size)) == NULL) { + if ((cipher_ctx = crypto_cipher_new(jcr->pki_session, true, + &cipher_block_size)) == NULL) { /* Shouldn't happen! */ Jmsg0(jcr, M_FATAL, 0, _("Failed to initialize encryption context\n")); goto err; @@ -652,7 +656,9 @@ int send_data(JCR *jcr, int stream, FF_PKT *ff_pkt, DIGEST *digest, DIGEST *sign * could be returned for the given read buffer size. * (Using the larger of either rsize or max_compress_len) */ - jcr->crypto_buf = check_pool_memory_size(jcr->crypto_buf, (MAX(rsize + sizeof(uint32_t), (int32_t)max_compress_len) + cipher_block_size - 1) / cipher_block_size * cipher_block_size); + jcr->crypto_buf = check_pool_memory_size(jcr->crypto_buf, + (MAX(rsize + (int)sizeof(uint32_t), (int32_t)max_compress_len) + + cipher_block_size - 1) / cipher_block_size * cipher_block_size); wbuf = jcr->crypto_buf; /* Encrypted, possibly compressed output here. */ } @@ -734,9 +740,9 @@ int send_data(JCR *jcr, int stream, FF_PKT *ff_pkt, DIGEST *digest, DIGEST *sign rbuf, sd->msglen); ((z_stream*)jcr->pZLIB_compress_workset)->next_in = (Bytef *)rbuf; - ((z_stream*)jcr->pZLIB_compress_workset)->avail_in = sd->msglen; + ((z_stream*)jcr->pZLIB_compress_workset)->avail_in = sd->msglen; ((z_stream*)jcr->pZLIB_compress_workset)->next_out = (Bytef *)cbuf; - ((z_stream*)jcr->pZLIB_compress_workset)->avail_out = max_compress_len; + ((z_stream*)jcr->pZLIB_compress_workset)->avail_out = max_compress_len; if ((zstat=deflate((z_stream*)jcr->pZLIB_compress_workset, Z_FINISH)) != Z_STREAM_END) { Jmsg(jcr, M_FATAL, 0, _("Compression deflate error: %d\n"), zstat); @@ -751,7 +757,8 @@ int send_data(JCR *jcr, int stream, FF_PKT *ff_pkt, DIGEST *digest, DIGEST *sign goto err; } - Dmsg2(400, "compressed len=%d uncompressed len=%d\n", compress_len, sd->msglen); + Dmsg2(400, "compressed len=%d uncompressed len=%d\n", compress_len, + sd->msglen); sd->msglen = compress_len; /* set compressed length */ cipher_input_len = compress_len; @@ -768,19 +775,22 @@ int send_data(JCR *jcr, int stream, FF_PKT *ff_pkt, DIGEST *digest, DIGEST *sign /* Encrypt the length of the input block */ uint32_t packet_len = htonl(cipher_input_len); - if (!crypto_cipher_update(cipher_ctx, (const u_int8_t *)&packet_len, sizeof(packet_len), (u_int8_t *)jcr->crypto_buf, &initial_len)) { + if (!crypto_cipher_update(cipher_ctx, (const u_int8_t *)&packet_len, + sizeof(packet_len), (u_int8_t *)jcr->crypto_buf, &initial_len)) { /* Encryption failed. Shouldn't happen. */ Jmsg(jcr, M_FATAL, 0, _("Encryption error\n")); goto err; } /* Encrypt the input block */ - if (crypto_cipher_update(cipher_ctx, cipher_input, cipher_input_len, (u_int8_t *)&jcr->crypto_buf[initial_len], &encrypted_len)) { + if (crypto_cipher_update(cipher_ctx, cipher_input, cipher_input_len, + (u_int8_t *)&jcr->crypto_buf[initial_len], &encrypted_len)) { if ((initial_len + encrypted_len) == 0) { /* No full block of data available, read more data */ continue; } - Dmsg2(400, "encrypted len=%d unencrypted len=%d\n", encrypted_len, sd->msglen); + Dmsg2(400, "encrypted len=%d unencrypted len=%d\n", encrypted_len, + sd->msglen); sd->msglen = initial_len + encrypted_len; /* set encrypted length */ } else { /* Encryption failed. Shouldn't happen. */ @@ -811,7 +821,8 @@ int send_data(JCR *jcr, int stream, FF_PKT *ff_pkt, DIGEST *digest, DIGEST *sign /* Send any remaining encrypted data + padding */ if (sd->msglen >= 0) { if (ff_pkt->flags & FO_ENCRYPT) { - if (!crypto_cipher_finalize(cipher_ctx, (uint8_t *)jcr->crypto_buf, &encrypted_len)) { + if (!crypto_cipher_finalize(cipher_ctx, (uint8_t *)jcr->crypto_buf, + &encrypted_len)) { /* Padding failed. Shouldn't happen. */ Jmsg(jcr, M_FATAL, 0, _("Encryption padding error\n")); goto err; diff --git a/bacula/src/version.h b/bacula/src/version.h index a58df209f6..7c9d1a7beb 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -3,7 +3,7 @@ */ #undef VERSION -#define VERSION "1.39.28" +#define VERSION "1.39.29" #define BDATE "12 November 2006" #define LSMDATE "12Nov06" #define BYEAR "2006" /* year for copyright messages in progs */ diff --git a/bacula/technotes-1.39 b/bacula/technotes-1.39 index 8b3efe6519..491fd3dff1 100644 --- a/bacula/technotes-1.39 +++ b/bacula/technotes-1.39 @@ -1,7 +1,12 @@ Technical notes on version 1.39 General: +13Nov06 +kes Replace () by {} in configure.in for proper HP configuration. +kes Shorten some lines over 80 characters in filed/backup.c +kes Cast sizeof() in filed/backup.c to avoid compiler warning. +Version 1.39.28 released: 12Nov06 kes Change error message 'illegal' to 'invalid' -- bug #707 kes Add rather primitive device resource deadlock detection in