1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-13 13:18:06 +03:00
Commit Graph

1343 Commits

Author SHA1 Message Date
Günther Deschner
528edcc789 s3-waf: add idmap_autorid to the build.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Mon Nov  8 14:17:27 UTC 2010 on sn-devel-104
2010-11-08 14:17:27 +00:00
Volker Lendecke
8b624c1d20 s3: Fix an uninitialized variable
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon Nov  8 13:22:06 UTC 2010 on sn-devel-104
2010-11-08 13:22:06 +00:00
Christian Ambach
9aab4149af s3:idmap: add a new ID mapping module autorid
This is an initial implementation of the idmap_autorid module.
It works similar to the idmap_rid module but requires less
configuration. It will automatically pick ranges for each domain,
so you do not have to bother any more about adding an idmap
configuration for all of the domains in the forest.

This is very easy to use and to configure and much more
deterministic and faster than idmap_tdb, the typical choice
of Samba users up to now.
2010-11-08 13:39:51 +01:00
Christian Ambach
51ddddfa9f s3:winbind add wcache_tdc_fetch_domainbysid
add a function to lookup a domain in the winbind cache by domain SID
2010-11-08 13:39:51 +01:00
Volker Lendecke
69155e4103 s3: Put some parentheses around conditionals 2010-11-08 13:39:51 +01:00
Volker Lendecke
cbe399155d s3: Consistently use stdbool types in new code 2010-11-08 13:39:51 +01:00
Christian Ambach
57b3d32c8d s3:winbind add timeouts to winbind cache
This adds a timeout value to cache entries and the NDR records
in the winbind cache.

The previous approach of just comparing the sequence number has some issues,
e.g. when retrying a wbinfo -n operation for a user in a not yet trusted
domain was always failing even after the trusted domain was added.

The new approach compares sequence number and timeout value to
determine if a cache entry is still valid or not.

I increased the cache version number so an old cache will be wiped
automatically after upgrade.
2010-11-08 13:39:51 +01:00
Volker Lendecke
5915d4a0b6 s3: Remove some duplicate prototypes 2010-11-05 15:54:05 +01:00
Volker Lendecke
80c3364cd3 s3: Fix a getgrent crash with many groups
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Nov  3 12:58:49 UTC 2010 on sn-devel-104
2010-11-03 12:58:49 +00:00
Volker Lendecke
4622f2e926 s3: Fix a typo in a DEBUG msg
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Nov  2 13:13:39 UTC 2010 on sn-devel-104
2010-11-02 13:13:39 +00:00
Andrew Bartlett
9da4ace1d9 s3-debug Impove setup_logging() to specify logging to stderr
This change improves the setup_logging() API so that callers which
wish to set up logging to stderr can simply ask for it, rather than
directly modify the dbf global variable.

Andrew Bartlett
2010-11-02 04:36:04 +00:00
Michael Adam
1ccb69aabb s3:winbindd: fix query_user for users with NULL full name.
Not sure whether query_user ever sends a NULL full name.
Query Display Info does, and it does not harm to add the
check here, too.

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Mon Nov  1 13:03:33 UTC 2010 on sn-devel-104
2010-11-01 13:03:33 +00:00
Michael Adam
53d19fac5f s3:winbindd: fix query_user_list for users with NULL full_name 2010-11-01 12:21:30 +00:00
Volker Lendecke
1d5cb5125c s3: Use any_nt_status_not_ok in winbind 2010-10-20 18:09:20 +02:00
Günther Deschner
64e9f79587 s3: fix the build of idmap_adex, idmap_tdb2, idmap_hash and several vfs modules.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Mon Oct 18 14:39:39 UTC 2010 on sn-devel-104
2010-10-18 14:39:39 +00:00
Andreas Schneider
b615b70601 s3-winbind: Fixed init order.
We need the system server info in the rpc services.

Autobuild-User: Andreas Schneider <asn@samba.org>
Autobuild-Date: Mon Oct 18 12:43:16 UTC 2010 on sn-devel-104
2010-10-18 12:43:16 +00:00
Andreas Schneider
0195f35ce1 s3-winbind: Fixed the build of idmap_rid. 2010-10-15 11:34:03 +00:00
Andrew Bartlett
a879a4610d libcli/auth Merge source4/libcli/security and util_sid.c into the common code
This should ensure we only have one copy of these core functions
in the tree.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-10-14 02:35:05 +00:00
Andrew Bartlett
170b345e0c s3-auth Use security_token_debug() from common code
This prints the security token including the privileges as strings
instead of just a bitmap.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-10-14 02:35:04 +00:00
Andrew Bartlett
f768b32e37 libcli/security Provide a common, top level libcli/security/security.h
This will reduce the noise from merges of the rest of the
libcli/security code, without this commit changing what code
is actually used.

