metze/samba/wip.git
13 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.

13 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

13 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

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

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

13 years agos3:idmap: remove an extra blank line
Michael Adam [Tue, 15 Jun 2010 07:12:49 +0000 (09:12 +0200)]
s3:idmap: remove an extra blank line

13 years agos3:idmap: use allocate_id() from the idmap_methods in idmap_allocate_unixid()
Michael Adam [Tue, 22 Jun 2010 12:37:47 +0000 (14:37 +0200)]
s3:idmap: use allocate_id() from the idmap_methods in idmap_allocate_unixid()

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

This has vanished with the removal of the separated idmap alloc methods.
This single "alloc" method is still needed though, for the samba-wide
Unix-ID allocator, which is used in group-mapping and ldapsam:editposix.
This method should ultimately also disappear.

13 years agos3:net: rewrite "net idmap restore" using dbwrap
Michael Adam [Mon, 14 Jun 2010 14:59:19 +0000 (16:59 +0200)]
s3:net: rewrite "net idmap restore" using dbwrap

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.

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

13 years agov3-4-ctdb: Bump up the vendor patch level to 8
Volker Lendecke [Tue, 15 Jun 2010 12:41:01 +0000 (14:41 +0200)]
v3-4-ctdb: Bump up the vendor patch level to 8

13 years agos3: Fix starving the echo responder
Volker Lendecke [Tue, 8 Jun 2010 12:33:05 +0000 (14:33 +0200)]
s3: Fix starving the echo responder

When both the echo responder and the 445 socket want to send stuff to the
worker smbd, the select loop is not fair. It always chooses the smaller file
descriptor to work on. This can mean that on a busy system the echo responder
never gets around to feed its stuff to the parent.

This fix chooses the async echo responder socket when both the 445 and the echo
responder socket are readable.

Yes, it is a very hackish fix which is required *now* I think. The proper fix
would be to either assign priorities to fd's in tevent, or the from my point of
view better fix would be to make tevent kindof round-robin.

Round-robin would mean that whenever a fd has been dealt with, it is taken off
the list of interested sockets, and only if no other socket is active, all of
the ones waiting are put back. This is a bit like EPOLL_ONESHOT, which I would
like to use for this in the epoll case. Although, I need to do some research if
maybe epoll already guarantees round-robin, I did not find anything in the docs
yet.

Volker

14 years agov3-4-ctdb: Bump up the vendor patch level to 7
Michael Adam [Tue, 1 Jun 2010 15:22:18 +0000 (17:22 +0200)]
v3-4-ctdb: Bump up the vendor patch level to 7

14 years agos3:winbind:idmap_tdb2: honour the "idmap read only" flag in the tdb2 module.
Michael Adam [Tue, 1 Jun 2010 14:45:51 +0000 (16:45 +0200)]
s3:winbind:idmap_tdb2: honour the "idmap read only" flag in the tdb2 module.

Note that this will not prevent the idmap script from writing its
mappings to the database, but no new unix ids will be allocated via
the allocator and hence no new mappings will be autogenerated.

14 years agos3:winbind: set the read_only flag when parsing the config in idmap_tdb2_db_init
Michael Adam [Tue, 1 Jun 2010 13:49:17 +0000 (15:49 +0200)]
s3:winbind: set the read_only flag when parsing the config in idmap_tdb2_db_init

For the default config this is taken from lp_idmap_read_only(),
and for explicit domains per "idmap config DOMAIN : read only".

14 years agos3:winbind:idmap_tdb2: add a read_only parameter to the idmap_tdb2_context.
Michael Adam [Tue, 1 Jun 2010 13:41:38 +0000 (15:41 +0200)]
s3:winbind:idmap_tdb2: add a read_only parameter to the idmap_tdb2_context.

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

14 years agos3: remove prototype of inexistent lp_idmap_alloc_backend().
Michael Adam [Tue, 1 Jun 2010 13:33:28 +0000 (15:33 +0200)]
s3: remove prototype of inexistent lp_idmap_alloc_backend().

