sfrench/samba-autobuild/.git
8 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.

8 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

8 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

8 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

8 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

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

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

8 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

8 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

8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 years agos3-waf: Cleanup smbregistry.
Andreas Schneider [Wed, 25 Apr 2012 12:15:42 +0000 (14:15 +0200)]
s3-waf: Cleanup smbregistry.

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

8 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

8 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

8 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

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

8 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

8 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

8 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

8 years agos3: Fix Coverity ID 2751: REVERSE_INULL
Volker Lendecke [Tue, 24 Apr 2012 10:25:59 +0000 (12:25 +0200)]
s3: Fix Coverity ID 2751: REVERSE_INULL

8 years agotalloc: Fix copy&paste errors
Volker Lendecke [Tue, 24 Apr 2012 08:28:29 +0000 (10:28 +0200)]
talloc: Fix copy&paste errors

8 years agoTalloc doc: talloc_strdup_append does not return duplicated string
Pavel Březina [Fri, 20 Apr 2012 12:32:01 +0000 (14:32 +0200)]
Talloc doc: talloc_strdup_append does not return duplicated string

8 years agoTalloc doc: when s == NULL in _append functions
Pavel Březina [Fri, 20 Apr 2012 12:29:59 +0000 (14:29 +0200)]
Talloc doc: when s == NULL in _append functions

8 years agos4-s3upgrade: print the error message from passdb.error exceptions
Andrew Bartlett [Tue, 24 Apr 2012 00:01:01 +0000 (10:01 +1000)]
s4-s3upgrade: print the error message from passdb.error exceptions

This gives more information on why a group membership lookup failed.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Apr 24 04:34:44 CEST 2012 on sn-devel-104

8 years agoFix pam_winbind build against newer iniparser library
Simo Sorce [Mon, 23 Apr 2012 21:23:35 +0000 (17:23 -0400)]
Fix pam_winbind build against newer iniparser library

iniparser_getstr is deprecated and has been removed in newer libraries
available in Fedora. Use iniparse_getstring instead.

Autobuild-User: Simo Sorce <idra@samba.org>
Autobuild-Date: Tue Apr 24 02:56:10 CEST 2012 on sn-devel-104

8 years agoAvoid warning about KRB5_DEPRECATE with MIT libs
Simo Sorce [Sun, 22 Apr 2012 23:05:31 +0000 (19:05 -0400)]
Avoid warning about KRB5_DEPRECATE with MIT libs

8 years agoCracknames: use krb wrapper functions so it works with MIT
Simo Sorce [Sat, 21 Apr 2012 20:55:35 +0000 (16:55 -0400)]
Cracknames: use krb wrapper functions so it works with MIT

Also avoid a silly game with directly modifying the principal and
then calling krb5_principal_unparse_flags to get out a string.
If we already assume it is a 2 components name and know what outcome we are
going to get, just go ahead and talloc_asprintf the linearized string.

8 years agokrb5_samba: Add support for krb5_princ_size when using Heimdal
Simo Sorce [Mon, 23 Apr 2012 01:38:29 +0000 (21:38 -0400)]
krb5_samba: Add support for krb5_princ_size when using Heimdal

8 years agoMake krb5 wrapper library common so they can be used all over
Simo Sorce [Sat, 21 Apr 2012 21:26:18 +0000 (17:26 -0400)]
Make krb5 wrapper library common so they can be used all over

8 years agoFor now just disable this Heindal specific stuff in the MIT build
Simo Sorce [Sat, 21 Apr 2012 20:35:48 +0000 (16:35 -0400)]
For now just disable this Heindal specific stuff in the MIT build

8 years agoMake krb5 context initialization not heimdal specific
Simo Sorce [Fri, 20 Apr 2012 17:14:30 +0000 (13:14 -0400)]
Make krb5 context initialization not heimdal specific

Turn the logging data to an opaque pointer.
Ifdef code and use MIT logging function when built against system MIT.

8 years agoMake sure krb5_principal_get_num_comp is identified as present for Heimdal build
Alexander Bokovoy [Mon, 23 Apr 2012 12:01:07 +0000 (15:01 +0300)]
Make sure krb5_principal_get_num_comp is identified as present for Heimdal build

Common wrappers for MIT / Heimdal use krb5_principal_get_num_comp() to replace krb5_princ_size
but rely on krb5_principal_get_num_comp() identified by the build. As we know it exists in Heimdal,
define it for waf build.

