sfrench/samba-autobuild/.git
7 years agofile_server: use embedded ntsvcs server
Andrew Bartlett [Mon, 30 Apr 2012 05:22:04 +0000 (15:22 +1000)]
file_server: use embedded ntsvcs server

7 years agofile_server: use embedded eventlog server
Andrew Bartlett [Mon, 30 Apr 2012 05:19:43 +0000 (15:19 +1000)]
file_server: use embedded eventlog server

7 years agofile_server: forward dssetup, but use embedded svcctl for s3fs
Andrew Bartlett [Mon, 30 Apr 2012 05:13:49 +0000 (15:13 +1000)]
file_server: forward dssetup, but use embedded svcctl for s3fs

7 years agoselftest: Use same pattern for path to share as Samba3.pm
Andrew Bartlett [Mon, 30 Apr 2012 05:08:38 +0000 (15:08 +1000)]
selftest: Use same pattern for path to share as Samba3.pm

This helps as we declare tests that were previously targetted at Samba3 only.

Andrew Bartlett

7 years agoselftest: Add hideunread share to plugin_s4_dc
Andrew Bartlett [Mon, 30 Apr 2012 05:17:54 +0000 (15:17 +1000)]
selftest: Add hideunread share to plugin_s4_dc

7 years agoselftest: run plugin_s4_dc with 'acl_xattr xattr_tdb streams_depot' VFS modules
Andrew Bartlett [Mon, 30 Apr 2012 05:16:15 +0000 (15:16 +1000)]
selftest: run plugin_s4_dc with 'acl_xattr xattr_tdb streams_depot' VFS modules

7 years agoselftest: prepare to run smbtorture tests against plugin_s4_dc
Andrew Bartlett [Thu, 26 Apr 2012 05:20:02 +0000 (15:20 +1000)]
selftest: prepare to run smbtorture tests against plugin_s4_dc

7 years agoselftest: attempt to test samba3hide in a different environment
Andrew Bartlett [Wed, 18 Apr 2012 06:05:22 +0000 (16:05 +1000)]
selftest: attempt to test samba3hide in a different environment

This should ensure that the samba3hide test is still run and passes,
in a non-ACLed environment.

Andrew Bartlett

7 years agoselftest: Enable ACL testing against the s3dc environment
Andrew Bartlett [Tue, 17 Apr 2012 01:56:23 +0000 (11:56 +1000)]
selftest: Enable ACL testing against the s3dc environment

Previously, ACL tests were skipped and the correct modules for ACL
testing were not loaded.

The addition of a knownfail entry for raw.samba3* tests is due to an
inconsitancy between the behaviour with and without ACL modules loaded
- posix chown calls appear to be ignored in this mode.

Andrew Bartlett

7 years agos3-smbd: Use security_session_user_level() rather than nt_token_check_sid()
Andrew Bartlett [Tue, 1 May 2012 07:13:34 +0000 (17:13 +1000)]
s3-smbd: Use security_session_user_level() rather than nt_token_check_sid()

This allows the unix.whoami test to pass when configured as part of the AD DC.

The struct auth_session_info is slightly different in the AD DC configuration
when using auth_samba4.  In particular, there is a distinction between Guest
and Anonymous logins.

Andrew Bartlett

7 years agos3:torture fix flakey testcase
Christian Ambach [Tue, 1 May 2012 19:21:40 +0000 (21:21 +0200)]
s3:torture fix flakey testcase

don't put database into /tmp, use lp_private_dir() to put
it into the selftest prefix

Autobuild-User: Christian Ambach <ambi@samba.org>
Autobuild-Date: Wed May  2 00:57:05 CEST 2012 on sn-devel-104

7 years agos3:selftest run LOCAL-IDMAP-TDB-COMMON in make test
Christian Ambach [Mon, 30 Apr 2012 15:02:46 +0000 (17:02 +0200)]
s3:selftest run LOCAL-IDMAP-TDB-COMMON in make test

Autobuild-User: Christian Ambach <ambi@samba.org>
Autobuild-Date: Tue May  1 11:07:08 CEST 2012 on sn-devel-104

7 years agos3:torture: add idmap_tdb_common test code
Christian Ambach [Wed, 22 Feb 2012 14:44:27 +0000 (15:44 +0100)]
s3:torture: add idmap_tdb_common test code