This includes (along with other security headers) dom_sid.h and
security_token.h

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Oct 12 05:54:10 UTC 2010 on sn-devel-104
2010-10-12 05:54:10 +00:00
Volker Lendecke
b5ed09c3af Move talloc_enable_null_tracking() to the s3 daemons 2010-10-08 21:11:45 +02:00
Günther Deschner
4e9508172d s3-waf: slowly getting modules to match how they look like in old build.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Fri Oct  8 09:31:01 UTC 2010 on sn-devel-104
2010-10-08 09:31:01 +00:00
Günther Deschner
b7683a2c9d samr: for correctness, rename samr_RidTypeArray to samr_RidAttrArray.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Thu Oct  7 12:04:32 UTC 2010 on sn-devel-104
2010-10-07 12:04:32 +00:00
Günther Deschner
4aa8aaa6d2 s3-waf: convert NSS_INFO into a subsystem.
We don't do the fancy symlinking to idmap modules though.

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Tue Oct  5 10:50:53 UTC 2010 on sn-devel-104
2010-10-05 10:50:53 +00:00
Steven Danneman
455fccf86b s3:events: Call all ready fd event handlers on each iteration of the main loop
Previously, only one fd handler was being called per main message loop
in all smbd child processes.

In the case where multiple fds are available for reading the fd
corresponding to the event closest to the beginning of the event list
would be run.  Obviously this is arbitrary and could cause unfairness.

Usually, the first event fd is the network socket, meaning heavy load
of client requests can starve out other fd events such as oplock
or notify upcalls from the kernel.

In this patch, I have changed the behavior of run_events() to unset
any fd that it has already called a handler function, as well
as decrement the number of fds that were returned from select().
This allows the caller of run_events() to iterate it, until all
available fds have been handled.

I then changed the main loop in smbd child processes to iterate
run_events().  This way, all available fds are handled on each wake
of select, while still checking for timed or signalled events between
each handler function call.  I also added an explicit check for
EINTR from select(), which previously was masked by the fact that
run_events() would handle any signal event before the return code
was checked.

This required a signature change to run_events() but all other callers
should have no change in their behavior.  I also fixed a bug in
run_events() where it could be called with a selrtn value of -1,
doing unecessary looping through the fd_event list when no fds were
available.

Also, remove the temporary echo handler hack, as all fds should be
treated fairly now.
2010-10-01 13:31:33 -07:00
Günther Deschner
b38d0542e1 samba: share select wrappers.
Guenther
2010-10-01 22:30:22 +02:00
Volker Lendecke
bad98e37e7 s3: Add "smbcontrol winbindd ip-dropped <local-ip>"
This is supposed to improve the winbind reconnect time after an ip address
has been moved away from a box. Any kind of HA scenario will benefit from
this, because winbindd does not have to wait for the TCP timeout to kick in
when a local IP address has been dropped and DC replies are not received
anymore.
2010-09-30 14:30:33 +02:00
Volker Lendecke
10f0c785c7 s3: Re-introduce a procid_self()
Giving the parent pid to reinit_after_fork is not a good idea....
None of the other callers do this, checked it.
2010-09-30 14:29:56 +02:00
Günther Deschner
2a1891a9d6 s3-waf: fix dependencies in most of our module subsystems.
Guenther
2010-09-28 09:41:54 +02:00
Jeremy Allison
f98d217514 Change to using TDB_INCOMPATIBLE_HASH (the jenkins hash) on all
TDB_CLEAR_IF_FIRST tdb's. For tdb's like gencache where we open
without CLEAR_IF_FIRST and then with CLEAR_IF_FIRST if corrupt
this is still safe to use as if opening an existing tdb the new
hash will be ignored - it's only used on creating a new tdb not
opening an old one.

