amitay/samba.git
12 years agoutil: add function to extend anonymous shared memory
Simo Sorce [Sun, 14 Aug 2011 22:10:53 +0000 (18:10 -0400)]
util: add function to extend anonymous shared memory

12 years agoreplace: Check if we have mremap() available
Simo Sorce [Sun, 14 Aug 2011 22:05:27 +0000 (18:05 -0400)]
replace: Check if we have mremap() available

12 years agoUse public pytalloc header file.
Jelmer Vernooij [Sun, 14 Aug 2011 13:34:08 +0000 (15:34 +0200)]
Use public pytalloc header file.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Aug 14 17:18:46 CEST 2011 on sn-devel-104

12 years agos3: Fix bug 8360
Volker Lendecke [Thu, 11 Aug 2011 14:52:22 +0000 (16:52 +0200)]
s3: Fix bug 8360

OS/2 sends an unexpected write&x/read&x chain

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Aug 14 08:48:58 CEST 2011 on sn-devel-104

12 years agos3-passdb: Fix python < 2.6 build errors in passdb python wrapper
Andrew Bartlett [Sun, 14 Aug 2011 00:05:42 +0000 (10:05 +1000)]
s3-passdb: Fix python < 2.6 build errors in passdb python wrapper

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Sun Aug 14 03:59:48 CEST 2011 on sn-devel-104

12 years agos4:misc: remove last usage of legacy event_ fn names
Simo Sorce [Tue, 25 May 2010 19:29:14 +0000 (15:29 -0400)]
s4:misc: remove last usage of legacy event_ fn names

Autobuild-User: Simo Sorce <idra@samba.org>
Autobuild-Date: Sun Aug 14 00:38:13 CEST 2011 on sn-devel-104

12 years agos4:lib: use tevent_ fns names instead of legcay event_ ones
Simo Sorce [Tue, 25 May 2010 19:28:35 +0000 (15:28 -0400)]
s4:lib: use tevent_ fns names instead of legcay event_ ones

12 years agos4:smbd: use tevent_ fn names instead of leagcy event_ ones
Simo Sorce [Tue, 25 May 2010 19:28:10 +0000 (15:28 -0400)]
s4:smbd: use tevent_ fn names instead of leagcy event_ ones

12 years agos4:ntvfs: use tevent_ fn names instead of legacy event_ ones
Simo Sorce [Tue, 25 May 2010 19:27:41 +0000 (15:27 -0400)]
s4:ntvfs: use tevent_ fn names instead of legacy event_ ones

12 years agos4:librpc: use tevent_ fn names instead of legacy event_ ones
Simo Sorce [Tue, 25 May 2010 19:27:11 +0000 (15:27 -0400)]
s4:librpc: use tevent_ fn names instead of legacy event_ ones

12 years agos4:libcli: use tevent_ fn names instead of legacy event_ ones
Simo Sorce [Tue, 25 May 2010 19:26:42 +0000 (15:26 -0400)]
s4:libcli: use tevent_ fn names instead of legacy event_ ones

12 years agos4:dsdb: use tevent_ fn names instaed of legacy event_ ones
Simo Sorce [Tue, 25 May 2010 19:26:00 +0000 (15:26 -0400)]
s4:dsdb: use tevent_ fn names instaed of legacy event_ ones

12 years agos4:messaging: use tevent_ function names instead of legacy event_ ones
Simo Sorce [Tue, 25 May 2010 19:25:26 +0000 (15:25 -0400)]
s4:messaging: use tevent_ function names instead of legacy event_ ones

12 years agotorture: use tevent_ functions names instead of the legacy event_ ones
Simo Sorce [Tue, 25 May 2010 19:23:55 +0000 (15:23 -0400)]
torture: use tevent_ functions names instead of the legacy event_ ones

12 years agoldb: Remove use after free in error case
Andrew Bartlett [Sat, 13 Aug 2011 03:42:04 +0000 (13:42 +1000)]
ldb: Remove use after free in error case

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Sat Aug 13 13:49:44 CEST 2011 on sn-devel-104

