From: Jeremy Allison Date: Fri, 25 Mar 2005 01:36:39 +0000 (+0000) Subject: r6057: Don't put the assert in the wrong place :-). X-Git-Tag: samba-misc-tags/initial-v3-0-unstable~5033 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6609b209f513f0859040686a88ee6c7106c06008;p=thirdparty%2Fsamba.git r6057: Don't put the assert in the wrong place :-). Jeremy. --- diff --git a/source/smbd/posix_acls.c b/source/smbd/posix_acls.c index 33db14aec3a..0b95a03dcb2 100644 --- a/source/smbd/posix_acls.c +++ b/source/smbd/posix_acls.c @@ -3888,12 +3888,11 @@ match on group %u -> can write.\n", fname, (unsigned int)*pgid )); } } - - check_stat: - /* If we get here we know ret == 0. */ SMB_ASSERT(ret == 0); + check_stat: + for (i = 0; i < current_user.ngroups; i++) { if (current_user.groups[i] == psbuf->st_gid) { ret = (psbuf->st_mode & S_IWGRP) ? 1 : 0; @@ -3904,7 +3903,7 @@ match on owning group %u -> %s.\n", fname, (unsigned int)psbuf->st_gid, ret ? "c } if (i == current_user.ngroups) { - SMB_ASSERT(ret == 0); + SMB_ASSERT(ret != 1); DEBUG(10,("check_posix_acl_group_write: file %s \ failed to match on user or group in token.\n", fname )); }