summaryrefslogtreecommitdiff
path: root/source3/passdb/pdb_smbpasswd.c
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2002-05-26 19:11:52 +0000
committerSimo Sorce <idra@samba.org>2002-05-26 19:11:52 +0000
commita27a0e01e2f0c48a4a8d84b17693390a268310f8 (patch)
tree36a97084026b6bfe9528313ae4970d07a5ec0603 /source3/passdb/pdb_smbpasswd.c
parent069e6fb9eb4a0bf6720cbbf493d0cb36baac9580 (diff)
downloadsamba-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_smbpasswd.c')
-rw-r--r--source3/passdb/pdb_smbpasswd.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source3/passdb/pdb_smbpasswd.c b/source3/passdb/pdb_smbpasswd.c
index f6214220ea..a6bd66eace 100644
--- a/source3/passdb/pdb_smbpasswd.c
+++ b/source3/passdb/pdb_smbpasswd.c
@@ -1411,7 +1411,6 @@ static BOOL smbpasswd_getsampwnam(struct pdb_methods *my_methods, SAM_ACCOUNT *s
return True;
}
-
static BOOL smbpasswd_getsampwrid(struct pdb_methods *my_methods, SAM_ACCOUNT *sam_acct,uint32 rid)
{
struct smbpasswd_privates *smbpasswd_state = (struct smbpasswd_privates*)my_methods->private_data;
@@ -1456,6 +1455,13 @@ static BOOL smbpasswd_getsampwrid(struct pdb_methods *my_methods, SAM_ACCOUNT *s
return True;
}
+static BOOL smbpasswd_getsampwsid(struct pdb_methods *my_methods, SAM_ACCOUNT * user, DOM_SID *sid)
+{
+ uint32 rid;
+ sid_peek_rid(sid, &rid);
+ return smbpasswd_getsampwrid(my_methods, user, rid);
+}
+
static BOOL smbpasswd_add_sam_account(struct pdb_methods *my_methods, SAM_ACCOUNT *sampass)
{
struct smbpasswd_privates *smbpasswd_state = (struct smbpasswd_privates*)my_methods->private_data;
@@ -1529,7 +1535,7 @@ NTSTATUS pdb_init_smbpasswd(PDB_CONTEXT *pdb_context, PDB_METHODS **pdb_method,
(*pdb_method)->endsampwent = smbpasswd_endsampwent;
(*pdb_method)->getsampwent = smbpasswd_getsampwent;
(*pdb_method)->getsampwnam = smbpasswd_getsampwnam;
- (*pdb_method)->getsampwrid = smbpasswd_getsampwrid;
+ (*pdb_method)->getsampwsid = smbpasswd_getsampwsid;
(*pdb_method)->add_sam_account = smbpasswd_add_sam_account;
(*pdb_method)->update_sam_account = smbpasswd_update_sam_account;
(*pdb_method)->delete_sam_account = smbpasswd_delete_sam_account;