summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-04-12 17:30:14 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:56:36 -0500
commit1a2c1f7d1edcf3b0b31d8e056f3b59cd006d3c11 (patch)
tree00d1d432a8a0cec1c984980a9fe52c3cb1888981
parent40062fbcde9ca594495bc5b1adbba45790498500 (diff)
downloadsamba-1a2c1f7d1edcf3b0b31d8e056f3b59cd006d3c11.tar.gz
samba-1a2c1f7d1edcf3b0b31d8e056f3b59cd006d3c11.tar.bz2
samba-1a2c1f7d1edcf3b0b31d8e056f3b59cd006d3c11.zip
r6316: Remove over-cautious asserts. Damn wish I'd made the release
with this.... Jeremy. (This used to be commit 11c464268df2a0a5155e93d4a7d053d2920fcff0)
-rw-r--r--source3/smbd/posix_acls.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c
index e0d98f4b89..738f9d76f3 100644
--- a/source3/smbd/posix_acls.c
+++ b/source3/smbd/posix_acls.c
@@ -3874,11 +3874,15 @@ match on group %u -> can write.\n", fname, (unsigned int)*pgid ));
}
}
- /* If we get here we know ret == 0. */
- SMB_ASSERT(ret == 0);
+ /* If ret is -1 here we didn't match on the user entry or
+ supplemental group entries. */
+
+ DEBUG(10,("check_posix_acl_group_write: ret = %d before check_stat:\n", ret));
check_stat:
+ /* Do we match on the owning group entry ? */
+
for (i = 0; i < current_user.ngroups; i++) {
if (current_user.groups[i] == psbuf->st_gid) {
ret = (psbuf->st_mode & S_IWGRP) ? 1 : 0;
@@ -3889,14 +3893,15 @@ match on owning group %u -> %s.\n", fname, (unsigned int)psbuf->st_gid, ret ? "c
}
if (i == current_user.ngroups) {
- SMB_ASSERT(ret != 1);
DEBUG(10,("check_posix_acl_group_write: file %s \
-failed to match on user or group in token.\n", fname ));
+failed to match on user or group in token (ret = %d).\n", fname, ret ));
}
done:
SMB_VFS_SYS_ACL_FREE_ACL(conn, posix_acl);
+
+ DEBUG(10,("check_posix_acl_group_write: file %s returning (ret = %d).\n", fname, ret ));
return ret;
}