Jeremy.
2010-09-27 17:18:54 -07:00
Günther Deschner
4584a12b6a s3-waf: add missing IDMAP modules.
Guenther
2010-09-27 00:39:38 +02:00
Günther Deschner
6465dbce6d s3-waf: move idmap subsystem to winbindd/wscript_build.
Guenther
2010-09-27 00:39:38 +02:00
Volker Lendecke
1d90227c3c s3: Remove a pointless if-statement 2010-09-21 11:09:46 -07:00
Günther Deschner
bf38287c76 s3-winbindd: another attempt to fix the non-ldap build.
Guenther
2010-09-21 00:20:00 -07:00
Andrew Bartlett
d7bc452a89 s3: Replace sid_binstring and sid_guidstring with PIDL-based alternatives
This reduces the manual marshalling of these structures by removing
the duplication here.

Andrew Bartlett

Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-20 16:15:03 -07:00
Günther Deschner
102a70e809 s3-util: use shared dom_sid_dup.
Guenther
2010-09-20 14:05:07 -07:00
Günther Deschner
4dbd743e46 s3-util_sid: use shared dom_sid_compare_auth and dom_sid_equal_X functions.
Guenther
2010-09-20 14:04:37 -07:00
Björn Jacke
1c82ca01c3 s3/winbind: remove unused winbindd_check_cache_size 2010-09-19 22:58:33 -07:00
Simo Sorce
db46b2bdb0 s3-winbindd: Use rpc_open_pipe_interface in winbindd.
Signed-off-by: Andreas Schneider <asn@samba.org>
2010-09-15 12:53:43 +02:00
Pierre Carrier
eeb24afd78 Allows changing the maximum number of simultaneous clients in winbindd through an smb.conf option.
Signed-off-by: Jeremy Allison <jra@samba.org>
2010-09-14 16:43:39 -07:00
Volker Lendecke
adfa071c5a s3: Remove a nesting level in winbindd_dual_pam_chauthtok 2010-09-12 18:30:38 +02:00
Andrew Bartlett
d1bb21b0d5 s3:auth Remove NT_USER_TOKEN
The all UPPER case typedef is no longer the preferred Samba style
and this makes it easier to see that this is the IDL-derivied structure

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:06 +10:00
Andrew Bartlett
4bfc8d3b1a s3-auth Change struct nt_user_token -> struct security_token
This common structure is defined in security.idl

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:05 +10:00
Andrew Bartlett
4bf783d4d6 s3-auth Change type of num_sids to uint32_t
size_t is overkill here, and in struct security_token in the num_sids
is uint32_t.

This includes a change to the prototype of add_sid_to_array()
and add_sid_to_array_unique(), which has had a number of
consequnetial changes as I try to sort out all the callers using
a pointer to the number of sids.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:05 +10:00
Volker Lendecke
f76983ae3f s3: Simplify the logic in generate_krb5_ccache
gd, jra, others, please check!
2010-09-11 00:02:02 +02:00
Björn Jacke
306465a5a4 s3/winbind: use mono time for startup timeout check 2010-09-10 23:10:26 +02:00
Volker Lendecke
aa00d331a6 s3: Simplify generate_krb5_ccache slightly
strequal deals with a NULL string input just fine
2010-09-10 12:36:07 -07:00
Volker Lendecke
789a162989 s3: Ensure NULL termination for "workstation" in auth_crap 2010-09-09 14:26:28 -07:00
Volker Lendecke
18962ea385 s3: These assignments are overwritten immediately
Dump them
2010-09-09 14:08:23 -07:00
Volker Lendecke
eedf476c24 s3: Remove "mem_ctx" from a few functions 2010-09-09 06:19:25 +02:00
Volker Lendecke
eaf778593f s3: Remove "mem_ctx" from wcache_save_creds() 2010-09-09 06:19:24 +02:00
Volker Lendecke
d38e1d13ea s3: Remove "mem_ctx" from lookup_cached_name() 2010-09-09 06:19:24 +02:00
Volker Lendecke
c7d6e6f571 s3: Remove a nested if-statement 2010-09-09 06:19:24 +02:00
Volker Lendecke
6f1916524b s3: Fill in workstation in winbindd_pam_auth_crap_send 2010-09-09 06:19:24 +02:00
Volker Lendecke
f506871538 s3: Fill in domain in winbindd_pam_auth_crap_send 2010-09-09 06:19:23 +02:00
Volker Lendecke
c2048db59d s3: Remove redundant flag checks
We're checking these in the parent already (winbindd_pam_auth_send and
winbindd_pam_auth_crap_send). No point in doing it in the child as well
2010-09-09 06:19:23 +02:00
Volker Lendecke
4e4228bd5d s3: Remove unused arg "user_sid" from winbindd_store_creds
All callers have passed in NULL
2010-09-09 06:19:23 +02:00
Volker Lendecke
7372a50a03 s3: Remove unused winbindd_update_creds_by_sid 2010-09-09 06:19:23 +02:00
Volker Lendecke
a0de3fc690 s3: Remove unused winbindd_dual_show_sequence() 2010-09-09 06:19:23 +02:00
Volker Lendecke
4f0b190a30 s3: "== false" looks wrong :-) 2010-09-08 15:31:33 -07:00
Volker Lendecke
e2b63996e8 s3: Make winbind_add_failed_connection_entry static 2010-09-08 21:10:18 +02:00
Volker Lendecke
3928565bc9 s3: Fix a typo 2010-09-08 21:00:03 +02:00
Volker Lendecke
2226347182 s3: Simplify cm_connect_sam a bit 2010-09-08 18:28:16 +02:00
Volker Lendecke
bcad45ed43 s3: Check for sid instead of name in cm_connect_sam 2010-09-08 18:28:16 +02:00
Stefan Metzmacher
d5355dda81 s3:winbindd: implement wbint_bh_set_timeout() as dummy
metze
2010-09-04 09:01:16 +02:00
Volker Lendecke
ac317eba25 s3: Remove unused nss_info_adex_init() 2010-09-02 22:14:55 +02:00
Andrew Bartlett
8c15cf54ae s3-auth Rename NT_USER_TOKEN user_sids -> sids
This is closer to the struct security_token from security.idl
2010-08-31 10:20:14 +10:00
Pierre Carrier
4b3630b7e7 winbindd: Add the client status in the clients list output
Hello list,