14 years agos3: remove unused prototype for lp_idmap_domains().
Michael Adam [Tue, 1 Jun 2010 13:32:20 +0000 (15:32 +0200)]
s3: remove unused prototype for lp_idmap_domains().

14 years agos3:winbind:idmap: fix idmap_allocate_unixid() to actually return the ID
Michael Adam [Tue, 1 Jun 2010 12:20:08 +0000 (14:20 +0200)]
s3:winbind:idmap: fix idmap_allocate_unixid() to actually return the ID

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

14 years agov3-4-ctdb: Bump up the vendor patch level to 6
Michael Adam [Mon, 31 May 2010 16:05:58 +0000 (18:05 +0200)]
v3-4-ctdb: Bump up the vendor patch level to 6

14 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"

14 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

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

Michael

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

Allocation is now completely handled in the allocating backends.

14 years agos3:winbind:idmap: remove idmap_alloc_context from idmap.c
Michael Adam [Mon, 31 May 2010 09:55:18 +0000 (11:55 +0200)]
s3:winbind: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.

14 years agos3:winbind:idmap: remove the alloc methods list from idmap.c
Michael Adam [Mon, 31 May 2010 09:47:04 +0000 (11:47 +0200)]
s3:winbind: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.

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

14 years agos3:winbind:idmap: remove unused smb_register_idmap_alloc().
Michael Adam [Mon, 31 May 2010 09:44:44 +0000 (11:44 +0200)]
s3:winbind: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.

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

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

14 years agos3:winbind: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:winbind: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.

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

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

14 years agos3:winbind: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:winbind: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.

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

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

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

14 years agos3:winbind: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:winbind: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.

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

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

14 years agos3:winbind:idmap: use sids_to_unixids() with a NULL sid instead of allocate_id
Michael Adam [Sun, 30 May 2010 20:24:19 +0000 (22:24 +0200)]
s3:winbind:idmap: use sids_to_unixids() with a NULL sid instead of allocate_id

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

into new idmap_allocate_unixid().

14 years agos3:winbind:idmap_tdb2_sids_to_unixids: only allocate an id for sid == NULL
Michael Adam [Sun, 30 May 2010 22:24:18 +0000 (00:24 +0200)]
s3:winbind:idmap_tdb2_sids_to_unixids: only allocate an id for sid == NULL

This special treatment allows to eliminate the alloc methods from the
surface while still keeping the WINBINDD_ALLOCATE_[U|G]ID methods.

14 years agos3:winbind:idmap_tdb2: add allocation of new mappings to idmap_tdb2_sids_to_unixids
Michael Adam [Mon, 31 May 2010 15:18:52 +0000 (17:18 +0200)]
s3:winbind: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!).

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

14 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

14 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

14 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

14 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

14 years agos3:idmap: remove the set_mapping method from the idmap API
Michael Adam [Fri, 14 May 2010 14:11:32 +0000 (16:11 +0200)]
s3:idmap: remove the set_mapping method from the idmap API

Keep the backend implementations for possible internal use.

Michael

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

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

Michael

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

Michael

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

Michael

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

Michael

14 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

14 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

14 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

14 years agos3:winbind: remove SET_HWM from winbind's API.
Michael Adam [Thu, 22 Jan 2009 12:46:03 +0000 (13:46 +0100)]
s3:winbind: remove SET_HWM from winbind's API.

Michael

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

Michael

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

Michael

14 years agos3:net idmap: TEMPORARILY disable the "net idmap restore" functionality
Michael Adam [Thu, 22 Jan 2009 12:33:54 +0000 (13:33 +0100)]
s3:net idmap: TEMPORARILY disable the "net idmap restore" functionality

The use of libwbclient has to be removed from net idmap restore,
since the idmap-rw-methods are removed from the winbindd API.

"net idmap restore" needs to be rewritten with plain tdb access,
more precisely with dbwrap access (also "net idmap dump" needs
rewrite), to allow for restoring mappings directly to a database,
potentially to a clustered database handled by ctdb.

