diff options
author | Gerald Carter <jerry@samba.org> | 2001-12-30 00:03:47 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2001-12-30 00:03:47 +0000 |
commit | 98010a076797f4d05d8c9bff45e65c076f30da3a (patch) | |
tree | cda0a7bc2efc710bc8937113cf4104058c433f67 /source3/passdb/pdb_smbpasswd.c | |
parent | 49e66e1352952fe4bfe363c7effe2052ae6da8b8 (diff) | |
download | samba-98010a076797f4d05d8c9bff45e65c076f30da3a.tar.gz samba-98010a076797f4d05d8c9bff45e65c076f30da3a.tar.bz2 samba-98010a076797f4d05d8c9bff45e65c076f30da3a.zip |
pdb_getsampwnuid() merge from 2.2
(This used to be commit 54cbfc7ebcdf1bd2094407b689b0050f0abfa46f)
Diffstat (limited to 'source3/passdb/pdb_smbpasswd.c')
-rw-r--r-- | source3/passdb/pdb_smbpasswd.c | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/source3/passdb/pdb_smbpasswd.c b/source3/passdb/pdb_smbpasswd.c index 8e942a60fb..e82e94dae5 100644 --- a/source3/passdb/pdb_smbpasswd.c +++ b/source3/passdb/pdb_smbpasswd.c @@ -1418,48 +1418,6 @@ BOOL pdb_getsampwnam(SAM_ACCOUNT *sam_acct, const char *username) } -BOOL pdb_getsampwuid (SAM_ACCOUNT *sam_acct, uid_t uid) -{ - struct smb_passwd *smb_pw; - void *fp = NULL; - - DEBUG(10, ("pdb_getsampwuid: search by uid: %d\n", (int)uid)); - - /* Open the sam password file - not for update. */ - fp = startsmbfilepwent(lp_smb_passwd_file(), PWF_READ, &pw_file_lock_depth); - - if (fp == NULL) { - DEBUG(0, ("unable to open passdb database.\n")); - return False; - } - - while ( ((smb_pw=getsmbfilepwent(fp)) != NULL) && (smb_pw->smb_userid != uid) ) - /* do nothing */ ; - - endsmbfilepwent(fp, &pw_file_lock_depth); - - /* did we locate the username in smbpasswd */ - if (smb_pw == NULL) - return False; - - DEBUG(10, ("pdb_getsampwuid: found by name: %s\n", smb_pw->smb_name)); - - if (!sam_acct) { - DEBUG(10,("pdb_getsampwuid:SAM_ACCOUNT is NULL\n")); -#if 0 - smb_panic("NULL pointer passed to pdb_getsampwuid\n"); -#endif - return False; - } - - /* now build the SAM_ACCOUNT */ - if (!build_sam_account(sam_acct, smb_pw)) - return False; - - /* success */ - return True; -} - BOOL pdb_getsampwrid(SAM_ACCOUNT *sam_acct,uint32 rid) { struct smb_passwd *smb_pw; |