12 years agos4-provision Add support for fixing the DC rid to a particular value
Andrew Bartlett [Sat, 13 Aug 2011 03:32:18 +0000 (13:32 +1000)]
s4-provision Add support for fixing the DC rid to a particular value

This will allow an upgraded DC to keep its SID, while being upgraded
to AD.  We also watch for the highest RID in the existing DB to set
next_rid for other additional users.

Andrew Bartlett

12 years agos3-smbd Avoid races creating 'ncaclrpc dir' with epmd in a child process
Andrew Bartlett [Sat, 13 Aug 2011 03:30:16 +0000 (13:30 +1000)]
s3-smbd Avoid races creating 'ncaclrpc dir' with epmd in a child process

12 years agos4-param Set szConfigFile even for s3 loadparm contexts
Andrew Bartlett [Fri, 12 Aug 2011 12:17:26 +0000 (22:17 +1000)]
s4-param Set szConfigFile even for s3 loadparm contexts

12 years agoupgrade: Add missing bits for the s3 to s4 upgrade script
Amitay Isaacs [Fri, 12 Aug 2011 01:37:57 +0000 (11:37 +1000)]
upgrade: Add missing bits for the s3 to s4 upgrade script

Use passdb backend to import/export users

Remove unused options for upgrade_from_s3 command (--blank) and credentials options
Config file is specified with -s/--configfile option and no need to specify as an argument.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

12 years agotests: Update test for s3 to s4 upgrade with two cases
Amitay Isaacs [Fri, 12 Aug 2011 07:47:49 +0000 (17:47 +1000)]
tests: Update test for s3 to s4 upgrade with two cases

S3-member to S4-member and S3-dc to S4-dc

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

12 years agos3-passdb: Added python method to get_global_sam_sid
Amitay Isaacs [Fri, 12 Aug 2011 07:10:17 +0000 (17:10 +1000)]
s3-passdb: Added python method to get_global_sam_sid

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

12 years agos3-passdb: Return dom_sid and guid with correct python types.
Amitay Isaacs [Fri, 12 Aug 2011 07:09:19 +0000 (17:09 +1000)]
s3-passdb: Return dom_sid and guid with correct python types.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

12 years agopassdb: Move python wrapper for passdb in samba3 python package
Amitay Isaacs [Fri, 12 Aug 2011 06:20:11 +0000 (16:20 +1000)]
passdb: Move python wrapper for passdb in samba3 python package

12 years agopy-samba3: Create samba3 python package to hold other modules
Amitay Isaacs [Fri, 12 Aug 2011 06:19:06 +0000 (16:19 +1000)]
py-samba3: Create samba3 python package to hold other modules

This will include passdb and param.

12 years agos3-param: Add python wrapper for s3 parameters
Amitay Isaacs [Fri, 12 Aug 2011 05:48:03 +0000 (15:48 +1000)]
s3-param: Add python wrapper for s3 parameters

This provids a get_context() method to return s3 context as s4 context type.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

12 years agos3-passdb: Connect to specified samdb if location is provided, otherwise use default
Amitay Isaacs [Fri, 12 Aug 2011 05:45:43 +0000 (15:45 +1000)]
s3-passdb: Connect to specified samdb if location is provided, otherwise use default

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

12 years agos3-passdb: Fix the error messages and return correct NTSTATUS
Amitay Isaacs [Fri, 12 Aug 2011 05:44:39 +0000 (15:44 +1000)]
s3-passdb: Fix the error messages and return correct NTSTATUS

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

12 years agos4-dsdb: Provide additional method to connect to specified database path
Amitay Isaacs [Fri, 12 Aug 2011 05:43:04 +0000 (15:43 +1000)]
s4-dsdb: Provide additional method to connect to specified database path

samdb_connect() now calls samdb_connect_url() with default "sam.ldb".

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

