+Release 1.38.10 (08Jun06) released 12JunO6
+08Jun06
+- Modify setting ACLs to suppress error message if the file is a
+ symbolic link since the file linked to may not yet be created,
+ and symbolic links really should not have attributes ...
+06Jun06
+- Complete implementation of acl.c error message during restore.
+ During backups, errors getting acls are silently ignored, as was
+ previously the case.
+04Jun06
+- Modify configure.in to check for typeof().
+- Better detection of postgresql installation if pg_conf works.
+- Fix RescheduleTimes = 0 bug (should not reschedule).
+- Down port from 1.39: fixes for reload, autochanger error messages,
+ scheduler fixes for reload and day light savings change,
+01Jun06
+- Implement partial error messages for src/filed/acl.c
+- Fix return code to fail when doing update barcodes and
+ Pool resource is not found. This previously caused Volumes
+ to be labeled as cleaning tapes.
+- Small updates to projects file.
+26May06
+- Prevent DVD code from rewriting label if the device cannot be
+ opened read/write.
+- Used __GNUC__ to detect GNU g++ as suggested by John Goerzen to
+ fix Debian build bug.
+- Fix Dir/SD run race in migrate.c, verify.c, and restore.c
+- Update projects file.
+24May06
+- Applied patch posted by Jaime Ventura to bug #570 to correct failure
+ of restarted jobs to complete (due to a destroyed pthreads conditional
+ variable used by the message thread).
+- Fixed bug #619 where Bacula would not restart jobs with MaxRestartTimes
+ set to zero.
+- Apply patch from John Goerzen bug #611 to fix bad manual links in the code.
+- Apply patch from Rudolf Cejka bug #614 to removed trailing
+ colons in query.sql file.
+- Apply patch from Rudolf Cejka bug #613 to correct prunning of files
+ not to create orphans.
+- Apply patch from Rudolf Cejka bug #617 to use mtime instead of ctime
+ in restore long listing.
+- Apply patch from Rudolf Cejka bug #609 to use MarkId in verify.c instead
+ of incorrect MarkedId.
+- Apply patch from adioso bug #616 to correct text in manual (replace
+ Director with File daemon).
+21May06
+- Move DIR "run" command to SD before starting the message thread
+ as suggested by Cristopher Hull to avoid a race deadlock from
+ two threads using the bsock structure.
+- Modify LICENSE to correct some problems pointed out by Debian.
+05May06
+- Correct EOF with no \n lex.c problem.
+- Add additional INFO messages if autochanger cannot be used.
+- Add Eric Bollengier's lex error handler fix, which corrects most
+ of the reload problems.
+
+Release 1.38.9 (02May06)
+02May06
+- Added code to strip backslashes from Windows filenames during
+ a restore.
+- Corrected Win32 License to use the correct LICENSE file.
+- Corrected the buffer count and bytes reported in the heap
+ statistics.
+26Apr06
+- Implement an NT_() macro to indicate that text should NOT
+ be translated.
+- Fix a number of incorrect strings marked for translation, when
+ they should not be (e.g. commands).
+- Fix StartTime bug reported for ClientRunBeforeJob and RunBeforeJob
+ Patches supplied by user in bugs #608 and #599.
+- Use most recent of st_ctime and st_mtime in restore tree DIR
+ listing. This fixes some problems with Win32 printing incorrect
+ values.
+- Correct the clock shift comm time calculation between the DIR
+ and the FD. It was added rather than subtracted.
+- Strip all backslashes in filenames to be restored on Win32
+ machines -- the names should all be in Unix format, and if
+ there are any backslashes it is most likely due to an improper
+ FileSet definition, and the files will not otherwise be
+ restorable.
+- Remove lib/regex.c (replaced by bregex.c).
+- Delete src/win32/License.txt
+- Modify installer to install LICENSE
+25Apr06
+- Add back ua_label barcode fix from Rufolf Cejka.
+23Apr06
+- Add 'Dir Status' button to the gnome console.
+- Display heap stats in Storage daemon without debug level.
+22Apr06
+- Integrate most of the MinGW changes -- more to do.
+21Apr06
+- Implement using pg_config for finding PostgreSQL files.
+ Fixes bug #600. Patch supplied by user.
+- Remove -t option from mktemp in mtx_changer.in and use
+ working directory. Fixes bug #578.
+- Update job start time after the any run before job so that
+ files created by the script are only backed up once. Fixes
+ bug #599.
+- Strip trailing newline only from filenames entered in
+ the restore command when reading a file. This permits
+ the user to enter filenames with trailing spaces. Fixes
+ bug #549. The user supplied a patch that I modified slightly.
+- Use the most recent time (st_mtime, st_ctime) in the dir
+ command in restore. This gives the user a better idea of what
+ the newest file really is. This fixes bug #574. The fix
+ was suggested by the user.
+18Apr06
+- Remove the -f option from the chown in Makefile.in for more
+ portability.
+- Change setting the group in Makefile.in to use chgrp for
+ more portability.
+- Implement a Bacula read/write lock for Python rather
+ than using the Python lock to avoid recursive problems.
+- Correct the uninstall directory names in filed/Makefile.in
+ as reported by a user.
+
Release 1.38.8 (14Apr06)
14Apr06
- Correct Makefile for Solaris /bin/sh
- Fix copyright date and URL typo -- bug #468.
- Change autostart install for FreeBSD to look for rc.conf
rather than rc.local as suggested fix for bug #466.
-- Apply patch supplied by Eric Bollengier to fix PostgreSQL
+- Apply patch supplied by Eric Bollinger to fix PostgreSQL
grant on status. Bug #465
-- Apply patch supplied by Eric Bollengier to fix PostgreSQL
+- Apply patch supplied by Eric Bollinger to fix PostgreSQL
update script. Bug #464
- Fix off by one for last Slot of autochanger for label.
- Update release date.
- Release Notes for Bacula 1.38.8
+ Release Notes for Bacula 1.38.10
- Bacula code: Total files = 419 Total lines = 137,078 (*.h *.c *.in)
- 20,440 additional lines of code since version 1.36.3
+ Bacula code: Total files = 423 Total lines = 139,479 (*.h *.c *.in)
-!!!! Important !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- In Bacula version 1.38.5 and prior, there was apparently a
- compiler bug that caused the Storage daemon to seg fault.
- I have applied a workaround in version 1.38.6 and greater that
- seems to work. If you experience problems, follow the instructions
- below.
-
- If you are compiling for a 64 bit machine, you need to ensure
- that the code is compiled with the -O0 (- oh zero) option otherwise
- the SD will crash on most all operations -- apparently due to
- a compiler bug in gcc's 64 bit code generation.
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-Warning:
+Warning for version 1.38.8 and greater:
- The Windows FD no longer automatically folds the case
in wild-card comparions. To get the same behavior as before,
you must explicitly use "Ignore Case = yes" in your FileSet.
(typical error for Windows users), unless the string is
enclosed in double quotes, in which case, the backslashes
must be doubled.
-- The new algorithm for selecting Volumes from the Scratch
- pool that was implemented in 1.38.6 and 1.38.7 is abandoned
- in favor of a corrected version of the 1.38.5 algorithm.
+
+Major Changes for 1.38.10:
+- This is a primarily a bug fix release, with the following bugs being
+ resolved #570, 609, 611, 613, 614, 617 as well as other bugs not
+ reported in the bugs database. See below for details.
+- The bconsole "reload" command should now work properly in virtually
+ all situations thanks to the efforts of a number of people (Eric,
+ Christopher, and myself).
+- There is an untested fix to eliminate the scheduling problems (either
+ no job run or the same job run twice) during sudden clock shifts (daylight
+ savings time change).
+- The manual has been released under the GNU Free Documentation License (FDL).
+ The major difference is that this removes the prior restriction on
+ commercial reproduction of the manual.
+- Fixed a race condition (thanks to Christopher) on dual processor machines
+ that caused jobs to block when starting with the SD.
+
+New features for 1.38.10:
+- None
+
+Fixes for 1.38.10:
+08Jun06
+- Modify setting ACLs to suppress error message if the file is a
+ symbolic link since the file linked to may not yet be created,
+ and symbolic links really should not have attributes ...
+06Jun06
+- Complete implementation of acl.c error message during restore.
+ During backups, errors getting acls are silently ignored, as was
+ previously the case.
+04Jun06
+- Modify configure.in to check for typeof().
+- Better detection of postgresql installation if pg_conf works.
+- Fix RescheduleTimes = 0 bug (should not reschedule).
+- Down port from 1.39: fixes for reload, autochanger error messages,
+ scheduler fixes for reload and day light savings change,
+01Jun06
+- Implement partial error messages for src/filed/acl.c
+- Fix return code to fail when doing update barcodes and
+ Pool resource is not found. This previously caused Volumes
+ to be labeled as cleaning tapes.
+- Small updates to projects file.
+26May06
+- Prevent DVD code from rewriting label if the device cannot be
+ opened read/write.
+- Fix Dir/SD run race in migrate.c, verify.c, and restore.c
+- Update projects file.
+24May06
+- Applied patch posted by Jaime Ventura to bug #570 to correct failure
+ of restarted jobs to complete (due to a destroyed pthreads conditional
+ variable used by the message thread).
+- Fixed bug #619 where Bacula would not restart jobs with MaxRestartTimes
+ set to zero.
+- Apply patch from John Goerzen bug #611 to fix bad manual links in the code.
+- Apply patch from Rudolf Cejka bug #614 to removed trailing
+ colons in query.sql file.
+- Apply patch from Rudolf Cejka bug #613 to correct prunning of files
+ not to create orphans.
+- Apply patch from Rudolf Cejka bug #617 to use mtime instead of ctime
+ in restore long listing.
+- Apply patch from Rudolf Cejka bug #609 to use MarkId in verify.c instead
+ of incorrect MarkedId.
+- Apply patch from adioso bug #616 to correct text in manual (replace
+ Director with File daemon).
+21May06
+- Move DIR "run" command to SD before starting the message thread
+ as suggested by Cristopher Hull to avoid a race deadlock from
+ two threads using the bsock structure.
+- Modify LICENSE to correct some problems pointed out by Debian.
+05May06
+- Correct EOF with no \n lex.c problem.
+- Add additional INFO messages if autochanger cannot be used.
+- Add Eric Bollengier's lex error handler fix, which corrects most
+ of the reload problems.
+
+
+New features for 1.38.9:
+- A "Dir Status" button in the Gnome console.
+
+Fixes:
+This is mainly a bug fix release containing a collection of
+ minor fixes for 1.38.8.
+- Added code to strip backslashes from Windows filenames during
+ a restore.
+- Corrected Win32 License to use the correct LICENSE file.
+- Corrected the buffer count and bytes reported in the heap
+ statistics.
+- Fix a number of incorrect strings marked for translation, when
+ they should not be (e.g. commands).
+- Fix StartTime bug reported for ClientRunBeforeJob and RunBeforeJob
+ Patches supplied by user in bugs #608 and #599.
+- Use most recent of st_ctime and st_mtime in restore tree DIR
+ listing. This fixes some problems with Win32 printing incorrect
+ values.
+- Correct the clock shift comm time calculation between the DIR
+ and the FD. It was added rather than subtracted.
+- Strip all backslashes in filenames to be restored on Win32
+ machines -- the names should all be in Unix format, and if
+ there are any backslashes it is most likely due to an improper
+ FileSet definition, and the files will not otherwise be
+ restorable.
+- Delete src/win32/License.txt
+- Modify installer to install LICENSE
+- Add back ua_label barcode fix from Rufolf Cejka.
+- Add 'Dir Status' button to the gnome console.
+- Display heap stats in Storage daemon without debug level.
+- Implement using pg_config for finding PostgreSQL files.
+ Fixes bug #600. Patch supplied by user.
+- Remove -t option from mktemp in mtx_changer.in and use
+ working directory. Fixes bug #578.
+- Update job start time after the any run before job so that
+ files created by the script are only backed up once. Fixes
+ bug #599.
+- Strip trailing newline only from filenames entered in
+ the restore command when reading a file. This permits
+ the user to enter filenames with trailing spaces. Fixes
+ bug #549. The user supplied a patch that I modified slightly.
+- Use the most recent time (st_mtime, st_ctime) in the dir
+ command in restore. This gives the user a better idea of what
+ the newest file really is. This fixes bug #574. The fix
+ was suggested by the user.
+- Remove the -f option from the chown in Makefile.in for more
+ portability.
+- Change setting the group in Makefile.in to use chgrp for
+ more portability.
+- Implement a Bacula read/write lock for Python rather
+ than using the Python lock to avoid recursive problems.
+- Correct the uninstall directory names in filed/Makefile.in
+ as reported by a user.
+
New features for 1.38.8:
- Regex, RegexFile, and RegexDir are now implemented in the
-# generated automatically by aclocal 1.9.5 -*- Autoconf -*-
+# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005 Free Software Foundation, Inc.
# AC_FUNC_FNMATCH dnl use local version
-dnl# FreeBSD needs to link libxpg4
-AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])
AC_CHECK_LIB(intl, gettext, [LIBS="$LIBS -lintl"])
/usr/openwin/share/include'
if test "$ac_x_includes" = no; then
- # Guess where to find include files, by looking for Intrinsic.h.
+ # Guess where to find include files, by looking for Xlib.h.
# First, try using that file with no special directory specified.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <X11/Intrinsic.h>
+#include <X11/Xlib.h>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
sed 's/^/| /' conftest.$ac_ext >&5
for ac_dir in $ac_x_header_dirs; do
- if test -r "$ac_dir/X11/Intrinsic.h"; then
+ if test -r "$ac_dir/X11/Xlib.h"; then
ac_x_includes=$ac_dir
break
fi
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <X11/Intrinsic.h>
+#include <X11/Xlib.h>
int
main ()
{
-XtMalloc (0)
+XrmInitialize ()
;
return 0;
}
# AC_FUNC_FNMATCH dnl use local version
-echo "$as_me:$LINENO: checking for setlocale in -lxpg4" >&5
-echo $ECHO_N "checking for setlocale in -lxpg4... $ECHO_C" >&6
-if test "${ac_cv_lib_xpg4_setlocale+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lxpg4 $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char setlocale ();
-int
-main ()
-{
-setlocale ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_xpg4_setlocale=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_xpg4_setlocale=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_xpg4_setlocale" >&5
-echo "${ECHO_T}$ac_cv_lib_xpg4_setlocale" >&6
-if test $ac_cv_lib_xpg4_setlocale = yes; then
- LIBS="$LIBS -lxpg4"
-fi
-
echo "$as_me:$LINENO: checking for gettext in -lintl" >&5
echo $ECHO_N "checking for gettext in -lintl... $ECHO_C" >&6
if test "${ac_cv_lib_intl_gettext+set}" = set; then
Kern Sibbald
General:
+Release 1.38.10 (08Jun06) released 12JunO6
+08Jun06
+- Modify setting ACLs to suppress error message if the file is a
+ symbolic link since the file linked to may not yet be created,
+ and symbolic links really should not have attributes ...
+- Remove old regex code from baconfig.h
+06Jun06
+- Complete implementation of acl.c error message during restore.
+ During backups, errors getting acls are silently ignored, as was
+ previously the case.
04Jun06
- Modify configure.in to check for typeof().
- Better detection of postgresql installation if pg_conf works.
Kern Sibbald
General:
+14Jun06
+- Remove xpg4 lib from FreeBSD build as it is no longer needed and
+ sometimes creates install problems.
+- Change a couple of %T in strftime to %H:%M:%S as seen in Robert
+ Nelson's code. More to do.
+- Convert a few store_bit to store_bool in filed_conf.c.
+- DVD tweak to block.c as supplied by Uwe Muessel.
04Jun06
- Modify configure.in to check for typeof().
- In findlib/attribs.c use typeof instead of templates if possible.
stime = jr->StartTime;
localtime_r(&stime, &tm);
- strftime(dt, sizeof(dt), "%Y-%m-%d %T", &tm);
+ strftime(dt, sizeof(dt), "%Y-%m-%d %H:%M:%S", &tm);
JobTDate = (btime_t)stime;
db_lock(mdb);
ttime = jr->EndTime;
localtime_r(&ttime, &tm);
- strftime(dt, sizeof(dt), "%Y-%m-%d %T", &tm);
+ strftime(dt, sizeof(dt), "%Y-%m-%d %H:%M:%S", &tm);
JobTDate = ttime;
db_lock(mdb);
Dmsg1(400, "Set FirstWritten Vol=%s\n", mr->VolumeName);
ttime = mr->FirstWritten;
localtime_r(&ttime, &tm);
- strftime(dt, sizeof(dt), "%Y-%m-%d %T", &tm);
+ strftime(dt, sizeof(dt), "%Y-%m-%d %H:%M:%S", &tm);
Mmsg(mdb->cmd, "UPDATE Media SET FirstWritten='%s'"
" WHERE VolumeName='%s'", dt, mr->VolumeName);
stat = UPDATE_DB(jcr, mdb, mdb->cmd);
ttime = time(NULL);
}
localtime_r(&ttime, &tm);
- strftime(dt, sizeof(dt), "%Y-%m-%d %T", &tm);
+ strftime(dt, sizeof(dt), "%Y-%m-%d %H:%M:%S", &tm);
Mmsg(mdb->cmd, "UPDATE Media SET LabelDate='%s' "
"WHERE VolumeName='%s'", dt, mr->VolumeName);
UPDATE_DB(jcr, mdb, mdb->cmd);
if (mr->LastWritten != 0) {
ttime = mr->LastWritten;
localtime_r(&ttime, &tm);
- strftime(dt, sizeof(dt), "%Y-%m-%d %T", &tm);
+ strftime(dt, sizeof(dt), "%Y-%m-%d %H:%M:%S", &tm);
Mmsg(mdb->cmd, "UPDATE Media Set LastWritten='%s' "
"WHERE VolumeName='%s'", dt, mr->VolumeName);
UPDATE_DB(jcr, mdb, mdb->cmd);
if (job_canceled(jcr)) {
update_job_end_record(jcr);
-
} else {
-
/* Run any script BeforeJob on dird */
run_scripts(jcr, jcr->job->RunScripts, "BeforeJob");
}
}
-bail_out:
generate_daemon_event(jcr, "JobEnd");
Dmsg1(50, "======== End Job stat=%c ==========\n", jcr->JobStatus);
sm_check(__FILE__, __LINE__, true);
acl_free(acl_text);
return len;
}
+ berrno be;
+ Jmsg2(jcr, M_ERROR, 0, _("acl_to_text error on file \"%s\": ERR=%s\n"),
+ jcr->last_fname, be.strerror());
+ Dmsg3(100, "acl_to_text error acl=%s file=%s ERR=%s\n",
+ jcr->acl_text, jcr->last_fname, be.strerror());
acl_free(acl);
#ifndef HAVE_OSF1_OS /* BACL_ENOTSUP not defined for OSF1 */
} else if (errno == BACL_ENOTSUP) {
*/
#ifndef HAVE_FREEBSD_OS
if (acl_valid(acl) != 0) {
+ berrno be;
+ Jmsg2(jcr, M_ERROR, 0, _("ac_valid error on file \"%s\": ERR=%s\n"),
+ jcr->last_fname, be.strerror());
+ Dmsg3(100, "acl_valid error acl=%s file=%s ERR=%s\n",
+ jcr->acl_text, jcr->last_fname, be.strerror());
acl_free(acl);
return -1;
}
#endif
- if (acl_set_file(jcr->last_fname, ostype, acl) != 0) {
+ /*
+ * Restore the ACLs, but don't complain about links which really should
+ * not have attributes, and the file it is linked to may not yet be restored.
+ */
+ if (acl_set_file(jcr->last_fname, ostype, acl) != 0 && jcr->last_type != FT_LNK) {
berrno be;
Jmsg2(jcr, M_ERROR, 0, _("acl_set_file error on file \"%s\": ERR=%s\n"),
jcr->last_fname, be.strerror());
actuallyfree(acl_text);
return len;
}
+ berrno be;
+ Jmsg2(jcr, M_ERROR, 0, _("acltostr error on file \"%s\": ERR=%s\n"),
+ jcr->last_fname, be.strerror());
+ Dmsg3(100, "acltostr error acl=%s file=%s ERR=%s\n",
+ jcr->acl_text, jcr->last_fname, be.strerror());
+ return -1;
}
return -1;
}
n = strtoacl(jcr->acl_text, 0, NACLENTRIES, acls, ACL_FILEOWNER, ACL_FILEGROUP);
if (n <= 0) {
+ berrno be;
+ Jmsg2(jcr, M_ERROR, 0, _("strtoacl error on file \"%s\": ERR=%s\n"),
+ jcr->last_fname, be.strerror());
+ Dmsg3(100, "strtoacl error acl=%s file=%s ERR=%s\n",
+ jcr->acl_text, jcr->last_fname, be.strerror());
return -1;
}
if (strtoacl(jcr->acl_text, n, NACLENTRIES, acls, ACL_FILEOWNER, ACL_FILEGROUP) != n) {
+ berrno be;
+ Jmsg2(jcr, M_ERROR, 0, _("strtoacl error on file \"%s\": ERR=%s\n"),
+ jcr->last_fname, be.strerror());
+ Dmsg3(100, "strtoacl error acl=%s file=%s ERR=%s\n",
+ jcr->acl_text, jcr->last_fname, be.strerror());
return -1;
}
- if (setacl(jcr->last_fname, n, acls) != 0) {
+ /*
+ * Restore the ACLs, but don't complain about links which really should
+ * not have attributes, and the file it is linked to may not yet be restored.
+ */
+ if (setacl(jcr->last_fname, n, acls) != 0 && jcr->last_type != FT_LNK) {
+ berrno be;
+ Jmsg2(jcr, M_ERROR, 0, _("setacl error on file \"%s\": ERR=%s\n"),
+ jcr->last_fname, be.strerror());
+ Dmsg3(100, "setacl error acl=%s file=%s ERR=%s\n",
+ jcr->acl_text, jcr->last_fname, be.strerror());
return -1;
}
return 0;
free(acls);
return len;
}
+ berrno be;
+ Jmsg2(jcr, M_ERROR, 0, _("acltotext error on file \"%s\": ERR=%s\n"),
+ jcr->last_fname, be.strerror());
+ Dmsg3(100, "acltotext error acl=%s file=%s ERR=%s\n",
+ jcr->acl_text, jcr->last_fname, be.strerror());
}
free(acls);
return -1;
acls = aclfromtext(jcr->acl_text, &n);
if (!acls) {
+ berrno be;
+ Jmsg2(jcr, M_ERROR, 0, _("aclfromtext error on file \"%s\": ERR=%s\n"),
+ jcr->last_fname, be.strerror());
+ Dmsg3(100, "aclfromtext error acl=%s file=%s ERR=%s\n",
+ jcr->acl_text, jcr->last_fname, be.strerror());
return -1;
}
- if (acl(jcr->last_fname, SETACL, n, acls) == -1) {
+ /*
+ * Restore the ACLs, but don't complain about links which really should
+ * not have attributes, and the file it is linked to may not yet be restored.
+ */
+ if (acl(jcr->last_fname, SETACL, n, acls) == -1 && jcr->last_type != FT_LNK) {
+ berrno be;
+ Jmsg2(jcr, M_ERROR, 0, _("acl(SETACL) error on file \"%s\": ERR=%s\n"),
+ jcr->last_fname, be.strerror());
+ Dmsg3(100, "acl(SETACL) error acl=%s file=%s ERR=%s\n",
+ jcr->acl_text, jcr->last_fname, be.strerror());
actuallyfree(acls);
return -1;
}
{"heartbeatinterval", store_time, ITEM(res_client.heartbeat_interval), 0, ITEM_DEFAULT, 0},
{"sdconnecttimeout", store_time,ITEM(res_client.SDConnectTimeout), 0, ITEM_DEFAULT, 60 * 30},
{"maximumnetworkbuffersize", store_pint, ITEM(res_client.max_network_buffer_size), 0, 0, 0},
- {"pkisignatures", store_bit, ITEM(res_client.pki_sign), 1, ITEM_DEFAULT, 0},
- {"pkiencryption", store_bit, ITEM(res_client.pki_encrypt), 1, ITEM_DEFAULT, 0},
+ {"pkisignatures", store_bool, ITEM(res_client.pki_sign), 0, ITEM_DEFAULT, 0},
+ {"pkiencryption", store_bool, ITEM(res_client.pki_encrypt), 0, ITEM_DEFAULT, 0},
{"pkikeypair", store_dir, ITEM(res_client.pki_keypair_file), 0, 0, 0},
{"pkisigner", store_alist_str, ITEM(res_client.pki_signing_key_files), 0, 0, 0},
{"pkimasterkey", store_alist_str, ITEM(res_client.pki_master_key_files), 0, 0, 0},
- {"tlsenable", store_bit, ITEM(res_client.tls_enable), 1, 0, 0},
- {"tlsrequire", store_bit, ITEM(res_client.tls_require), 1, 0, 0},
+ {"tlsenable", store_bool, ITEM(res_client.tls_enable), 0, 0, 0},
+ {"tlsrequire", store_bool, ITEM(res_client.tls_require), 0, 0, 0},
{"tlscacertificatefile", store_dir, ITEM(res_client.tls_ca_certfile), 0, 0, 0},
{"tlscacertificatedir", store_dir, ITEM(res_client.tls_ca_certdir), 0, 0, 0},
{"tlscertificate", store_dir, ITEM(res_client.tls_certfile), 0, 0, 0},
{"description", store_str, ITEM(res_dir.hdr.desc), 0, 0, 0},
{"password", store_password, ITEM(res_dir.password), 0, ITEM_REQUIRED, 0},
{"address", store_str, ITEM(res_dir.address), 0, 0, 0},
- {"monitor", store_bit, ITEM(res_dir.monitor), 1, ITEM_DEFAULT, 0},
- {"tlsenable", store_bit, ITEM(res_dir.tls_enable), 1, 0, 0},
- {"tlsrequire", store_bit, ITEM(res_dir.tls_require), 1, 0, 0},
- {"tlsverifypeer", store_bit, ITEM(res_dir.tls_verify_peer), 1, ITEM_DEFAULT, 1},
+ {"monitor", store_bool, ITEM(res_dir.monitor), 0, ITEM_DEFAULT, 0},
+ {"tlsenable", store_bool, ITEM(res_dir.tls_enable), 0, 0, 0},
+ {"tlsrequire", store_bool, ITEM(res_dir.tls_require), 0, 0, 0},
+ {"tlsverifypeer", store_bool, ITEM(res_dir.tls_verify_peer), 0, ITEM_DEFAULT, 1},
{"tlscacertificatefile", store_dir, ITEM(res_dir.tls_ca_certfile), 0, 0, 0},
{"tlscacertificatedir", store_dir, ITEM(res_dir.tls_ca_certdir), 0, 0, 0},
{"tlscertificate", store_dir, ITEM(res_dir.tls_certfile), 0, 0, 0},
RES hdr;
char *password; /* Director password */
char *address; /* Director address or zero */
- int monitor; /* Have only access to status and .status functions */
- int tls_enable; /* Enable TLS */
- int tls_require; /* Require TLS */
- int tls_verify_peer; /* TLS Verify Client Certificate */
+ bool monitor; /* Have only access to status and .status functions */
+ bool tls_enable; /* Enable TLS */
+ bool tls_require; /* Require TLS */
+ bool tls_verify_peer; /* TLS Verify Client Certificate */
char *tls_ca_certfile; /* TLS CA Certificate File */
char *tls_ca_certdir; /* TLS CA Certificate Directory */
char *tls_certfile; /* TLS Server Certificate File */
utime_t heartbeat_interval; /* Interval to send heartbeats to Dir */
utime_t SDConnectTimeout; /* timeout in seconds */
uint32_t max_network_buffer_size; /* max network buf size */
- int pki_sign; /* Enable Data Integrity Verification via Digital Signatures */
- int pki_encrypt; /* Enable Data Encryption */
+ bool pki_sign; /* Enable Data Integrity Verification via Digital Signatures */
+ bool pki_encrypt; /* Enable Data Encryption */
char *pki_keypair_file; /* PKI Key Pair File */
alist *pki_signing_key_files; /* PKI Signing Key Files */
alist *pki_master_key_files; /* PKI Master Key Files */
- int tls_enable; /* Enable TLS */
- int tls_require; /* Require TLS */
+ bool tls_enable; /* Enable TLS */
+ bool tls_require; /* Require TLS */
char *tls_ca_certfile; /* TLS CA Certificate File */
char *tls_ca_certdir; /* TLS CA Certificate Directory */
char *tls_certfile; /* TLS Client Certificate File */
case CF_CREATED: /* File created, but there is no content */
jcr->lock();
pm_strcpy(jcr->last_fname, attr->ofname);
+ jcr->last_type = attr->type;
jcr->JobFiles++;
jcr->unlock();
fileAddr = 0;
/*
- Copyright (C) 2000-2005 Kern Sibbald
+ Copyright (C) 2000-2006 Kern Sibbald
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
struct f_link *lp;
if (ff_pkt->linkhash == NULL) {
- ff_pkt->linkhash = (link_t **)bmalloc(LINK_HASHTABLE_SIZE * sizeof(link_t *));
- memset(ff_pkt->linkhash, 0, LINK_HASHTABLE_SIZE * sizeof(link_t *));
+ ff_pkt->linkhash = (link_t **)bmalloc(LINK_HASHTABLE_SIZE * sizeof(link_t *));
+ memset(ff_pkt->linkhash, 0, LINK_HASHTABLE_SIZE * sizeof(link_t *));
}
const int linkhash = LINKHASH(ff_pkt->statp);
uint32_t num_files_examined; /* files examined this job */
POOLMEM *last_fname; /* last file saved/verified */
POOLMEM *acl_text; /* text of ACL for backup */
+ int last_type; /* type of last file saved/verified */
/*********FIXME********* add missing files and files to be retried */
int incremental; /* set if incremental for SINCE */
time_t mtime; /* begin time for SINCE */
#include "jcr.h"
int execvp_errors[] = {
- EACCES,
- ENOEXEC,
- EFAULT,
- EINTR,
- E2BIG,
- ENAMETOOLONG,
- ENOMEM,
+ EACCES,
+ ENOEXEC,
+ EFAULT,
+ EINTR,
+ E2BIG,
+ ENAMETOOLONG,
+ ENOMEM,
#ifndef WIN32
- ETXTBSY,
+ ETXTBSY,
#endif
- ENOENT
+ ENOENT
};
int num_execvp_errors = (int)(sizeof(execvp_errors)/sizeof(int));
#else
#warning "WTERMSIG undefined in Win32 !!!"
#endif
- Dmsg1(800, "Child died from signale %d\n", stat);
+ Dmsg1(800, "Child died from signal %d\n", stat);
stat |= b_errno_signal; /* exit signal returned */
}
}
#define DP_C_INT64 4
#define char_to_int(p) ((p)- '0')
+#undef MAX
#define MAX(p,q) (((p) >= (q)) ? (p) : (q))
/*
* Version $Id$
*/
/*
- Copyright (C) 2000-2005 Kern Sibbald
+ Copyright (C) 2000-2006 Kern Sibbald
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
Dmsg3(100, "Tests : %d %d %d\n", (dev->VolCatInfo.VolCatParts > 0),
((dev->file_addr-dev->part_start) == dev->part_size),
(dev->part <= dev->VolCatInfo.VolCatParts));*/
- /* Check for part file end */
- if ((dev->num_parts > 0) &&
- ((dev->file_addr-dev->part_start) == dev->part_size) &&
- (dev->part < dev->num_parts)) {
+ /* Check for DVD part file end */
+ if (dev->at_eof() && dev->is_dvd() && dev->num_parts > 0 &&
+ dev->part < dev->num_parts) {
if (dvd_open_next_part(dcr) < 0) {
- Jmsg2(dcr->jcr, M_FATAL, 0, _("Unable to open device next part %s: ERR=%s\n"),
- dev->print_name(), dev->bstrerror());
+ Jmsg3(dcr->jcr, M_FATAL, 0, _("Unable to open device part=%d %s: ERR=%s\n"),
+ dev->part, dev->print_name(), dev->bstrerror());
dev->dev_errno = EIO;
return false;
}
if (at_eot()) {
return true;
}
- state &= ~(ST_EOF); /* remove EOF flags */
+ clear_eof(); /* remove EOF flag */
block_num = file = 0;
file_size = 0;
file_addr = 0;
// Dmsg1(100, "====== Seek to %lld\n", pos);
if (pos >= 0) {
update_pos_dev(this);
- state |= ST_EOT;
+ set_eot();
return true;
}
dev_errno = errno;
}
update_pos_dev(this);
Dmsg1(200, "Return %d from FSF\n", stat);
- if (at_eof())
+ if (at_eof()) {
Dmsg0(200, "ST_EOF set on exit FSF\n");
- if (at_eot())
+ }
+ if (at_eot()) {
Dmsg0(200, "ST_EOT set on exit FSF\n");
+ }
Dmsg1(200, "Return from FSF file=%d\n", file);
return stat == 0;
}
return false;
}
Dmsg0(29, "bsf\n");
- state &= ~(ST_EOT|ST_EOF);
+ clear_eot();
+ clear_eof();
file -= num;
file_addr = 0;
file_size = 0;
Dmsg0(29, "bsr_dev\n");
block_num -= num;
- state &= ~(ST_EOF|ST_EOT|ST_EOF);
+ clear_eof();
+ clear_eot();
mt_com.mt_op = MTBSR;
mt_com.mt_count = num;
stat = ioctl(fd, MTIOCTOP, (char *)&mt_com);
return false;
}
- state &= ~(ST_EOT | ST_EOF); /* remove EOF/EOT flags */
+ clear_eof();
+ clear_eot();
mt_com.mt_op = MTWEOF;
mt_com.mt_count = num;
stat = ioctl(fd, MTIOCTOP, (char *)&mt_com);