Poor debug 10 message in modules/vfs-acl-common.c

Richard Sharpe realrichardsharpe at gmail.com
Mon Jul 16 15:28:38 MDT 2012

Hi folks,

In tracking down an issue, I came across this sub-optimal code in

        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.

Richard Sharpe

More information about the samba-technical mailing list