diff options
author | Luke Leighton <lkcl@samba.org> | 1998-10-21 21:11:16 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1998-10-21 21:11:16 +0000 |
commit | 21e107fd42eb953affac28239588458c6c0ee323 (patch) | |
tree | c00689d10ac2147dae1fe035585901e8c46ee0e7 /source3/passdb/passdb.c | |
parent | 8c307cee7a687da965c9b03ff19dd9de2eaabe64 (diff) | |
download | samba-21e107fd42eb953affac28239588458c6c0ee323.tar.gz samba-21e107fd42eb953affac28239588458c6c0ee323.tar.bz2 samba-21e107fd42eb953affac28239588458c6c0ee323.zip |
the next dialog: user-groups. it's not very sensible what appears, but hey:
it appears!
(This used to be commit 399035098f212e976cc0000a215e0705ebe78c05)
Diffstat (limited to 'source3/passdb/passdb.c')
-rw-r--r-- | source3/passdb/passdb.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c index a4bb657e80..0cd2f6ef2e 100644 --- a/source3/passdb/passdb.c +++ b/source3/passdb/passdb.c @@ -85,6 +85,15 @@ BOOL initialize_password_db(void) */ /************************************************************************ + Utility function to search smb passwd by rid. +*************************************************************************/ + +struct smb_passwd *iterate_getsmbpwrid(uint32 user_rid) +{ + return iterate_getsmbpwuid(pdb_user_rid_to_uid(user_rid)); +} + +/************************************************************************ Utility function to search smb passwd by uid. use this if your database does not have search facilities. *************************************************************************/ @@ -223,6 +232,15 @@ struct smb_passwd *getsmbpwnam(char *name) } /************************************************************************ + Routine to search smb passwd by user rid. +*************************************************************************/ + +struct smb_passwd *getsmbpwrid(uint32 user_rid) +{ + return pdb_ops->getsmbpwrid(user_rid); +} + +/************************************************************************ Routine to search smb passwd by uid. *************************************************************************/ @@ -966,6 +984,15 @@ Error was %s\n", sid_file, strerror(errno) )); converts UNIX uid to an NT User RID. ********************************************************************/ +uid_t pdb_user_rid_to_uid(uint32 user_rid) +{ + return (uid_t)(((user_rid & (~USER_RID_TYPE))- 1000)/RID_MULTIPLIER); +} + +/******************************************************************* + converts UNIX uid to an NT User RID. + ********************************************************************/ + uint32 pdb_uid_to_user_rid(uid_t uid) { return (((((uint32)uid)*RID_MULTIPLIER) + 1000) | USER_RID_TYPE); |