1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-13 13:18:06 +03:00
Commit Graph

60160 Commits

Author SHA1 Message Date
Kamen Mazdrashki
d07883ed86 s4/idl: DsWriteAccountSpn - switch types should be unsigned
Changes also propagated into source code as they are
too minor to be done in separate commit

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-03-10 17:12:03 +01:00
Kamen Mazdrashki
88494b2b62 s3/drs: DsCrackNames - Propagating IDL changes to source code
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-03-10 17:12:03 +01:00
Kamen Mazdrashki
2483ed362b s4/drs: DsCrackNames - Propagating IDL changes to source code
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-03-10 17:12:02 +01:00
Kamen Mazdrashki
d22eaddf95 s4/idl: DsCrackNames - switch types should be unsigned
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-03-10 17:12:02 +01:00
Kamen Mazdrashki
00135d83f4 s4/idl: DsGetMemberships - switch types should be unsigned
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-03-10 17:12:01 +01:00
Kamen Mazdrashki
890d408fea s4/idl: DsReplicaMod - switch types should be unsigned
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-03-10 17:12:00 +01:00
Kamen Mazdrashki
4ea818e349 s4/idl: DsReplicaDel - switch types should be unsigned
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-03-10 17:12:00 +01:00
Kamen Mazdrashki
9f71ffb06c s4/idl: DsReplicaAdd - switch types should be unsigned
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-03-10 17:11:59 +01:00
Kamen Mazdrashki
62b4b675fd s4/idl: DsReplicaUpdateRefs - switch types should be unsigned
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-03-10 17:11:58 +01:00
Kamen Mazdrashki
feb4c8a3e3 s3/drs: DsGetNCChanges - Propagating IDL changes to source code
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-03-10 17:11:57 +01:00
Kamen Mazdrashki
9f21787131 s4/drs: DsGetNCChanges - Propagating IDL changes to source code
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-03-10 17:11:57 +01:00
Kamen Mazdrashki
89f8c35ac4 s4/idl: DsGetNCChanges - switch types should be unsigned
Converting those types to unsigned should help in
creating DRSUAPI dissector for Wireshark also.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-03-10 17:11:56 +01:00
Kamen Mazdrashki
163cc1a02d s4/idl: drsuapi_DsReplicaSyncOptions flags are no more used
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-03-10 17:11:55 +01:00
Kamen Mazdrashki
d142d9fb64 doxygen: talloc_get_type name fixed in Doxygen documentation
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-03-10 17:11:55 +01:00
Günther Deschner
c5ba525748 s3-winreg: add some debug statements to _winreg_QueryValue().
Guenther
2010-03-10 16:12:22 +01:00
Günther Deschner
52ca26a820 s4-smbtorture: do full winreg QueryValue test for values we created.
Guenther
2010-03-10 16:12:22 +01:00
Günther Deschner
420aac7538 s4-smbtorture: check for non existing value under version key in RPC-WINREG.
Guenther
2010-03-10 16:12:22 +01:00
Volker Lendecke
89c785c47a s3: Fix a long-standing problem with recycled PIDs
When a samba server process dies hard, it has no chance to clean up its entries
in locking.tdb, brlock.tdb, connections.tdb and sessionid.tdb.

For locking.tdb and brlock.tdb Samba is robust by checking every time we read
an entry from the database if the corresponding process still exists. If it
does not exist anymore, the entry is deleted. This is not 100% failsafe though:
On systems with a limited PID space there is a non-zero chance that between the
smbd's death and the fresh access, the PID is recycled by another long-running
process. This renders all files that had been locked by the killed smbd
potentially unusable until the new process also dies.

This patch is supposed to fix the problem the following way: Every process ID
in every database is augmented by a random 64-bit number that is stored in a
serverid.tdb. Whenever we need to check if a process still exists we know its
PID and the 64-bit number. We look up the PID in serverid.tdb and compare the
64-bit number. If it's the same, the process still is a valid smbd holding the
lock. If it is different, a new smbd has taken over.

I believe this is safe against an smbd that has died hard and the PID has been
taken over by a non-samba process. This process would not have registered
itself with a fresh 64-bit number in serverid.tdb, so the old one still exists
in serverid.tdb. We protect against this case by the parent smbd taking care of
deregistering PIDs from serverid.tdb and the fact that serverid.tdb is
CLEAR_IF_FIRST.

CLEAR_IF_FIRST does not work in a cluster, so the automatic cleanup does not
work when all smbds are restarted. For this, "net serverid wipe" has to be run
before smbd starts up. As a convenience, "net serverid wipedbs" also cleans up
sessionid.tdb and connections.tdb.

While there, this also cleans up overloading connections.tdb with all the
process entries just for messaging_send_all().

Volker
2010-03-10 16:07:10 +01:00
Volker Lendecke
184afeb57d s3: Make TLDAP_IS_ALPHA and TLDAP_IS_ADH static functions 2010-03-10 14:37:35 +01:00
Karolin Seeger
7fdbbddf42 s3-passdb: Fix typo in debug message.
Karolin
2010-03-10 12:08:27 +01:00
Günther Deschner
eeb8c36326 s4-spoolss: remove unsed iconv handle from dcesrv_spoolss_GetPrinterData().
Guenther
2010-03-10 11:16:20 +01:00
Matthias Dieter Wallnöfer
eeb05bf746 s4:winreg RPC - don't crash when incoming data wasn't correctly specified
Also found by the WINREG torture test enhancements by gd.
2010-03-10 09:26:17 +01:00
Matthias Dieter Wallnöfer
bb507d1d49 s4:lib/registry/ldb.c - fix up registry backend to be more robust
This should let the new WINREG tests written by gd at least pass against us.
2010-03-10 09:26:09 +01:00
Jeremy Allison
41be39013b Fix the shell script in the root case. When run as root, make test now detects CAP_DAC_OVERRIDE being left on in error.
Jeremy.
2010-03-09 20:06:19 -08:00
Günther Deschner
420e3b8553 s4-smbtorture: disable winreg QueryValue test for today.
wow, both s3 and s4 crash on full coverage winreg QueryValue testing.