7 years agos3:winbindd/idmap_tdb: use idmap_tdb_common code
Christian Ambach [Mon, 20 Feb 2012 11:13:56 +0000 (12:13 +0100)]
s3:winbindd/idmap_tdb: use idmap_tdb_common code

7 years agos3:winbindd/idmap_tdb2: fix logic error in set_mapping_action
Christian Ambach [Sun, 26 Feb 2012 16:49:23 +0000 (17:49 +0100)]
s3:winbindd/idmap_tdb2: fix logic error in set_mapping_action

fix an endless loop

7 years agos3:winbindd/idmap_tdb2: use idmap_tdb_common code
Christian Ambach [Fri, 17 Feb 2012 16:34:03 +0000 (17:34 +0100)]
s3:winbindd/idmap_tdb2: use idmap_tdb_common code

7 years agos3:winbindd/autorid use idmap_tdb_common code in autorid
Christian Ambach [Wed, 25 Jan 2012 18:06:16 +0000 (19:06 +0100)]
s3:winbindd/autorid use idmap_tdb_common code in autorid

- use common logic for the allocation pool
- add a idmap_tdb style 1on1 mapping for non-domain SIDs
  like Everyone (S-1-1-0)

7 years agos3:winbindd add idmap_tdb_common file to store common code of TDB idmap backends
Christian Ambach [Mon, 16 Jan 2012 16:21:38 +0000 (17:21 +0100)]
s3:winbindd add idmap_tdb_common file to store common code of TDB idmap backends

7 years agos3:util add sid_check_is_wellknown_builtin()
Christian Ambach [Tue, 17 Jan 2012 12:59:56 +0000 (13:59 +0100)]
s3:util add sid_check_is_wellknown_builtin()

7 years agomove VERSION to alpha21
Andrew Bartlett [Tue, 1 May 2012 04:42:33 +0000 (14:42 +1000)]
move VERSION to alpha21

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue May  1 08:16:38 CEST 2012 on sn-devel-104

7 years agoprepare WHATSNEW for alpha20 and mark as release samba-4.0.0alpha20
Andrew Bartlett [Tue, 1 May 2012 04:40:48 +0000 (14:40 +1000)]
prepare WHATSNEW for alpha20 and mark as release

7 years agos4-upgradedns: Update serverdn with only the attributes that have changed
Amitay Isaacs [Thu, 19 Apr 2012 23:39:53 +0000 (09:39 +1000)]
s4-upgradedns: Update serverdn with only the attributes that have changed

This fixes the issue of ldb 'Operations Error' when trying to modify
hasPartialReplicaNCs attribute.

Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Tue May  1 05:28:04 CEST 2012 on sn-devel-104

7 years agoFix bug #8873 - self granting privileges in security=ads.
Jeremy Allison [Tue, 17 Apr 2012 19:30:15 +0000 (12:30 -0700)]
Fix bug #8873 - self granting privileges in security=ads.

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue May  1 01:04:46 CEST 2012 on sn-devel-104

7 years agoFix the loop unrolling inside resolve_ads(). If we don't get
Jeremy Allison [Mon, 30 Apr 2012 18:05:51 +0000 (11:05 -0700)]
Fix the loop unrolling inside resolve_ads(). If we don't get
an IP list don't use interpret_string_addr(), as this only
returns one address, use interpret_string_addr_internal()
instead.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Apr 30 23:21:16 CEST 2012 on sn-devel-104

7 years agoProtect all of the name resolution methods from returning null addrs. Ensure all...
Jeremy Allison [Fri, 27 Apr 2012 23:25:58 +0000 (16:25 -0700)]
Protect all of the name resolution methods from returning null addrs. Ensure all returns go through remove_duplicate_addrs2().

7 years agoFix convert_ss2service() to filter out zero addresses.
Jeremy Allison [Fri, 27 Apr 2012 23:07:20 +0000 (16:07 -0700)]
Fix convert_ss2service() to filter out zero addresses.

7 years agoFix remove_duplicate_addrs2 to do exactly what it says. Previously it could leave...
Jeremy Allison [Fri, 27 Apr 2012 23:02:15 +0000 (16:02 -0700)]
Fix remove_duplicate_addrs2 to do exactly what it says. Previously it could leave zero addresses in the list.

7 years agos4:samldb LDB module - homogenize LDB search attributes arrays
Matthias Dieter Wallnöfer [Sat, 21 Apr 2012 15:32:48 +0000 (17:32 +0200)]
s4:samldb LDB module - homogenize LDB search attributes arrays