Considered relevant by a customer.
As I suppose one doesn't send SIGUSR2 very often, I didn't bother adding another DEBUGLEVEL.

--
Pierre
2010-08-26 18:23:00 +02:00
Pierre Carrier
b219bfe699 winbindd: useless function
Hello list,

Seems simple enough for my first patch :)

--
Pierre
2010-08-26 18:23:00 +02:00
Günther Deschner
8b4f5319ef s3-build: use talloc_dict.h only where needed.
Guenther
2010-08-26 00:25:58 +02:00
Günther Deschner
7a05ca2c9c s3-build: use dbwrap.h only where needed.
Guenther
2010-08-26 00:25:55 +02:00
Günther Deschner
2b41f421fd s3-idmap: only include idmap headers where needed.
Guenther
2010-08-26 00:20:29 +02:00
Günther Deschner
7ff7eb0b52 s3-build: only include nsswitch header where needed.
Guenther
2010-08-26 00:20:28 +02:00
Jeremy Allison
33060f67be Final part of fix for bug #7636 - winbind internal error, backtrace.
Ensure cm_get_schannel_creds() returns NTSTATUS.

Jeremy.
2010-08-23 16:53:45 -07:00
Stefan Metzmacher
c9621a8c00 s3:winbindd: fix error handling in wb_next_grent_fetch_done()
We should not use 'result' uninitialized.

metze
2010-08-20 14:23:41 +02:00
Günther Deschner
28ba023b4c s3-idmap: fix uninitialized variable in idmap_tdb_sids_to_unixids_action().
Michael, please check.

Guenther
2010-08-19 14:08:06 +02:00
Volker Lendecke
4b5e252354 s3: Add "client_id" to pipes_struct 2010-08-18 11:18:23 +02:00
Stefan Metzmacher
aca7b22e96 s3:winbindd: don't ignore 'result' in wb_dsgetdcname_done()
Ignoring it could cause a segfault in winbindd_getdcname_recv()

metze
2010-08-17 12:46:53 +02:00
Stefan Metzmacher
760948a5d4 s3:winbindd: remove rpc_pipe_client references from winbind_dual_ndr code
metze
2010-08-16 14:30:21 +02:00
Stefan Metzmacher
13c744fa30 s3:winbindd: use dcerpc_wbint_* functions instead of rpccli_wbint_*
metze
2010-08-16 14:30:21 +02:00
Stefan Metzmacher
2ccaa23558 s3:winbindd: add binding_handle to struct winbindd_child
metze
2010-08-16 14:30:20 +02:00
Stefan Metzmacher
7f2343be12 s3:winbindd: remove unused wb_ndr_dispatch* functions
metze
2010-08-16 14:30:19 +02:00
Andrew Bartlett
70211ea6a3 s3:auth Change winbindd -> auth interface to more standard structures
This removes conversions to and from the source3 varient of the
server_info structure when replaced in s3compat, and presents a tidier
interface to winbindd in any case.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-08-14 11:58:13 +10:00
Andrew Bartlett
23994e1b53 s3:auth Make Samba3 use the new common struct auth_usersupplied_info
This common structure will make it much easier to produce an auth
module for s3compat that calls Samba4's auth subsystem.

