svn commit: samba r21953 - in branches: SAMBA_3_0/source/lib
SAMBA_3_0/source/smbd SAMBA_3_0_25/source/lib
SAMBA_3_0_25/source/smbd
jra at samba.org
jra at samba.org
Fri Mar 23 21:50:44 GMT 2007
Author: jra
Date: 2007-03-23 21:50:44 +0000 (Fri, 23 Mar 2007)
New Revision: 21953
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21953
Log:
One format fix, clarify a condition that the IBM
checker was worried about.
Jeremy.
Modified:
branches/SAMBA_3_0/source/lib/sysacls.c
branches/SAMBA_3_0/source/smbd/service.c
branches/SAMBA_3_0_25/source/lib/sysacls.c
branches/SAMBA_3_0_25/source/smbd/service.c
Changeset:
Modified: branches/SAMBA_3_0/source/lib/sysacls.c
===================================================================
--- branches/SAMBA_3_0/source/lib/sysacls.c 2007-03-23 21:11:08 UTC (rev 21952)
+++ branches/SAMBA_3_0/source/lib/sysacls.c 2007-03-23 21:50:44 UTC (rev 21953)
@@ -181,7 +181,7 @@
id = idbuf;
} else {
id = gr->gr_name;
- }
+ }
case SMB_ACL_GROUP_OBJ:
tag = "group";
break;
Modified: branches/SAMBA_3_0/source/smbd/service.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/service.c 2007-03-23 21:11:08 UTC (rev 21952)
+++ branches/SAMBA_3_0/source/smbd/service.c 2007-03-23 21:50:44 UTC (rev 21953)
@@ -915,10 +915,28 @@
*/
{
+ BOOL can_write = False;
NT_USER_TOKEN *token = conn->nt_user_token ?
- conn->nt_user_token : vuser->nt_user_token;
+ conn->nt_user_token :
+ (vuser ? vuser->nt_user_token : NULL);
- BOOL can_write = share_access_check(token,
+ /*
+ * I don't believe this can happen. But the
+ * logic above is convoluted enough to confuse
+ * automated checkers, so be sure. JRA.
+ */
+
+ if (token == NULL) {
+ DEBUG(0,("make_connection: connection to %s "
+ "denied due to missing "
+ "NT token.\n",
+ lp_servicename(snum)));
+ conn_free(conn);
+ *status = NT_STATUS_ACCESS_DENIED;
+ return NULL;
+ }
+
+ can_write = share_access_check(token,
lp_servicename(snum),
FILE_WRITE_DATA);
Modified: branches/SAMBA_3_0_25/source/lib/sysacls.c
===================================================================
--- branches/SAMBA_3_0_25/source/lib/sysacls.c 2007-03-23 21:11:08 UTC (rev 21952)
+++ branches/SAMBA_3_0_25/source/lib/sysacls.c 2007-03-23 21:50:44 UTC (rev 21953)
@@ -181,7 +181,7 @@
id = idbuf;
} else {
id = gr->gr_name;
- }
+ }
case SMB_ACL_GROUP_OBJ:
tag = "group";
break;
Modified: branches/SAMBA_3_0_25/source/smbd/service.c
===================================================================
--- branches/SAMBA_3_0_25/source/smbd/service.c 2007-03-23 21:11:08 UTC (rev 21952)
+++ branches/SAMBA_3_0_25/source/smbd/service.c 2007-03-23 21:50:44 UTC (rev 21953)
@@ -814,10 +814,28 @@
*/
{
+ BOOL can_write = False;
NT_USER_TOKEN *token = conn->nt_user_token ?
- conn->nt_user_token : vuser->nt_user_token;
+ conn->nt_user_token :
+ (vuser ? vuser->nt_user_token : NULL);
- BOOL can_write = share_access_check(token,
+ /*
+ * I don't believe this can happen. But the
+ * logic above is convoluted enough to confuse
+ * automated checkers, so be sure. JRA.
+ */
+
+ if (token == NULL) {
+ DEBUG(0,("make_connection: connection to %s "
+ "denied due to missing "
+ "NT token.\n",
+ lp_servicename(snum)));
+ conn_free(conn);
+ *status = NT_STATUS_ACCESS_DENIED;
+ return NULL;
+ }
+
+ can_write = share_access_check(token,
lp_servicename(snum),
FILE_WRITE_DATA);
More information about the samba-cvs
mailing list