svn commit: samba r6377 - in trunk/source/smbd: .
jra at samba.org
jra at samba.org
Mon Apr 18 22:53:40 GMT 2005
Author: jra
Date: 2005-04-18 22:53:40 +0000 (Mon, 18 Apr 2005)
New Revision: 6377
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=6377
Log:
Other systems may not return 1 for checking WRITE permission.
Canaonicalise any +ve return to 1.
Jeremy.
Modified:
trunk/source/smbd/posix_acls.c
Changeset:
Modified: trunk/source/smbd/posix_acls.c
===================================================================
--- trunk/source/smbd/posix_acls.c 2005-04-18 18:46:49 UTC (rev 6376)
+++ trunk/source/smbd/posix_acls.c 2005-04-18 22:53:40 UTC (rev 6377)
@@ -3745,6 +3745,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)
@@ -3786,6 +3787,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) {
@@ -3849,6 +3856,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