amitay/samba.git
11 years agos3:idmap_tdb2: pass idmap_domain (not idmap_tdb2_context) to idmap_tdb2_sid_to_id
Michael Adam [Wed, 16 Jun 2010 15:06:17 +0000 (17:06 +0200)]
s3:idmap_tdb2: pass idmap_domain (not idmap_tdb2_context) to idmap_tdb2_sid_to_id

11 years agos3:idmap_tdb2: pass idmap_domain instead of idmap_tdb2_context to idmap_tdb2_unixids_...
Michael Adam [Wed, 16 Jun 2010 14:02:07 +0000 (16:02 +0200)]
s3:idmap_tdb2: pass idmap_domain instead of idmap_tdb2_context to idmap_tdb2_unixids_to_sids

The reason for this will become apparent later: The ranges are being moved to
the idmap_domain: They are universal.

11 years agos3:idmap_tdb2: also support idmap script for named domains
Michael Adam [Wed, 16 Jun 2010 13:49:30 +0000 (15:49 +0200)]
s3:idmap_tdb2: also support idmap script for named domains

this can be configured via "idmap config DOMAIN : script = foobar"

11 years agos3:idmap_tdb2: move the idmap script from idmap_tdb2_state to idmap_tdb2_context
Michael Adam [Wed, 16 Jun 2010 13:47:23 +0000 (15:47 +0200)]
s3:idmap_tdb2: move the idmap script from idmap_tdb2_state to idmap_tdb2_context

The state (aka idmap_tdb2_alloc_context) is being removed.
The (global) idmap script was wrong there anyways.
It belongs to the per-domain context.

11 years agos3:idmap_tdb2: remove use of idmap_tdb2_state from idmap_tdb2_allocate_id
Michael Adam [Wed, 16 Jun 2010 13:31:55 +0000 (15:31 +0200)]
s3:idmap_tdb2: remove use of idmap_tdb2_state from idmap_tdb2_allocate_id

idmap_tdb2_state should actually be called idmap_tdb2_alloc_context.
This is being removed as the idmap and allocation is moved together.
We use the idmap_tdb2_context * that is sitting in dom->private_data.
This contains the same ranges as those in the state anyways.
Later, when we can also allocate for named domains, this will become
necessary anyways.

11 years agos3:idmap_tdb2: move definition of struct idmap_tdb2_context up.
Michael Adam [Wed, 16 Jun 2010 13:31:05 +0000 (15:31 +0200)]
s3:idmap_tdb2: move definition of struct idmap_tdb2_context up.

11 years agos3:idmap_tdb2: open the db after loading the ranges in idmap_tdb2_db_init().
Michael Adam [Wed, 16 Jun 2010 13:08:16 +0000 (15:08 +0200)]
s3:idmap_tdb2: open the db after loading the ranges in idmap_tdb2_db_init().

11 years agos3:idmap_tdb2: add allocation of new mappings to idmap_tdb2_sids_to_unixids
Michael Adam [Thu, 29 Jul 2010 21:13:54 +0000 (23:13 +0200)]
s3:idmap_tdb2: add allocation of new mappings to idmap_tdb2_sids_to_unixids

This moves the new_mapping feature inside the tdb2 backend to make creations
of mappings atomic.

Note: The new internal function idmap_tdb2_get_new_id() that is used to allocate
a new unix id is prepared to function for multiple explicitly configured idmap
domains, but currently it does only work for the default domain. The extended
allocation support requires extension of the data base format to store multiple
counters (per domain). This will be added in a later step (TODO!).

11 years agos3:idmap_tdb2: re-implement allocated_id in idmap methods.
Michael Adam [Tue, 22 Jun 2010 12:47:11 +0000 (14:47 +0200)]
s3:idmap_tdb2: re-implement allocated_id in idmap methods.

11 years agos3:idmap: add idmap_unix_id_is_in_range() for checking an id against an idmap range
Michael Adam [Wed, 16 Jun 2010 14:59:26 +0000 (16:59 +0200)]
s3:idmap: add idmap_unix_id_is_in_range() for checking an id against an idmap range

