From 41b4bc29a0434cef4a31c5e52d52dd325a950dfa Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sat, 6 Sep 2014 04:07:11 +0200 Subject: [PATCH] server-Inherited_ACLs: One more small fix to ensure we don't dereference a NULL pointer. --- ...er-Inherit-security-attributes-from-parent-direc.patch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/patches/server-Inherited_ACLs/0002-server-Inherit-security-attributes-from-parent-direc.patch b/patches/server-Inherited_ACLs/0002-server-Inherit-security-attributes-from-parent-direc.patch index fc759c27..b13cc00a 100644 --- a/patches/server-Inherited_ACLs/0002-server-Inherit-security-attributes-from-parent-direc.patch +++ b/patches/server-Inherited_ACLs/0002-server-Inherit-security-attributes-from-parent-direc.patch @@ -1,4 +1,4 @@ -From 426cab848d0577238d08463e2e1b4e5f4a06ef45 Mon Sep 17 00:00:00 2001 +From cf51d788cce57b6c5f99bfc15e81790fb5d449c4 Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Fri, 18 Apr 2014 14:10:49 -0600 Subject: server: Inherit security attributes from parent directories on @@ -146,7 +146,7 @@ index e3b722c..e6ec90a 100644 if (orig->inode) diff --git a/server/file.c b/server/file.c -index 431b8a1..9299132 100644 +index 431b8a1..a5d2de3 100644 --- a/server/file.c +++ b/server/file.c @@ -329,6 +329,106 @@ struct security_descriptor *inherit_sd( const struct security_descriptor *parent @@ -201,8 +201,8 @@ index 431b8a1..9299132 100644 + /* Fill in the security descriptor so that it is compatible with our DACL */ + user = (const SID *)(old_sd + 1); + group = (const SID *)((char *)(old_sd + 1) + old_sd->owner_len); -+ sd = mem_alloc( sizeof(struct security_descriptor) + sd->owner_len -+ + sd->group_len + dacl_size ); ++ sd = mem_alloc( sizeof(struct security_descriptor) + old_sd->owner_len ++ + old_sd->group_len + dacl_size ); + if (!sd) return sd; + sd->control = SE_DACL_PRESENT; + sd->owner_len = old_sd->owner_len;