[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-476-g8450e66

Günther Deschner gd at samba.org
Wed Feb 4 22:02:17 GMT 2009


The branch, master has been updated
       via  8450e6677bfc2b42d7fe54fbf24c9f8ff07b40e1 (commit)
       via  a63d4c5ed1d6fc6dd253d5bf99edbef7d9d0341b (commit)
       via  d7e2384dba448753580c698cb3b460ba8849ccb9 (commit)
       via  8b126e942d5251cc7be08634dd73a598f8a834eb (commit)
       via  abb4faf813dcc70435d4b47c94c50e0da004fa4f (commit)
       via  96fd6b5a01cbc9f91ea818943e28036fba7cd248 (commit)
       via  58ded409abe336b9bcf048912c884f0deec281dc (commit)
       via  7ade5cf776a4aa04ae578cfeb46a54bfde53700f (commit)
      from  858116d54e61f2d86757aecce3afba147434c7fc (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 8450e6677bfc2b42d7fe54fbf24c9f8ff07b40e1
Author: Günther Deschner <gd at samba.org>
Date:   Wed Feb 4 21:50:51 2009 +0100

    s3-eventlog: w00t! remove last traces of old eventlog rpc marshalling.
    
    spoolss, I'm coming!
    
    Guenther

commit a63d4c5ed1d6fc6dd253d5bf99edbef7d9d0341b
Author: Günther Deschner <gd at samba.org>
Date:   Wed Feb 4 21:49:06 2009 +0100

    s3-eventlog: remove old eventlog server.
    
    Guenther

commit d7e2384dba448753580c698cb3b460ba8849ccb9
Author: Günther Deschner <gd at samba.org>
Date:   Wed Feb 4 21:42:32 2009 +0100

    s3-eventlog: remove fixup_eventlog_entry.
    
    Guenther

commit 8b126e942d5251cc7be08634dd73a598f8a834eb
Author: Günther Deschner <gd at samba.org>
Date:   Tue Feb 3 14:14:39 2009 +0100

    s3-eventlog: remove write_eventlog_tdb.
    
    Guenther

commit abb4faf813dcc70435d4b47c94c50e0da004fa4f
Author: Günther Deschner <gd at samba.org>
Date:   Wed Feb 4 21:35:29 2009 +0100

    s3-eventlog: remove add_record_to_resp.
    
    Guenther

commit 96fd6b5a01cbc9f91ea818943e28036fba7cd248
Author: Günther Deschner <gd at samba.org>
Date:   Wed Feb 4 21:34:35 2009 +0100

    s3-eventlog: remove read_package_entry.
    
    Guenther

commit 58ded409abe336b9bcf048912c884f0deec281dc
Author: Günther Deschner <gd at samba.org>
Date:   Wed Feb 4 21:33:58 2009 +0100

    s3-eventlog: remove get_eventlog_record.
    
    Guenther

commit 7ade5cf776a4aa04ae578cfeb46a54bfde53700f
Author: Günther Deschner <gd at samba.org>
Date:   Wed Feb 4 21:32:20 2009 +0100

    s3-eventlog: remove old hand marshalling for eventlog read call.
    
    Guenther

-----------------------------------------------------------------------

Summary of changes:
 source3/Makefile.in                   |    4 +-
 source3/configure.in                  |    4 +-
 source3/include/includes.h            |    1 -
 source3/include/proto.h               |   21 ---
 source3/include/rpc_eventlog.h        |  100 -------------
 source3/rpc_parse/parse_eventlog.c    |  210 ---------------------------
 source3/rpc_server/srv_eventlog.c     |   99 -------------
 source3/rpc_server/srv_eventlog_lib.c |  142 ------------------
 source3/rpc_server/srv_eventlog_nt.c  |  252 ---------------------------------
 9 files changed, 4 insertions(+), 829 deletions(-)
 delete mode 100644 source3/include/rpc_eventlog.h
 delete mode 100644 source3/rpc_parse/parse_eventlog.c
 delete mode 100644 source3/rpc_server/srv_eventlog.c


Changeset truncated at 500 lines:

diff --git a/source3/Makefile.in b/source3/Makefile.in
index c4a6317..c1b51db 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -566,7 +566,7 @@ RPC_DFS_OBJ =  ../librpc/gen_ndr/srv_dfs.o rpc_server/srv_dfs_nt.o
 
 RPC_SPOOLSS_OBJ = rpc_server/srv_spoolss.o rpc_server/srv_spoolss_nt.o
 
-RPC_EVENTLOG_OBJ = rpc_server/srv_eventlog.o rpc_server/srv_eventlog_nt.o \
+RPC_EVENTLOG_OBJ = rpc_server/srv_eventlog_nt.o \
 		   $(LIB_EVENTLOG_OBJ) ../librpc/gen_ndr/srv_eventlog.o
 
 RPC_PIPE_OBJ = rpc_server/srv_pipe_hnd.o \
@@ -578,7 +578,7 @@ RPC_SERVER_OBJ = @RPC_STATIC@ $(RPC_PIPE_OBJ)
 
 RPC_PARSE_OBJ = $(RPC_PARSE_OBJ2) \
                 rpc_parse/parse_spoolss.o \
-	        rpc_parse/parse_eventlog.o rpc_parse/parse_buffer.o
+	        rpc_parse/parse_buffer.o
 
 RPC_CLIENT_OBJ = rpc_client/cli_pipe.o rpc_client/rpc_transport_np.o \
 	rpc_client/rpc_transport_sock.o rpc_client/rpc_transport_smbd.o
diff --git a/source3/configure.in b/source3/configure.in
index 1a25de8..306566f 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -414,7 +414,7 @@ AC_SUBST(DYNEXP)
 
 dnl Add modules that have to be built by default here
 dnl These have to be built static:
-default_static_modules="pdb_smbpasswd pdb_tdbsam rpc_lsarpc rpc_samr rpc_winreg rpc_initshutdown rpc_dssetup rpc_wkssvc rpc_svcctl rpc_ntsvcs rpc_netlogon rpc_netdfs rpc_srvsvc rpc_spoolss rpc_eventlog2 auth_sam auth_unix auth_winbind auth_server auth_domain auth_builtin auth_netlogond vfs_default nss_info_template"
+default_static_modules="pdb_smbpasswd pdb_tdbsam rpc_lsarpc rpc_samr rpc_winreg rpc_initshutdown rpc_dssetup rpc_wkssvc rpc_svcctl rpc_ntsvcs rpc_netlogon rpc_netdfs rpc_srvsvc rpc_spoolss rpc_eventlog auth_sam auth_unix auth_winbind auth_server auth_domain auth_builtin auth_netlogond vfs_default nss_info_template"
 
 dnl These are preferably build shared, and static if dlopen() is not available
 default_shared_modules="vfs_recycle vfs_audit vfs_extd_audit vfs_full_audit vfs_netatalk vfs_fake_perms vfs_default_quota vfs_readonly vfs_cap vfs_expand_msdfs vfs_shadow_copy vfs_shadow_copy2 charset_CP850 charset_CP437 auth_script vfs_readahead vfs_xattr_tdb vfs_streams_xattr vfs_streams_depot vfs_acl_xattr vfs_acl_tdb vfs_smb_traffic_analyzer"
@@ -6340,7 +6340,7 @@ SMB_MODULE(rpc_netlogon, \$(RPC_NETLOG_OBJ), "bin/librpc_NETLOGON.$SHLIBEXT", RP
 SMB_MODULE(rpc_netdfs, \$(RPC_DFS_OBJ), "bin/librpc_netdfs.$SHLIBEXT", RPC)
 SMB_MODULE(rpc_srvsvc, \$(RPC_SVC_OBJ), "bin/librpc_svcsvc.$SHLIBEXT", RPC)
 SMB_MODULE(rpc_spoolss, \$(RPC_SPOOLSS_OBJ), "bin/librpc_spoolss.$SHLIBEXT", RPC)
-SMB_MODULE(rpc_eventlog2, \$(RPC_EVENTLOG_OBJ), "bin/librpc_eventlog2.$SHLIBEXT", RPC)
+SMB_MODULE(rpc_eventlog, \$(RPC_EVENTLOG_OBJ), "bin/librpc_eventlog.$SHLIBEXT", RPC)
 SMB_MODULE(rpc_samr, \$(RPC_SAMR_OBJ), "bin/librpc_samr.$SHLIBEXT", RPC)
 SMB_MODULE(rpc_rpcecho, \$(RPC_ECHO_OBJ), "bin/librpc_rpcecho.$SHLIBEXT", RPC)
 SMB_SUBSYSTEM(RPC,smbd/server.o)
diff --git a/source3/include/includes.h b/source3/include/includes.h
index ebd8923..a20a17c 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -623,7 +623,6 @@ struct smb_iconv_convenience *lp_iconv_convenience(void *lp_ctx);
 #include "reg_objects.h"
 #include "reg_db.h"
 #include "rpc_spoolss.h"
-#include "rpc_eventlog.h"
 #include "rpc_perfcount.h"
 #include "rpc_perfcount_defs.h"
 #include "librpc/gen_ndr/notify.h"
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 5cef54f..88742c4 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -5675,16 +5675,6 @@ bool smb_io_relarraystr(const char *desc, RPC_BUFFER *buffer, int depth, uint16
 bool smb_io_relsecdesc(const char *desc, RPC_BUFFER *buffer, int depth, SEC_DESC **secdesc);
 uint32 size_of_relative_string(UNISTR *string);
 
-/* The following definitions come from rpc_parse/parse_eventlog.c  */
-
-bool eventlog_io_q_read_eventlog(const char *desc, EVENTLOG_Q_READ_EVENTLOG *q_u,
-				 prs_struct *ps, int depth);
-bool eventlog_io_r_read_eventlog(const char *desc,
-				 EVENTLOG_Q_READ_EVENTLOG *q_u,
-				 EVENTLOG_R_READ_EVENTLOG *r_u,
-				 prs_struct *ps,
-				 int depth);
-
 /* The following definitions come from rpc_parse/parse_misc.c  */
 
 bool smb_io_time(const char *desc, NTTIME *nttime, prs_struct *ps, int depth);
@@ -6246,11 +6236,6 @@ bool spoolss_io_r_xcvdataport(const char *desc, SPOOL_R_XCVDATAPORT *r_u, prs_st
 bool make_monitorui_buf( RPC_BUFFER *buf, const char *dllname );
 bool convert_port_data_1( NT_PORT_DATA_1 *port1, RPC_BUFFER *buf ) ;
 
-/* The following definitions come from rpc_server/srv_eventlog.c  */
-
-NTSTATUS rpc_eventlog2_init(void);
-void eventlog2_get_pipe_fns(struct api_struct **fns, int *n_fns);
-
 /* The following definitions come from rpc_server/srv_eventlog_lib.c  */
 
 TDB_CONTEXT *elog_init_tdb( char *tdbfilename );
@@ -6259,8 +6244,6 @@ int elog_tdb_size( TDB_CONTEXT * tdb, int *MaxSize, int *Retention );
 bool prune_eventlog( TDB_CONTEXT * tdb );
 ELOG_TDB *elog_open_tdb( const char *logname, bool force_clear, bool read_only );
 int elog_close_tdb( ELOG_TDB *etdb, bool force_close );
-int write_eventlog_tdb( TDB_CONTEXT * the_tdb, Eventlog_entry * ee );
-void fixup_eventlog_entry( Eventlog_entry * ee );
 bool parse_logentry( TALLOC_CTX *mem_ctx, char *line, struct eventlog_Record_tdb *entry, bool * eor );
 size_t fixup_eventlog_record_tdb(struct eventlog_Record_tdb *r);
 struct eventlog_Record_tdb *evlog_pull_record_tdb(TALLOC_CTX *mem_ctx,
@@ -6286,10 +6269,6 @@ NTSTATUS evlog_tdb_entry_to_evt_entry(TALLOC_CTX *mem_ctx,
 
 /* The following definitions come from rpc_server/srv_eventlog_nt.c  */
 
-NTSTATUS _eventlog_read_eventlog( pipes_struct * p,
-				EVENTLOG_Q_READ_EVENTLOG * q_u,
-				EVENTLOG_R_READ_EVENTLOG * r_u );
-
 /* The following definitions come from rpc_server/srv_lsa_hnd.c  */
 
 bool init_pipe_handle_list(pipes_struct *p,
diff --git a/source3/include/rpc_eventlog.h b/source3/include/rpc_eventlog.h
deleted file mode 100644
index f17e448..0000000
--- a/source3/include/rpc_eventlog.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/* 
- *  Unix SMB/CIFS implementation.
- *  RPC Pipe client / server routines
- *  Copyright (C) Marcin Krzysztof Porwit    2005.
- *  
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 3 of the License, or
- *  (at your option) any later version.
- *  
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *  
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, see <http://www.gnu.org/licenses/>.
- */
- 
-#ifndef _RPC_EVENTLOG_H		/* _RPC_EVENTLOG_H */
-#define _RPC_EVENTLOG_H
-
-/* opcodes */
-
-#define EVENTLOG_CLEAREVENTLOG		0x00
-#define EVENTLOG_CLOSEEVENTLOG		0x02
-#define EVENTLOG_GETNUMRECORDS		0x04
-#define EVENTLOG_GETOLDESTENTRY		0x05
-#define EVENTLOG_OPENEVENTLOG		0x07
-#define EVENTLOG_READEVENTLOG		0x0a
-
-/* Eventlog read flags */
-/* defined in librpc/gen_ndr/eventlog.h */
-
-/* Event types */
-/* defined in librpc/gen_ndr/eventlog.h */
-
-/***********************************/
-
-typedef struct 
-{
-	POLICY_HND handle;
-	uint32 flags;
-	uint32 offset;
-	uint32 max_read_size;
-} EVENTLOG_Q_READ_EVENTLOG;
-
-typedef struct {
-	uint32 length;
-	uint32 reserved1;
-	uint32 record_number;
-	uint32 time_generated;
-	uint32 time_written;
-	uint32 event_id;
-	uint16 event_type;
-	uint16 num_strings;
-	uint16 event_category;
-	uint16 reserved2;
-	uint32 closing_record_number;
-	uint32 string_offset;
-	uint32 user_sid_length;
-	uint32 user_sid_offset;
-	uint32 data_length;
-	uint32 data_offset;
-} Eventlog_record;
-
-typedef struct {
-	uint32 source_name_len;
-	smb_ucs2_t *source_name;
-	uint32 computer_name_len;
-	smb_ucs2_t *computer_name;
-	uint32 sid_padding;
-	smb_ucs2_t *sid;
-	uint32 strings_len;
-	smb_ucs2_t *strings;
-	uint32 user_data_len;
-	char *user_data;
-	uint32 data_padding;
-} Eventlog_data_record;
-
-typedef struct eventlog_entry {
-	Eventlog_record record;
-	Eventlog_data_record data_record;
-	uint8 *data;
-	uint8 *end_of_data_padding;
-	struct eventlog_entry *next;
-} Eventlog_entry;
- 
-typedef struct {
-	uint32 num_bytes_in_resp;
-	uint32 bytes_in_next_record;
-	uint32 num_records;
-	Eventlog_entry *entry;
-	uint8 *end_of_entries_padding;
-	uint32 sent_size;
-	uint32 real_size;
-	NTSTATUS status;
-} EVENTLOG_R_READ_EVENTLOG;
-
-#endif /* _RPC_EVENTLOG_H */
diff --git a/source3/rpc_parse/parse_eventlog.c b/source3/rpc_parse/parse_eventlog.c
deleted file mode 100644
index 40930a2..0000000
--- a/source3/rpc_parse/parse_eventlog.c
+++ /dev/null
@@ -1,210 +0,0 @@
-/* 
- *  Unix SMB/CIFS implementation.
- *  RPC Pipe client / server routines
- *  Copyright (C) Marcin Krzysztof Porwit    2005.
- *  
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 3 of the License, or
- *  (at your option) any later version.
- *  
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *  
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, see <http://www.gnu.org/licenses/>.
- */
- 
-#include "includes.h"
-
-#undef DBGC_CLASS
-#define DBGC_CLASS DBGC_RPC_PARSE
-
-/********************************************************************
-********************************************************************/
-
-bool eventlog_io_q_read_eventlog(const char *desc, EVENTLOG_Q_READ_EVENTLOG *q_u,
-				 prs_struct *ps, int depth)
-{
-	if(q_u == NULL)
-		return False;
-
-	prs_debug(ps, depth, desc, "eventlog_io_q_read_eventlog");
-	depth++;
-
-	if(!(prs_align(ps)))
-		return False;
-
-	if(!(smb_io_pol_hnd("log handle", &(q_u->handle), ps, depth)))
-		return False;
-
-	if(!(prs_uint32("read flags", ps, depth, &(q_u->flags))))
-		return False;
-
-	if(!(prs_uint32("read offset", ps, depth, &(q_u->offset))))
-		return False;
-
-	if(!(prs_uint32("read buf size", ps, depth, &(q_u->max_read_size))))
-		return False;
-
-	return True;
-}
-
-static bool smb_io_eventlog_entry(const char *name, prs_struct *ps, int depth, Eventlog_entry *entry)
-{
-	if(entry == NULL)
-		return False;
-
-	prs_debug(ps, depth, name, "smb_io_eventlog_entry");
-	depth++;
-
-	if(!prs_align(ps))
-		return False;
-
-	if(!(prs_uint32("length", ps, depth, &(entry->record.length))))
-		return False;
-	if(!(prs_uint32("reserved", ps, depth, &(entry->record.reserved1))))
-		return False;
-	if(!(prs_uint32("record number", ps, depth, &(entry->record.record_number))))
-		return False;
-	if(!(prs_uint32("time generated", ps, depth, &(entry->record.time_generated))))
-		return False;
-	if(!(prs_uint32("time written", ps, depth, &(entry->record.time_written))))
-		return False;
-	if(!(prs_uint32("event id", ps, depth, &(entry->record.event_id))))
-		return False;
-	if(!(prs_uint16("event type", ps, depth, &(entry->record.event_type))))
-		return False;
-	if(!(prs_uint16("num strings", ps, depth, &(entry->record.num_strings))))
-		return False;
-	if(!(prs_uint16("event category", ps, depth, &(entry->record.event_category))))
-		return False;
-	if(!(prs_uint16("reserved2", ps, depth, &(entry->record.reserved2))))
-		return False;
-	if(!(prs_uint32("closing record", ps, depth, &(entry->record.closing_record_number))))
-		return False;
-	if(!(prs_uint32("string offset", ps, depth, &(entry->record.string_offset))))
-		return False;
-	if(!(prs_uint32("user sid length", ps, depth, &(entry->record.user_sid_length))))
-		return False;
-	if(!(prs_uint32("user sid offset", ps, depth, &(entry->record.user_sid_offset))))
-		return False;
-	if(!(prs_uint32("data length", ps, depth, &(entry->record.data_length))))
-		return False;
-	if(!(prs_uint32("data offset", ps, depth, &(entry->record.data_offset))))
-		return False;
-	if(!(prs_align(ps)))
-		return False;
-
-	/* Now encoding data */
-
-	if(!(prs_uint8s(False, "buffer", ps, depth, entry->data,
-		entry->record.length - sizeof(Eventlog_record) - sizeof(entry->record.length))))
-	{
-		return False;
-	}
-
-	if(!(prs_align(ps)))
-		return False;
-
-	if(!(prs_uint32("length 2", ps, depth, &(entry->record.length))))
-			return False;
-
-	return True;
-}
-
-/** Structure of response seems to be:
-   DWORD num_bytes_in_resp -- MUST be the same as q_u->max_read_size
-   for i=0..n
-       EVENTLOGRECORD record
-   DWORD sent_size -- sum of EVENTLOGRECORD lengths if records returned, 0 otherwise
-   DWORD real_size -- 0 if records returned, otherwise length of next record to be returned
-   WERROR status */
-bool eventlog_io_r_read_eventlog(const char *desc,
-				 EVENTLOG_Q_READ_EVENTLOG *q_u,
-				 EVENTLOG_R_READ_EVENTLOG *r_u,
-				 prs_struct *ps,
-				 int depth)
-{
-	Eventlog_entry *entry;
-	uint32 record_written = 0;
-	uint32 record_total = 0;
-
-	if(r_u == NULL)
-		return False;
-
-	prs_debug(ps, depth, desc, "eventlog_io_r_read_eventlog");
-	depth++;
-
-	/* First, see if we've read more logs than we can output */
-
-	if(r_u->num_bytes_in_resp > q_u->max_read_size) {
-		entry = r_u->entry;
-
-		/* remove the size of the last entry from the list */
-
-		while(entry->next != NULL)
-			entry = entry->next;
-
-		r_u->num_bytes_in_resp -= entry->record.length;
-
-		/* do not output the last log entry */
-	
-		r_u->num_records--;
-	}
-    
-	entry = r_u->entry;
-	record_total = r_u->num_records;
-
-	if(r_u->num_bytes_in_resp != 0)
-		r_u->sent_size = r_u->num_bytes_in_resp;
-	else
-		r_u->real_size = r_u->bytes_in_next_record;
-
-	if(!(prs_align(ps)))
-		return False;
-	if(!(prs_uint32("bytes in resp", ps, depth, &(q_u->max_read_size))))
-		return False;
-
-	while(entry != NULL && record_written < record_total)
-	{
-		DEBUG(11, ("eventlog_io_r_read_eventlog: writing record [%d] out of [%d].\n", record_written, record_total));
-
-		/* Encode the actual eventlog record record */
-
-		if (!(smb_io_eventlog_entry("entry", ps, depth, entry)))
-			return false;
-
-		entry = entry->next;
-		record_written++;
-
-	} 	/* end of encoding EVENTLOGRECORD */
-
-	/* Now pad with whitespace until the end of the response buffer */
-
-	if (q_u->max_read_size - r_u->num_bytes_in_resp) {
-		r_u->end_of_entries_padding = PRS_ALLOC_MEM(ps, uint8_t, q_u->max_read_size - r_u->num_bytes_in_resp);
-		if (!r_u->end_of_entries_padding) {
-			return False;
-		}
-
-		if(!(prs_uint8s(False, "end of entries padding", ps, 
-				depth, r_u->end_of_entries_padding,
-				(q_u->max_read_size - r_u->num_bytes_in_resp)))) {
-			return False;
-		}
-	}
-
-	/* We had better be DWORD aligned here */
-
-	if(!(prs_uint32("sent size", ps, depth, &(r_u->sent_size))))
-		return False;
-	if(!(prs_uint32("real size", ps, depth, &(r_u->real_size))))
-		return False;
-	if(!(prs_ntstatus("status code", ps, depth, &r_u->status)))
-		return False;
-
-	return True;
-}
diff --git a/source3/rpc_server/srv_eventlog.c b/source3/rpc_server/srv_eventlog.c
deleted file mode 100644
index dd00a24..0000000
--- a/source3/rpc_server/srv_eventlog.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/* 
- *  Unix SMB/CIFS implementation.
- *  RPC Pipe client / server routines
- *  Copyright (C) Marcin Krzysztof Porwit         2005.
- *  Copyright (C) Gerald Carter                   2005 - 2007
- *  
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 3 of the License, or
- *  (at your option) any later version.
- *  
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *  
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, see <http://www.gnu.org/licenses/>.
- */
- 
-#include "includes.h"
-#include "librpc/gen_ndr/srv_eventlog.h"
-
-#undef DBGC_CLASS
-#define DBGC_CLASS DBGC_RPC_SRV
-
-static bool proxy_eventlog_call(pipes_struct *p, uint8 opnum)
-{
-	struct api_struct *fns;
-	int n_fns;
-
-	eventlog_get_pipe_fns(&fns, &n_fns);
-
-	if (opnum >= n_fns)
-		return False;
-
-	if (fns[opnum].opnum != opnum) {
-		smb_panic("EVENTLOG function table not sorted\n");
-	}
-
-	return fns[opnum].fn(p);
-}
-
-static bool api_eventlog_open_eventlog(pipes_struct *p)
-{
-	return proxy_eventlog_call(p, NDR_EVENTLOG_OPENEVENTLOGW);
-}
-
-static bool api_eventlog_close_eventlog(pipes_struct *p)
-{
-	return proxy_eventlog_call( p, NDR_EVENTLOG_CLOSEEVENTLOG );	
-}
-
-static bool api_eventlog_get_num_records(pipes_struct *p)
-{
-	return proxy_eventlog_call(p, NDR_EVENTLOG_GETNUMRECORDS);
-}
-
-static bool api_eventlog_get_oldest_entry(pipes_struct *p)
-{
-	return proxy_eventlog_call(p, NDR_EVENTLOG_GETOLDESTRECORD);
-}
-


-- 
Samba Shared Repository


More information about the samba-cvs mailing list