summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorMatthew McGillis <matthew@mcgillis.org>2010-06-04 17:48:40 -0700
committerVolker Lendecke <vl@samba.org>2010-06-07 10:19:18 +0200
commitf7696717800e82193e2b1ab1b3467e117306a769 (patch)
tree38eb6b81c424150abacd85b075759d66792f5bc4 /source3/utils
parent98b98a29f6502422fb6e4bd8c16b5731e2c9c553 (diff)
downloadsamba-f7696717800e82193e2b1ab1b3467e117306a769.tar.gz
samba-f7696717800e82193e2b1ab1b3467e117306a769.tar.bz2
samba-f7696717800e82193e2b1ab1b3467e117306a769.zip
Fix bug with incorrect flag values for inherited ace in some cases.
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/smbcacls.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c
index 0c7a72263a..46361add76 100644
--- a/source3/utils/smbcacls.c
+++ b/source3/utils/smbcacls.c
@@ -1026,6 +1026,9 @@ static int inherit(struct cli_state *cli, const char *filename,
parent = get_secdesc(cli,parentname);
for (i=0;i<parent->dacl->num_aces;i++) {
struct security_ace *ace=&parent->dacl->aces[i];
+ /* Add inherited flag to all aces */
+ ace->flags=ace->flags|
+ SEC_ACE_FLAG_INHERITED_ACE;
if ((oldattr & aDIR) == aDIR) {
if ((ace->flags & SEC_ACE_FLAG_CONTAINER_INHERIT) ==
SEC_ACE_FLAG_CONTAINER_INHERIT) {
@@ -1034,6 +1037,8 @@ static int inherit(struct cli_state *cli, const char *filename,
} else {
if ((ace->flags & SEC_ACE_FLAG_OBJECT_INHERIT) ==
SEC_ACE_FLAG_OBJECT_INHERIT) {
+ /* clear flags for files */
+ ace->flags=0;
add_ace(&old->dacl, ace);
}
}