Guenther
2010-03-10 02:54:27 +01:00
Günther Deschner
0a253e6b72 s4-smbtorture: fix some build warnings in RPC-SPOOLSS test.
Guenther
2010-03-10 02:54:26 +01:00
Jeremy Allison
3855c948c0 Add tests which, when run as root, will ensure we can't write
into a read-only directory, or read a owner-read-only file.

Jeremy.
2010-03-09 16:36:48 -08:00
Günther Deschner
ae79d8ce02 s4-smbtorture: on HKLM hive test the well known CurrentVersion value.
Guenther
2010-03-10 00:46:23 +01:00
Günther Deschner
722daf43d0 s4-smbtorture: add full coverage test for winreg QueryValue calls.
Guenther
2010-03-10 00:46:23 +01:00
Günther Deschner
62b41e6842 s4-smbtorture: rework test_winreg_QueryValue in RPC-SPOOLSS-PRINTER once again.
Guenther
2010-03-10 00:46:23 +01:00
Günther Deschner
6d10645bca s4-smbtorture: add tests for set and delete value in RPC-WINREG.
Guenther
2010-03-10 00:46:23 +01:00
Simo Sorce
f7f67e9e1f Fix typo and convert spaces to tabs 2010-03-09 16:42:05 -05:00
Simo Sorce
8fa81e9909 Fix typo 2010-03-09 16:42:05 -05:00
Jeremy Allison
9adbba6fb9 Allow "make test" to complete as root. Obviously only safe on tightly
controlled developer machines.
Jeremy.
2010-03-09 13:14:18 -08:00
Volker Lendecke
25452a2268 s3: Fix a NULL pointer dereference
Found by Laurent Gaffie <laurent.gaffie@gmail.com>.

Thanks!

Volker
2010-03-09 22:00:44 +01:00
Simo Sorce
c05d13d3c2 s4:ldb fix escape parsing
sscanf can return also on short reads, in this case an invalid escape
sequence like '\1k' would be accepted, returning 1 as value and swallowing the
'k'. Use an auxiliar function to validate and convert hex escapes.
2010-03-09 15:23:49 -05:00
Simo Sorce
9f53820de7 s3:tldap add own filter parsing
Also add torture test to check filter parsing.
2010-03-09 15:23:48 -05:00
Matthias Dieter Wallnöfer
2ee3cca4ff s4:winbind - use "unsigned" variables where possible 2010-03-09 17:54:12 +01:00
Matthias Dieter Wallnöfer
1310eba970 s4:winbind/wb_cmd_getgroups.c - fix up warnings
Also fix some indentations.
2010-03-09 17:52:10 +01:00
Matthieu Patou
98bc10d0a8 s4:unittest Fix unittest to reflect that wbinfo -r no longer fail
Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
2010-03-09 17:20:31 +01:00
Matthieu Patou
bc766a9a84 s4:winbind: stub implementation of WINBINDD_PAM_LOGOFF
Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
2010-03-09 17:20:31 +01:00
Matthieu Patou
238ff24341 s4:winbind: Fix a misplaced returned info
libwbclient expect to have in auth.exra_data the INFO3_TXT and in auth.unix_username the username

Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
2010-03-09 17:20:30 +01:00
Matthieu Patou
42b5b38187 s4:winbind Implement logic for getgroups to work
This function is called by the system everytime we do a id user or when we do wbinfo -r

Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
2010-03-09 17:20:30 +01:00
Matthieu Patou
30baf31411 s4:winbind: implement calls for allowing getent groups
This is to say getgrent and setgrent, and the associated technical objects (states, build directives,...) needed.

Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
2010-03-09 17:20:30 +01:00
Matthias Dieter Wallnöfer
74166c380c s4:torture/rpc/netlogon.c - "LogonGetDomainInfo" test - make it compatible against Windows Server 2008
This is a reworked version of the mentioned test which passes against Windows
Server 2008. The previous version, also mainly written by me passed only against
Windows Server <= 2003.
2010-03-09 17:19:04 +01:00
Matthias Dieter Wallnöfer
9995a37a8c s4:netlogon RPC - "LogonGetDomainInfo" - make the call compatible with >= Windows 2008
Add more security checks and other corrections to imitate Windows Server >= 2008.
2010-03-09 17:18:46 +01:00
Matthias Dieter Wallnöfer
1deefcaee1 libcli/auth/schannel_state_tdb.c - fix an obviously wrong error handling 2010-03-09 17:18:26 +01:00
Günther Deschner
48cdca0d47 s4-smbtorture: fix uninitialized variable in winreg QueryValue call.
Guenther
2010-03-09 16:14:39 +01:00
Volker Lendecke
8fd43f44ef s3: Fix a typo. Thanks to Christian Ambach for pointing me at it :-) 2010-03-09 15:37:39 +01:00
Nadezhda Ivanova
deebbe7cfa A helper function to get the Infrastructure DN. 2010-03-09 14:56:46 +02:00