Signed-off-by: Simo Sorce <idra@samba.org>
8 years agowaf: rename SAMBA4_INTERNAL_HEIMDAL to SAMBA4_USES_HEIMDAL
Alexander Bokovoy [Fri, 20 Apr 2012 17:22:39 +0000 (20:22 +0300)]
waf: rename SAMBA4_INTERNAL_HEIMDAL to SAMBA4_USES_HEIMDAL

SAMBA4_INTERNAL_HEIMDAL is defined unconditionally regardless
where Heimdal comes from, system-wide or embedded version.

This define is not used anywhere. We'll use it to distinguish
between Heimdal and MIT Krb5 builds.

Signed-off-by: Simo Sorce <idra@samba.org>
8 years agowaf: move krb5 checks to a separate waf file
Alexander Bokovoy [Fri, 20 Apr 2012 09:53:11 +0000 (12:53 +0300)]
waf: move krb5 checks to a separate waf file

With PROCESS_SEPARATE_RULE in wafsamba it is now possible to simplify
configuration and checks for MIT/Heimdal Kerberos implementations.

1. Move MIT krb5 checks from source3/wscript to wscript_configure_krb5
2. Make sure they are called same way (--with-mit-krb5-checks)
3. If no configure checks identified MIT krb5 in system (or were disabled),
   make sure Heimdal build is selected, embedded (default) or system-provided.

This makes logic of configuration unchanged for Heimdal builds but adds
less hacky way to use MIT krb5 builds. The latter does not work yet as we
need to untangle more subsystems from HDB/Heimdal-specific details but
lays out a foundation for that.

Signed-off-by: Simo Sorce <idra@samba.org>
8 years agoFix bug #8882 - Broken processing of %U with vfs_full_audit when force user is set.
Jeremy Allison [Sat, 21 Apr 2012 00:52:57 +0000 (17:52 -0700)]
Fix bug #8882 - Broken processing of %U with vfs_full_audit when force user is set.

When doing a "force user" we need to remember what the "sanitized_username"
was from the original connect.

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