12 years agos3-param: Make sure we have talloc stack frame before calling in s3 code
Amitay Isaacs [Fri, 12 Aug 2011 05:40:26 +0000 (15:40 +1000)]
s3-param: Make sure we have talloc stack frame before calling in s3 code

When loading parameters as s4 context in s3 code, ensure we have a
talloc stack frame. This is required for python wrapping s3 params.

12 years agoparam: Add smb.conf loading support to s3/s4 loadparm bridge
Andrew Bartlett [Fri, 12 Aug 2011 01:26:42 +0000 (11:26 +1000)]
param: Add smb.conf loading support to s3/s4 loadparm bridge

12 years agos4-dsdb ensure we honour the hash_values control, even for really odd hashes
Andrew Bartlett [Thu, 11 Aug 2011 05:50:54 +0000 (15:50 +1000)]
s4-dsdb ensure we honour the hash_values control, even for really odd hashes

12 years agos4-dsdb Give a less worrying error message on failure to get a transaction
Andrew Bartlett [Thu, 11 Aug 2011 05:49:37 +0000 (15:49 +1000)]
s4-dsdb Give a less worrying error message on failure to get a transaction

12 years agos4-scripting Rename passdb upgrade routine to avoid conflict with upgradeprovision
Andrew Bartlett [Thu, 11 Aug 2011 06:19:24 +0000 (16:19 +1000)]
s4-scripting Rename passdb upgrade routine to avoid conflict with upgradeprovision

12 years agos3-passdb Add support for pdb_add_sam_account() and password hashes to pdb_samba4
Andrew Bartlett [Thu, 11 Aug 2011 05:47:01 +0000 (15:47 +1000)]
s3-passdb Add support for pdb_add_sam_account() and password hashes to pdb_samba4

This will help when using this as part of the Samba3 passdb -> Samba4
ldb database upgrade script.

Andrew Bartlett

12 years agos4-dsdb Add ability to force a particular SID in the upgrade case
Andrew Bartlett [Thu, 11 Aug 2011 05:46:26 +0000 (15:46 +1000)]
s4-dsdb Add ability to force a particular SID in the upgrade case

12 years agos3-passdb Make pdb_element_is_changed available to all passdb modules
Andrew Bartlett [Thu, 11 Aug 2011 05:39:47 +0000 (15:39 +1000)]
s3-passdb Make pdb_element_is_changed available to all passdb modules

This will allow pdb_samba4 to use this

Andrew Bartlett

12 years agos4-dsdb Add flag to set DSDB_BYPASS_PASSWORD_HASH control
Andrew Bartlett [Thu, 11 Aug 2011 06:14:36 +0000 (16:14 +1000)]
s4-dsdb Add flag to set DSDB_BYPASS_PASSWORD_HASH control

12 years agopassdb: Allocate talloc stackframe before calling in pdb functions.
Amitay Isaacs [Thu, 11 Aug 2011 03:59:00 +0000 (13:59 +1000)]
passdb: Allocate talloc stackframe before calling in pdb functions.

12 years agopassdb: Call with correct backend methods instead of default methods
Amitay Isaacs [Wed, 10 Aug 2011 07:32:32 +0000 (17:32 +1000)]
passdb: Call with correct backend methods instead of default methods

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

12 years agopassdb: Added python wrapper to passdb
Amitay Isaacs [Wed, 10 Aug 2011 03:53:43 +0000 (13:53 +1000)]
passdb: Added python wrapper to passdb

 - Added python wrapper for samu structure.

 - Added python wrapper for passdb methods:

   domain_info(), getsampwnam(), getsampwsid(), create_user(),
   delete_user(), add_sam_account(), delete_sam_account(),
   update_sam_account(), rename_sam_account(), search_users()

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

12 years agopassdb: Add a function to read secrets db from a specified path
Amitay Isaacs [Wed, 10 Aug 2011 03:50:26 +0000 (13:50 +1000)]
passdb: Add a function to read secrets db from a specified path

This allows to load secrets db from a different location. The original
secrets_init() now calls secrets_init_path() with lp_private_dir().

