svn commit: samba r7693 - in branches/SAMBA_3_0/source/smbd: .

jra at samba.org jra at samba.org
Fri Jun 17 15:54:11 GMT 2005


Author: jra
Date: 2005-06-17 15:54:10 +0000 (Fri, 17 Jun 2005)
New Revision: 7693

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7693

Log:
Fix from James Peach @ SGI for null pointer ACL free.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/smbd/posix_acls.c


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/posix_acls.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/posix_acls.c	2005-06-17 15:53:01 UTC (rev 7692)
+++ branches/SAMBA_3_0/source/smbd/posix_acls.c	2005-06-17 15:54:10 UTC (rev 7693)
@@ -2949,7 +2949,9 @@
 		return 0;
 
 	/* Case (2). */
-	if ((uid == current_user.uid) && (user_has_privileges(current_user.nt_user_token,&se_take_ownership))) {
+	if (lp_enable_privileges() &&
+			(uid == current_user.uid) &&
+			(user_has_privileges(current_user.nt_user_token,&se_take_ownership))) {
 		become_root();
 		/* Keep the current file gid the same - take ownership doesn't imply group change. */
 		ret = SMB_VFS_CHOWN(conn, fname, uid, (gid_t)-1);
@@ -3970,7 +3972,9 @@
 
   done:
 
-	SMB_VFS_SYS_ACL_FREE_ACL(conn, posix_acl);
+	if (posix_acl) {
+		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;



More information about the samba-cvs mailing list