11 years agos3:idmap: don't check range for passdb idmap domain
Michael Adam [Tue, 22 Jun 2010 14:29:13 +0000 (16:29 +0200)]
s3:idmap: don't check range for passdb idmap domain

11 years agos3:idmap: parse ranges and "read only" in idmap_init_domain().
Michael Adam [Wed, 16 Jun 2010 14:07:55 +0000 (16:07 +0200)]
s3:idmap: parse ranges and "read only" in idmap_init_domain().

11 years agos3:idmap: add a read_only flag to the idmap_domain struct.
Michael Adam [Thu, 29 Jul 2010 15:51:13 +0000 (17:51 +0200)]
s3:idmap: add a read_only flag to the idmap_domain struct.

This will be used to mark "allocating backends" (tdb, tdb2, ldap) read-only.

11 years agos3:idmap: add low_id and high_id to the idmap_domain struct
Michael Adam [Wed, 16 Jun 2010 14:05:34 +0000 (16:05 +0200)]
s3:idmap: add low_id and high_id to the idmap_domain struct

This global data will replace the backend-specific filter_low_id
and filter_high_id. The presence of a range is generic to all
idmap configs.

11 years agos3:docs: fix net manpage to reflect removal of net "idmap secret alloc" feature
Michael Adam [Mon, 31 May 2010 13:55:01 +0000 (15:55 +0200)]
s3:docs: fix net manpage to reflect removal of net "idmap secret alloc" feature

11 years agos3:net: remove the "net idmap secret alloc" functionality.
Michael Adam [Mon, 31 May 2010 13:00:38 +0000 (15:00 +0200)]
s3:net: remove the "net idmap secret alloc" functionality.

This is now not available any more, since allocation is moved
below the id mapping layer. The functionality could be
reintroduced on a per domain basis as an e.g
"net idmap secret <domain> alloc" command.

11 years agos3:docs: add documentation for new "idmap read only" parameter
Michael Adam [Fri, 30 Jul 2010 13:15:47 +0000 (15:15 +0200)]
s3:docs: add documentation for new "idmap read only" parameter

11 years agos3:loadparm: add new boolean parameter "idmap read only"
Michael Adam [Tue, 1 Jun 2010 13:35:01 +0000 (15:35 +0200)]
s3:loadparm: add new boolean parameter "idmap read only"

This will be used to be able to put the default idmap config
read only. This can make sense for instance with the tdb2
idmap backend and using the idmap script feature.

11 years agos3:docs: remove documentation of removed parameter "idmap alloc backend"
Michael Adam [Fri, 30 Jul 2010 13:01:37 +0000 (15:01 +0200)]
s3:docs: remove documentation of removed parameter "idmap alloc backend"

11 years agos3:loadparm: remove parameter "idmap alloc backend"
Michael Adam [Mon, 31 May 2010 13:53:27 +0000 (15:53 +0200)]
s3:loadparm: remove parameter "idmap alloc backend"

11 years agos3:idmap: remove unused definition of idmap_alloc_methods.
Michael Adam [Mon, 31 May 2010 09:56:55 +0000 (11:56 +0200)]
s3:idmap: remove unused definition of idmap_alloc_methods.

Allocation is now completely handled in the allocating backends.

11 years agos3:idmap: remove idmap_alloc_context from idmap.c
Michael Adam [Mon, 31 May 2010 09:55:18 +0000 (11:55 +0200)]
s3:idmap: remove idmap_alloc_context from idmap.c

The registering of alloc backends is being removed.
The idmap backends are responsible for initializing
their alloc code on their own if necessary.

No list of alloc backends is maintained any more in the top level.

11 years agos3:idmap: remove the alloc methods list from idmap.c
Michael Adam [Mon, 31 May 2010 09:47:04 +0000 (11:47 +0200)]
s3:idmap: remove the alloc methods list from idmap.c

The registering of alloc backends is being removed.
The idmap backends are responsible for initializing
their alloc code on their own if necessary.

No list of alloc backends is maintained any more in the top level.

