svn commit: samba r23640 - in branches: SAMBA_3_0/source/smbd	SAMBA_3_0_26/source/smbd Author: jra
Date: 2007-06-27 22:45:08 +0000 (Wed, 27 Jun 2007)
New Revision: 23640

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

Log:
When we support the SeSecurity privilage, this is where
we'll check it.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/smbd/nttrans.c
   branches/SAMBA_3_0_26/source/smbd/nttrans.c


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/nttrans.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/nttrans.c	2007-06-27 22:10:25 UTC (rev 23639)
+++ branches/SAMBA_3_0/source/smbd/nttrans.c	2007-06-27 22:45:08 UTC (rev 23640)
@@ -702,6 +702,17 @@
 		}
 	}
 
+#if 0
+	/* We need to support SeSecurityPrivilege for this. */
+	if ((access_mask & SEC_RIGHT_SYSTEM_SECURITY)) && 
+			!user_has_privileges(current_user.nt_user_token,
+				&se_security)) {
+		restore_case_semantics(conn, file_attributes);
+		END_PROFILE(SMBntcreateX);
+		return ERROR_NT(NT_STATUS_PRIVILEGE_NOT_HELD);
+	}
+#endif
+
 	/*
 	 * If it's a request for a directory open, deal with it separately.
 	 */
@@ -1378,6 +1389,16 @@
 		}
 	}
 
+#if 0
+	/* We need to support SeSecurityPrivilege for this. */
+	if ((access_mask & SEC_RIGHT_SYSTEM_SECURITY)) && 
+			!user_has_privileges(current_user.nt_user_token,
+				&se_security)) {
+		restore_case_semantics(conn, file_attributes);
+		return ERROR_NT(NT_STATUS_PRIVILEGE_NOT_HELD);
+	}
+#endif
+
 	if (ea_len) {
 		pdata = data + sd_len;
 

Modified: branches/SAMBA_3_0_26/source/smbd/nttrans.c
===================================================================
--- branches/SAMBA_3_0_26/source/smbd/nttrans.c	2007-06-27 22:10:25 UTC (rev 23639)
+++ branches/SAMBA_3_0_26/source/smbd/nttrans.c	2007-06-27 22:45:08 UTC (rev 23640)
@@ -696,6 +696,17 @@
 		}
 	}
 
+#if 0
+	/* We need to support SeSecurityPrivilege for this. */
+	if ((access_mask & SEC_RIGHT_SYSTEM_SECURITY)) && 
+			!user_has_privileges(current_user.nt_user_token,
+				&se_security)) {
+		restore_case_semantics(conn, file_attributes);
+		END_PROFILE(SMBntcreateX);
+		return ERROR_NT(NT_STATUS_PRIVILEGE_NOT_HELD);
+	}
+#endif
+
 	/*
 	 * If it's a request for a directory open, deal with it separately.
 	 */
@@ -1372,6 +1383,16 @@
 		}
 	}
 
+#if 0
+	/* We need to support SeSecurityPrivilege for this. */
+	if ((access_mask & SEC_RIGHT_SYSTEM_SECURITY)) && 
+			!user_has_privileges(current_user.nt_user_token,
+				&se_security)) {
+		restore_case_semantics(conn, file_attributes);
+		return ERROR_NT(NT_STATUS_PRIVILEGE_NOT_HELD);
+	}
+#endif
+
 	if (ea_len) {
 		pdata = data + sd_len;
 