12 years agopassdb: Add a function to expose loaded backend list.
Amitay Isaacs [Wed, 10 Aug 2011 03:46:34 +0000 (13:46 +1000)]
passdb: Add a function to expose loaded backend list.

This function is used in python wrapper to list available python backends.

12 years agowaf: Add SAMBA3_PYTHON context to build python wrappers in samba3
Amitay Isaacs [Wed, 10 Aug 2011 03:43:18 +0000 (13:43 +1000)]
waf: Add SAMBA3_PYTHON context to build python wrappers in samba3

12 years agosamba-tool: Remove gpo setacl command
Amitay Isaacs [Wed, 3 Aug 2011 05:09:19 +0000 (15:09 +1000)]
samba-tool: Remove gpo setacl command

12 years agos3:smb2cli: pass more fields to smb2cli_req_create()/smb2cli_req_send()
Stefan Metzmacher [Fri, 12 Aug 2011 15:26:13 +0000 (17:26 +0200)]
s3:smb2cli: pass more fields to smb2cli_req_create()/smb2cli_req_send()

The caller should take care of the global cli_state values.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Aug 12 19:38:27 CEST 2011 on sn-devel-104

12 years agos3:smb2cli: allow 32bit dyn_len in smb2cli_req_create()/smb2cli_req_send()
Stefan Metzmacher [Fri, 12 Aug 2011 15:23:04 +0000 (17:23 +0200)]
s3:smb2cli: allow 32bit dyn_len in smb2cli_req_create()/smb2cli_req_send()

metze

12 years agos3:libsmb: keep a cli_smb_state->one_way
Stefan Metzmacher [Fri, 12 Aug 2011 15:40:04 +0000 (17:40 +0200)]
s3:libsmb: keep a cli_smb_state->one_way

This moves the SMB1 specific stuff to cli_smb_req_create(),
instead of having it in the core dispatching code.

metze

12 years agos3:libsmb: abstract the incoming dispatch function via a function pointer
Stefan Metzmacher [Fri, 12 Aug 2011 12:50:09 +0000 (14:50 +0200)]
s3:libsmb: abstract the incoming dispatch function via a function pointer

This will allow handling of SMB2 in future.

metze

12 years agos3:libsmb: split out cli_state_dispatch_smb1() from cli_smb_received()
Stefan Metzmacher [Fri, 12 Aug 2011 12:41:23 +0000 (14:41 +0200)]
s3:libsmb: split out cli_state_dispatch_smb1() from cli_smb_received()

metze

12 years agos3:libsmb: add missing TALLOC_FREE(frame) to cli_smb_received()
Stefan Metzmacher [Fri, 12 Aug 2011 12:44:44 +0000 (14:44 +0200)]
s3:libsmb: add missing TALLOC_FREE(frame) to cli_smb_received()

metze

12 years agos3:smb2_server: make sure we prefer responses over requests on the client socket
Stefan Metzmacher [Fri, 5 Aug 2011 18:34:43 +0000 (20:34 +0200)]
s3:smb2_server: make sure we prefer responses over requests on the client socket

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Aug 12 16:46:43 CEST 2011 on sn-devel-104

12 years agoselftest:Samba4: test --domain-critical-only in provision_vampire_dc()
Stefan Metzmacher [Thu, 11 Aug 2011 21:07:35 +0000 (23:07 +0200)]
selftest:Samba4: test --domain-critical-only in provision_vampire_dc()

This way only only replicate critical objects during the initial join
as DC, then we'll replicate the whole domain while 'samba' is running.

metze

Signed-off-by: Andrew Tridgell <tridge@samba.org>
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Aug 12 14:07:50 CEST 2011 on sn-devel-104

12 years agos3:samba-tool: add --domain-critical-only to "samba-tool domain join"
Stefan Metzmacher [Mon, 8 Aug 2011 09:15:35 +0000 (11:15 +0200)]
s3:samba-tool: add --domain-critical-only to "samba-tool domain join"