11 years agos3:idmap: remove unused get_alloc_methods().
Michael Adam [Mon, 31 May 2010 09:45:58 +0000 (11:45 +0200)]
s3:idmap: remove unused get_alloc_methods().

11 years agos3:idmap: remove unused smb_register_idmap_alloc().
Michael Adam [Mon, 31 May 2010 09:44:44 +0000 (11:44 +0200)]
s3:idmap: remove unused smb_register_idmap_alloc().

The registering of alloc backends is being removed.
The idmap backends are responsible for initializing
their alloc code on their own if necessary.

11 years agos3:idmap_ldap: remove unused idmap_ldap_alloc_methods.
Michael Adam [Mon, 31 May 2010 09:41:05 +0000 (11:41 +0200)]
s3:idmap_ldap: remove unused idmap_ldap_alloc_methods.

11 years agos3:idmap_ldap: remoce unused idmap_alloc_ldap_init
Michael Adam [Mon, 31 May 2010 09:38:58 +0000 (11:38 +0200)]
s3:idmap_ldap: remoce unused idmap_alloc_ldap_init

11 years agos3:idmap_ldap: don't call idmap_alloc_ldap_init in idmap_ldap_init
Michael Adam [Mon, 31 May 2010 09:37:40 +0000 (11:37 +0200)]
s3:idmap_ldap: don't call idmap_alloc_ldap_init in idmap_ldap_init

The registering of alloc backends is being removed.
The idmap backends are responsible for initializing
their alloc code on their own if necessary.

11 years agos3:idmap_tdb: remove unused idmap_alloc_methods
Michael Adam [Mon, 31 May 2010 09:34:46 +0000 (11:34 +0200)]
s3:idmap_tdb: remove unused idmap_alloc_methods

11 years agos3:idmap_tdb: remove unused idmap_alloc_tdb_init()
Michael Adam [Mon, 31 May 2010 09:33:34 +0000 (11:33 +0200)]
s3:idmap_tdb: remove unused idmap_alloc_tdb_init()

11 years agos3:idmap_tdb: don't call idmap_alloc_tdb_init in idmap_tdb_init
Michael Adam [Mon, 31 May 2010 09:32:20 +0000 (11:32 +0200)]
s3:idmap_tdb: don't call idmap_alloc_tdb_init in idmap_tdb_init

The registering of alloc backends is being removed.
The idmap backends are responsible for initializing
their alloc code on their own if necessary.

11 years agos3:idmap_tdb2: remove unused idmap_tdb2_alloc_init().
Michael Adam [Mon, 31 May 2010 09:29:00 +0000 (11:29 +0200)]
s3:idmap_tdb2: remove unused idmap_tdb2_alloc_init().

11 years agos3:idmap_tdb2: remove unused idmap_tdb2_alloc_close().
Michael Adam [Mon, 31 May 2010 09:28:02 +0000 (11:28 +0200)]
s3:idmap_tdb2: remove unused idmap_tdb2_alloc_close().

11 years agos3:idmap_tdb2: remove unused idmap_alloc_methods.
Michael Adam [Mon, 31 May 2010 09:27:18 +0000 (11:27 +0200)]
s3:idmap_tdb2: remove unused idmap_alloc_methods.

11 years agos3:idmap_tdb2: don't call smb_register_idmap_alloc() in idmap_tdb2_init
Michael Adam [Mon, 31 May 2010 09:24:52 +0000 (11:24 +0200)]
s3:idmap_tdb2: don't call smb_register_idmap_alloc() in idmap_tdb2_init

The registering of alloc backends is being removed.
The idmap backends are responsible for initializing
their alloc code on their own if necessary.

11 years agos3:idmap_tdb: make idmap_alloc_tdb_init() static.
Michael Adam [Mon, 31 May 2010 08:14:18 +0000 (10:14 +0200)]
s3:idmap_tdb: make idmap_alloc_tdb_init() static.

11 years agos3:idmap: remove unused idmap_alloc_init().
Michael Adam [Sun, 30 May 2010 22:27:23 +0000 (00:27 +0200)]
s3:idmap: remove unused idmap_alloc_init().

