Poor debug 10 message in modules/vfs-acl-common.c
Jeremy Allison
jra at samba.org
Tue Jul 17 11:05:02 MDT 2012
On Mon, Jul 16, 2012 at 02:28:38PM -0700, Richard Sharpe wrote:
> Hi folks,
>
> In tracking down an issue, I came across this sub-optimal code in
> get_nt_acl_internal:
>
> if (memcmp(&hash[0], &hash_tmp[0], XATTR_SD_HASH_SIZE) == 0) {
> /* Hash matches, return blob sd. */
> DEBUG(10, ("get_nt_acl_internal: blob hash "
> "matches for file %s\n",
> name ));
> goto out;
> }
>
> The code only spits out a debug message if the hashes match and does
> not spit out a debug message if they do not match. However, from the
> point of view of debugging, we really should spit out a message if
> they do not match so that people who don't read the code or don't know
> where to look can figure out what is going wrong.
What I'm pushing to master. Raise a bug and I'll get it in 3.6.next.
Cheers,
Jeremy.
-------------- next part --------------
diff --git a/source3/modules/vfs_acl_common.c b/source3/modules/vfs_acl_common.c
index c7bce57..a3d53a1 100644
--- a/source3/modules/vfs_acl_common.c
+++ b/source3/modules/vfs_acl_common.c
@@ -370,6 +370,11 @@ static NTSTATUS get_nt_acl_internal(vfs_handle_struct *handle,
}
/* Hash doesn't match, return underlying sd. */
+ DEBUG(10, ("get_nt_acl_internal: blob hash "
+ "does not match for file %s - returning "
+ "file system SD mapping.\n",
+ name ));
+
TALLOC_FREE(psd);
psd = pdesc_next;
More information about the samba-technical
mailing list