[PATCH] SAFE_FREE segfault in smbd/posix_acls.c

Alexander Bokovoy a.bokovoy at sam-solutions.net
Fri Jan 25 06:25:09 GMT 2002


Attached patch fixes segfault in smbd/posix_acls.c:create_canon_ace_lists()
when DEBUG message with log level 0 used a structure after SAFE_FREE().


Index: posix_acls.c
===================================================================
RCS file: /cvsroot/samba/source/smbd/posix_acls.c,v
retrieving revision 1.56
diff -u -r1.56 posix_acls.c
--- posix_acls.c	11 Jan 2002 11:26:31 -0000	1.56
+++ posix_acls.c	25 Jan 2002 14:21:31 -0000
@@ -758,9 +758,9 @@
 
 			free_canon_ace_list(file_ace);
 			free_canon_ace_list(dir_ace);
-			SAFE_FREE(current_ace);
 			DEBUG(0,("create_canon_ace_lists: unable to map SID %s to uid or gid.\n",
 				sid_to_string(str, &current_ace->trustee) ));
+			SAFE_FREE(current_ace);
 			return False;
 		}
 
-- 
/ Alexander Bokovoy
$ cat /proc/identity >~/.signature
  `Senior software developer and analyst for SaM-Solutions Ltd.`
---
Nov 21 20:58:58 alconost kernel: VFS: Busy inodes after unmount. 
		    Self-destruct in 5 seconds.  Have a nice day...




More information about the samba-technical mailing list