11 years agos3:idmap: use allocate_id() from the idmap_methods in idmap_allocate_unixid()
Michael Adam [Thu, 29 Jul 2010 21:20:21 +0000 (23:20 +0200)]
s3:idmap: use allocate_id() from the idmap_methods in idmap_allocate_unixid()

The idmap alloc methods are being removed.

11 years agos3:idmap: add an allocate_id method to the idmap_methods struct.
Michael Adam [Tue, 22 Jun 2010 12:31:24 +0000 (14:31 +0200)]
s3:idmap: add an allocate_id method to the idmap_methods struct.

The idmap_alloc_methods are being removed, but this single "alloc" method
is still needed for the samba-wide Unix-ID allocator, which is used in
group-mapping and ldapsam:editposix.
This method should ultimately also disappear.

11 years agos3:idmap: factor out common code of idmap_allocate_uid|gid()
Michael Adam [Sun, 30 May 2010 19:40:44 +0000 (21:40 +0200)]
s3:idmap: factor out common code of idmap_allocate_uid|gid()

into new idmap_allocate_unixid().

11 years agos3:idmap: remove the set_mapping method from the idmap API
Michael Adam [Wed, 19 May 2010 08:20:08 +0000 (10:20 +0200)]
s3:idmap: remove the set_mapping method from the idmap API

11 years agos3:idmap: remove idmap_new_mapping() - now implemented in the backends
Michael Adam [Thu, 20 May 2010 08:28:03 +0000 (10:28 +0200)]
s3:idmap: remove idmap_new_mapping() - now implemented in the backends

11 years agos3:idmap: add a debug message to idmap_sid_to_gid
Michael Adam [Sat, 15 May 2010 22:32:10 +0000 (00:32 +0200)]
s3:idmap: add a debug message to idmap_sid_to_gid

11 years agos3:idmap: add a debug message to idmap_sid_to_uid
Michael Adam [Sat, 15 May 2010 22:31:39 +0000 (00:31 +0200)]
s3:idmap: add a debug message to idmap_sid_to_uid

11 years agos3:idmap: don't call idmap_new_mapping idmap_sid_to_gid
Michael Adam [Fri, 14 May 2010 14:19:46 +0000 (16:19 +0200)]
s3:idmap: don't call idmap_new_mapping idmap_sid_to_gid

The setting of a new mapping is moved into the backend code
to achieve atomicity and greater flexibility.

Michael

11 years agos3:idmap: don't call idmap_new_mapping idmap_sid_to_unixid.
Michael Adam [Fri, 14 May 2010 14:18:16 +0000 (16:18 +0200)]
s3:idmap: don't call idmap_new_mapping idmap_sid_to_unixid.

The setting of a new mapping is moved into the backend code
to achieve atomicity and greater flexibility.

Michael

11 years agos3:winbind: increase interface version after removing calls
Michael Adam [Thu, 22 Jan 2009 17:05:20 +0000 (18:05 +0100)]
s3:winbind: increase interface version after removing calls

Michael

11 years agos3:idmap: remove unused method set_id_hwm from idmap API
Michael Adam [Thu, 22 Jan 2009 16:59:18 +0000 (17:59 +0100)]
s3:idmap: remove unused method set_id_hwm from idmap API

Michael

11 years agos3:idmap: remove unused alloc method get_id_hwm from idmap API
Michael Adam [Thu, 22 Jan 2009 16:56:19 +0000 (17:56 +0100)]
s3:idmap: remove unused alloc method get_id_hwm from idmap API

Michael

11 years agos3:idmap: remove unused method dump_data() from the idmap API
Michael Adam [Thu, 22 Jan 2009 14:52:34 +0000 (15:52 +0100)]
s3:idmap: remove unused method dump_data() from the idmap API

Michael

11 years agos3:idmap: remove the remove_mapping method from API and backends
Michael Adam [Thu, 22 Jan 2009 13:44:24 +0000 (14:44 +0100)]
s3:idmap: remove the remove_mapping method from API and backends

