summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srv_eventlog_lib.c
AgeCommit message (Collapse)AuthorFilesLines
2009-04-08s3-eventlog: move rpc_server/srv_eventlog_lib.c out of rpc_server.Günther Deschner1-960/+0
Guenther
2009-03-01s3: Fix incompatible type warningsTim Prouty1-1/+1
2009-02-17Fix an invalid typecastingVolker Lendecke1-1/+7
entry->num_of_strings is a uint16_t. Casting it with (int *)&entry->num_of_strings is wrong, because it gives add_string_to_array the illusion that the object "num" points to is an int, which it is not. In case we are running on a machine where "int" is 32 or 64 bits long, what happens with that cast? "add_string_to_array" interprets the byte field that starts where "num_of_strings" starts as an int. Under very particular circumstances this might work in a limited number of cases: When the byte order of an int is such that the lower order bits of the int are stored first, the subsequent bytes which do not belong to the uint16_t anymore happen to be 0 and the result of the increment still fits into the first 2 bytes of that int, i.e. the result is < 65536. The correct solution to this problem is to use the implicit type conversion that happens when an assignment is done. BTW, this bug is found if you compile with -O3 -Wall, it shows up as a warning: rpc_server/srv_eventlog_lib.c:574: warning: dereferencing type-punned pointer will break strict-aliasing rules Thanks, Volker
2009-02-05s3-eventlog: fix Coverity #877.Günther Deschner1-2/+4
Guenther
2009-02-04s3-eventlog: remove fixup_eventlog_entry.Günther Deschner1-38/+0
Guenther
2009-02-04s3-eventlog: remove write_eventlog_tdb.Günther Deschner1-104/+0
Guenther
2009-02-04s3-eventlog: make can_write_to_eventlog static.Günther Deschner1-1/+1
Guenther
2009-02-04s3-eventlog: add my copyright.Günther Deschner1-0/+1
Guenther
2009-02-04s3-eventlog: add evlog_push_record function.Günther Deschner1-0/+28
Guenther
2009-02-04s3-eventlog: add evlog_pull_record function.Günther Deschner1-0/+33
Guenther
2009-02-04s3-eventlog: add evlog_tdb_entry_to_evt_entry.Günther Deschner1-0/+63
Guenther
2009-02-04s3-eventlog: add evlog_evt_entry_to_tdb_entry.Günther Deschner1-0/+63
Guenther
2009-02-04s3-eventlogadm: use struct eventlog_Record_tdb for storing entries in tdbs.Günther Deschner1-53/+40
Guenther
2009-02-04s3-eventlog: add fixup_eventlog_record_tdb.Günther Deschner1-0/+40
Guenther
2009-02-04s3-eventlog: add evlog_push_record_tdb function.Günther Deschner1-0/+74
This is almost a copy of write_eventlog_tdb() and still needs to be modified to use tdb transactions. Guenther
2009-02-03s3-eventlog: add evlog_pull_record_tdb function.Günther Deschner1-0/+55
Guenther
2009-02-03s3-eventlog: pass down talloc context to parse_logentry().Günther Deschner1-8/+7
Guenther
2009-02-03s3-eventlog: make logname in elog_open_tdb const.Günther Deschner1-1/+1
Guenther
2009-02-03s3-eventlog: allow to open eventlog tdbs readonly.Günther Deschner1-2/+9
Guenther
2009-01-24Fix a segfault in parse_logentryVolker Lendecke1-1/+1
entry->data_record.strings is type smb_ucs2, so the pointer arithmetic increments by two :-)
2009-01-16s3-eventlog: remove whitespace.Günther Deschner1-45/+45
Guenther
2008-11-19This code mixes up int and uint32 when pulling out of a TDB. This is very ↵Jeremy Allison1-20/+22
bad. Fixing... May fix bug #5891, not sure. Jeremy.
2008-10-18Use separate make variables for libutil and libcrypto.Jelmer Vernooij1-1/+1
2008-03-23Fix Coverity ID 432Volker Lendecke1-2/+0
(This used to be commit 7070c77ee2a9c3c9ff1b3c7b93008b13b80ac02b)
2008-01-29Make make_way_for_eventlogs() staticGerald W. Carter1-2/+2
(This used to be commit cb6531965b2baab320123d4301ab851c6e22aa58)
2008-01-29Fix a memleakVolker Lendecke1-4/+0
(This used to be commit 252c3130697d1b7fd34a5225d83cef4f32e663b2)
2007-11-27fix a obscure compiler warningGuenther Deschner1-3/+3
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Jeremy, I have never seen this warning before: "warning: comparison is always false due to limited range of data type". Guenther - -- Günther Deschner GPG-ID: 8EE11688 Red Hat gdeschner@redhat.com Samba Team gd@samba.org -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFHTIOOSOk3aI7hFogRArxMAJwP0ktE96tHcwn9nXG6AOqonpeDgQCgm/zi 54B6HJZvx6zdUTMFFNWqUb0= =kUJa -----END PGP SIGNATURE----- >From 6a4935ee455adc1251fce2759f97d35f303bd40e Mon Sep 17 00:00:00 2001 From: =?utf-8?q?G=C3=BCnther=20Deschner?= <gd@samba.org> Date: Tue, 27 Nov 2007 21:48:39 +0100 Subject: [PATCH] Getting rid of "comparison is always false due to limited range of data type" warning. Guenther (This used to be commit 951202913956e113841585f7372e8db8f9aeb76a)
2007-11-27Remove pstring from everything in rpc_server exceptJeremy Allison1-76/+75
srv_spoolss_nt.c and srv_srvsvc_nt.c. They're next :-). Jeremy. (This used to be commit 55b4f9d003b036af69085f7b64e0df08c5ba440d)
2007-11-01Patch 2 of 3 from Debian Samba packagers:Gerald (Jerry) Carter1-2/+2
The point is doing the following associations: - non discardable state data (all TDB files that may need to be backed up) go to statedir - shared data (codepage stuff) go to codepagedir The patch *does not change* the default location for these directories. So, there is no behaviour change when applying it. The main change is for samba developers who have to think when dealing with files that previously pertained to libdir whether they: - go in statedir - go in codepagedir - stay in libdir (This used to be commit d6cdbfd875bb2653e831d314726c3240beb0a96b)
2007-10-18RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison1-7/+7
bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy. (This used to be commit f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f)
2007-10-10r23801: The FSF has moved around a lot. This fixes their Mass Ave address.Andrew Tridgell1-2/+1
(This used to be commit 87c91e4362c51819032bfbebbb273c52e203b227)
2007-10-10r23779: Change from v2 or later to v3 or later.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
2007-10-10r22009: change TDB_DATA from char * to unsigned char *Stefan Metzmacher1-5/+5
and fix all compiler warnings in the users metze (This used to be commit 3a28443079c141a6ce8182c65b56ca210e34f37f)
2007-10-10r17316: More C++ warnings -- 456 leftVolker Lendecke1-2/+2
(This used to be commit 1e4ee728df7eeafc1b4d533240acb032f73b4f5c)
2007-10-10r16542: Fix #3863, reported by jason@ncac.gwu.eduJeremy Allison1-0/+6
Jeremy. (This used to be commit cde8323fdc4d4ddaa30e8c59bec89dc130fe26a6)
2007-10-10r15380: default eventlog tdbs to mode 0660 to allow easier access by ↵Gerald Carter1-1/+1
BUILTIN\Administrators (This used to be commit a02933c9589e34488f289cbc40f77f6864a58367)
2007-10-10r15101: Little step towards getting Samba4 tdb into 3: tdb_lock_bystring ↵Volker Lendecke1-2/+2
does not have the timeout argument in Samba4. Add a new routine tdb_lock_bystring_with_timeout. Volker (This used to be commit b9c6e3f55602fa505859a4b2cd137b74105d685f)
2007-10-10r13766: Patch from Arek Glabek <aglabek@centeris.com>:Gerald Carter1-6/+3
* Fix parsing error in eventlogadm caused by log entries with no DAT: line. (This used to be commit f0a8f438793a806e8cf73e1e695b09e540a4239e)
2007-10-10r11761: * fix clearing of event logs by truncating the tdb.Gerald Carter1-48/+59
This feature got broken in some of the other updates. Now each open handle stores an pointer to an open tdb data structure (not the tdb pointer itself). Clearing can be done with a simple elog_close_tdb( elog, True ) to force a close and then calling elog_open_tdb( logname, True ) to force an tdb truncate. Permissions on existing tdbs are maintained which is important. * We don't currently handle backup. Haven't looked at the format of a backuped up eventlog to know what the deal is. (This used to be commit 2df34c9403446d12f1ceeac38cbda5d3ba805b02)
2007-10-10r11137: Compile with only 2 warnings (I'm still working on that code) on a gcc4Jeremy Allison1-3/+3
x86_64 box. Jeremy. (This used to be commit d720867a788c735e56d53d63265255830ec21208)
2007-10-10r11060: merging new eventlog code from trunkGerald Carter1-116/+232
(This used to be commit 1bcf7e82ede63a851a244162a3b939373787b693)
2007-10-10r10819: merging a couple of fixes from trunkGerald Carter1-2/+1
* only keep the registry,tdb file open when we have an open key handle * tpot's setup.py fix * removing files that no longer exist in trunk and copying some that were missing in 3.0 (This used to be commit 6c6bf6ca5fd430a7a20bf20ed08050328660e570)
2007-10-10r10795: Fix code before decl error.Jeremy Allison1-1/+2
Jeremy. (This used to be commit 30bd894ee63e5be266b6069533138ccb3c0fbccb)
2007-10-10r10781: merging eventlog and svcctl code from trunkGerald Carter1-0/+620
(This used to be commit f10aa9fb84bfac4f1a22b74d63999668700ffaac)