r22611: Fix from Jens Nissen <jens.nissen@gmx.net>. Fix bad
authorJeremy Allison <jra@samba.org>
Mon, 30 Apr 2007 16:32:17 +0000 (16:32 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:19:50 +0000 (12:19 -0500)
memory leak I introduced into acl code, also remove
redundent extra check for global_sid_System :

global_sid_System == S-1-5-18 which is already
included in the check for a domain of
global_sid_NT_Authority == S-1-5

Jeremy.
(This used to be commit 10649540ac11e679997f414d4a6b12d057bd7913)

source3/lib/util_sid.c
source3/smbd/posix_acls.c

index c89abc916f2df73799099614c3e7d9b21bed3f8f..032be9aa93b9d01791c9aa1612520e50dcbca0a9 100644 (file)
@@ -510,9 +510,6 @@ BOOL non_mappable_sid(DOM_SID *sid)
        DOM_SID dom;
        uint32 rid;
 
-       if (sid_equal(sid, &global_sid_System))
-               return True;
-
        sid_copy(&dom, sid);
        sid_split_rid(&dom, &rid);
 
index cdb60a23e725421350da764eda334217aa048c40..7eda998547e650afad450ab250828a256fe81ac1 100644 (file)
@@ -1413,6 +1413,7 @@ static BOOL create_canon_ace_lists(files_struct *fsp, SMB_STRUCT_STAT *pst,
                        if (non_mappable_sid(&psa->trustee)) {
                                DEBUG(10,("create_canon_ace_lists: ignoring non-mappable SID %s\n",
                                        sid_to_string(str, &psa->trustee) ));
+                               SAFE_FREE(current_ace);
                                continue;
                        }