metze

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agos4:py/samba/join: add domain_critical_only=False to join_DC/join_RODC
Stefan Metzmacher [Mon, 8 Aug 2011 09:01:21 +0000 (11:01 +0200)]
s4:py/samba/join: add domain_critical_only=False to join_DC/join_RODC

metze

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agos4:py/samba/drs_utils: pass down req/req_level to self.net.replicate_chunk()
Stefan Metzmacher [Mon, 8 Aug 2011 08:47:12 +0000 (10:47 +0200)]
s4:py/samba/drs_utils: pass down req/req_level to self.net.replicate_chunk()

metze

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agos4:libnet_vampire: don't keep the replication state if DRSUAPI_DRS_CRITICAL_ONLY...
Stefan Metzmacher [Tue, 9 Aug 2011 10:23:29 +0000 (12:23 +0200)]
s4:libnet_vampire: don't keep the replication state if DRSUAPI_DRS_CRITICAL_ONLY was used

In that case we have incomplete information and need to start
from 0 in the next run.

metze

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agos4:libnet: passdown the DsGetNCChangesReq* to the libnet_BecomeDC_StoreChunk handler
Stefan Metzmacher [Mon, 8 Aug 2011 08:29:05 +0000 (10:29 +0200)]
s4:libnet: passdown the DsGetNCChangesReq* to the libnet_BecomeDC_StoreChunk handler

metze

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agoselftest:target/Samba4: use the correct configuration in setup_vampire_dc()
Stefan Metzmacher [Tue, 9 Aug 2011 10:20:54 +0000 (12:20 +0200)]
selftest:target/Samba4: use the correct configuration in setup_vampire_dc()

This allows "TDB_NO_FSYNC=1 make -j test TESTS=vampire" to work.

metze

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agos3:libsmb: keep the request order in cli_smb_req_unset_pending()
Stefan Metzmacher [Fri, 12 Aug 2011 06:39:15 +0000 (08:39 +0200)]
s3:libsmb: keep the request order in cli_smb_req_unset_pending()

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Aug 12 12:36:03 CEST 2011 on sn-devel-104

12 years agos3:libsmb: use tevent_req_defer_callback() unless there's only one request in cli_smb...
Stefan Metzmacher [Thu, 11 Aug 2011 10:45:26 +0000 (12:45 +0200)]
s3:libsmb: use tevent_req_defer_callback() unless there's only one request in cli_smb_received()

Callers of tevent_req_done() (or similar functions) have to return directly.
Otherwise the callback could invalidate the current stack state,
which is likely to trigger segfaults.

If there was only one pending request and we just got the response
for that one, we can use tevent_req_done() directly.

Otherwise there're more pending requests and we need to call
cli_state_receive_next() or we got the response for chained requests.
Both means that we have to use tevent_req_defer_callback().

metze

12 years agos3:libsmb: make use of cli_state_receive_next() in cli_smb_received()
Stefan Metzmacher [Thu, 11 Aug 2011 10:28:06 +0000 (12:28 +0200)]
s3:libsmb: make use of cli_state_receive_next() in cli_smb_received()

metze

12 years agos3:libsmb: notify all request about failures in cli_smb_req_set_pending()
Stefan Metzmacher [Thu, 11 Aug 2011 10:26:31 +0000 (12:26 +0200)]
s3:libsmb: notify all request about failures in cli_smb_req_set_pending()

It's up to the caller to notify the current request,
but we have to notify all other pending requests if
we're not able to read the next response from the server.

metze

12 years agos3:libsmb: split out cli_state_receive_next() from cli_smb_req_set_pending()
Stefan Metzmacher [Thu, 11 Aug 2011 10:16:02 +0000 (12:16 +0200)]
s3:libsmb: split out cli_state_receive_next() from cli_smb_req_set_pending()

metze

12 years agos3:libsmb: use talloc_stackframe() in cli_smb_received()
Stefan Metzmacher [Thu, 11 Aug 2011 10:07:55 +0000 (12:07 +0200)]
s3:libsmb: use talloc_stackframe() in cli_smb_received()