In order the make the link work properly (and not map twice), we mark
both that we did try and map the user, as well as if we changed the
user during the mapping.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-08-14 11:58:13 +10:00
Michael Adam
60eae5a134 s3:idmap: fix sid_to_unixid for builtin and own domain.
The old idmap code created a new mapping if asking the backends failed.
Now with the new layering, if passdb (which is used for our own domain
and builtin), then we need to continue and ask the backends, giving
tdb or whatever the default backend is a chance to create a mapping.
2010-08-14 02:10:57 +02:00
Michael Adam
9f60eb8c1b s3:idmap: fix spacing/indentation 2010-08-14 02:10:57 +02:00
Michael Adam
a739cb5944 s3:idmap_ldap: use idmap_rw_new_mapping in idmap_ldap_new_mapping 2010-08-14 02:10:57 +02:00
Michael Adam
a7ba9064d6 s3:idmap_ldap: add idmap_rw_ops to idmap_ldap_context and init in db_init() 2010-08-14 02:10:57 +02:00
Michael Adam
6659ac11de s3:idmap_tdb: use idmap_rw_new_mapping in idmap_tdb_new_mapping 2010-08-14 02:10:57 +02:00
Michael Adam
5a82cffb8b s3:idmap_tdb: add idmap_rw_ops to idmap_tdb_context and initialize them in init_db 2010-08-14 02:10:57 +02:00
Michael Adam
3f3cff9127 s3:idmap_tdb2: use idmap_rw_new_mapping in idmap_tdb2_new_mapping 2010-08-14 02:10:57 +02:00
Michael Adam
e82ef14008 s3:idmap_tdb2: add rw_ops to idmap_tdb2_context and initialize in idmap_tdb2_db_init 2010-08-14 02:10:56 +02:00
Michael Adam
307e5b239a s3:idmap: add abstract idmap_rw new_mapping mechanism without registering backends 2010-08-14 02:10:56 +02:00
Michael Adam
9897647584 s3:idmap_ad: untangle two assignments from checks 2010-08-14 02:10:56 +02:00
Michael Adam
264910b06f s3:idmap_ad: remove unused filter_low_id and filter_high_id from idmap_ad_context
The filter range from the idmap_domain is used now.
2010-08-14 02:10:56 +02:00
Michael Adam
d515d7fe49 s3:idmap_ad: use range from idmap_domain in idmap_ad_sids_to_unixids() 2010-08-14 02:10:56 +02:00
Michael Adam
96607d9543 s3:idmap_ad: use range from idmap_domain in idmap_ad_unixids_to_sids() 2010-08-14 02:10:55 +02:00
Michael Adam
f07049495d s3:idmap_rid: remove a comment that does not apply in that place.
Probably got copied from a different location.
2010-08-14 02:10:55 +02:00
Michael Adam
a758228367 s3:idmap_rid: remove unused domain_name from the idmap_rid_context. 2010-08-14 02:10:55 +02:00
Michael Adam
2916b302f3 s3:idmap_rid: remove range from idmap_rid_context()
Now, the idmap_domain range that is centrally parsed is used.
2010-08-14 02:10:55 +02:00
Michael Adam
ac63c50684 s3:idmap_rid: use range from idmap_domain in idmap_rid_sid_to_id() 2010-08-14 02:10:55 +02:00
Michael Adam
cda44b9e8e s3:idmap_rid: use ranges from idmap_domain struct in idmap_rid_id_to_sid() 2010-08-14 02:10:55 +02:00
Michael Adam
a6f58b76cc s3:idmap_rid: remove unused talloc context var from idmap_rid_sids_to_unixids() 2010-08-14 02:10:55 +02:00
Michael Adam
376e2bcc6e s3:idmap_rid: remove unused talloc context arg from idmap_rid_sid_to_id() 2010-08-14 02:10:54 +02:00
Michael Adam
597292a819 s3:idmap_rid: remove unused talloc context var from idmap_rid_unixids_to_sids() 2010-08-14 02:10:54 +02:00
Michael Adam
62833871bc s3:idmap_rid: remove unused talloc ctx argument from idmap_rid_id_to_sid() 2010-08-14 02:10:54 +02:00
Michael Adam
622bda8a67 s3:idmap_rid: untangle assignment from check in idmap_rid_initialize() 2010-08-14 02:10:54 +02:00
Michael Adam
a896ba07bb s3:idmap_ldap: add my (C) 2010-08-14 02:10:54 +02:00
Michael Adam
58cb5163f2 s3:idmap_ldap: create mappings for unmapped sids in idmap_ldap_sids_to_unixids() 2010-08-14 02:10:54 +02:00
Michael Adam
26c82596d9 s3:idmap_ldap: add a idmap_ldap_new_mapping().
High level function to create a new mapping for an unmapped sid.
This builds logic that used to reside in the top level idmap code
in the backend.
2010-08-14 02:10:54 +02:00
Michael Adam
4ed6f315d9 s3:idmap_ldap: add idmap_ldap_get_new_id() to allocate a new id given a domain
Currently this only works with the default domain, calling out
to idmap_ldap_allocate_id(). In the future this will be extended
to also work for non-default domains.
2010-08-14 02:10:54 +02:00
Michael Adam
5f77570bb6 s3:idmap_ldap: move idmap_ldap_set_mapping() further up. 2010-08-14 02:10:53 +02:00
Michael Adam
3e71eaeca0 s3:idmap_ldap: make idmap_ldap_alloc_context a member of idmap_ldap_context
this hides this beneath the idmap structure and removes a global variable
2010-08-14 02:10:53 +02:00
Michael Adam
523b94f180 s3:idmap_ldap: call idmap_ldap_alloc_init from idmap_ldap_init.
The alloc subsystem is now subordinate to the idmap system.
2010-08-14 02:10:53 +02:00
Michael Adam
c854261867 s3:idmap_ldap: remove the (now unused) range from idmap_ldap_alloc_context 2010-08-14 02:10:53 +02:00
Michael Adam
3f39921e7e s3:idmap_ldap: use ranges from idmap domain in idmap_ldap_allocate_id()
Second step in removing the idmap range from the idmap_ldap_alloc_context.
2010-08-14 02:10:53 +02:00
Michael Adam
5518bcb840 s3:idmap_ldap: add idmap_domain arg to idmap_ldap_alloc_init and verify_idpool
First step in removing idmap ranges from the idmap_ldap_alloc_context.
The range from the domain is to be used now.
2010-08-14 02:10:53 +02:00
Michael Adam
1cf27374ab s3:idmap_ldap: remove unused filter range from struct idmap_ldap_context 2010-08-14 02:10:53 +02:00
Michael Adam
5bb4a94c6c s3:idmap_ldap: don't load ranges - they have been loaded into struct idmap_domain 2010-08-14 02:10:52 +02:00
Michael Adam
634cd2e045 s3:idmap_ldap: use filter range from idmap domain, not idmap_ldap_context 2010-08-14 02:10:52 +02:00
Michael Adam
3a5f86216b s3:idmap_ldap: re-implement allocate_id in idmap methods. 2010-08-14 02:10:52 +02:00
Michael Adam
5bb5b69b0f s3:idmap_tdb: add my (C) 2010-08-14 02:10:52 +02:00
Michael Adam
78979c6420 s3:idmap_tdb: properly initialize the idmap_tdb context with zero 2010-08-14 02:10:52 +02:00
Michael Adam
9c3d4dff82 s3:idmap_tdb: prevent opening the idmap db more than once. 2010-08-14 02:10:52 +02:00
Michael Adam
66a38d8612 s3:idmap_tdb: rewrite sids_to_unixids to create mappings for unmapped sids. 2010-08-14 02:10:52 +02:00
Michael Adam
4f2bb1a259 s3:idmap_tdb: add a idmap_tdb_new_mapping().
High level function to create a new mapping for an unmapped sid.
This builds logic that used to reside in the top level idmap code
in the backend. To be called inside a transaction to guarantee
atomicity of the operation.
2010-08-14 02:10:51 +02:00
Michael Adam
47387b3ebb s3:idmap_tdb: move the set_mapping code up 2010-08-14 02:10:51 +02:00
Michael Adam
2b2a8f9b3b s3:idmap_tdb: use transaction wrapper for idmap_tdb_set_mapping(). 2010-08-14 02:10:51 +02:00
Michael Adam
b0615e4757 s3:idmap_tdb: remove unused struct idmap_tdb_state. 2010-08-14 02:10:51 +02:00
Michael Adam
28535349bd s3:idmap_tdb: remove unused idmap_alloc_db 2010-08-14 02:10:51 +02:00
Michael Adam
9010194972 s3:idmap_tdb: remove unused idmap_tdb_alloc_close(). 2010-08-14 02:10:51 +02:00
Michael Adam
2e4a0382f5 s3:idmap_tdb: give idmap_domain arg to idmap_tdb_allocate_id and use ctx->db
instead of alloc_db
2010-08-14 02:10:50 +02:00
Michael Adam
4301a81c99 s3:idmap_tdb: call idmap_tdb_init_hwm() from idmap_tdb_open_db(). 2010-08-14 02:10:50 +02:00
Michael Adam
1039506493 s3:idmap_tdb: move idmap_tdb_init_hwm up. 2010-08-14 02:10:50 +02:00
Michael Adam
f739ccb1b9 s3:idmap_tdb: remove unused idmap_tdb_load_ranges()
The idmap_tdb_state (which should actually be called idmap_tdb_alloc_context)
is being removed since the alloc part is combined with the id mapping part.
2010-08-14 02:10:50 +02:00
Michael Adam
b1285a5cb3 s3:idmap_tdb: have idmap_tdb_open_db take an idmap_domain struct as argument
the other arguments are not needed any more and are removed.
2010-08-14 02:10:49 +02:00
Michael Adam
53856fc8b0 s3:idmap_tdb: rename idmap_tdb_alloc_init->idmap_tdb_init_hwm and use db from idmap_tdb_context
instead of the special idmap_alloc_db
2010-08-14 02:10:49 +02:00
Michael Adam
384e35f8a7 s3:idmap_tdb: move definition of struct idmap_tdb_context up. 2010-08-14 02:10:47 +02:00
Michael Adam
db38972583 s3:idmap_tdb: remove filter_low_id,filter_high_id from idmap_tdb_context
These are now taken from the idmap_domain struct.
2010-08-14 02:10:47 +02:00
Michael Adam
3315f2cf9b s3:idmap_tdb: add idmap domain arg to idmap_tdb_upgrade and use domain range 2010-08-14 02:10:47 +02:00
Michael Adam
6d66018187 s3:idmap_tdb: use filter from idmap_domain rather than from idmap_tdb_context 2010-08-14 02:10:47 +02:00
Michael Adam
053e4510cd s3:idmap_tdb: give idmap domain argument to idmap_tdb_sid_to_id
instead of idmap_tdb_context. This is in preparation of using the
filter from the idmap_domain struct.
2010-08-14 02:10:47 +02:00
Michael Adam
f7a5f0987c s3:idmap_tdb: give idmap domain argument to idmap_tdb_id_to_sid
instead of idmap_tdb_context. This is in preparation of using the
filter from the idmap_domain struct.
2010-08-14 02:10:47 +02:00
Michael Adam
0f248169d9 s3:idmap_tdb: implement allocate_id in idmap methods for tdb backend 2010-08-14 02:10:46 +02:00
Michael Adam
2b9ad09ae7 s3:idmap_tdb: add idmap_tdb_get_new_id() to allocate a new id given a domain
Currently this only works with the default domain, calling out
to idmap_tdb_allocate_id(). In the future this will be extended
to also work for non-default domains.
2010-08-14 02:10:46 +02:00
Michael Adam
9e8df7403a s3:idmap_tdb: convert idmap_tdb_allocate_id() to use transaction wrappers 2010-08-14 02:10:46 +02:00
Michael Adam
85e9b35993 s3:idmap_tdb: remove an extra blank line 2010-08-14 02:10:46 +02:00
Michael Adam
aad8756dae s3:idmap_tdb2: add my (C) 2010-08-14 02:10:46 +02:00
Michael Adam
dac9f73ccd s3:idmap_tdb2: move idmap_tdb2_new_mapping() up. spare a prototype. 2010-08-14 02:10:46 +02:00
Michael Adam
627b9aa4b7 s3:idmap_tdb2: get rid of an extra variable in idmap_tdb2_db_init(). 2010-08-14 02:10:46 +02:00