8 years agoAdd complete test program for Linux kernel aio inside configure.in (I discovered...
Jeremy Allison [Fri, 20 Apr 2012 22:53:55 +0000 (15:53 -0700)]
Add complete test program for Linux kernel aio inside configure.in (I discovered yesterday there are systems with only half the glibc changes needed to implement userspace kaio.

8 years agos4-libnet Always return after composite_error()
Andrew Bartlett [Mon, 23 Apr 2012 07:28:39 +0000 (17:28 +1000)]
s4-libnet Always return after composite_error()

These instances should not cause a problem, but make it easier to audit for
this kind of problem in the future with grep.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Apr 23 14:29:45 CEST 2012 on sn-devel-104

8 years agos4-libnet Always return after composite_error()
Andrew Bartlett [Mon, 23 Apr 2012 07:27:02 +0000 (17:27 +1000)]
s4-libnet Always return after composite_error()

This can and does cause crashes as multiple conflicting sets of callbacks run on
memory that may have been destroyed.

Andrew Bartlett

8 years agos4-libnet: Fix continue_groupinfo_openuser to check correct state info
Andrew Bartlett [Mon, 23 Apr 2012 07:16:05 +0000 (17:16 +1000)]
s4-libnet: Fix continue_groupinfo_openuser to check correct state info

This meant that we would attempt to query the user that we could not open.

This is a mirror of 4ba1647d5db59e5bb4911c399111e9286aac1a8e.

Andrew Bartlett

8 years agobuild: Remove support for a system libsmbclient
Andrew Bartlett [Mon, 23 Apr 2012 05:03:05 +0000 (15:03 +1000)]
build: Remove support for a system libsmbclient

With the new --private-libraries option, there is no longer the need
to have this support, which was aimed at avoiding the duplication
between two different libsmbclient binaries in a packaged
distribution.  By using --private-libraries instead, we do not
introduce a dependency between Samba 4.0 packages and whatever other
packages are on the system.

This effectivly reverts part of
e3ffb31554927a24df35576bd753ee4eb2dc2a3c while kpeeing the improved
SAMBA_LIBRARY declaration.

Andrew Bartlett

8 years agobuild: Remove support for system libwbclient
Andrew Bartlett [Mon, 23 Apr 2012 05:00:47 +0000 (15:00 +1000)]
build: Remove support for system libwbclient

This effectively reverts commit 2c49782dc1069eebc9f5a5cd2a055b5912665595

This also adds explaination about what would need to be done to
support a system libwbclient

Andrew Bartlett

8 years agos4:librpc/rpc: directly return after composite_error()
Stefan Metzmacher [Mon, 23 Apr 2012 07:23:08 +0000 (09:23 +0200)]
s4:librpc/rpc: directly return after composite_error()

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Apr 23 12:17:08 CEST 2012 on sn-devel-104

8 years agos4:libnet_become_dc: add missing 'return' after composite_error()
Stefan Metzmacher [Mon, 23 Apr 2012 07:22:18 +0000 (09:22 +0200)]
s4:libnet_become_dc: add missing 'return' after composite_error()

metze

8 years agoselftest: Add test for bug #8884: wbinfo --group-info=administrator segfaults s4...
Andrew Bartlett [Mon, 23 Apr 2012 03:52:17 +0000 (13:52 +1000)]
selftest: Add test for bug #8884: wbinfo --group-info=administrator segfaults s4-winbindd

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Apr 23 07:44:50 CEST 2012 on sn-devel-104

8 years agos4-libnet: Fix continue_groupinfo_opengroup to check correct state info
Andrew Bartlett [Mon, 23 Apr 2012 03:48:49 +0000 (13:48 +1000)]
s4-libnet: Fix continue_groupinfo_opengroup to check correct state info

This meant that we would attempt to query the group that we could not open.

Andrew Bartlett

8 years agos4-libnet: Fix segfault shown by wbinfo --group-info=administrator
Andrew Bartlett [Mon, 23 Apr 2012 03:47:46 +0000 (13:47 +1000)]
s4-libnet: Fix segfault shown by wbinfo --group-info=administrator

The issue was that after the LookupNames call indicated that this was
not a group, the call paths diverged, with both sucess and failure
paths running.

Andrew Bartlett

8 years agos3-dbwrap: A void function can not return a value
Andrew Bartlett [Mon, 23 Apr 2012 02:21:35 +0000 (12:21 +1000)]
s3-dbwrap: A void function can not return a value

Only non-gcc compilers seem to notice this as an error.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Apr 23 05:58:52 CEST 2012 on sn-devel-104

8 years agodlz_bind9: Also produce and install binary plugin for bind 9.9
Andrew Bartlett [Sun, 22 Apr 2012 01:05:46 +0000 (11:05 +1000)]
dlz_bind9: Also produce and install binary plugin for bind 9.9

Thanks to Alexander Bokovoy <ab@samba.org> for the fix!

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Sun Apr 22 10:51:57 CEST 2012 on sn-devel-104

8 years agoidl: fix the charset for the source_dsa_address in DsReplicaDel call
Matthieu Patou [Fri, 20 Apr 2012 06:56:51 +0000 (23:56 -0700)]
idl: fix the charset for the source_dsa_address in DsReplicaDel call

Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Sun Apr 22 03:00:06 CEST 2012 on sn-devel-104

8 years agos3: Implement db_id for dbwrap_cache
Volker Lendecke [Sat, 21 Apr 2012 10:07:28 +0000 (12:07 +0200)]
s3: Implement db_id for dbwrap_cache

Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Sat Apr 21 13:46:00 CEST 2012 on sn-devel-104

8 years agos3: Initialize "stored_callback" in dbwrap_cache
Volker Lendecke [Sat, 21 Apr 2012 10:04:13 +0000 (12:04 +0200)]
s3: Initialize "stored_callback" in dbwrap_cache

This should fix one of the recent flaky tests

8 years agos3: Remove two unused variables
Volker Lendecke [Sat, 21 Apr 2012 08:24:42 +0000 (10:24 +0200)]
s3: Remove two unused variables

8 years agos3:smbcontrol: remove an unused variable
Michael Adam [Fri, 20 Apr 2012 15:43:12 +0000 (17:43 +0200)]
s3:smbcontrol: remove an unused variable

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Sat Apr 21 00:55:13 CEST 2012 on sn-devel-104

8 years agos3:memcache: remove the idmap-part from memcache
Michael Adam [Fri, 20 Apr 2012 08:56:58 +0000 (10:56 +0200)]
s3:memcache: remove the idmap-part from memcache

This was useful before the idmap cache was moved to gencache.
Nowadays it is available to smbd through gencache, so we
can remove the extra caching layer.

8 years agos3:id_cache: do not use the in-memory idmap cache (it is going to be removed)
Michael Adam [Fri, 20 Apr 2012 08:37:24 +0000 (10:37 +0200)]
s3:id_cache: do not use the in-memory idmap cache (it is going to be removed)

This also removes the ID_CACHE_FLUSH message.

8 years agos3:passdb: do not use the in-memory idmap cache (it will be removed)
Michael Adam [Fri, 20 Apr 2012 08:31:31 +0000 (10:31 +0200)]
s3:passdb: do not use the in-memory idmap cache (it will be removed)