]> git.sur5r.net Git - bacula/bacula/commitdiff
- Implement partial error messages for src/filed/acl.c
authorKern Sibbald <kern@sibbald.com>
Thu, 1 Jun 2006 08:08:30 +0000 (08:08 +0000)
committerKern Sibbald <kern@sibbald.com>
Thu, 1 Jun 2006 08:08:30 +0000 (08:08 +0000)
- 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.

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3039 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/kernstodo
bacula/kes-1.39
bacula/projects
bacula/src/dird/ua_label.c
bacula/src/filed/acl.c
bacula/src/version.h

index 5a908f46cfea1fa8295c8c1234ed10f8f4086076..40d967f3a050134837c0bfa63294333c365b2b33 100644 (file)
@@ -1544,3 +1544,5 @@ Block Position: 0
   accept time qualifiers.
 - Does ClientRunAfterJob fail the job on a bad return code?
 - Make hardlink code at line 240 of find_one.c use binary search.
+- Add ACL error messages in src/filed/acl.c.
+
index 368f1af702622921a3829822cbfcfdc805b2f463..83aa5031d2f2950242c399b22d9da7719a910468 100644 (file)
@@ -2,6 +2,12 @@
                         Kern Sibbald
 
 General:
+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.
 27May06
 - Add Eric Bollengier patch for new RunScript directive. It breaks
   compatibility between dird and fd.
index d3e2f9c2f6b32a0f46de23f272cbd98c0d592b4d..3bc11156a6d3b8c986d946f10dbc6e900055388a 100644 (file)
@@ -487,7 +487,8 @@ Item 13:  Multiple threads in file daemon for the same job
 Item 14:  Implement red/black binary tree routines.
   Date:   28 October 2005
   Origin: Kern
-  Status: 
+  Status: Class code is complete. Code needs to be integrated into
+          restore tree code.
 
   What:   Implement a red/black binary tree class. This could 
           then replace the current binary insert/search routines
@@ -499,7 +500,8 @@ Item 14:  Implement red/black binary tree routines.
 Item 15:  Add support for FileSets in user directories  CACHEDIR.TAG
   Origin: Norbert Kiesel <nkiesel at tbdnetworks dot com>
   Date:   21 November 2005
-  Status:
+  Status: (I think this is better done using a Python event that I
+           will implement in version 1.39.x).
 
   What:   CACHDIR.TAG is a proposal for identifying directories which
           should be ignored for archiving/backup.  It works by ignoring
@@ -530,7 +532,7 @@ Item 15:  Add support for FileSets in user directories  CACHEDIR.TAG
 Item 16:  Implement extraction of Win32 BackupWrite data.
   Origin: Thorsten Engel <thorsten.engel at matrix-computer dot com>
   Date:   28 October 2005
-  Status: Assigned to Thorsten. Implemented in current CVS
+  Status: Done. Assigned to Thorsten. Implemented in current CVS
 
   What:   This provides the Bacula File daemon with code that
           can pick apart the stream output that Microsoft writes
@@ -660,7 +662,7 @@ Item 21:  Quick release of FD-SD connection after backup.
 
 Item 22:  Permit multiple Media Types in an Autochanger
   Origin: Kern
-  Status: Now implemented
+  Status: Done. Implemented in 1.38.9 (I think).  
 
   What:   Modify the Storage daemon so that multiple Media Types
           can be specified in an autochanger. This would be somewhat
@@ -769,7 +771,7 @@ Item n:   Allow skipping execution of Jobs
 
 Item n: archive data
 
-  Origin: calvin streeting calvin@absentdream.com
+  Origin: calvin streeting calvin at absentdream dot com
   Date:   15/5/2006
 
   What:   The abilty to archive to media (dvd/cd) in a uncompressd format