metze

12 years agos3:libsmb: call cli_smb_req_unset_pending() before tevent_req_done() also for chained...
Stefan Metzmacher [Thu, 11 Aug 2011 10:18:58 +0000 (12:18 +0200)]
s3:libsmb: call cli_smb_req_unset_pending() before tevent_req_done() also for chained requests

metze

12 years agos3:libsmb: reset the destructor in cli_smb_req_unset_pending()
Stefan Metzmacher [Thu, 11 Aug 2011 10:18:26 +0000 (12:18 +0200)]
s3:libsmb: reset the destructor in cli_smb_req_unset_pending()

metze

12 years agos3:libsmb: add cli_state_notify_pending() and use it
Stefan Metzmacher [Thu, 11 Aug 2011 07:35:38 +0000 (09:35 +0200)]
s3:libsmb: add cli_state_notify_pending() and use it

If we got a problem on the connection we need to notify every
pending request. But we need to make use of tevent_req_defer_callback()
before tevent_req_nterror(), otherwise the callback, triggered
by tevent_req_nterror(), could invalidate the state of current caller,
which will likely cause segfaults.

metze

12 years agos4-test: use standard process model for 'dc' server
Andrew Tridgell [Fri, 12 Aug 2011 04:37:04 +0000 (14:37 +1000)]
s4-test: use standard process model for 'dc' server

this provides us with both 'standard' and 'single' process models in
selftest, ensuring that we test the standard process model in the
build farm

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Fri Aug 12 11:06:50 CEST 2011 on sn-devel-104

12 years agosocket-wrapped: added wrappers for dup() and dup2()
Andrew Tridgell [Fri, 12 Aug 2011 04:28:03 +0000 (14:28 +1000)]
socket-wrapped: added wrappers for dup() and dup2()

The Samba4 standard process model uses dup() on incoming sockets as an
optimisation (it makes select() a tiny bit faster when used).

Adding dup() to socket wrapper allows us to use the standard process
model in selftest

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

12 years agos3:selftest: run smbtorture3 CHAIN1/CHAIN2 tests
Stefan Metzmacher [Thu, 11 Aug 2011 20:32:49 +0000 (22:32 +0200)]
s3:selftest: run smbtorture3 CHAIN1/CHAIN2 tests

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Aug 12 09:37:04 CEST 2011 on sn-devel-104

12 years agotevent: don't force the nesting flag to false in the destructor
Andrew Tridgell [Fri, 12 Aug 2011 01:56:28 +0000 (11:56 +1000)]
tevent: don't force the nesting flag to false in the destructor

the tevent destructor is called in tevent_re_initialise(), to reset
the event context back to its original state for creating child
processes. We need the nesting flag to stay the same

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Fri Aug 12 05:18:25 CEST 2011 on sn-devel-104

12 years agos4-dbcheck: offer to fix dsServiceName to be in GUID form
Andrew Tridgell [Thu, 11 Aug 2011 06:59:11 +0000 (16:59 +1000)]
s4-dbcheck: offer to fix dsServiceName to be in GUID form

this fixes the dsServiceName so it can handle server renames

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

12 years agos4-dsdb: don't cache the NTDS settings DN
Andrew Tridgell [Thu, 11 Aug 2011 06:29:24 +0000 (16:29 +1000)]
s4-dsdb: don't cache the NTDS settings DN

this DN can change due to a server rename, so we cannot cache it. It
is set by provision, but not anywhere else.

This seems to not have a large performance impact

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

12 years agos4-join: make dsServiceName a GUID in @ROOTDSE on join
Andrew Tridgell [Thu, 11 Aug 2011 06:05:11 +0000 (16:05 +1000)]
s4-join: make dsServiceName a GUID in @ROOTDSE on join

when joining another domain as a DC we should setup our dsServiceName
in @ROOTDSE to be a GUID so we can cope with later server renames

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

