svn commit: samba r10884 - in trunk/source/rpc_server: .

jerry at samba.org jerry at samba.org
Mon Oct 10 22:18:12 GMT 2005


Author: jerry
Date: 2005-10-10 22:18:12 +0000 (Mon, 10 Oct 2005)
New Revision: 10884

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

Log:
adding placeholder for access check in eventlog open
Modified:
   trunk/source/rpc_server/srv_eventlog_nt.c


Changeset:
Modified: trunk/source/rpc_server/srv_eventlog_nt.c
===================================================================
--- trunk/source/rpc_server/srv_eventlog_nt.c	2005-10-10 22:17:41 UTC (rev 10883)
+++ trunk/source/rpc_server/srv_eventlog_nt.c	2005-10-10 22:18:12 UTC (rev 10884)
@@ -31,6 +31,7 @@
 	uint32 num_records;
 	uint32 oldest_entry;
 	uint32 flags;
+	uint32 access_granted;
 } EVENTLOG_INFO;
 
 /********************************************************************
@@ -64,6 +65,14 @@
 }
 
 /********************************************************************
+********************************************************************/
+
+static BOOL elog_check_access( EVENTLOG_INFO *info )
+{
+	return True;
+}
+
+/********************************************************************
  ********************************************************************/
 
 static BOOL elog_validate_logname( const char *name )
@@ -95,11 +104,16 @@
 		return WERR_NOMEM;
 		
 	elog->logname = talloc_strdup( elog, logname );
+	
+	/* do the access check */
+	if ( !elog_check_access( elog ) ) {
+		TALLOC_FREE( elog );
+		return WERR_ACCESS_DENIED;
+	}
 
 	/* having done the nexessary access checks, surround the
 	   tdb open with a {un}become_root() pair since we can
 	   only have one tdb context per eventlog per process */
-
 	
 	become_root();
 	elog->tdb = elog_open_tdb( elog->logname );
@@ -115,6 +129,12 @@
 			
 			elog->logname = talloc_strdup( elog, ELOG_APPL );			
 
+			/* do the access check */
+			if ( !elog_check_access( elog ) ) {
+				TALLOC_FREE( elog );
+				return WERR_ACCESS_DENIED;
+			}
+	
 			become_root();
 			elog->tdb = elog_open_tdb( elog->logname );
 			unbecome_root();
@@ -124,7 +144,7 @@
 			TALLOC_FREE( elog );
 			return WERR_OBJECT_PATH_INVALID;	/* ??? */		
 		}
-	}	
+	}
 	
 	/* create the policy handle */
 	



More information about the samba-cvs mailing list