]> git.sur5r.net Git - bacula/bacula/commitdiff
Apply patches sent by David Duchscher <kreios@gmail.com> for
authorKern Sibbald <kern@sibbald.com>
Fri, 5 Aug 2005 18:58:32 +0000 (18:58 +0000)
committerKern Sibbald <kern@sibbald.com>
Fri, 5 Aug 2005 18:58:32 +0000 (18:58 +0000)
  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

bacula/autoconf/configure.in
bacula/kernstodo
bacula/kes-1.37
bacula/src/dird/next_vol.c
bacula/src/filed/acl.c
bacula/src/filed/acl.h
bacula/src/version.h

index 76b01a22943721adf09e5cbbaa75715e66260245..a126d20b30e60f0068e4b8e3007e8b2e123361aa 100644 (file)
@@ -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
index d31a541110849dc062cfe68a34577c9678c0ab45..5efb120c1553b198ecdd4c2306f3b1bce0dd39d1 100644 (file)
@@ -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.
-
index 470548f09918b25613fa3086be870c6b97fe0a9c..f5d17059caea66126de20db9dfbcfdb44de936d7 100644 (file)
@@ -4,7 +4,10 @@
 General:
 
 Changes to 1.37.34:
-04Aug03
+05Aug05
+- Apply patches sent by David Duchscher <kreios@gmail.com> 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 
index 2ced309bd7938703a69840ab4d646cf7eadbf2ba..6954d2ddfc2b86196870787794c969afff02a237 100644 (file)
@@ -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));
index f68de53dfa114fb77c2ca2459a6134419fb38a7b..018323db26fc3383429352fe9484a0b9a10918ce 100644 (file)
@@ -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;
 
index 2d5676f24d3af7f885e12268254d4610f9ec93b0..7f10b000e8d9469c25b9e6730f3d85c9b7696fe7 100644 (file)
@@ -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
index 854f38da65dec193eb3b17d217a5bef0519b46b2..506509e73a88c7664126dc84347604be1bd57938 100644 (file)
@@ -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