12 years agos4-provision: create dsServiceName in @ROOTDSE in GUID form
Andrew Tridgell [Thu, 11 Aug 2011 05:45:43 +0000 (15:45 +1000)]
s4-provision: create dsServiceName in @ROOTDSE in GUID form

this allows for handling of server renames as the GUID doesn't change

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

12 years agos4-dsdb: expand dsServiceName from GUID form at runtime
Andrew Tridgell [Thu, 11 Aug 2011 05:44:32 +0000 (15:44 +1000)]
s4-dsdb: expand dsServiceName from GUID form at runtime

this allows dsServiceName to be stored as an extended DN or GUID form
in @ROOTDSE, and its string form will be found at runtime.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

12 years agos4-dsdb: remove the naming_fsmo and pdc_fsmo modules
Andrew Tridgell [Thu, 11 Aug 2011 05:43:22 +0000 (15:43 +1000)]
s4-dsdb: remove the naming_fsmo and pdc_fsmo modules

these are not needed now that the rootdse modules calculates the
validFSMOs attribute at runtime

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

12 years agos4-dsdb: calculate validFSMOs at runtime instead of pre-computing
Andrew Tridgell [Thu, 11 Aug 2011 05:40:53 +0000 (15:40 +1000)]
s4-dsdb: calculate validFSMOs at runtime instead of pre-computing

this changes the rootdse to compute the validFSMOs attribute at
runtime by checking the fSMORoleOwner attribute on the appropriate
DN. This avoids the need for the pdc_fsmo and naming_fsmo modules.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

12 years agotevent: fix documentation for tevent_context_init_byname()
Sumit Bose [Thu, 11 Aug 2011 10:39:57 +0000 (12:39 +0200)]
tevent: fix documentation for tevent_context_init_byname()

Signed-off-by: Simo Sorce <idra@samba.org>
Autobuild-User: Simo Sorce <idra@samba.org>
Autobuild-Date: Thu Aug 11 21:56:37 CEST 2011 on sn-devel-104

12 years agotevent: Set FD_CLOEXEC on epoll handle
Sumit Bose [Thu, 11 Aug 2011 10:30:48 +0000 (12:30 +0200)]
tevent: Set FD_CLOEXEC on epoll handle

If an application using libtevent starts a new process the epoll file descriptor
is leaked to the new process if the event context is not freed explicitly. By
setting FD_CLOEXEC this is not needed anymore.

Signed-off-by: Simo Sorce <idra@samba.org>
12 years agos3-messaging: Do not register to classes we are not going to use.
Simo Sorce [Thu, 11 Aug 2011 03:28:09 +0000 (23:28 -0400)]
s3-messaging: Do not register to classes we are not going to use.

Signed-off-by: Andreas Schneider <asn@samba.org>
Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Thu Aug 11 17:09:30 CEST 2011 on sn-devel-104

12 years agos3-messaging: Change classification of MSG_SMB_CONF_UPDATED.
Simo Sorce [Thu, 11 Aug 2011 03:25:56 +0000 (23:25 -0400)]
s3-messaging: Change classification of MSG_SMB_CONF_UPDATED.

smbd is not the only daemon interested in smb.conf changes. Move this
message to the GENERAL class so that all interested partied (nmbd,
winbindd, spoolssd, etc..) can receive this notification.

Signed-off-by: Andreas Schneider <asn@samba.org>
12 years agos3-messaging: Fix messaging classes.
Simo Sorce [Thu, 11 Aug 2011 03:10:48 +0000 (23:10 -0400)]
s3-messaging: Fix messaging classes.

This has been broken since ff0ac5b0 (May 2007).
Basically all messages were belonging to the General class except for CTDB
messages.
This fixed the message_send_all() function to correctly compute the class, and
fixes registrations to include all they need to cope with the fact not all
messages are of calss general (registrations rotted a bit because as long as
FLAG_MSG_GENERAL was defined the process woould receive all messages).

Signed-off-by: Andreas Schneider <asn@samba.org>
12 years agos3-messaging: Remove obsolete class.
Simo Sorce [Thu, 11 Aug 2011 03:36:06 +0000 (23:36 -0400)]
s3-messaging: Remove obsolete class.

