diff options
author | Volker Lendecke <vlendec@samba.org> | 2004-03-14 10:24:19 +0000 |
---|---|---|
committer | Volker Lendecke <vlendec@samba.org> | 2004-03-14 10:24:19 +0000 |
commit | 5b0f30e01c5a51f98025b035bfa5e00eb0268fef (patch) | |
tree | 46e4a3d4e1bed72363fb8332642af9639a7fffb6 /source3/nsswitch/wb_client.c | |
parent | af6225afa95cf1d8dd6bb1bfb438daaf6097e30a (diff) | |
download | samba-5b0f30e01c5a51f98025b035bfa5e00eb0268fef.tar.gz samba-5b0f30e01c5a51f98025b035bfa5e00eb0268fef.tar.bz2 samba-5b0f30e01c5a51f98025b035bfa5e00eb0268fef.zip |
Add and delete aliases via srv_samr_nt. For that I added a RID allocation call
to winbindd. idmap_allocate_rid wants information about whether this will be a
user or a group, I did not export this to the winbind interface.
The reason for idmap to get that info is to keep consistent with the
algorithmic convention to alloc only even rids for users and odd rids for
groups. I'm not fully convinced that this really gains us anything. Any real
good arguments?
Volker
(This used to be commit 7f62cf933cad69799204bfdc773e08ff0dde0b20)
Diffstat (limited to 'source3/nsswitch/wb_client.c')
-rw-r--r-- | source3/nsswitch/wb_client.c | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/source3/nsswitch/wb_client.c b/source3/nsswitch/wb_client.c index 90e4584dab..32dfc8deca 100644 --- a/source3/nsswitch/wb_client.c +++ b/source3/nsswitch/wb_client.c @@ -235,6 +235,30 @@ BOOL winbind_gid_to_sid(DOM_SID *sid, gid_t gid) return (result == NSS_STATUS_SUCCESS); } +BOOL winbind_allocate_rid(uint32 *rid) +{ + struct winbindd_request request; + struct winbindd_response response; + int result; + + /* Initialise request */ + + ZERO_STRUCT(request); + ZERO_STRUCT(response); + + /* Make request */ + + result = winbindd_request(WINBINDD_ALLOCATE_RID, &request, &response); + + if (result != NSS_STATUS_SUCCESS) + return False; + + /* Copy out result */ + *rid = response.data.rid; + + return True; +} + /* Fetch the list of groups a user is a member of from winbindd. This is used by winbind_getgroups. */ @@ -595,8 +619,6 @@ BOOL winbind_delete_group( const char *group ) } /***********************************************************************/ -#if 0 /* not needed currently since winbindd_acct was added -- jerry */ - /* Call winbindd to convert SID to uid. Do not allocate */ BOOL winbind_sid_to_uid_query(uid_t *puid, const DOM_SID *sid) @@ -667,7 +689,5 @@ BOOL winbind_sid_to_gid_query(gid_t *pgid, const DOM_SID *sid) return (result == NSS_STATUS_SUCCESS); } -#endif /* JERRY */ - /***********************************************************************/ |