From: Radoslaw Korzeniewski Date: Fri, 13 Apr 2018 08:15:22 +0000 (+0200) Subject: Add some debugging information to bacl_solaris. X-Git-Tag: Release-9.2.0~109 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7a969d41fddbcf41c33b08d8fcbba4b00b776dd3;p=thirdparty%2Fbacula.git Add some debugging information to bacl_solaris. --- diff --git a/bacula/src/filed/bacl.c b/bacula/src/filed/bacl.c index 53ed0218f8..4eb611340c 100644 --- a/bacula/src/filed/bacl.c +++ b/bacula/src/filed/bacl.c @@ -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); diff --git a/bacula/src/filed/bacl_solaris.c b/bacula/src/filed/bacl_solaris.c index a751ce4fe8..d3a725c92e 100644 --- a/bacula/src/filed/bacl_solaris.c +++ b/bacula/src/filed/bacl_solaris.c @@ -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;