Michael

11 years agos3:idmap: remove unused idmap_remove_mapping().
Michael Adam [Thu, 22 Jan 2009 13:38:21 +0000 (14:38 +0100)]
s3:idmap: remove unused idmap_remove_mapping().

Michael

11 years agos4: remove REMOVE_MAPPING from wb_samba3_protocol
Michael Adam [Thu, 22 Jan 2009 13:36:51 +0000 (14:36 +0100)]
s4: remove REMOVE_MAPPING from wb_samba3_protocol

Michael

11 years agos3:winbind: remove the method REMOVE_MAPPING from winbind's API
Michael Adam [Thu, 22 Jan 2009 13:34:50 +0000 (14:34 +0100)]
s3:winbind: remove the method REMOVE_MAPPING from winbind's API

Michael

11 years agos3:idmap: remove unused idmap_set_mapping().
Michael Adam [Thu, 22 Jan 2009 13:31:55 +0000 (14:31 +0100)]
s3:idmap: remove unused idmap_set_mapping().

Michael

11 years agos4: remove SET_MAPPING from wb_samba3_protocol
Michael Adam [Thu, 22 Jan 2009 13:30:25 +0000 (14:30 +0100)]
s4: remove SET_MAPPING from wb_samba3_protocol

Michael

11 years agos3:winbind: remove the method SET_MAPPING from winbind's API
Michael Adam [Thu, 22 Jan 2009 13:29:15 +0000 (14:29 +0100)]
s3:winbind: remove the method SET_MAPPING from winbind's API

Michael

11 years agolibwbclient: unimplement wbcRemoveGidMapping()
Michael Adam [Thu, 22 Jan 2009 12:57:21 +0000 (13:57 +0100)]
libwbclient: unimplement wbcRemoveGidMapping()

Michael

11 years agolibwbclient: unimplement wbcRemoveUidMapping()
Michael Adam [Thu, 22 Jan 2009 12:56:09 +0000 (13:56 +0100)]
libwbclient: unimplement wbcRemoveUidMapping()

Michael

11 years agolibwbclient: unimplement wbcSetGidMapping()
Michael Adam [Thu, 22 Jan 2009 12:54:03 +0000 (13:54 +0100)]
libwbclient: unimplement wbcSetGidMapping()

Michael

11 years agolibwbclient: unimplement wbcSetUidMapping()
Michael Adam [Thu, 22 Jan 2009 12:51:53 +0000 (13:51 +0100)]
libwbclient: unimplement wbcSetUidMapping()

Michael

11 years agos3:idmap: remove unused idmap_set_gid_hwm()
Michael Adam [Thu, 22 Jan 2009 12:49:42 +0000 (13:49 +0100)]
s3:idmap: remove unused idmap_set_gid_hwm()

Michael

11 years agos3:idmap: remove unused idmap_set_uid_hwm()
Michael Adam [Thu, 22 Jan 2009 12:49:06 +0000 (13:49 +0100)]
s3:idmap: remove unused idmap_set_uid_hwm()

Michael

11 years agos4: remove SET_HWM and SET_DUAL_HWM from wb_samba3_protocol
Michael Adam [Thu, 22 Jan 2009 12:46:25 +0000 (13:46 +0100)]
s4: remove SET_HWM and SET_DUAL_HWM from wb_samba3_protocol

Michael

11 years agos3:winbind: remove SET_HWM from winbind's API.
Michael Adam [Sun, 27 Jun 2010 22:34:29 +0000 (00:34 +0200)]
s3:winbind: remove SET_HWM from winbind's API.

11 years agolibwbclient: unimplement wbcSetGidHwm()
Michael Adam [Thu, 22 Jan 2009 12:39:33 +0000 (13:39 +0100)]
libwbclient: unimplement wbcSetGidHwm()

Michael

11 years agolibwbclient: unimplement wbcSetUidHwm()
Michael Adam [Thu, 22 Jan 2009 12:37:11 +0000 (13:37 +0100)]
libwbclient: unimplement wbcSetUidHwm()