14 years agos3: remove prototype of non-existsing function idmap_tdb_tdb_close().
Michael Adam [Mon, 31 May 2010 08:14:57 +0000 (10:14 +0200)]
s3: remove prototype of non-existsing function idmap_tdb_tdb_close().

14 years agos3:winbind:idmap_tdb2_set_mapping: untangle assignment from check
Michael Adam [Tue, 18 May 2010 13:25:53 +0000 (15:25 +0200)]
s3:winbind:idmap_tdb2_set_mapping: untangle assignment from check

14 years agos3:winbind:idmap_tdb: don't check ranges when an invalid entry was found.
Michael Adam [Mon, 17 May 2010 08:45:04 +0000 (10:45 +0200)]
s3:winbind:idmap_tdb: don't check ranges when an invalid entry was found.

There is no point in checking the ranges this if the record found had an
invalid/unknown type: the mapping is not filled in. If it were initialized
to some defaults before, the check just might replace the status
NT_STATUS_INTERNAL_DB_ERROR with a NT_STATUS_NONE_MAPPED, which is not
as precise.

14 years agos3: Fix some debug messages
Volker Lendecke [Wed, 26 May 2010 15:52:10 +0000 (17:52 +0200)]
s3: Fix some debug messages

14 years agos3: Don't announce readraw and writeraw with the async echo responder
Volker Lendecke [Wed, 26 May 2010 15:47:37 +0000 (17:47 +0200)]
s3: Don't announce readraw and writeraw with the async echo responder

14 years agos3: Fix a bad memleak in the async echo responder
Volker Lendecke [Thu, 27 May 2010 16:12:30 +0000 (18:12 +0200)]
s3: Fix a bad memleak in the async echo responder

14 years agov3-4-ctdb: Bump up the vendor patch level to 5
Volker Lendecke [Tue, 11 May 2010 09:59:40 +0000 (11:59 +0200)]
v3-4-ctdb: Bump up the vendor patch level to 5

14 years agolibwbclient: Fix a fd-leak at dlclose-time
Volker Lendecke [Mon, 10 May 2010 10:05:01 +0000 (12:05 +0200)]
libwbclient: Fix a fd-leak at dlclose-time

__attribute__((destructor)) makes winbind_close_sock() being called at
dlclose() time.

Found while testing apache on Linux with mod_auth_pam.

Other platforms will have to find a different fix. One possibility would be to
always close the socket after each operation, but this badly sucks
performance-wise.

14 years agos3: Test for "__attribute__((destructor))"
Volker Lendecke [Mon, 10 May 2010 09:53:03 +0000 (11:53 +0200)]
s3: Test for "__attribute__((destructor))"

14 years agonsswitch: Make some functions static
Volker Lendecke [Sat, 23 Jan 2010 17:06:53 +0000 (18:06 +0100)]
nsswitch: Make some functions static

14 years agos3: range-check idmap script output
Volker Lendecke [Thu, 29 Apr 2010 10:14:08 +0000 (12:14 +0200)]
s3: range-check idmap script output

Not doing so results in the id mapping succeeding once unchecked and later on
being refused, because when reading from the tdb we do the checks.

14 years agos3: Fix an uninitialized variable in idmap_tdb2_sid_to_id()
Volker Lendecke [Thu, 29 Apr 2010 10:11:04 +0000 (12:11 +0200)]
s3: Fix an uninitialized variable in idmap_tdb2_sid_to_id()

When we find an invalid record in the database, there's no point in checking
the non-existing value against the range limits.

14 years agos3: Fix some nonempty blank lines
Volker Lendecke [Thu, 29 Apr 2010 10:09:48 +0000 (12:09 +0200)]
s3: Fix some nonempty blank lines

14 years agov3-4-ctdb: Bump up the vendor patch level to 4
Volker Lendecke [Mon, 26 Apr 2010 14:30:34 +0000 (16:30 +0200)]
v3-4-ctdb: Bump up the vendor patch level to 4