The FLAG_MSG_PRINT_NOTIFY class is actually obsolete and never used, as the
only message belonging to it is not used either.

Signed-off-by: Andreas Schneider <asn@samba.org>
12 years agos3:build(autoconf): fix bug #8369: remove irritating "." targets when recent system...
Michael Adam [Thu, 11 Aug 2011 08:49:30 +0000 (10:49 +0200)]
s3:build(autoconf): fix bug #8369: remove irritating "." targets when recent system libs exist

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Thu Aug 11 13:26:27 CEST 2011 on sn-devel-104

12 years agoAdapt tally_histogram to Samba coding conventions
Volker Lendecke [Wed, 10 Aug 2011 17:53:53 +0000 (19:53 +0200)]
Adapt tally_histogram to Samba coding conventions

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Aug 10 21:12:59 CEST 2011 on sn-devel-104

12 years agoAdapt get_max_bucket to Samba coding conventions
Volker Lendecke [Wed, 10 Aug 2011 17:52:58 +0000 (19:52 +0200)]
Adapt get_max_bucket to Samba coding conventions

12 years agoAdapt tally_approx_median to Samba coding conventions
Volker Lendecke [Wed, 10 Aug 2011 17:52:40 +0000 (19:52 +0200)]
Adapt tally_approx_median to Samba coding conventions

12 years agoAdapt bucket_range to Samba coding conventions
Volker Lendecke [Wed, 10 Aug 2011 17:52:15 +0000 (19:52 +0200)]
Adapt bucket_range to Samba coding conventions

12 years agoAdapt tally_mean to Samba coding conventions
Volker Lendecke [Wed, 10 Aug 2011 17:51:56 +0000 (19:51 +0200)]
Adapt tally_mean to Samba coding conventions

12 years agoAdapt divls64 to Samba coding conventions
Volker Lendecke [Wed, 10 Aug 2011 17:51:26 +0000 (19:51 +0200)]
Adapt divls64 to Samba coding conventions

12 years agoAvoid some // style comments in divls64
Volker Lendecke [Wed, 10 Aug 2011 17:50:52 +0000 (19:50 +0200)]
Avoid some // style comments in divls64

12 years agoAdapt divlu64 to Samba coding conventions
Volker Lendecke [Wed, 10 Aug 2011 17:49:55 +0000 (19:49 +0200)]
Adapt divlu64 to Samba coding conventions

12 years agoAvoid some // style comments in divlu64
Volker Lendecke [Wed, 10 Aug 2011 17:49:23 +0000 (19:49 +0200)]
Avoid some // style comments in divlu64

12 years agoAdapt fls64 to Samba coding conventions
Volker Lendecke [Wed, 10 Aug 2011 17:46:52 +0000 (19:46 +0200)]
Adapt fls64 to Samba coding conventions

12 years agoAdapt tally_num to Samba coding conventions
Volker Lendecke [Wed, 10 Aug 2011 17:46:37 +0000 (19:46 +0200)]
Adapt tally_num to Samba coding conventions

12 years agoAdapt tally_add to Samba coding conventions
Volker Lendecke [Wed, 10 Aug 2011 17:46:24 +0000 (19:46 +0200)]
Adapt tally_add to Samba coding conventions

12 years agoAdapt renormalize to Samba coding conventions
Volker Lendecke [Wed, 10 Aug 2011 17:46:00 +0000 (19:46 +0200)]
Adapt renormalize to Samba coding conventions

12 years agoAdapt shift_overflows to Samba coding conventions
Volker Lendecke [Wed, 10 Aug 2011 17:45:40 +0000 (19:45 +0200)]
Adapt shift_overflows to Samba coding conventions

12 years agoAdapt bucket_min to Samba coding conventions
Volker Lendecke [Wed, 10 Aug 2011 17:45:24 +0000 (19:45 +0200)]
Adapt bucket_min to Samba coding conventions