First they do not need to be "static" any longer since we have abandoned
asynchronous result handling (where global variables have been important).
In addition add some "const" in order to protect us from unwanted writes.

Reviewed-by: Andrew Bartlett
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Mon Apr 30 16:46:20 CEST 2012 on sn-devel-104

7 years agos4-libnet: Add mem_ctx to libnet_rpc_groupdel calls (bug #8889)
Andrew Bartlett [Mon, 30 Apr 2012 10:29:56 +0000 (20:29 +1000)]
s4-libnet: Add mem_ctx to libnet_rpc_groupdel calls (bug #8889)

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Apr 30 14:41:36 CEST 2012 on sn-devel-104

7 years agos4-libnet: Add mem_ctx to libnet_rpc_groupadd calls (bug #8889)
Andrew Bartlett [Mon, 30 Apr 2012 10:27:33 +0000 (20:27 +1000)]
s4-libnet: Add mem_ctx to libnet_rpc_groupadd calls (bug #8889)

7 years agos4-libnet: Add mem_ctx to libnet_rpc_usermod calls (bug #8889)
Andrew Bartlett [Mon, 30 Apr 2012 10:25:55 +0000 (20:25 +1000)]
s4-libnet: Add mem_ctx to libnet_rpc_usermod calls (bug #8889)

7 years agos4-libnet: Add mem_ctx to libnet_rpc_userdel calls (bug #8889)
Andrew Bartlett [Mon, 30 Apr 2012 10:23:07 +0000 (20:23 +1000)]
s4-libnet: Add mem_ctx to libnet_rpc_userdel calls (bug #8889)

7 years agos4-libnet: Add mem_ctx to libnet_rpc_useradd calls (bug #8889)
Andrew Bartlett [Mon, 30 Apr 2012 10:14:42 +0000 (20:14 +1000)]
s4-libnet: Add mem_ctx to libnet_rpc_useradd calls (bug #8889)

7 years agos4-libnet: Add mem_ctx to libnet_rpc_groupinfo calls (bug #8889)
Andrew Bartlett [Mon, 30 Apr 2012 10:09:58 +0000 (20:09 +1000)]
s4-libnet: Add mem_ctx to libnet_rpc_groupinfo calls (bug #8889)

7 years agos4-libnet: Add mem_ctx to libnet_DomainClose calls (bug #8889)
Andrew Bartlett [Mon, 30 Apr 2012 10:02:42 +0000 (20:02 +1000)]
s4-libnet: Add mem_ctx to libnet_DomainClose calls (bug #8889)

7 years agos4-libnet: Add mem_ctx to libnet_DomainOpen calls (bug #8889)
Andrew Bartlett [Mon, 30 Apr 2012 09:57:45 +0000 (19:57 +1000)]
s4-libnet: Add mem_ctx to libnet_DomainOpen calls (bug #8889)

7 years agos4-libnet: Add mem_ctx to libnet_Lookup calls (bug #8889)
Andrew Bartlett [Mon, 30 Apr 2012 09:35:25 +0000 (19:35 +1000)]
s4-libnet: Add mem_ctx to libnet_Lookup calls (bug #8889)

7 years agonet: Let get*sid return error from passdb init
Christof Schmitt [Tue, 24 Apr 2012 21:33:46 +0000 (14:33 -0700)]
net: Let get*sid return error from passdb init

When initialize_password_db returns an error this means that the SID
stored in the backend cannot be read. Return this error directly
instead of creating a random SID through get_global_sam_sid.

Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Mon Apr 30 13:07:20 CEST 2012 on sn-devel-104

7 years agopassdb: Do not panic in initialize_password_db
Christof Schmitt [Tue, 24 Apr 2012 21:42:28 +0000 (14:42 -0700)]
passdb: Do not panic in initialize_password_db

A call to initialize_password_db leads to smb_panic in case the backend
returns an error. All callers to initialize_password_db check the return
value, so this code path should return the status instead of calling
smb_panic.

Move the call to smb_panic from pdb_get_methods_reload pdb_get_methods
to get it out of the initialize code path.  This allows printing the
proper error message for 'net getlocalsid' which is much nicer than
printing the panic stack trace.

7 years agos3-auth_samba4: use new_server_id_task() to allocate server id values
Andrew Bartlett [Wed, 25 Apr 2012 07:40:35 +0000 (17:40 +1000)]
s3-auth_samba4: use new_server_id_task() to allocate server id values

This is rather than just picking a random number out of the air.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Apr 30 11:29:34 CEST 2012 on sn-devel-104

7 years agos3-lib Add a way to allocate the task_id value in server_id
Andrew Bartlett [Thu, 21 Jul 2011 06:29:38 +0000 (16:29 +1000)]
s3-lib Add a way to allocate the task_id value in server_id

This safely allocates the task_id so that when we have multiple event
contexts, they can each have their own messaging context, particularly
for the imessaging subsystem under source4.

Andrew Bartlett

7 years agos4-messaging: Fill in the whole server_id in all use cases
Andrew Bartlett [Mon, 30 Apr 2012 05:44:01 +0000 (15:44 +1000)]
s4-messaging: Fill in the whole server_id in all use cases

This started per https://bugzilla.samba.org/show_bug.cgi?id=8872#c4
and avoids any possible collision with a different process.

We also need to ensure that across a Samba installation on a single
node that id.vnn is the same.  Samba4 previously used 0, while Samba3
used NONCLUSTER_VNN.  When a message is sent between these 'different'
nodes, the error NT_STATUS_INVALID_DEVICE_REQUEST is raised.

Andrew Bartlett

7 years agos4-torture: convert samba3misc tests to use torture_failure and torture_assert
Andrew Bartlett [Mon, 30 Apr 2012 04:57:41 +0000 (14:57 +1000)]
s4-torture: convert samba3misc tests to use torture_failure and torture_assert

This helps us when these tests fail, as subunit-formatted failures can
be declared as knownfail entries, and show up correctly in the make
test output.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Apr 30 08:34:52 CEST 2012 on sn-devel-104

7 years agos4-torture: move samba3 tests to use torture helper functions
Andrew Bartlett [Mon, 30 Apr 2012 04:15:12 +0000 (14:15 +1000)]
s4-torture: move samba3 tests to use torture helper functions

7 years agos4-torture: Move various samba3 tests to the torture_suite_add_1smb_test wrapper
Andrew Bartlett [Mon, 30 Apr 2012 04:05:19 +0000 (14:05 +1000)]
s4-torture: Move various samba3 tests to the torture_suite_add_1smb_test wrapper

7 years agos4:samldb LDB module - implement "fSMORoleOwner" attribute protection
Matthias Dieter Wallnöfer [Sat, 21 Apr 2012 16:16:43 +0000 (18:16 +0200)]
s4:samldb LDB module - implement "fSMORoleOwner" attribute protection

This is a very essential attribute since it references to various domain
master roles (PDC emulator, schema...) depending on which entry it has
been set. Incautious modifications can cause severe problems.

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Apr 30 02:04:24 CEST 2012 on sn-devel-104

7 years agos4:dsdb/common/util.c - samdb_is_pdc() - fail if the "fSMORoleOwner" attribute has...
Matthias Dieter Wallnöfer [Fri, 20 Apr 2012 16:15:23 +0000 (18:15 +0200)]
s4:dsdb/common/util.c - samdb_is_pdc() - fail if the "fSMORoleOwner" attribute has not been set

7 years agoAdd some debug for FOOBAR return case as they are hard to diagnose
Matthieu Patou [Sun, 29 Apr 2012 05:12:40 +0000 (22:12 -0700)]
Add some debug for FOOBAR return case as they are hard to diagnose

Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Sun Apr 29 09:08:15 CEST 2012 on sn-devel-104

7 years agodsdb: more RELAX to DBCHECK control shift so that only dbcheck can do uncontrolled...
Matthieu Patou [Sun, 29 Apr 2012 04:51:12 +0000 (21:51 -0700)]
dsdb: more RELAX to DBCHECK control shift so that only dbcheck can do uncontrolled changes

7 years agodsdb: change control from relax to dbcheck
Matthieu Patou [Sat, 28 Apr 2012 22:55:06 +0000 (15:55 -0700)]
dsdb: change control from relax to dbcheck

Comment indicate that this is needed by dbcheck only and it permits
other projects to push broken schema and remain undetected

7 years agodns server: move very verbose debug to higher level 2 -> 8
Matthieu Patou [Sat, 28 Apr 2012 22:53:41 +0000 (15:53 -0700)]
dns server: move very verbose debug to higher level 2 -> 8

7 years agos3: Remove a SMB_ASSERT
Volker Lendecke [Sat, 28 Apr 2012 17:55:31 +0000 (19:55 +0200)]
s3: Remove a SMB_ASSERT

Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Sat Apr 28 23:38:45 CEST 2012 on sn-devel-104

7 years agos3: Fix bug 8904 -- wbinfo --lookup-sids "" crashes winbind
Volker Lendecke [Sat, 28 Apr 2012 17:51:46 +0000 (19:51 +0200)]
s3: Fix bug 8904 -- wbinfo --lookup-sids "" crashes winbind

Much of the code further down and up the call chain expects the
structures wb_lookupsids returns to be allocated. Do that despite
we have nothing to look up.

7 years agoAdd an audit file VFS routine so we can handle auditing with SACLs.
Richard Sharpe [Sat, 28 Apr 2012 04:31:34 +0000 (21:31 -0700)]
Add an audit file VFS routine so we can handle auditing with SACLs.

Autobuild-User: Richard Sharpe <sharpe@samba.org>
Autobuild-Date: Sat Apr 28 08:05:00 CEST 2012 on sn-devel-104

7 years agos4:torture: add a check for talloc success in rpc.samba3.randomauth2
Michael Adam [Fri, 27 Apr 2012 22:35:56 +0000 (00:35 +0200)]
s4:torture: add a check for talloc success in rpc.samba3.randomauth2

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Sat Apr 28 02:10:39 CEST 2012 on sn-devel-104

7 years agos4:torture: add a check for talloc success in the rpc.samba3 suite
Michael Adam [Fri, 27 Apr 2012 22:34:36 +0000 (00:34 +0200)]
s4:torture: add a check for talloc success in the rpc.samba3 suite

7 years agos4:torture: add a rpc.samba3.smb2-reauth2 test
Michael Adam [Fri, 27 Apr 2012 22:31:57 +0000 (00:31 +0200)]
s4:torture: add a rpc.samba3.smb2-reauth2 test

like smb-reauth2, only for smb2

7 years agos4:torture: add a rpc.samba3.smb2-reauth1 test
Michael Adam [Fri, 27 Apr 2012 14:20:38 +0000 (16:20 +0200)]
s4:torture: add a rpc.samba3.smb2-reauth1 test

7 years agos4:librpc: create a binding on the pipe if necessary in dcerpc_pipe_open_smb2_send()
Stefan Metzmacher [Fri, 27 Apr 2012 14:18:47 +0000 (16:18 +0200)]
s4:librpc: create a binding on the pipe if necessary in dcerpc_pipe_open_smb2_send()

Pair-Programmed-With: Michael Adam <obnox@samba.org>

7 years agoselftest: Add test to ensure that bug #8872 does not come back
Andrew Bartlett [Fri, 27 Apr 2012 02:52:54 +0000 (12:52 +1000)]
selftest: Add test to ensure that bug #8872 does not come back

The raw.composite test checks that we handle mutliple concurrent connections.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri Apr 27 16:25:37 CEST 2012 on sn-devel-104

7 years agoselftest: Place the test environment at the end of the failure lines
Andrew Bartlett [Fri, 27 Apr 2012 02:50:36 +0000 (12:50 +1000)]
selftest: Place the test environment at the end of the failure lines

This allows a knownfail entry to be added for only one environment, rather than
all environments.

Andrew Bartlett

7 years agoselftest: Remove silly space before unit test name
Andrew Bartlett [Fri, 27 Apr 2012 02:49:14 +0000 (12:49 +1000)]
selftest: Remove silly space before unit test name

When we have no description, there is no need for a leading space here

Andrew Bartlett

7 years agos3:winbindd: also try SMB2 when connecting to "IPC$"
Stefan Metzmacher [Thu, 26 Apr 2012 10:06:21 +0000 (12:06 +0200)]
s3:winbindd: also try SMB2 when connecting to "IPC$"

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Apr 27 13:10:15 CEST 2012 on sn-devel-104

7 years agos3:libsmb/cli_np_tstream: add support for SMB2
Stefan Metzmacher [Wed, 25 Apr 2012 18:18:22 +0000 (20:18 +0200)]
s3:libsmb/cli_np_tstream: add support for SMB2

metze

7 years agos3:libsmb/cli_np_tstream: remove unused tstream_cli_np_existing()
Stefan Metzmacher [Thu, 26 Apr 2012 12:05:40 +0000 (14:05 +0200)]
s3:libsmb/cli_np_tstream: remove unused tstream_cli_np_existing()

metze

7 years agos3:libsmb: add smb2cli_ioctl*
Stefan Metzmacher [Wed, 21 Dec 2011 10:04:43 +0000 (11:04 +0100)]
s3:libsmb: add smb2cli_ioctl*

metze

7 years agolibcli/smb: move SMB2_IOCTL_FLAG_IS_FSCTL to smb2_constants.h
Stefan Metzmacher [Thu, 26 Apr 2012 07:35:34 +0000 (09:35 +0200)]
libcli/smb: move SMB2_IOCTL_FLAG_IS_FSCTL to smb2_constants.h

metze

7 years agos4:ntvfs/ipc: don't echo back the smb2 ioctl input_buffer
Stefan Metzmacher [Thu, 26 Apr 2012 10:05:24 +0000 (12:05 +0200)]
s4:ntvfs/ipc: don't echo back the smb2 ioctl input_buffer

metze

7 years agos3: oplock_timeout is a talloc child of fsp
Volker Lendecke [Thu, 26 Apr 2012 16:57:01 +0000 (18:57 +0200)]
s3: oplock_timeout is a talloc child of fsp

Jeremy, I know you like it explicit, but I stumbled across this
explicit TALLOC_FREE and asked myself about a potentially wrong
talloc hierarchy.

Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Thu Apr 26 23:00:03 CEST 2012 on sn-devel-104

7 years agos3: Remove code TALLOC_FREE already does
Volker Lendecke [Thu, 26 Apr 2012 16:54:37 +0000 (18:54 +0200)]
s3: Remove code TALLOC_FREE already does

7 years agotorture: change dfs tests now that we return a level 4 when level 4 is requested
Matthieu Patou [Thu, 26 Apr 2012 07:05:24 +0000 (00:05 -0700)]
torture: change dfs tests now that we return a level 4 when level 4 is requested

Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Thu Apr 26 21:25:37 CEST 2012 on sn-devel-104

7 years agodfs_server: fix the response to please XP and Windows 2008R2 doing so avoid continiou...
Matthieu Patou [Tue, 24 Apr 2012 07:24:39 +0000 (00:24 -0700)]
dfs_server: fix the response to please XP and Windows 2008R2 doing so avoid continious DFS requests from W2K8R2

7 years agoreplace: Fix use of mktemp
Simo Sorce [Wed, 25 Apr 2012 22:55:46 +0000 (18:55 -0400)]
replace: Fix use of mktemp

mktemp always returns the template, so checking for NULL doesn't cactch any
error. Errors are reported by turning the template into an empty string.

Autobuild-User: Simo Sorce <idra@samba.org>
Autobuild-Date: Thu Apr 26 16:14:24 CEST 2012 on sn-devel-104

7 years agoaddns: clean up headers
Simo Sorce [Wed, 25 Apr 2012 13:47:47 +0000 (09:47 -0400)]
addns: clean up headers

All this stuff is already included properly in the replace headers on top.

7 years agos3: Remove an unused variable
Volker Lendecke [Thu, 26 Apr 2012 08:42:38 +0000 (10:42 +0200)]
s3: Remove an unused variable

Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Thu Apr 26 12:17:14 CEST 2012 on sn-devel-104

7 years agos4-torture: never return false in the raw.composite torture test
Andrew Bartlett [Thu, 26 Apr 2012 00:13:37 +0000 (10:13 +1000)]
s4-torture: never return false in the raw.composite torture test

We must use torture_assert() macros to ensure that the failure is
recorded in the subunit stream correctly, rather than being returned
as an unknown 'error'.  (We cannot handle error results as knownfail).

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Apr 26 04:00:16 CEST 2012 on sn-devel-104

7 years agoselftest: push --target selection into plansmbtorturetestsuite
Andrew Bartlett [Wed, 25 Apr 2012 22:27:37 +0000 (08:27 +1000)]
selftest: push --target selection into plansmbtorturetestsuite

7 years agos4:torture: add a rpc.samba3.smb-reauth2 test
Michael Adam [Wed, 25 Apr 2012 14:38:56 +0000 (16:38 +0200)]
s4:torture: add a rpc.samba3.smb-reauth2 test

* Open session.
* Reauth to anon.
* Open lsa pipe.
* Do lsa get username.
* Rauth to original user.
* Do lsa get username again.

expected result: the getusername works and
shows 'NT AUTHORITY\ANONYMOUS LOGON' in both calls.

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Thu Apr 26 02:27:12 CEST 2012 on sn-devel-104

7 years agos4:torture: add a rpc.samba3.smb-reauth1 test
Michael Adam [Tue, 24 Apr 2012 11:30:41 +0000 (13:30 +0200)]
s4:torture: add a rpc.samba3.smb-reauth1 test

It does reauth while using an rpc pipe:

* open session
* open lsa pipe
* do lsa getusername
* reauth to anonymous
* do lsa getusername again
* reauth back to original user
* do reauth again

result: lsa getusername is always possible
and always gives the first (authenticated user)

7 years agos4:torture: add a raw.session suite with a raw.session.reauth test
Gregor Beck [Wed, 7 Mar 2012 12:53:24 +0000 (13:53 +0100)]
s4:torture: add a raw.session suite with a raw.session.reauth test

Signed-off-by: Michael Adam <obnox@samba.org>
7 years agoFix bug reported by Dina_Fine@Dell.com.
Jeremy Allison [Wed, 25 Apr 2012 18:28:37 +0000 (11:28 -0700)]
Fix bug reported by Dina_Fine@Dell.com.

Don't ask the DC for an IP list when locating kdc's. Ask for the
name and use getaddrinfo to get all possible addresses instead.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Apr 25 22:01:18 CEST 2012 on sn-devel-104

7 years agolibcli: Use data_blob_null
Volker Lendecke [Wed, 25 Apr 2012 09:49:56 +0000 (11:49 +0200)]
libcli: Use data_blob_null

Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Wed Apr 25 18:54:51 CEST 2012 on sn-devel-104

7 years agoselftest: remove printserver.enum_printers_servername from flapping
Michael Adam [Mon, 23 Apr 2012 23:02:29 +0000 (01:02 +0200)]
selftest: remove printserver.enum_printers_servername from flapping

Signed-off-by: Andreas Schneider <asn@samba.org>
Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Wed Apr 25 17:18:28 CEST 2012 on sn-devel-104

7 years agoselftest: remove samba3.rpc.spoolss.*printserver.openprinter_badnamelist from flapping
Michael Adam [Mon, 23 Apr 2012 23:02:03 +0000 (01:02 +0200)]
selftest: remove samba3.rpc.spoolss.*printserver.openprinter_badnamelist from flapping

Signed-off-by: Andreas Schneider <asn@samba.org>
7 years agoselftest: mark the driver_info_winreg tests knownfail.
Michael Adam [Mon, 23 Apr 2012 22:36:03 +0000 (00:36 +0200)]
selftest: mark the driver_info_winreg tests knownfail.

They only get executed when driver files are around.

Signed-off-by: Andreas Schneider <asn@samba.org>
7 years agoselftest: mark failing print_tests more specifically
Michael Adam [Mon, 23 Apr 2012 22:28:48 +0000 (00:28 +0200)]
selftest: mark failing print_tests more specifically

Signed-off-by: Andreas Schneider <asn@samba.org>
7 years agoselftest: remove .*printer.*print_test_extended from flapping
Michael Adam [Mon, 16 Apr 2012 11:55:26 +0000 (13:55 +0200)]
selftest: remove .*printer.*print_test_extended from flapping

Signed-off-by: Andreas Schneider <asn@samba.org>
7 years agoselftest: remove the "rpc.spoolss.printer" test from flapping
Michael Adam [Mon, 23 Apr 2012 15:10:34 +0000 (17:10 +0200)]
selftest: remove the "rpc.spoolss.printer" test from flapping

Signed-off-by: Andreas Schneider <asn@samba.org>
7 years agos3:registry: replace call to reg_openkey() in reg_createkey() by accesscheck.
Michael Adam [Mon, 23 Apr 2012 14:44:15 +0000 (16:44 +0200)]
s3:registry: replace call to reg_openkey() in reg_createkey() by accesscheck.

Signed-off-by: Andreas Schneider <asn@samba.org>
7 years agos3:registry: remove a superfluous fill_subkey_cache() in reg_createkey()
Michael Adam [Mon, 23 Apr 2012 14:13:29 +0000 (16:13 +0200)]
s3:registry: remove a superfluous fill_subkey_cache() in reg_createkey()

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>

Signed-off-by: Andreas Schneider <asn@samba.org>
7 years agos3:registry: use fill_subkey_cache to check exsistence in regkey_open_onelevel().
Michael Adam [Mon, 23 Apr 2012 14:07:21 +0000 (16:07 +0200)]
s3:registry: use fill_subkey_cache to check exsistence in regkey_open_onelevel().

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>

Signed-off-by: Andreas Schneider <asn@samba.org>
7 years agos3:registry: let fill_subkey_cache return WERR_BADFILE when the subkey list could...
Michael Adam [Mon, 23 Apr 2012 14:05:33 +0000 (16:05 +0200)]
s3:registry: let fill_subkey_cache return WERR_BADFILE when the subkey list could not be loaded

WERR_NO_MORE_ITEMS seems inappropriate.

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>

Signed-off-by: Andreas Schneider <asn@samba.org>
7 years agos3:registry: convert reg_openkey() to use talloc instead of SMB_STRDUP etc
Michael Adam [Mon, 23 Apr 2012 13:47:33 +0000 (15:47 +0200)]
s3:registry: convert reg_openkey() to use talloc instead of SMB_STRDUP etc

Signed-off-by: Andreas Schneider <asn@samba.org>
7 years agos3:registry untangle an assignment from the check in regkey_open_onelevel()
Michael Adam [Mon, 23 Apr 2012 13:30:38 +0000 (15:30 +0200)]
s3:registry untangle an assignment from the check in regkey_open_onelevel()

Signed-off-by: Andreas Schneider <asn@samba.org>
7 years agos3:registry: untangle assignment from check in regkey_open_onelevel()
Michael Adam [Mon, 23 Apr 2012 13:29:41 +0000 (15:29 +0200)]
s3:registry: untangle assignment from check in regkey_open_onelevel()

Signed-off-by: Andreas Schneider <asn@samba.org>
7 years agos3:registry: fix seqnum race in regdb_fetch_keys_internal
Michael Adam [Wed, 11 Apr 2012 13:51:40 +0000 (15:51 +0200)]
s3:registry: fix seqnum race in regdb_fetch_keys_internal

This prevents race between fetching seqnum and key content.

Because there is currently no way to atomically fetch the
record along with the seqnum, I use a loop.
This is far from optimal and should should ideally be done
differently. But for now it fixes the race.

Signed-off-by: Andreas Schneider <asn@samba.org>
7 years agos3:registry: fix seqnum race in fetch_values_internal
Michael Adam [Wed, 11 Apr 2012 13:48:02 +0000 (15:48 +0200)]
s3:registry: fix seqnum race in fetch_values_internal

This prevents race between fetching seqnum and key content.

Because there is currently no way to atomically fetch the
record along with the seqnum, I use a loop.
This is far from optimal and should should ideally be done
differently. But for now it fixes the race.

Signed-off-by: Andreas Schneider <asn@samba.org>
7 years agos3:registry: update the seqnum in the subkey cache at the end of regval_store_keys
Michael Adam [Wed, 11 Apr 2012 14:02:44 +0000 (16:02 +0200)]
s3:registry: update the seqnum in the subkey cache at the end of regval_store_keys

The purpose is to prevent next reads from going to disk.

Note that this will currently only be effective with local tdbs, not
with ctdb: For tdb, store and delete bump the seqnum while transaction
commit does not. For ctdb, transaction commit bumps the seqnum, while
store and delete don't... This needs fixing (in ctdb).

Signed-off-by: Andreas Schneider <asn@samba.org>
7 years agos3:registry:db: update the value container seqnum after storing/deleting to prevent...
Michael Adam [Wed, 11 Apr 2012 13:38:29 +0000 (15:38 +0200)]
s3:registry:db: update the value container seqnum after storing/deleting to prevent next read from going to disk if possible

Note that this will currently only be effective in the local TDB implementation.
For CTDB, this wont work since seqnum currently works differently there (needs
fixing): For tdb, store and delete operations bump the db seqnum, while
transaction commits don't. For ctdb, the seqnum is bumped by the transaction
commit but not by store and delete operations.

Signed-off-by: Andreas Schneider <asn@samba.org>
7 years agos3:registry: wrap reg_deletekey() into a transaction
Michael Adam [Thu, 12 Apr 2012 20:53:24 +0000 (22:53 +0200)]
s3:registry: wrap reg_deletekey() into a transaction

This is wrong layering but fixes a race condition.

Signed-off-by: Andreas Schneider <asn@samba.org>