diff options
author | Günther Deschner <gd@samba.org> | 2010-06-29 16:13:15 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2010-07-02 10:50:21 +0200 |
commit | b381fba0892021f164223bae8b0951014a28735e (patch) | |
tree | 5dc8f39ea4997a0863e9506dbe9387ca7ceb6971 /source3/rpc_server/srv_eventlog_nt.c | |
parent | 84c5dd1e4bb1b4c45d7b5ac68ab432cfc399835c (diff) | |
download | samba-b381fba0892021f164223bae8b0951014a28735e.tar.gz samba-b381fba0892021f164223bae8b0951014a28735e.tar.bz2 samba-b381fba0892021f164223bae8b0951014a28735e.zip |
s3-registry: avoid using registry_value union.
Just pull and push data as is.
Guenther
Diffstat (limited to 'source3/rpc_server/srv_eventlog_nt.c')
-rw-r--r-- | source3/rpc_server/srv_eventlog_nt.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/source3/rpc_server/srv_eventlog_nt.c b/source3/rpc_server/srv_eventlog_nt.c index 241cbab4f6..19d0514717 100644 --- a/source3/rpc_server/srv_eventlog_nt.c +++ b/source3/rpc_server/srv_eventlog_nt.c @@ -304,8 +304,8 @@ static int elog_size( EVENTLOG_INFO *info ) static bool sync_eventlog_params( EVENTLOG_INFO *info ) { char *path = NULL; - uint32 uiMaxSize; - uint32 uiRetention; + uint32_t uiMaxSize = 0; + uint32_t uiRetention = 0; struct registry_key *key; struct registry_value *value; WERROR wresult; @@ -350,7 +350,10 @@ static bool sync_eventlog_params( EVENTLOG_INFO *info ) win_errstr(wresult))); goto done; } - uiRetention = value->v.dword; + + if (value->data.length >= 4) { + uiRetention = IVAL(value->data.data, 0); + } wresult = reg_queryvalue(key, key, "MaxSize", &value); if (!W_ERROR_IS_OK(wresult)) { @@ -358,7 +361,9 @@ static bool sync_eventlog_params( EVENTLOG_INFO *info ) win_errstr(wresult))); goto done; } - uiMaxSize = value->v.dword; + if (value->data.length >= 4) { + uiMaxSize = IVAL(value->data.data, 0); + } tdb_store_int32( ELOG_TDB_CTX(info->etdb), EVT_MAXSIZE, uiMaxSize ); tdb_store_int32( ELOG_TDB_CTX(info->etdb), EVT_RETENTION, uiRetention ); |