Michael

11 years agos3:net: rewrite "net idmap restore" using dbwrap
Michael Adam [Thu, 22 Jan 2009 12:33:54 +0000 (13:33 +0100)]
s3:net: rewrite "net idmap restore" using dbwrap

This removes the use of libwbclient from "net idmap".

This detects the idmap backend from the current smb.conf
and stores the id mapping tables in the corresponding data bases.
Currently, only tdb and tdb2 backends are supported.
Support for the ldap backend may be implemented later.

11 years agos3:net: change "net idmap dump" to use dbwrap instead of direct tdb access
Michael Adam [Mon, 14 Jun 2010 10:25:11 +0000 (12:25 +0200)]
s3:net: change "net idmap dump" to use dbwrap instead of direct tdb access

This way, it will also work in a samba-ctdb cluster.

11 years agos3:net sam provision: compose sid before getting uid for Guest
Michael Adam [Thu, 22 Jan 2009 11:20:46 +0000 (12:20 +0100)]
s3:net sam provision: compose sid before getting uid for Guest

Michael

11 years agos3:net sam provision: allocate the uid after composing the sid for Administrator
Michael Adam [Thu, 22 Jan 2009 11:12:43 +0000 (12:12 +0100)]
s3:net sam provision: allocate the uid after composing the sid for Administrator

Michael

11 years agos3:pdb_ldap: move some code in ldapsam_create_dom_group()
Michael Adam [Thu, 22 Jan 2009 11:01:16 +0000 (12:01 +0100)]
s3:pdb_ldap: move some code in ldapsam_create_dom_group()

to make the flow more similar to ldapsam_create_user().
This prepares for calling winbind_sid_to_gid() instead of
winbind_allocate_gid(): we need the group_sid for this...

Michael

11 years agos3:groupdb: allocate a gid after allocating a rid in pdb_default_create_alias()
Michael Adam [Thu, 22 Jan 2009 10:10:01 +0000 (11:10 +0100)]
s3:groupdb: allocate a gid after allocating a rid in pdb_default_create_alias()

Michael

11 years agos3:idmap_tdb2: fix a debug message
Michael Adam [Tue, 1 Jun 2010 12:03:32 +0000 (14:03 +0200)]
s3:idmap_tdb2: fix a debug message

11 years agos3:test: add a new "valgrindtestenv" target, similar to gdbtestenv
Michael Adam [Fri, 13 Aug 2010 23:54:37 +0000 (01:54 +0200)]
s3:test: add a new "valgrindtestenv" target, similar to gdbtestenv

this runs the daemins in xterm under valgrind instead of in gdb

11 years agos3:gdbtestenv: also start an xterm with nmbd. and start winbindd before smbd.
Michael Adam [Fri, 13 Aug 2010 23:52:41 +0000 (01:52 +0200)]
s3:gdbtestenv: also start an xterm with nmbd. and start winbindd before smbd.

11 years agos3:gdbtestenv: also set the xterm's window title appropriately
Michael Adam [Fri, 13 Aug 2010 23:49:52 +0000 (01:49 +0200)]
s3:gdbtestenv: also set the xterm's window title appropriately

11 years agos3:gdbtestenv: print the server's name in the icontitle instead of "server"
Michael Adam [Fri, 13 Aug 2010 23:48:09 +0000 (01:48 +0200)]
s3:gdbtestenv: print the server's name in the icontitle instead of "server"

11 years agopidl: fix printing of server side ndr request debug messages
Michael Adam [Fri, 13 Aug 2010 15:29:07 +0000 (17:29 +0200)]
pidl: fix printing of server side ndr request debug messages

The macros NDR_PRINT_IN_DEBUG and NDR_PRINT_OUT_DEBUG are made for
the client side. For the server side, the NDR_SET_VALUES flag needs
to be added for the OUT struct and not for the IN struct, otherwise,
the OUT part can print uninitialized data and the IN part may
recalculate string lengths illegally.

11 years agos3: Fix some error messages
Volker Lendecke [Fri, 13 Aug 2010 20:51:29 +0000 (22:51 +0200)]
s3: Fix some error messages

