git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
005427f
)
r6316: Remove over-cautious asserts. Damn wish I'd made the release
author
Jeremy Allison
<jra@samba.org>
Tue, 12 Apr 2005 17:30:14 +0000
(17:30 +0000)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Wed, 10 Oct 2007 15:56:36 +0000
(10:56 -0500)
with this....
Jeremy.
source/smbd/posix_acls.c
patch
|
blob
|
history
diff --git
a/source/smbd/posix_acls.c
b/source/smbd/posix_acls.c
index e0d98f4b8979825f28740e87ccc2e91672b89eda..738f9d76f335cd7a4d5dbefd640406bc06f049e7 100644
(file)
--- a/
source/smbd/posix_acls.c
+++ b/
source/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:
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;
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) {
}
if (i == current_user.ngroups) {
- SMB_ASSERT(ret != 1);
DEBUG(10,("check_posix_acl_group_write: file %s \
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);
}
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;
}
return ret;
}