Nadezhda Ivanova [Thu, 11 Mar 2010 21:10:38 +0000 (23:10 +0200)]
Moved access_check_on_dn from acl module as an utility.
Made this an utility function so it can be used for access checking
outside of the acl ldb module, such as checking validated writes and
control access rights in other protocols (e. g drs)
Günther Deschner [Thu, 11 Mar 2010 19:48:24 +0000 (20:48 +0100)]
s3-winreg: make QueryValue pass RPC-WINREG test again.
Guenther
Günther Deschner [Thu, 11 Mar 2010 19:23:13 +0000 (20:23 +0100)]
s4-smbtorture: skip extended SetValue test against Samba (both dont survive).
Guenther
Günther Deschner [Thu, 11 Mar 2010 19:24:58 +0000 (20:24 +0100)]
s4-smbtorture: test NULL and "" valuenames as well in query for wellknown winreg key.
Guenther
Günther Deschner [Thu, 11 Mar 2010 19:20:48 +0000 (20:20 +0100)]
winreg: add winreg_KeyType enum.
Guenther
Günther Deschner [Thu, 11 Mar 2010 18:25:57 +0000 (19:25 +0100)]
s3-winreg: fix some function names in debug statements.
Guenther
Günther Deschner [Thu, 11 Mar 2010 19:17:48 +0000 (20:17 +0100)]
s4-winreg: continue processing in WERR_MORE_DATA case in dcesrv_winreg_QueryValue().
Matthias, please check.
Guenther
Günther Deschner [Thu, 11 Mar 2010 17:52:38 +0000 (18:52 +0100)]
s4-smbtorture: add extended SetValue test to RPC-WINREG.
Really looks like a blob based database frontend.
As it seems, we can set *any* type of data with *any* content on Windows and get
the exact same data back.
Guenther
Günther Deschner [Thu, 11 Mar 2010 17:37:02 +0000 (18:37 +0100)]
s4-smbtorture: more work on test_key_value() RPC-WINREG test.
Guenther
Volker Lendecke [Thu, 11 Mar 2010 10:33:01 +0000 (11:33 +0100)]
s3: Make init_smb_request return bool
Centralize the exit_server_cleanly()
Stefan Metzmacher [Thu, 11 Mar 2010 14:11:29 +0000 (15:11 +0100)]
RPC-DSSYNC: handle DCERPC_FAULT_OP_RNG_ERROR as not supported for DsGetNT4ChangeLog()
metze
Stefan Metzmacher [Thu, 11 Mar 2010 13:52:37 +0000 (14:52 +0100)]
s4:torture/libnet/libnet_user.c: fix double free in error path
metze
Günther Deschner [Thu, 11 Mar 2010 13:27:45 +0000 (14:27 +0100)]
s4-registry: add all winreg types to reg_value_types table.
Guenther
Stefan Metzmacher [Thu, 11 Mar 2010 12:32:34 +0000 (13:32 +0100)]
s4:selftest: move samba4.net.api.become.dc from skip to knownfail
Someone should fix the remaining bug, as this test is expected to work.
metze
Stefan Metzmacher [Thu, 11 Mar 2010 12:30:19 +0000 (13:30 +0100)]
NET-API-BECOME-DC: convert to torture api
metze
Stefan Metzmacher [Thu, 11 Mar 2010 12:05:55 +0000 (13:05 +0100)]
s4:rpc_server/drsuapi: don't reset [out,ref] pointer to NULL in dcesrv_drsuapi_DsRemoveDSServer()
metze
Stefan Metzmacher [Thu, 11 Mar 2010 12:04:56 +0000 (13:04 +0100)]
selftest: let the client also use the dns_host_file
metze
Stefan Metzmacher [Thu, 11 Mar 2010 08:12:07 +0000 (09:12 +0100)]
RPC-DSSYNC: fix the build after idl changes
metze
Stefan Metzmacher [Thu, 11 Mar 2010 08:11:25 +0000 (09:11 +0100)]
librpc: rerun make idl
metze
Stefan Metzmacher [Thu, 11 Mar 2010 07:46:39 +0000 (08:46 +0100)]
drsuapi.idl: finish drsuapi_DsGetNT4ChangeLog idl
metze
Matthieu Patou [Wed, 3 Mar 2010 08:38:51 +0000 (11:38 +0300)]
s4: allow pam_winbind.so to be build on samba4
* Modify the nsswitch/config.m4 to add tests and build that will be put in configure by the autoconf/autoheader
We test if there is pam headers and pam library to be able to build the pam module
We add s4 build directive (that are normaly in standalone config.mk) this is due to the fact that we need
to rely on path that are guessed during configure.
Add tests not to build pam_winbind if pam dev files is not present
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Matthieu Patou [Wed, 3 Mar 2010 08:38:51 +0000 (11:38 +0300)]
s4: create ../lib/iniparser_build/config.m4
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Matthieu Patou [Wed, 3 Mar 2010 08:38:51 +0000 (11:38 +0300)]
s4: Modify auth/config.m4 to move pam tests to nsswitch.m4 so that we tests things in one place
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Günther Deschner [Thu, 11 Mar 2010 11:21:08 +0000 (12:21 +0100)]
s3-winreg: Fix _winreg_QueryValue crash bugs and implement windows behavior.
Found by RPC-WINREG smbtorture test.
Guenther
Andrew Bartlett [Thu, 11 Mar 2010 04:34:01 +0000 (15:34 +1100)]
Explain why we don't use certain characters in the generated pw
Endi S. Dewata [Thu, 11 Mar 2010 02:34:01 +0000 (20:34 -0600)]
lib/util - Removed curly braces from generate_random_password().
Endi S. Dewata [Wed, 10 Mar 2010 01:12:30 +0000 (19:12 -0600)]
s4:provision - Updated FDS schema mapping.
Andrew Bartlett [Thu, 11 Mar 2010 03:49:34 +0000 (14:49 +1100)]
s4:provision Improve the handling of provision errors
The backtraces were too confusing for our users, and didn't tell them
what to do to fix the problem. By printing the string (rather than a
backtrace), and including in the error what to do, and what file to
remove, we give them a chance.
Andrew Bartlett
Jeremy Allison [Thu, 11 Mar 2010 01:46:09 +0000 (17:46 -0800)]
Try and fix bug #7233 - print fails with jobs >4GB from Win7 clients.
Remove an arbitrarty 4G B limit that *doesn't need to be there* !
Jeremy.
Andrew Bartlett [Wed, 10 Mar 2010 05:01:41 +0000 (16:01 +1100)]
s4:libcli Use integrated name resolution when connecting SMB
This avoids pulling the address into a string and back again if given
a name, by letting the next async layer down do the name resolution.
If it was an IP address to start with, then the resolver library just
converts that to the struct socket_address.
Andrew Bartlett
Andrew Bartlett [Wed, 24 Feb 2010 11:57:09 +0000 (22:57 +1100)]
s4:libcli/resovle File based lookup module for DNS name types
This uses the new common code to read a file containing DNS host
names, so we don't have to use real DNS lookups in our test
environment.
Andrew Bartlett
Andrew Bartlett [Tue, 9 Mar 2010 12:29:43 +0000 (23:29 +1100)]
libcli/nbt Add parser for a 'hosts' file that takes DNS record types
Andrew Bartlett [Tue, 9 Mar 2010 12:34:10 +0000 (23:34 +1100)]
s4:samba_dnsupdate Add a 'file based' mode to samba_dnsupdate
For the testsuite to use DNS like names, we need to write these names
to a file.
Also, to have this run in 'make test' the usual rules about 'no 127.*'
IP addresses in DNS must be skipped, so glue.interface_ips takes two
arguments now
Andrew Bartlett [Wed, 10 Mar 2010 05:04:44 +0000 (16:04 +1100)]
s4:lib/socket Don't go via a string when resolving addresses in connect_multi
This also removes the special case for IP addresses, and leaves that
to the code in the resolver library.
Andrew Bartlett
Andrew Bartlett [Wed, 10 Mar 2010 04:56:13 +0000 (15:56 +1100)]
s4:libcli/resolve Use a more robust way to return the string address
By going via these tevent functions, we avoid needing to dereference
the struct socket_address, which may contain a 'struct sockaddr' or
strings. The new dns_host_file resolver returns in the form of a
struct sockaddr.
Andrew Bartlett
Andrew Bartlett [Wed, 10 Mar 2010 04:55:26 +0000 (15:55 +1100)]
s4:lib/socket Add function to set a port on the socket address
Andrew Bartlett [Tue, 9 Mar 2010 12:30:41 +0000 (23:30 +1100)]
Move prototype to header of common code for set_sockaddr_port
Andrew Bartlett [Wed, 10 Mar 2010 23:42:18 +0000 (10:42 +1100)]
s4/rpc_server Don't segfault over replPropertyMetaData contents
The replPropertyMetaData may contain attrid values that we don't yet
have in the local schema. We need to deal with this - it is a serious
error, but we should not segfault.
Andrew Bartlett
SATOH Fumiyasu [Wed, 10 Mar 2010 03:15:44 +0000 (12:15 +0900)]
vfs_netatalk: Segfault if hide files or veto files has no ".AppleDouble"
Günther Deschner [Wed, 10 Mar 2010 23:07:00 +0000 (00:07 +0100)]
s4-smbtorture: only look at DATA_BLOB pointer when einfo[0].data_length > 0.
Guenther
Jeremy Allison [Wed, 10 Mar 2010 22:40:20 +0000 (14:40 -0800)]
Added regression test for bug #7234 - Symlink delete fails but incorrectly reports success.
Ensure we can delete a symlink by path.
Jeremy.
Günther Deschner [Wed, 10 Mar 2010 22:08:09 +0000 (23:08 +0100)]
s4-smbtorture: while testing PrinterDataEx also compare Get and Enum results.
Guenther
Jeremy Allison [Wed, 10 Mar 2010 22:06:18 +0000 (14:06 -0800)]
Fix bug #7234 - Symlink delete fails but incorrectly reports success to client.
Typo called LSTAT instead of STAT in the unlink by pathname path.
Jeremy.
Günther Deschner [Wed, 10 Mar 2010 21:04:02 +0000 (22:04 +0100)]
Revert "s4-smbtorture: disable winreg QueryValue test for today."
This reverts commit
420e3b8553c9e721fba27dd64eb78b2c7105ce64.
Björn Jacke [Wed, 10 Mar 2010 19:58:16 +0000 (20:58 +0100)]
ѕ4: EDQUOT needs to be mapped to NT_STATUS_DISK_FULL
Matthias Dieter Wallnöfer [Wed, 10 Mar 2010 19:23:43 +0000 (20:23 +0100)]
s4:libnet - change variables to "unsigned" where needed
Matthias Dieter Wallnöfer [Wed, 10 Mar 2010 19:22:06 +0000 (20:22 +0100)]
s4:libnet_become_dc - change counter variables to "unsigned" where they count LDB objects
Matthias Dieter Wallnöfer [Wed, 10 Mar 2010 18:49:25 +0000 (19:49 +0100)]
s4:winreg RPC - fix up the "QueryValue" call to work against the enhanced torture test
Found out by gd's updated torture test.
Matthias Dieter Wallnöfer [Wed, 10 Mar 2010 08:47:02 +0000 (09:47 +0100)]
s4:registry/ldb.c - if "name" isn't set we should return WERR_INVALID_PARAM
Stefan Metzmacher [Tue, 9 Mar 2010 11:24:59 +0000 (12:24 +0100)]
nsswitch: build libnss_winbind.so with SOVERSION = 2
metze
Stefan Metzmacher [Tue, 9 Mar 2010 09:29:33 +0000 (10:29 +0100)]
nsswitch: don't use socket_wrapper for winbind client code
metze
Stefan Metzmacher [Tue, 9 Mar 2010 10:14:50 +0000 (11:14 +0100)]
nsswitch: build libnss_winbindd.so only for the non merged build
metze
Stefan Metzmacher [Tue, 9 Mar 2010 09:44:41 +0000 (10:44 +0100)]
s4:build/m4/public.m4: add realname argument to SMB_BUILD_LIBRARY()
metze
Stefan Metzmacher [Wed, 10 Mar 2010 13:12:28 +0000 (14:12 +0100)]
s4:rpc_server/wkssvc: don't reset [out,ref] pointer to 0
r->out.total_entries = 0; should be *r->out.total_entries = 0;
Otherwise we fail to marshall the reponse or crash if we run with
log level = 10 and trigger the ndr_print functions.
All out elements are already setup and initialized by the pidl generated code.
metze
Stefan Metzmacher [Wed, 10 Mar 2010 13:10:13 +0000 (14:10 +0100)]
s4:rpc_server/wkssvc: remove unneeded talloc_reference()
metze
Stefan Metzmacher [Wed, 10 Mar 2010 13:08:34 +0000 (14:08 +0100)]
s4:rpc_server/wkssvc: avoid ZERO_STRUCT(r->out) and use already allocated [out,ref] memory
metze
Stefan Metzmacher [Wed, 10 Mar 2010 12:59:37 +0000 (13:59 +0100)]
s4:rpc_server/srvsvc: remove unused ZERO_STRUCT(r->out);
Here it doesn't matter, but it's a bad example for other code
as it might reset the [out,ref] pointers which are already
generated by the pidl generated code.
metze
Kamen Mazdrashki [Fri, 5 Mar 2010 22:35:17 +0000 (00:35 +0200)]
idl: Regenerate DRSUAPI idl files
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Kamen Mazdrashki [Fri, 5 Mar 2010 22:31:12 +0000 (00:31 +0200)]
s4/idl: drsuapi_QuerySitesByCostCtr1 'unknown' member is now known
and this it is a reserved fields for future flags - 'flags_reserver'
Must be 0 and is currently ignored.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Kamen Mazdrashki [Thu, 4 Mar 2010 17:51:01 +0000 (19:51 +0200)]
s4/idl: QuerySitesByCost - switch types should be unsigned
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Kamen Mazdrashki [Thu, 4 Mar 2010 17:25:40 +0000 (19:25 +0200)]
s4/idl: DsGetMemberships2 - switch types should be unsigned
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Kamen Mazdrashki [Fri, 5 Mar 2010 21:24:10 +0000 (23:24 +0200)]
s4/drs: DsRemoveDSServer - Propagating IDL changes to source code
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Kamen Mazdrashki [Fri, 5 Mar 2010 21:17:50 +0000 (23:17 +0200)]
s4/idl: DsRemoveDSServer - switch types should be unsigned
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Kamen Mazdrashki [Fri, 5 Mar 2010 21:04:52 +0000 (23:04 +0200)]
s4/drs: DsWriteAccountSpn - Propagating IDL changes to source code
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Kamen Mazdrashki [Fri, 5 Mar 2010 21:03:21 +0000 (23:03 +0200)]
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>
Kamen Mazdrashki [Fri, 5 Mar 2010 20:50:57 +0000 (22:50 +0200)]
s3/drs: DsCrackNames - Propagating IDL changes to source code
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Kamen Mazdrashki [Fri, 5 Mar 2010 20:38:03 +0000 (22:38 +0200)]
s4/drs: DsCrackNames - Propagating IDL changes to source code
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Kamen Mazdrashki [Fri, 5 Mar 2010 20:37:44 +0000 (22:37 +0200)]
s4/idl: DsCrackNames - switch types should be unsigned
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Kamen Mazdrashki [Thu, 4 Mar 2010 15:55:46 +0000 (17:55 +0200)]
s4/idl: DsGetMemberships - switch types should be unsigned
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Kamen Mazdrashki [Thu, 4 Mar 2010 15:53:03 +0000 (17:53 +0200)]
s4/idl: DsReplicaMod - switch types should be unsigned
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Kamen Mazdrashki [Thu, 4 Mar 2010 15:19:32 +0000 (17:19 +0200)]
s4/idl: DsReplicaDel - switch types should be unsigned
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Kamen Mazdrashki [Thu, 4 Mar 2010 15:11:38 +0000 (17:11 +0200)]
s4/idl: DsReplicaAdd - switch types should be unsigned
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Kamen Mazdrashki [Fri, 5 Mar 2010 19:30:40 +0000 (21:30 +0200)]
s4/idl: DsReplicaUpdateRefs - switch types should be unsigned
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Kamen Mazdrashki [Fri, 5 Mar 2010 19:58:01 +0000 (21:58 +0200)]
s3/drs: DsGetNCChanges - Propagating IDL changes to source code
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Kamen Mazdrashki [Fri, 5 Mar 2010 18:33:46 +0000 (20:33 +0200)]
s4/drs: DsGetNCChanges - Propagating IDL changes to source code
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Kamen Mazdrashki [Fri, 5 Mar 2010 18:33:23 +0000 (20:33 +0200)]
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>
Kamen Mazdrashki [Wed, 3 Mar 2010 20:07:55 +0000 (22:07 +0200)]
s4/idl: drsuapi_DsReplicaSyncOptions flags are no more used
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Kamen Mazdrashki [Wed, 3 Mar 2010 20:07:12 +0000 (22:07 +0200)]
doxygen: talloc_get_type name fixed in Doxygen documentation
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Günther Deschner [Wed, 10 Mar 2010 13:17:23 +0000 (14:17 +0100)]
s3-winreg: add some debug statements to _winreg_QueryValue().
Guenther
Günther Deschner [Wed, 10 Mar 2010 12:04:17 +0000 (13:04 +0100)]
s4-smbtorture: do full winreg QueryValue test for values we created.
Guenther
Günther Deschner [Wed, 10 Mar 2010 11:54:17 +0000 (12:54 +0100)]
s4-smbtorture: check for non existing value under version key in RPC-WINREG.
Guenther
Volker Lendecke [Tue, 2 Mar 2010 16:02:01 +0000 (17:02 +0100)]
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
Volker Lendecke [Mon, 8 Mar 2010 06:24:03 +0000 (07:24 +0100)]
s3: Make TLDAP_IS_ALPHA and TLDAP_IS_ADH static functions
Karolin Seeger [Wed, 10 Mar 2010 11:07:44 +0000 (12:07 +0100)]
s3-passdb: Fix typo in debug message.
Karolin
Günther Deschner [Wed, 10 Mar 2010 10:16:20 +0000 (11:16 +0100)]
s4-spoolss: remove unsed iconv handle from dcesrv_spoolss_GetPrinterData().
Guenther
Matthias Dieter Wallnöfer [Wed, 10 Mar 2010 08:22:42 +0000 (09:22 +0100)]
s4:winreg RPC - don't crash when incoming data wasn't correctly specified
Also found by the WINREG torture test enhancements by gd.
Matthias Dieter Wallnöfer [Wed, 10 Mar 2010 08:10:53 +0000 (09:10 +0100)]
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.
Jeremy Allison [Wed, 10 Mar 2010 04:06:19 +0000 (20:06 -0800)]
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.
Günther Deschner [Wed, 10 Mar 2010 01:52:13 +0000 (02:52 +0100)]
s4-smbtorture: disable winreg QueryValue test for today.
wow, both s3 and s4 crash on full coverage winreg QueryValue testing.
Guenther
Günther Deschner [Wed, 10 Mar 2010 01:50:32 +0000 (02:50 +0100)]
s4-smbtorture: fix some build warnings in RPC-SPOOLSS test.
Guenther
Jeremy Allison [Wed, 10 Mar 2010 00:36:48 +0000 (16:36 -0800)]
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.
Günther Deschner [Tue, 9 Mar 2010 23:43:57 +0000 (00:43 +0100)]
s4-smbtorture: on HKLM hive test the well known CurrentVersion value.
Guenther
Günther Deschner [Tue, 9 Mar 2010 23:17:59 +0000 (00:17 +0100)]
s4-smbtorture: add full coverage test for winreg QueryValue calls.
Guenther
Günther Deschner [Tue, 9 Mar 2010 23:16:46 +0000 (00:16 +0100)]
s4-smbtorture: rework test_winreg_QueryValue in RPC-SPOOLSS-PRINTER once again.
Guenther
Günther Deschner [Tue, 9 Mar 2010 23:06:52 +0000 (00:06 +0100)]
s4-smbtorture: add tests for set and delete value in RPC-WINREG.
Guenther
Simo Sorce [Tue, 9 Mar 2010 21:40:55 +0000 (16:40 -0500)]
Fix typo and convert spaces to tabs
Simo Sorce [Tue, 9 Mar 2010 21:41:44 +0000 (16:41 -0500)]
Fix typo
Jeremy Allison [Tue, 9 Mar 2010 21:14:18 +0000 (13:14 -0800)]
Allow "make test" to complete as root. Obviously only safe on tightly
controlled developer machines.
Jeremy.
Volker Lendecke [Tue, 9 Mar 2010 10:14:14 +0000 (11:14 +0100)]
s3: Fix a NULL pointer dereference
Found by Laurent Gaffie <laurent.gaffie@gmail.com>.
Thanks!
Volker
Simo Sorce [Mon, 8 Mar 2010 01:20:45 +0000 (20:20 -0500)]
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.