]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Add some debugging information to bacl_solaris.
authorRadoslaw Korzeniewski <radekk@inteos.pl>
Fri, 13 Apr 2018 08:15:22 +0000 (10:15 +0200)
committerRadosław Korzeniewski <radekk@inteos.pl>
Fri, 20 Apr 2018 11:18:28 +0000 (13:18 +0200)
bacula/src/filed/bacl.c
bacula/src/filed/bacl_solaris.c

index 53ed0218f85bed49bb444e12b684f7c95a43b0fd..4eb611340c34c94d23d8b27c66d8142eec3739d4 100644 (file)
@@ -453,6 +453,7 @@ bRC_BACL BACL::restore_acl (JCR *jcr, int stream, char *data, uint32_t length)
             return restore_plugin_acl(jcr);
          default:
             if (flags & BACL_FLAG_NATIVE){
+               Dmsg0(400, "make Native ACL call\n");
                for (a = 0; acl_streams[a] > 0; a++){
                   if (acl_streams[a] == stream){
                      return os_restore_acl(jcr, stream, content, content_len);
index a751ce4fe847fd0b0bec99c7391abc07bc2cba8e..d3a725c92e23a88d8fc709a3b29dc22cf9ebadaf 100644 (file)
@@ -181,6 +181,7 @@ bRC_BACL BACL_Solaris::os_restore_acl (JCR *jcr, int stream, char *content, uint
          break;
    }
 
+   Dmsg2(400, "restore acl stream %i on file: %s\n", stream, jcr->last_fname);
    switch (stream){
       case STREAM_XACL_SOLARIS_POSIX:
          if ((aclrc & (_ACL_ACLENT_ENABLED | _ACL_ACE_ENABLED)) == 0){
@@ -211,7 +212,7 @@ bRC_BACL BACL_Solaris::os_get_acl(JCR *jcr, int *stream){
    int flags;
    acl_t *aclp;
    char *acl_text;
-   bRC_BACL rc = bRC_BACL_fatal;
+   bRC_BACL rc = bRC_BACL_ok;
 
    if (!stream){
       return bRC_BACL_fatal;
@@ -249,20 +250,20 @@ bRC_BACL BACL_Solaris::os_get_acl(JCR *jcr, int *stream){
 
    if ((acl_text = acl_totext(aclp, flags)) != NULL){
       set_content(acl_text);
-      actuallyfree(acl_text);
-
       switch (acl_type(aclp)){
          case ACLENT_T:
             *stream = STREAM_XACL_SOLARIS_POSIX;
+            Dmsg1(500, "found acl SOLARIS_POSIX: %s\n", acl_text);
             break;
          case ACE_T:
             *stream = STREAM_XACL_SOLARIS_NFS4;
+            Dmsg1(500, "found acl SOLARIS_NFS4: %s\n", acl_text);
             break;
          default:
             rc = bRC_BACL_error;
             break;
       }
-
+      actuallyfree(acl_text);
       acl_free(aclp);
    }
    return rc;