summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-02-04 21:34:35 +0100
committerGünther Deschner <gd@samba.org>2009-02-04 22:51:07 +0100
commit96fd6b5a01cbc9f91ea818943e28036fba7cd248 (patch)
treec68f592b3aa037007a0a797d65b8863b9ee663bf /source3/rpc_server
parent58ded409abe336b9bcf048912c884f0deec281dc (diff)
downloadsamba-96fd6b5a01cbc9f91ea818943e28036fba7cd248.tar.gz
samba-96fd6b5a01cbc9f91ea818943e28036fba7cd248.tar.bz2
samba-96fd6b5a01cbc9f91ea818943e28036fba7cd248.zip
s3-eventlog: remove read_package_entry.
Guenther
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_eventlog_nt.c92
1 files changed, 0 insertions, 92 deletions
diff --git a/source3/rpc_server/srv_eventlog_nt.c b/source3/rpc_server/srv_eventlog_nt.c
index b378556f43..4a2ea2f2c0 100644
--- a/source3/rpc_server/srv_eventlog_nt.c
+++ b/source3/rpc_server/srv_eventlog_nt.c
@@ -353,98 +353,6 @@ done:
/********************************************************************
********************************************************************/
-static Eventlog_entry *read_package_entry( TALLOC_CTX *mem_ctx,
- Eventlog_entry * entry )
-{
- uint8 *offset;
- Eventlog_entry *ee_new = NULL;
-
- ee_new = TALLOC_ZERO_ARRAY(mem_ctx, Eventlog_entry, 1 );
- if ( ee_new == NULL ) {
- return NULL;
- }
-
- entry->data_record.sid_padding =
- ( ( 4 -
- ( ( entry->data_record.source_name_len +
- entry->data_record.computer_name_len ) % 4 ) ) % 4 );
- entry->data_record.data_padding =
- ( 4 -
- ( ( entry->data_record.strings_len +
- entry->data_record.user_data_len ) % 4 ) ) % 4;
- entry->record.length = sizeof( Eventlog_record );
- entry->record.length += entry->data_record.source_name_len;
- entry->record.length += entry->data_record.computer_name_len;
- if ( entry->record.user_sid_length == 0 ) {
- /* Should not pad to a DWORD boundary for writing out the sid if there is
- no SID, so just propagate the padding to pad the data */
- entry->data_record.data_padding +=
- entry->data_record.sid_padding;
- entry->data_record.sid_padding = 0;
- }
- DEBUG( 10,
- ( "sid_padding is [%d].\n", entry->data_record.sid_padding ) );
- DEBUG( 10,
- ( "data_padding is [%d].\n",
- entry->data_record.data_padding ) );
-
- entry->record.length += entry->data_record.sid_padding;
- entry->record.length += entry->record.user_sid_length;
- entry->record.length += entry->data_record.strings_len;
- entry->record.length += entry->data_record.user_data_len;
- entry->record.length += entry->data_record.data_padding;
- /* need another copy of length at the end of the data */
- entry->record.length += sizeof( entry->record.length );
- DEBUG( 10,
- ( "entry->record.length is [%d].\n", entry->record.length ) );
- entry->data =
- TALLOC_ZERO_ARRAY(mem_ctx, uint8_t,
- entry->record.length -
- sizeof( Eventlog_record ) -
- sizeof( entry->record.length ));
- if ( entry->data == NULL ) {
- return NULL;
- }
- offset = entry->data;
- memcpy( offset, entry->data_record.source_name,
- entry->data_record.source_name_len );
- offset += entry->data_record.source_name_len;
- memcpy( offset, entry->data_record.computer_name,
- entry->data_record.computer_name_len );
- offset += entry->data_record.computer_name_len;
- /* SID needs to be DWORD-aligned */
- offset += entry->data_record.sid_padding;
- entry->record.user_sid_offset =
- sizeof( Eventlog_record ) + ( offset - entry->data );
- memcpy( offset, entry->data_record.sid,
- entry->record.user_sid_length );
- offset += entry->record.user_sid_length;
- /* Now do the strings */
- entry->record.string_offset =
- sizeof( Eventlog_record ) + ( offset - entry->data );
- memcpy( offset, entry->data_record.strings,
- entry->data_record.strings_len );
- offset += entry->data_record.strings_len;
- /* Now do the data */
- entry->record.data_length = entry->data_record.user_data_len;
- entry->record.data_offset =
- sizeof( Eventlog_record ) + ( offset - entry->data );
- memcpy( offset, entry->data_record.user_data,
- entry->data_record.user_data_len );
- offset += entry->data_record.user_data_len;
-
- memcpy( &( ee_new->record ), &entry->record,
- sizeof( Eventlog_record ) );
- memcpy( &( ee_new->data_record ), &entry->data_record,
- sizeof( Eventlog_data_record ) );
- ee_new->data = entry->data;
-
- return ee_new;
-}
-
-/********************************************************************
- ********************************************************************/
-
static bool add_record_to_resp( EVENTLOG_R_READ_EVENTLOG * r_u,
Eventlog_entry * ee_new )
{