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

jra at samba.org jra at samba.org
Mon Apr 18 22:53:54 GMT 2005


Author: jra
Date: 2005-04-18 22:53:51 +0000 (Mon, 18 Apr 2005)
New Revision: 6378

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

Log:
Other systems may not return 1 for checking WRITE permission.
Canaonicalise any +ve return to 1.
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-04-18 22:53:40 UTC (rev 6377)
+++ branches/SAMBA_3_0/source/smbd/posix_acls.c	2005-04-18 22:53:51 UTC (rev 6378)
@@ -3742,6 +3742,7 @@
 
 /****************************************************************************
  Check for POSIX group ACLs. If none use stat entry.
+ Return -1 if no match, 0 if match and denied, 1 if match and allowed.
 ****************************************************************************/
 
 static int check_posix_acl_group_write(connection_struct *conn, const char *fname, SMB_STRUCT_STAT *psbuf)
@@ -3782,6 +3783,12 @@
 			goto check_stat;
 		}
 
+		/*
+		 * Solaris returns 2 for this if write is available.
+		 * canonicalize to 0 or 1.
+		 */	
+		have_write = (have_write ? 1 : 0);
+
 		switch(tagtype) {
 			case SMB_ACL_MASK:
 				if (!have_write) {
@@ -3845,6 +3852,12 @@
 			goto check_stat;
 		}
 
+		/*
+		 * Solaris returns 2 for this if write is available.
+		 * canonicalize to 0 or 1.
+		 */	
+		have_write = (have_write ? 1 : 0);
+
 		switch(tagtype) {
 			case SMB_ACL_GROUP:
 			{



More information about the samba-cvs mailing list