nivanova/samba-autobuild/.git
11 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)

11 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

11 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.

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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.

11 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

11 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

11 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

11 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

11 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

11 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>

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

12 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

12 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

12 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

12 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

12 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

12 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.

12 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

12 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

12 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

12 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

12 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)

12 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>
12 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

12 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

12 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

12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 years agos3:registry: wrap reg_createkey() in a transaction
Michael Adam [Thu, 12 Apr 2012 20:17:35 +0000 (22:17 +0200)]
s3:registry: wrap reg_createkey() in a transaction

This is wrong layering (calling into regdb_transaction* in the reg_api code)
but fixes a potential race. It makes the multi-step create procedure atomic.

This should completely be done in the backend.

Signed-off-by: Andreas Schneider <asn@samba.org>
12 years agos3:registry: untangle assignments from checks in reg_createkey()
Michael Adam [Thu, 12 Apr 2012 15:58:26 +0000 (17:58 +0200)]
s3:registry: untangle assignments from checks in reg_createkey()

Signed-off-by: Andreas Schneider <asn@samba.org>
12 years agos3:registry: wrap reg_deletevalue() in a transaction
Michael Adam [Thu, 12 Apr 2012 15:52:43 +0000 (17:52 +0200)]
s3:registry: wrap reg_deletevalue() in a transaction

This is at the wrong layer, but if fixes a race potentially causing
data corruption by concurrent access.

Signed-off-by: Andreas Schneider <asn@samba.org>
12 years agos3:registry: untangle assignment from check in reg_deletevalue()
Michael Adam [Thu, 12 Apr 2012 15:46:02 +0000 (17:46 +0200)]
s3:registry: untangle assignment from check in reg_deletevalue()

Signed-off-by: Andreas Schneider <asn@samba.org>
12 years agos3:registry: fix race in reg_setvalue that could lead to data corruption
Michael Adam [Thu, 12 Apr 2012 11:38:32 +0000 (13:38 +0200)]
s3:registry: fix race in reg_setvalue that could lead to data corruption

(there was no lock around fetching the values and storing them)

The layering is wrong in that it uses regdb transactions in reg_api

Signed-off-by: Andreas Schneider <asn@samba.org>
12 years agos3:registry: untangle assignment from check and add a debugmessage in reg_setvalue()
Michael Adam [Fri, 20 Apr 2012 13:19:47 +0000 (15:19 +0200)]
s3:registry: untangle assignment from check and add a debugmessage in reg_setvalue()

Signed-off-by: Andreas Schneider <asn@samba.org>
12 years agos3:registry: don't leak the old contents when updating the value cache
Michael Adam [Thu, 12 Apr 2012 06:18:04 +0000 (08:18 +0200)]
s3:registry: don't leak the old contents when updating the value cache

Signed-off-by: Andreas Schneider <asn@samba.org>
12 years agos3:registry: fix debug message in regdb_store_values_internal()
Michael Adam [Fri, 30 Mar 2012 13:39:58 +0000 (15:39 +0200)]
s3:registry: fix debug message in regdb_store_values_internal()

Signed-off-by: Andreas Schneider <asn@samba.org>
12 years agos3:registry: improve log message in regdb_unpack_values()
Michael Adam [Fri, 30 Mar 2012 13:35:14 +0000 (15:35 +0200)]
s3:registry: improve log message in regdb_unpack_values()

Signed-off-by: Andreas Schneider <asn@samba.org>
12 years agos3:registry: fix a debug message typo
Michael Adam [Fri, 30 Mar 2012 13:14:01 +0000 (15:14 +0200)]
s3:registry: fix a debug message typo

Signed-off-by: Andreas Schneider <asn@samba.org>
12 years agos3:registry: add a new function regval_ctr_value_byname()
Michael Adam [Fri, 30 Mar 2012 12:39:50 +0000 (14:39 +0200)]
s3:registry: add a new function regval_ctr_value_byname()

This is like regval_ctr_key_exists() but does not return bool,
but the regval_blob instead, if found, and NULL if not found.

