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
/* LOCALEDIR */
#undef LOCALEDIR
/* LOCALEDIR */
#undef LOCALEDIR
-/* Set to value of --sysconfdir option */
-#undef SYSCONFDIR
-
/* Define if you have zlib */
#undef HAVE_LIBZ
/* Define if you have zlib */
#undef HAVE_LIBZ
/* 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.
/* 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 <sys/stat.h> do not work properly. */
#undef STACK_DIRECTION
/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* 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 <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME
datadir=`eval echo ${datadir}`
localedir=`eval echo ${datadir}/locale`
AC_DEFINE_UNQUOTED(LOCALEDIR, "$localedir")
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}
# -------------------------------------------------------------------------
# If the user has not set --exec-prefix, we default to ${prefix}
OPENSSL_INC="-I$with_openssl_directory/include $OPENSSL_INC"
fi
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 <openssl/ssl.h> ],
[ CRYPTO_set_id_callback(NULL); ],
AC_TRY_LINK([ #include <openssl/ssl.h> ],
[ CRYPTO_set_id_callback(NULL); ],
[ ac_cv_openssl_sha2="no" ]
)
[ 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])
if test "$support_tls" = "yes"; then
AC_DEFINE(HAVE_OPENSSL, 1, [Define if OpenSSL library is available])
;;
hpux)
PSCMD="UNIX95=1 ps -e -o pid,comm"
;;
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"
DISTVER=`uname -r`
TAPEDRIVE="/dev/rmt/0hnb"
PTHREAD_LIB="-lpthread"
OPENSSL_INC="-I$with_openssl_directory/include $OPENSSL_INC"
fi
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. */
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
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
if test "$support_tls" = "yes"; then
;;
hpux)
PSCMD="UNIX95=1 ps -e -o pid,comm"
;;
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"
DISTVER=`uname -r`
TAPEDRIVE="/dev/rmt/0hnb"
PTHREAD_LIB="-lpthread"
Major development:
Project Developer
Major development:
Project Developer
-- Arno's reservation deadlock.
-- Doc items
+- Migration Volume span bug
+- Rescue release
+- Test FIFO backup/restore -- make regression
+- Doc items
- Add encryption regression tests
- Test Volume compatibility between machine architectures
- Encryption documentation
- 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)
- 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
- Document need for UTF-8 format
- Restore of a raw drive should not try to check the volume size.
- Lock tape drive door when open()
- Make release unload any autochanger.
- 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
* Currently this is not a problem as the only other stream, resource forks,
* are not handled as sparse files.
*/
* 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 */
{
BSOCK *sd = jcr->store_bsock;
uint64_t fileAddr = 0; /* file address */
Dmsg1(300, "Saving data, type=%d\n", ff_pkt->type);
#ifdef HAVE_LIBZ
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;
const Bytef *cbuf = NULL;
int zstat;
if (((z_stream*)jcr->pZLIB_compress_workset)->total_in == 0) {
/* set gzip compression level - must be done per file */
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;
Jmsg(jcr, M_FATAL, 0, _("Compression deflateParams error: %d\n"), zstat);
set_jcr_job_status(jcr, JS_ErrorTerminated);
goto err;
if (ff_pkt->flags & FO_ENCRYPT) {
/* Allocate the cipher context */
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;
/* Shouldn't happen! */
Jmsg0(jcr, M_FATAL, 0, _("Failed to initialize encryption context\n"));
goto err;
* could be returned for the given read buffer size.
* (Using the larger of either rsize or max_compress_len)
*/
* 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. */
}
wbuf = jcr->crypto_buf; /* Encrypted, possibly compressed output here. */
}
rbuf, sd->msglen);
((z_stream*)jcr->pZLIB_compress_workset)->next_in = (Bytef *)rbuf;
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)->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);
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);
- 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;
sd->msglen = compress_len; /* set compressed length */
cipher_input_len = compress_len;
/* Encrypt the length of the input block */
uint32_t packet_len = htonl(cipher_input_len);
/* 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 */
/* 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;
}
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. */
sd->msglen = initial_len + encrypted_len; /* set encrypted length */
} else {
/* Encryption failed. Shouldn't happen. */
/* Send any remaining encrypted data + padding */
if (sd->msglen >= 0) {
if (ff_pkt->flags & FO_ENCRYPT) {
/* 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;
/* Padding failed. Shouldn't happen. */
Jmsg(jcr, M_FATAL, 0, _("Encryption padding error\n"));
goto err;
-#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 */
#define BDATE "12 November 2006"
#define LSMDATE "12Nov06"
#define BYEAR "2006" /* year for copyright messages in progs */
Technical notes on version 1.39
General:
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
12Nov06
kes Change error message 'illegal' to 'invalid' -- bug #707
kes Add rather primitive device resource deadlock detection in