diff options
author | Gerald Carter <jerry@samba.org> | 2003-07-11 05:33:40 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2003-07-11 05:33:40 +0000 |
commit | 03d5867d529f126da368ebda70bf2d997aa602e0 (patch) | |
tree | 6bed479ab42b3bcbd5ac6b70157c16232ff69869 /source3/sam/idmap.c | |
parent | d117c83ca9fc1b598d09f5d24805560e9c49f65c (diff) | |
download | samba-03d5867d529f126da368ebda70bf2d997aa602e0.tar.gz samba-03d5867d529f126da368ebda70bf2d997aa602e0.tar.bz2 samba-03d5867d529f126da368ebda70bf2d997aa602e0.zip |
moving more code around.
* move rid allocation into IDMAP. See comments in _api_samr_create_user()
* add winbind delete user/group functions
I'm checking this in to sync up with everyone. But I'm going to split
the add a separate winbindd_allocate_rid() function for systems
that have an 'add user script' but need idmap to give them a RID.
Life would be so much simplier without 'enable rid algorithm'.
The current RID allocation is horrible due to this one fact.
Tested idmap_tdb but not idmap_ldap yet. Will do that tomorrow.
Nothing has changed in the way a samba domain is represented, stored,
or search in the directory so things should be ok with previous installations.
going to bed now.
(This used to be commit 0463045cc7ff177fab44b25faffad5bf7140244d)
Diffstat (limited to 'source3/sam/idmap.c')
-rw-r--r-- | source3/sam/idmap.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/source3/sam/idmap.c b/source3/sam/idmap.c index 1db89eba24..7a8f270e15 100644 --- a/source3/sam/idmap.c +++ b/source3/sam/idmap.c @@ -252,7 +252,7 @@ NTSTATUS idmap_get_sid_from_id(DOM_SID *sid, unid_t id, int id_type) } /************************************************************************** - Get ID from SID. This can create a mapping for a SID to a POSIX id. + Alloocate a new UNIX uid/gid **************************************************************************/ NTSTATUS idmap_allocate_id(unid_t *id, int id_type) @@ -265,6 +265,19 @@ NTSTATUS idmap_allocate_id(unid_t *id, int id_type) return cache_map->allocate_id( id, id_type ); } +/************************************************************************** + Alloocate a new RID +**************************************************************************/ + +NTSTATUS idmap_allocate_rid(uint32 *rid, int type) +{ + /* we have to allocate from the authoritative backend */ + + if ( remote_map ) + return remote_map->allocate_rid( rid, type ); + + return cache_map->allocate_rid( rid, type ); +} /************************************************************************** Shutdown maps. |