Signed-off-by: Andreas Schneider <asn@samba.org>
12 years agos3:registry: rename regval_ctr_key_exists() to regval_ctr_value_exists()
Michael Adam [Fri, 30 Mar 2012 12:33:39 +0000 (14:33 +0200)]
s3:registry: rename regval_ctr_key_exists() to regval_ctr_value_exists()

Signed-off-by: Andreas Schneider <asn@samba.org>
12 years agos4:torture:rpc:spoolss: also initialize driverName before checking it in test_Printer...
Michael Adam [Thu, 29 Mar 2012 23:00:51 +0000 (01:00 +0200)]
s4:torture:rpc:spoolss: also initialize driverName before checking it in test_PrinterData_DsSpooler()

Signed-off-by: Andreas Schneider <asn@samba.org>
12 years agos3:registry:reg_api: fix reg_queryvalue to not fail when values are modified while...
Michael Adam [Thu, 29 Mar 2012 22:10:14 +0000 (00:10 +0200)]
s3:registry:reg_api: fix reg_queryvalue to not fail when values are modified while it runs

Signed-off-by: Andreas Schneider <asn@samba.org>
12 years agos3:registry: make regdb_values_need_update() static
Michael Adam [Fri, 20 Apr 2012 12:23:44 +0000 (14:23 +0200)]
s3:registry: make regdb_values_need_update() static

Signed-off-by: Andreas Schneider <asn@samba.org>
12 years agos3:registry: make regdb_subkeys_need_update() static
Michael Adam [Fri, 20 Apr 2012 12:22:27 +0000 (14:22 +0200)]
s3:registry: make regdb_subkeys_need_update() static

Signed-off-by: Andreas Schneider <asn@samba.org>
12 years agos3:registry: make regdb_store_values() static
Michael Adam [Fri, 20 Apr 2012 12:21:16 +0000 (14:21 +0200)]
s3:registry: make regdb_store_values() static

Signed-off-by: Andreas Schneider <asn@samba.org>
12 years agos3:registry: make regdb_fetch_values() static
Michael Adam [Fri, 20 Apr 2012 12:19:56 +0000 (14:19 +0200)]
s3:registry: make regdb_fetch_values() static

Signed-off-by: Andreas Schneider <asn@samba.org>
12 years agos3:registry: make regdb_fetch_keys() static
Michael Adam [Fri, 20 Apr 2012 12:18:39 +0000 (14:18 +0200)]
s3:registry: make regdb_fetch_keys() static

Signed-off-by: Andreas Schneider <asn@samba.org>
12 years agos3:registry: make regdb_store_keys() static
Michael Adam [Fri, 20 Apr 2012 12:10:54 +0000 (14:10 +0200)]
s3:registry: make regdb_store_keys() static

Signed-off-by: Andreas Schneider <asn@samba.org>
12 years agos3:registry: printing backend: use regdb options via ops struct, not directly
Michael Adam [Fri, 20 Apr 2012 12:07:30 +0000 (14:07 +0200)]
s3:registry: printing backend: use regdb options via ops struct, not directly

just like the other backends.

This is in preparation of making the backend functions private

Signed-off-by: Andreas Schneider <asn@samba.org>
12 years agos3:registry: remove usage of reg_objects from net_rpc_printer.c
Gregor Beck [Thu, 19 Apr 2012 13:40:40 +0000 (15:40 +0200)]
s3:registry: remove usage of reg_objects from net_rpc_printer.c

Signed-off-by: Andreas Schneider <asn@samba.org>
12 years agos3:registry: remove usage of reg_objects from cmd_spoolss.c
Gregor Beck [Thu, 19 Apr 2012 12:00:36 +0000 (14:00 +0200)]
s3:registry: remove usage of reg_objects from cmd_spoolss.c

Signed-off-by: Andreas Schneider <asn@samba.org>
12 years agos3:eventlogadm make a transaction for addsource
Gregor Beck [Thu, 19 Apr 2012 11:32:26 +0000 (13:32 +0200)]
s3:eventlogadm make a transaction for addsource

Signed-off-by: Andreas Schneider <asn@samba.org>
12 years agos3:eventlogadm reimplement addsource using reg_api
Gregor Beck [Thu, 19 Apr 2012 11:30:40 +0000 (13:30 +0200)]
s3:eventlogadm reimplement addsource using reg_api

