From: Kern Sibbald Date: Fri, 5 Aug 2005 18:58:32 +0000 (+0000) Subject: Apply patches sent by David Duchscher for X-Git-Tag: Release-1.38.0~206 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=942e66ff5cd760fff435020352d300a7018c0bad;p=bacula%2Fbacula Apply patches sent by David Duchscher for making ACLs work on MacOS X and FreeBSD. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2298 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/autoconf/configure.in b/bacula/autoconf/configure.in index 76b01a2294..a126d20b30 100644 --- a/bacula/autoconf/configure.in +++ b/bacula/autoconf/configure.in @@ -1517,12 +1517,13 @@ if test x$FDLIBS = x-lz; then have_zlib=yes fi -AC_CHECK_HEADER(sys/acl.h) -AC_CHECK_LIB(acl, acl_get_file, [FDLIBS="-lacl $FDLIBS"]) have_acl=no -if test $ac_cv_lib_acl_acl_get_file = yes; then +AC_CHECK_HEADER(sys/acl.h) +AC_CHECK_FUNC(acl_get_file, [have_acl=yes], + [AC_CHECK_LIB(acl, acl_get_file, [have_acl=yes; FDLIBS="-lacl $FDLIBS"])] +) +if test $have_acl = yes; then AC_DEFINE(HAVE_ACL) - have_acl=yes fi dnl Check for pthread libraries diff --git a/bacula/kernstodo b/bacula/kernstodo index d31a541110..5efb120c15 100644 --- a/bacula/kernstodo +++ b/bacula/kernstodo @@ -12,6 +12,7 @@ Final items for 1.37 before release: - Tape xxx in drive 0, requested in drive 1 - The mount command does not work with drives other than 0. - Look at fixing restore status stats in SD. +- My database is growing - --without-openssl breaks at least on Solaris. 9. Run the regression scripts on Solaris and FreeBSD @@ -60,6 +61,7 @@ Document: ======= For 1.39: +- Look at NDMP - Email to the user when the tape is about to need changing x days before it needs changing. - Command to show next tape that will be used for a job even @@ -1437,4 +1439,3 @@ Block Position: 0 a reservation? - Multi-drive changer seems to only use drive 0 Multiple drives don't seem to be opened. - diff --git a/bacula/kes-1.37 b/bacula/kes-1.37 index 470548f099..f5d17059ca 100644 --- a/bacula/kes-1.37 +++ b/bacula/kes-1.37 @@ -4,7 +4,10 @@ General: Changes to 1.37.34: -04Aug03 +05Aug05 +- Apply patches sent by David Duchscher for + making ACLs work on MacOS X and FreeBSD. +04Aug05 - Apply patch in bug#397 that improved configure - find readline under $with_readline/include/readline - no libutil under Solaris @@ -14,7 +17,7 @@ Changes to 1.37.34: resource. - Correct a return code in find_suitable_device_for_job() Possibly cause of "busy writing to another volume". -03Aug03 +03Aug05 - Modify open() for tape so nonblocking really works. - Use fcntl() to reset blocking status rather than close() and reopen the drive. @@ -25,7 +28,7 @@ Changes to 1.37.34: or changed that free_volume() is called on the old name. Changes to 1.37.33: -03Aug03 +03Aug05 - Require 5 arguments to mtx-changer except list and slots - Turn -EPIPE status returns from bpipe to ETIME - Include Slot in SD status output diff --git a/bacula/src/dird/next_vol.c b/bacula/src/dird/next_vol.c index 2ced309bd7..6954d2ddfc 100644 --- a/bacula/src/dird/next_vol.c +++ b/bacula/src/dird/next_vol.c @@ -121,6 +121,8 @@ int find_next_volume_for_append(JCR *jcr, MEDIA_DBR *mr, bool create) edit_int64(smr.MediaId, ed2)); ok = db_sql_query(jcr->db, query, NULL, NULL); db_unlock(jcr->db); + Jmsg(jcr, M_INFO, 0, _("Using Volume \"%s\" from 'Scratch' pool.\n"), + smr.VolumeName); /* Set new Pool Id in smr record, then copy it to mr */ smr.PoolId = mr->PoolId; memcpy(mr, &smr, sizeof(MEDIA_DBR)); diff --git a/bacula/src/filed/acl.c b/bacula/src/filed/acl.c index f68de53dfa..018323db26 100644 --- a/bacula/src/filed/acl.c +++ b/bacula/src/filed/acl.c @@ -97,6 +97,7 @@ JCR jcr; #if !defined(HAVE_ACL) /* ACL support is required, of course */ \ || !( defined(HAVE_AIX_OS) /* man page -- may need flags */ \ || defined(HAVE_FREEBSD_OS) /* tested -- compile wihtout flags */ \ + || defined(HAVE_DARWIN_OS) /* tested -- compile wihtout flags */ \ || defined(HAVE_IRIX_OS) /* man page -- compile without flags */ \ || defined(HAVE_OSF1_OS) /* man page -- may need -lpacl */ \ || defined(HAVE_LINUX_OS) /* tested -- compile with -lacl */ \ @@ -112,7 +113,11 @@ JCR jcr; * with what we have and give all ACL streams a new number/type. */ #endif -#if !defined(HAVE_ACL) || !defined(HAVE_LINUX_OS) +#if !defined(HAVE_ACL) + || ( defined(HAVE_LINUX_OS) + || defined(HAVE_FREEBSD_OS) + || defined(HAVE_DARWIN_OS) + ) /* bacl_get() returns the lenght of the string, or -1 on error. */ int bacl_get(JCR *jcr, int acltype) @@ -151,6 +156,7 @@ int bacl_set(JCR *jcr, int acltype) } #elif defined(HAVE_FREEBSD_OS) \ + || defined(HAVE_DARWIN_OS) \ || defined(HAVE_IRIX_OS) \ || defined(HAVE_OSF1_OS) \ || defined(HAVE_LINUX_OS) @@ -181,7 +187,8 @@ int bacl_set(JCR *jcr, int acltype) int bacl_get(JCR *jcr, int acltype) { acl_t acl; - int len, ostype; + int len; + acl_type_t ostype; char *acl_text; ostype = (acltype & BACL_TYPE_DEFAULT) ? ACL_TYPE_DEFAULT : ACL_TYPE_ACCESS; @@ -209,7 +216,7 @@ int bacl_get(JCR *jcr, int acltype) int bacl_set(JCR *jcr, int acltype) { acl_t acl; - int ostype; + acl_type_t ostype; ostype = (acltype & BACL_TYPE_DEFAULT) ? ACL_TYPE_DEFAULT : ACL_TYPE_ACCESS; diff --git a/bacula/src/filed/acl.h b/bacula/src/filed/acl.h index 2d5676f24d..7f10b000e8 100644 --- a/bacula/src/filed/acl.h +++ b/bacula/src/filed/acl.h @@ -24,6 +24,9 @@ #if defined(HAVE_FREEBSD_OS) #define BACL_CAP (BACL_CAP_DEFAULTS|BACL_CAP_DEFAULTS_DIR) #define BACL_ENOTSUP EOPNOTSUPP +#elif defined(HAVE_DARWIN_OS) +#define BACL_CAP BACL_CAP_NONE +#define BACL_ENOTSUP EOPNOTSUPP #elif defined(HAVE_HPUX_OS) #define BACL_CAP BACL_CAP_NONE #define BACL_ENOTSUP EOPNOTSUPP diff --git a/bacula/src/version.h b/bacula/src/version.h index 854f38da65..506509e73a 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -1,8 +1,8 @@ /* */ #undef VERSION #define VERSION "1.37.34" -#define BDATE "04 August 2005" -#define LSMDATE "04Aug05" +#define BDATE "05 August 2005" +#define LSMDATE "05Aug05" /* Debug flags */ #undef DEBUG