14 years agos3: Implement "net rpc user setprimarygroup"
Volker Lendecke [Mon, 26 Apr 2010 14:44:34 +0000 (16:44 +0200)]
s3: Implement "net rpc user setprimarygroup"

14 years agofix snapshot content display with hide unreadable
Christian Ambach [Wed, 14 Apr 2010 08:05:56 +0000 (10:05 +0200)]
fix snapshot content display with hide unreadable

With the hide unreadable option set, snapshots are be displayed
as empty with shadow_copy2 and a NFSv4 ACL module.

To prevent multiple conversions of the paths when the acl call
does a VFS_STAT (as the nfs4acl code does), a check was added
to convert_shadow2_name() so it will not touch paths any more
that look like they have already been converted.

Signed-off-by: Christian Ambach <christian.ambach@de.ibm.com>
14 years agolibwbclient: Re-Fix a bug that was fixed with e5741e27c4c
Volker Lendecke [Tue, 13 Apr 2010 10:09:21 +0000 (12:09 +0200)]
libwbclient: Re-Fix a bug that was fixed with e5741e27c4c

> r21878: Fix a bug with smbd serving a windows terminal server: If winbind
> decides smbd to be idle it might happen that smbd needs to do a winbind
> operation (for example sid2name) as non-root. This then fails to get the
> privileged pipe. When later on on the same connection another authentication
> request comes in, we try to do the CRAP auth via the non-privileged pipe.
>
> This adds a winbindd_priv_request_response() request that kills the existing
> winbind pipe connection if it's not privileged.

The fix for this was lost during the conversion to libwbclient.

Thanks to Ira Cooper <samba@ira.wakeful.net> for pointing this out!

Volker

14 years agos3: Cache the username map in gencache
Volker Lendecke [Fri, 9 Apr 2010 15:19:13 +0000 (17:19 +0200)]
s3: Cache the username map in gencache

This is for uses with a heavy-weight username map script

14 years agos3: Little refactoring: Factor out skip_space
Volker Lendecke [Fri, 9 Apr 2010 12:30:54 +0000 (14:30 +0200)]
s3: Little refactoring: Factor out skip_space

14 years agos3: Remove a bogus 0-check, "isspace" can not return true for \0
Volker Lendecke [Fri, 9 Apr 2010 12:28:44 +0000 (14:28 +0200)]
s3: Remove a bogus 0-check, "isspace" can not return true for \0

14 years agos3: Cache the result of the username map script
Volker Lendecke [Mon, 12 Apr 2010 08:34:29 +0000 (10:34 +0200)]
s3: Cache the result of the username map script

14 years agos3: Use talloc_tos() as talloc ctx for fd_lines_load() in map_username()
Volker Lendecke [Fri, 9 Apr 2010 12:09:20 +0000 (14:09 +0200)]
s3: Use talloc_tos() as talloc ctx for fd_lines_load() in map_username()

14 years agos3: TALLOC_FREE(command) correctly in map_username()
Volker Lendecke [Fri, 9 Apr 2010 12:05:09 +0000 (14:05 +0200)]
s3: TALLOC_FREE(command) correctly in map_username()

14 years agov3-4-ctdb: Bump up the vendor patch level to 3
Volker Lendecke [Thu, 8 Apr 2010 13:24:02 +0000 (15:24 +0200)]
v3-4-ctdb: Bump up the vendor patch level to 3

14 years agos3: Fork multiple children per domain
Volker Lendecke [Wed, 7 Apr 2010 15:45:12 +0000 (17:45 +0200)]
s3: Fork multiple children per domain

14 years agos3: Introduce winbindd_child_busy()
Volker Lendecke [Wed, 7 Apr 2010 15:44:18 +0000 (17:44 +0200)]
s3: Introduce winbindd_child_busy()

14 years agos3: Remove the separate "child" argument from setup_domain_child()
Volker Lendecke [Wed, 7 Apr 2010 15:43:37 +0000 (17:43 +0200)]
s3: Remove the separate "child" argument from setup_domain_child()