11 years agoEliminate any chance of a class of "uninitialized auto variable" errors.
Jeremy Allison [Fri, 13 Aug 2010 17:47:08 +0000 (10:47 -0700)]
Eliminate any chance of a class of "uninitialized auto variable" errors.

Jeremy.

11 years agotdb: workaround starvation problem in locking entire database.
Rusty Russell [Fri, 13 Aug 2010 16:43:26 +0000 (02:13 +0930)]
tdb: workaround starvation problem in locking entire database.

We saw tdb_lockall() take 71 seconds under heavy load; this is because Linux
(at least) doesn't prevent new small locks being obtained while we're waiting
for a big log.

The workaround is to do divide and conquer using non-blocking chainlocks: if
we get down to a single chain we block.  Using a simple test program where
children did "hold lock for 100ms, sleep for 1 second" the time to do
tdb_lockall() dropped signifiantly.  There are ln(hashsize) locks taken in
the contended case, but that's slow anyway.

More analysis is given in my blog at http://rusty.ozlabs.org/?p=120

This may also help transactions, though in that case it's the initial
read lock which uses this gradual locking routine; the update-to-write-lock
code is separate and still tries to update in one go.

Even though ABI doesn't change, minor version bumped so behavior change
can be easily detected.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
11 years agos3-selftest: move make test to selftest.
Günther Deschner [Tue, 10 Aug 2010 09:33:03 +0000 (11:33 +0200)]
s3-selftest: move make test to selftest.

The old "make test" can be still called as "make oldtest".

Guenther

11 years agos3-selftest: fix testparm tests as non-root.
Günther Deschner [Fri, 13 Aug 2010 16:28:48 +0000 (18:28 +0200)]
s3-selftest: fix testparm tests as non-root.

Thanks to Andreas for pointing this out.

Guenther

11 years agos3-smbd: Publish nt printers.
Andreas Schneider [Tue, 10 Aug 2010 11:45:55 +0000 (13:45 +0200)]
s3-smbd: Publish nt printers.

Reloading of the printers requires rpc services up and running! The
first call in reload_services will be skipped.

Signed-off-by: Simo Sorce <idra@samba.org>
11 years agos3-smbd: Move rpc services init to smbd parent.
Andreas Schneider [Tue, 10 Aug 2010 10:29:27 +0000 (12:29 +0200)]
s3-smbd: Move rpc services init to smbd parent.

The move to the parent makes it possible to use an internal rpc pipe
really early and as we migrated serveral parts of samba to rpc function
this is required. This should speed up the fork of a smbd a bit cause
the rpc services are already running.

We still have several problems here which aren't solved. We don't have a
dependency tree here. For example we have to make sure that the registry
is initialized before we can use the winreg pipe. The spoolss server
requires winreg, so we have to start winreg before we can start the
spoolss server. I'm sure there are more dependencies.

Signed-off-by: Simo Sorce <idra@samba.org>
11 years agos3-smbd: Regroup some init functions.
Andreas Schneider [Tue, 10 Aug 2010 10:28:46 +0000 (12:28 +0200)]
s3-smbd: Regroup some init functions.

Signed-off-by: Simo Sorce <idra@samba.org>
11 years agos3-smbd: Fixed indent.
Andreas Schneider [Mon, 9 Aug 2010 13:57:38 +0000 (15:57 +0200)]
s3-smbd: Fixed indent.

Signed-off-by: Simo Sorce <idra@samba.org>
11 years agos3-loadparm: Added some comments to lp_load_ex calls.
Andreas Schneider [Mon, 9 Aug 2010 12:50:12 +0000 (14:50 +0200)]
s3-loadparm: Added some comments to lp_load_ex calls.

Signed-off-by: Simo Sorce <idra@samba.org>
11 years agos3-smbd: Cleanup the order of the init functions.
Andreas Schneider [Mon, 9 Aug 2010 12:49:08 +0000 (14:49 +0200)]
s3-smbd: Cleanup the order of the init functions.