Signed-off-by: Andreas Schneider <asn@samba.org>
12 years agos3-waf: Cleanup smbregistry.
Andreas Schneider [Wed, 25 Apr 2012 12:15:42 +0000 (14:15 +0200)]
s3-waf: Cleanup smbregistry.

12 years agos3:registry: remove usage of reg_objects from srv_spoolss_nt.c
Gregor Beck [Wed, 18 Apr 2012 14:16:05 +0000 (16:16 +0200)]
s3:registry: remove usage of reg_objects from srv_spoolss_nt.c

Signed-off-by: Andreas Schneider <asn@samba.org>
12 years agos3:registry: remove usage of reg_objects from libads/ldap_printer.c
Gregor Beck [Wed, 18 Apr 2012 14:06:07 +0000 (16:06 +0200)]
s3:registry: remove usage of reg_objects from libads/ldap_printer.c

Signed-off-by: Andreas Schneider <asn@samba.org>
12 years agos4-messaging: Use generate_random() to get a unique ID for messaging clients
Andrew Bartlett [Wed, 25 Apr 2012 07:53:18 +0000 (17:53 +1000)]
s4-messaging: Use generate_random() to get a unique ID for messaging clients

The call to random() resulted in duplicate values for s3fs configurations
which, due to the forked child, all started with the same random seed.

A future improvement would be to move to a proven unique value.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Apr 25 11:43:40 CEST 2012 on sn-devel-104

12 years agos4-torture: enable raw.composite test again, and convert to new style test
Andrew Bartlett [Wed, 25 Apr 2012 06:26:50 +0000 (16:26 +1000)]
s4-torture: enable raw.composite test again, and convert to new style test

This test has been skipped for some time, but is an important test for parallel operation.

Andrew Bartlett

12 years agolib/replace: split out GSSAPI from lib/replace/system/kerberos.h into lib/replace...
Alexander Bokovoy [Tue, 24 Apr 2012 16:37:13 +0000 (19:37 +0300)]
lib/replace: split out GSSAPI from lib/replace/system/kerberos.h into lib/replace/system/gssapi.h

With waf build include directories are defined by dependencies specified to subsystems.
Without proper dependency <gssapi/gssapi.h> cannot be found for embedded Heimdal builds
when there are no system-wide gssapi/gssapi.h available.

Split out GSSAPI header includes in a separate replacement header and use that explicitly
where needed.

Autobuild-User: Alexander Bokovoy <ab@samba.org>
Autobuild-Date: Wed Apr 25 00:18:33 CEST 2012 on sn-devel-104

12 years agos3: Simplify check_reduced_name a bit
Volker Lendecke [Tue, 24 Apr 2012 12:23:11 +0000 (14:23 +0200)]
s3: Simplify check_reduced_name a bit

It's pointless to do a talloc_asprintf with a SMB_STRDUP on the
result. Use asprintf directly.

Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Tue Apr 24 18:18:05 CEST 2012 on sn-devel-104

12 years agos3: Fix a typo
Volker Lendecke [Tue, 24 Apr 2012 12:07:00 +0000 (14:07 +0200)]
s3: Fix a typo

12 years agos3: Introduce variable "indyniov" for easier reading
Volker Lendecke [Tue, 24 Apr 2012 10:58:23 +0000 (12:58 +0200)]
s3: Introduce variable "indyniov" for easier reading

12 years agos4:libnet: pass an explicit mem_ctx to libnet_rpc_userinfo_send() (bug #8889)
Stefan Metzmacher [Tue, 24 Apr 2012 11:49:52 +0000 (13:49 +0200)]
s4:libnet: pass an explicit mem_ctx to libnet_rpc_userinfo_send() (bug #8889)

This hopefully fixes the flakey autobuild.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Apr 24 16:43:03 CEST 2012 on sn-devel-104

12 years agos3: Attempt to fix the build without kerberos
Volker Lendecke [Tue, 24 Apr 2012 11:24:29 +0000 (13:24 +0200)]
s3: Attempt to fix the build without kerberos

Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Tue Apr 24 15:04:14 CEST 2012 on sn-devel-104