index 8869dcdcc0f12cc9e1ff6cb21cf484219a858975..9e2b7f46b5b0418daf5cc6edc5135ee39c40f7ed 100644 (file)
@@ -953,8 +953,9 @@ static bool is_cleaning_tape(UAContext *ua, MEDIA_DBR *mr, POOL_DBR *pr)
    /* Find Pool resource */
    ua->jcr->pool = (POOL *)GetResWithName(R_POOL, pr->Name);
    if (!ua->jcr->pool) {
-      bsendmsg(ua, _("Pool \"%s\" resource not found!\n"), pr->Name);
-      return true;
+      bsendmsg(ua, _("Pool \"%s\" resource not found for volume \"%s\"!\n"),
+         pr->Name, mr->VolumeName);
+      return false;
    }
    if (ua->jcr->pool->cleaning_prefix == NULL) {
       return false;
index 39646a544382f45c5c7b653e754e1ea366778439..d7ad3fdd30c35ea99e9a25cf83d465efba8cdd69 100644 (file)
@@ -29,7 +29,7 @@
  *   Version $Id$
  */
 /*
-   Copyright (C) 2004-2005 Kern Sibbald
+   Copyright (C) 2004-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
 #include "bacula.h"
 #include "filed.h"
 
-#else
-/*
- * Test program setup 
- *
- * Compile and set up with eg. with eg.
- *
- *    $ cc -DTEST_PROGRAM -DHAVE_SUN_OS -lsec -o acl acl.c
- *    $ ln -s acl aclcp
- *
- * You can then list ACLs with acl and copy them with aclcp.
- *
- * For a list of compiler flags, see the list preceding the big #if below.
- */
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/stat.h>
-#include "acl.h"
-
-#define BACLLEN 65535
-#define pm_strcpy(d,s)     (strncpy(d, s, BACLLEN - 1) == NULL ? -1 : (int)strlen(d))
-#define Dmsg0(n,s)         fprintf(stderr, s)
-#define Dmsg1(n,s,a1)      fprintf(stderr, s, a1)
-#define Dmsg2(n,s,a1,a2)   fprintf(stderr, s, a1, a2)
-
-int aclls(char *fname);
-int aclcp(char *src, char *dst);
-
-struct JCRstruct {
-   char *last_fname;
-   char acl_text[BACLLEN];
-};
-typedef struct JCRstruct JCR;
-JCR jcr;
 #endif
 
 /*
@@ -121,11 +86,13 @@ JCR jcr;
 /* bacl_get() returns the lenght of the string, or -1 on error. */
 int bacl_get(JCR *jcr, int acltype)
 {
+   Jmsg(jcr, M_FATAL, 0, _("ACL support not configured for your machine.\n"));
    return -1;
 }
 
 int bacl_set(JCR *jcr, int acltype)
 {
+   Jmsg(jcr, M_FATAL, 0, _("ACL support not configured for your machine.\n"));
    return -1;
 }
 
@@ -224,11 +191,19 @@ int bacl_set(JCR *jcr, int acltype)
       if (acl_delete_def_file(jcr->last_fname) == 0) {
          return 0;
       }
+      berrno be;
+      Jmsg2(jcr, M_ERROR, 0, _("acl_delete_def_file error on file \"%s\": ERR=%s\n"),
+         jcr->last_fname, be.strerror());
       return -1;
    }
 
    acl = acl_from_text(jcr->acl_text);
    if (acl == NULL) {
+      berrno be;
+      Jmsg2(jcr, M_ERROR, 0, _("acl_from_text error on file \"%s\": ERR=%s\n"),
+         jcr->last_fname, be.strerror());
+      Dmsg3(100, "acl_from_text error acl=%s file=%s ERR=%s\n"), 
+         jcr->acl_text, jcr->last_fname, be.strerror());
       return -1;
    }
 
@@ -244,6 +219,10 @@ int bacl_set(JCR *jcr, int acltype)
 #endif
 
    if (acl_set_file(jcr->last_fname, ostype, acl) != 0) {
+      Jmsg2(jcr, M_ERROR, 0, _("acl_set_file error on file \"%s\": ERR=%s\n"),
+         jcr->last_fname, be.strerror());
+      Dmsg3(100, "acl_set_file error acl=%s file=%s ERR=%s\n"), 
+         jcr->acl_text, jcr->last_fname, be.strerror());
       acl_free(acl);
       return -1;
    }
@@ -347,6 +326,42 @@ int bacl_set(JCR *jcr, int acltype)
 
 
 #ifdef TEST_PROGRAM
+
+/*
+ * Test program setup 
+ *
+ * Compile and set up with eg. with eg.
+ *
+ *    $ cc -DTEST_PROGRAM -DHAVE_SUN_OS -lsec -o acl acl.c
+ *    $ ln -s acl aclcp
+ *
+ * You can then list ACLs with acl and copy them with aclcp.
+ *
+ * For a list of compiler flags, see the list preceding the big #if below.
+ */
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+#include "acl.h"
+
+#define BACLLEN 65535
+#define pm_strcpy(d,s)     (strncpy(d, s, BACLLEN - 1) == NULL ? -1 : (int)strlen(d))
+#define Dmsg0(n,s)         fprintf(stderr, s)
+#define Dmsg1(n,s,a1)      fprintf(stderr, s, a1)
+#define Dmsg2(n,s,a1,a2)   fprintf(stderr, s, a1, a2)
+
+int aclls(char *fname);
+int aclcp(char *src, char *dst);
+
+struct JCRstruct {
+   char *last_fname;
+   char acl_text[BACLLEN];
+};
+typedef struct JCRstruct JCR;
+JCR jcr;
+
 int main(int argc, char **argv)
 {
    char *prgname;
index 11d554081fc62b09064fe841e8a3ed407e736104..d1d427ed80ee4a1750fa34f82c1c2b3fe73f94c9 100644 (file)
@@ -4,8 +4,8 @@
 
 #undef  VERSION
 #define VERSION "1.39.12"
-#define BDATE   "26 May 2006"
-#define LSMDATE "26May06"
+#define BDATE   "01 June 2006"
+#define LSMDATE "01Jun06"
 
 /* Debug flags */
 #undef  DEBUG