Signed-off-by: Simo Sorce <idra@samba.org>
11 years agos3-smbd: Make sure the event context is initialized.
Andreas Schneider [Mon, 9 Aug 2010 12:47:55 +0000 (14:47 +0200)]
s3-smbd: Make sure the event context is initialized.

Signed-off-by: Simo Sorce <idra@samba.org>
11 years agos3-build: remove pointless RPC_PARSE_OBJ2.
Günther Deschner [Fri, 13 Aug 2010 14:01:56 +0000 (16:01 +0200)]
s3-build: remove pointless RPC_PARSE_OBJ2.

Guenther

11 years agos3-waf: remove pointless RPC_PARSE_SRC2.
Günther Deschner [Fri, 13 Aug 2010 14:02:28 +0000 (16:02 +0200)]
s3-waf: remove pointless RPC_PARSE_SRC2.

Guenther

11 years agos3: Replace some cli_errstr calls by nt_errstr
Volker Lendecke [Fri, 13 Aug 2010 13:08:38 +0000 (15:08 +0200)]
s3: Replace some cli_errstr calls by nt_errstr

11 years agos3-libnet: also remove libnet/libnet_samsync_keytab.c.orig.
Günther Deschner [Fri, 13 Aug 2010 13:24:00 +0000 (15:24 +0200)]
s3-libnet: also remove libnet/libnet_samsync_keytab.c.orig.

Guys, what are you doing here ? ;-)

Guenther

11 years agos3-libnet: remove source3/libnet/libnet_join.c.orig, added by a previous commit.
Günther Deschner [Fri, 13 Aug 2010 13:22:06 +0000 (15:22 +0200)]
s3-libnet: remove source3/libnet/libnet_join.c.orig, added by a previous commit.

Guenther

11 years agos3-dcerpc: fix build warning seen with -O3.
Günther Deschner [Fri, 13 Aug 2010 13:12:29 +0000 (15:12 +0200)]
s3-dcerpc: fix build warning seen with -O3.

"warning: assuming signed overflow does not occur when assuming that (X + c) < X is always false"

Guenther

11 years agos3-krb5 Only build ADS support if arcfour-hmac-md5 is available
Andrew Bartlett [Mon, 9 Aug 2010 22:25:02 +0000 (08:25 +1000)]
s3-krb5 Only build ADS support if arcfour-hmac-md5 is available

Modern Kerberos implementations have either defines or enums for these
key types, which makes doing #ifdef difficult.  This shows up in files
such as libnet_samsync_keytab.c, the bulk of which is not compiled on
current Fedora 12, for example.

The downside is that this makes Samba unconditionally depend on the
arcfour-hmac-md5 encryption type at build time.  We will no longer
support libraries that only support the DES based encryption types.
However, the single-DES types that are supported in common with AD are
already painfully weak - so much so that they are disabled by default
in modern Kerberos libraries.

If not found, ADS support will not be compiled in.

This means that our 'net ads join' will no longer set the
ACB_USE_DES_KEY_ONLY flag, and we will always try to use
arcfour-hmac-md5.

A future improvement would be to remove the use of the DES encryption
types totally, but this would require that any ACB_USE_DES_KEY_ONLY
flag be removed from existing joins.

Andrew Bartlett

Signed-off-by: Simo Sorce <idra@samba.org>
11 years agos3:libnet Add other required headers for libnet_samsync_keytab.c
Andrew Bartlett [Tue, 10 Aug 2010 02:00:29 +0000 (12:00 +1000)]
s3:libnet Add other required headers for libnet_samsync_keytab.c

Due to missing defines in modern kerberos libraries, this code was
not compiled and so this wasn't noticed.

Andrew Bartlett

Signed-off-by: Simo Sorce <idra@samba.org>
11 years agotdb: add TDB_DEPS variable filled with required libraries
Björn Jacke [Fri, 13 Aug 2010 12:53:22 +0000 (14:53 +0200)]
tdb: add TDB_DEPS variable filled with required libraries

This is required for Solaris, which needs to link in librt to make use of
fdatasync().