/* Set if Bacula conio support enabled */
#undef HAVE_CONIO
+/* Define if encryption support should be enabled */
+#undef HAVE_CRYPTO
+
/* Define to 1 if you have the <curses.h> header file. */
#undef HAVE_CURSES_H
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
+/* Define to 1 if you have the `fdatasync' function. */
+#undef HAVE_FDATASYNC
+
/* Define to 1 if you have the `fork' function. */
#undef HAVE_FORK
/* 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 runtime.
- 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. */
AC_CHECK_FUNCS(fchdir, [AC_DEFINE(HAVE_FCHDIR)])
AC_CHECK_FUNCS(strtoll, [AC_DEFINE(HAVE_STRTOLL)])
AC_CHECK_FUNCS(posix_fadvise)
+AC_CHECK_FUNCS(fdatasync)
AC_CHECK_FUNCS(chflags)
done
+for ac_func in fdatasync
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_var'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
for ac_func in chflags
do
02-Feb 11:00 btape: Fatal Error because: Bacula interrupted by signal 11: Segmentation violation
Kaboom! btape, btape got signal 11. Attempting traceback.
+- Encryption -- email from Landon
+ > The backup encryption algorithm is currently not configurable, and is
+ > set to AES_128_CBC in src/filed/backup.c. The encryption code
+ > supports a number of different ciphers (as well as adding arbitrary
+ > new ones) -- only a small bit of code would be required to map a
+ > configuration string value to a CRYPTO_CIPHER_* value, if anyone is
+ > interested in implementing this functionality.
+
- Ensure that moving a purged Volume in ua_purge.c to the RecyclePool
does the right thing.
- Why doesn't @"xxx abc" work in a conf file?
#include <sys/paths.h>
#endif
+#if !defined(HAVE_FDATASYNC)
+#define fdatasync(fd)
+#endif
+
+
/* ===============================================================
*
* U N I X AND W I N D O W S
}
}
bfd->berrno = errno;
+ bfd->m_flags = flags;
Dmsg1(400, "Open file %d\n", bfd->fid);
errno = bfd->berrno;
bfd->win32DecompContext.liNextHeader = 0;
#if defined(HAVE_POSIX_FADVISE) && defined(POSIX_FADV_WILLNEED)
- if (bfd->fid != -1) {
+ if (bfd->fid != -1 && flags & O_RDONLY) {
int stat = posix_fadvise(bfd->fid, 0, 0, POSIX_FADV_WILLNEED);
Dmsg2(400, "Did posix_fadvise on %s stat=%d\n", fname, stat);
}
if (bfd->fid == -1) {
return 0;
}
+#if defined(HAVE_POSIX_FADVISE) && defined(POSIX_FADV_DONTNEED)
+ if (bfd->m_flags & O_RDONLY) {
+ fdatasync(bfd->fid); /* sync the file */
+ /* Tell OS we don't need it any more */
+ posix_fadvise(bfd->fid, 0, 0, POSIX_FADV_DONTNEED);
+ }
+#endif
/* Close normal file */
stat = close(bfd->fid);
-/*
- * 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.
- *
- * Kern Sibbald May MMIII
- */
/*
Bacula® - The Network Backup Solution
- Copyright (C) 2003-2006 Free Software Foundation Europe e.V.
+ Copyright (C) 2003-2007 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.
(FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
Switzerland, email:ftf@fsfeurope.org.
*/
+/*
+ * 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.
+ *
+ * Kern Sibbald May MMIII
+ */
#ifndef __BFILE_H
#define __BFILE_H
/* Basic Unix low level I/O file packet */
struct BFILE {
int fid; /* file id on Unix */
+ int m_flags; /* open flags */
int berrno;
char *prog; /* reader/writer program if any */
JCR *jcr; /* jcr for editing job codes */
POOL_MEM msg(PM_MESSAGE);
int len;
+ len = Mmsg(msg, _("Spooling statistics:\n"));
+
if (spool_stats.data_jobs || spool_stats.max_data_size) {
len = Mmsg(msg, _("Data spooling: %u active jobs, %s bytes; %u total jobs, %s max bytes/job.\n"),
spool_stats.data_jobs, edit_uint64_with_commas(spool_stats.data_size, ed1),
sendit(msg.c_str(), len, arg);
}
+ len = Mmsg(msg, "====\n");
+ sendit(msg.c_str(), len, arg);
}
bool begin_data_spool(DCR *dcr)
struct tm tm;
char tzbuf[MAXSTRING];
long my_timezone;
- struct timeval tv;
- struct timezone tz;
/* Add RFC822 date */
(void)localtime_r(&now, &tm);
my_timezone /= 60;
#else
+ struct timeval tv;
+ struct timezone tz;
gettimeofday(&tv, &tz);
my_timezone = tz.tz_minuteswest; /* timezone offset in mins */
#endif
General:
24May07
+kes Add code to tell the OS that we no longer need a cached
+ file that we were reading. In findlib/bfile.c. Also,
+ only cache files that we are reading.
+kes Tweak to bsmtp to eliminate compiler warnings on Win32.
+kes Implement script to automatically generate cats and dll .def
+ files for Win32 dll.
+kes Update README.mingw32 to include new .def file generation.
kes Correct typo in UTF-8 error message as reported by:
jhernandez <julianhernandez@gmail.com>
kes Add additional sm_check() code on debug level 1.