diff options
author | Simo Sorce <idra@samba.org> | 2002-05-26 19:11:52 +0000 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2002-05-26 19:11:52 +0000 |
commit | a27a0e01e2f0c48a4a8d84b17693390a268310f8 (patch) | |
tree | 36a97084026b6bfe9528313ae4970d07a5ec0603 /source3/passdb/pdb_tdb.c | |
parent | 069e6fb9eb4a0bf6720cbbf493d0cb36baac9580 (diff) | |
download | samba-a27a0e01e2f0c48a4a8d84b17693390a268310f8.tar.gz samba-a27a0e01e2f0c48a4a8d84b17693390a268310f8.tar.bz2 samba-a27a0e01e2f0c48a4a8d84b17693390a268310f8.zip |
change: pdb_getsampwrid() ->pdb_getsampwsid()
passdb interface change, now the passdb modules will be asked for SID not for rid, the modules have been updated with a passthrough function that calls the old getsampwrid() functions.
srv_samr_nt.c functions that made use of the pdb_getsampwrid funcion has been updated to use the SID one.
(This used to be commit f5c6496c33fa7f5c2826540ffb4a49d8a5790fb3)
Diffstat (limited to 'source3/passdb/pdb_tdb.c')
-rw-r--r-- | source3/passdb/pdb_tdb.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/source3/passdb/pdb_tdb.c b/source3/passdb/pdb_tdb.c index cda9d68c10..2341210e39 100644 --- a/source3/passdb/pdb_tdb.c +++ b/source3/passdb/pdb_tdb.c @@ -277,7 +277,7 @@ done: Intialize a BYTE buffer from a SAM_ACCOUNT struct *********************************************************************/ static uint32 init_buffer_from_sam (struct tdbsam_privates *tdb_state, - uint8 **buf, SAM_ACCOUNT *sampass) + uint8 **buf, const SAM_ACCOUNT *sampass) { size_t len, buflen; @@ -668,6 +668,13 @@ static BOOL tdbsam_getsampwrid (struct pdb_methods *my_methods, SAM_ACCOUNT *use return tdbsam_getsampwnam (my_methods, user, name); } +static BOOL tdbsam_getsampwsid(struct pdb_methods *my_methods, SAM_ACCOUNT * user, DOM_SID *sid) +{ + uint32 rid; + sid_peek_rid(sid, &rid); + return tdbsam_getsampwrid(my_methods, user, rid); +} + /*************************************************************************** Delete a SAM_ACCOUNT ****************************************************************************/ @@ -910,7 +917,7 @@ NTSTATUS pdb_init_tdbsam(PDB_CONTEXT *pdb_context, PDB_METHODS **pdb_method, con (*pdb_method)->endsampwent = tdbsam_endsampwent; (*pdb_method)->getsampwent = tdbsam_getsampwent; (*pdb_method)->getsampwnam = tdbsam_getsampwnam; - (*pdb_method)->getsampwrid = tdbsam_getsampwrid; + (*pdb_method)->getsampwsid = tdbsam_getsampwsid; (*pdb_method)->add_sam_account = tdbsam_add_sam_account; (*pdb_method)->update_sam_account = tdbsam_update_sam_account; (*pdb_method)->delete_sam_account = tdbsam_delete_sam_account; |