diff options
author | Gerald Carter <jerry@samba.org> | 2001-08-23 22:58:00 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2001-08-23 22:58:00 +0000 |
commit | 92f795760a6d6524028c7e7042d2b9f96f8f9972 (patch) | |
tree | 590ed9cd1eb9f03445e2c4452a9cc755bd53707c | |
parent | 7495a1a894a44913adc9602d1759a11eb00b631c (diff) | |
download | samba-92f795760a6d6524028c7e7042d2b9f96f8f9972.tar.gz samba-92f795760a6d6524028c7e7042d2b9f96f8f9972.tar.bz2 samba-92f795760a6d6524028c7e7042d2b9f96f8f9972.zip |
merge from 2.2
(This used to be commit 97b5499def99016b4baf97343597f1b218a69399)
-rw-r--r-- | source3/passdb/pdb_smbpasswd.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/source3/passdb/pdb_smbpasswd.c b/source3/passdb/pdb_smbpasswd.c index 942c232ae8..1ef2995d71 100644 --- a/source3/passdb/pdb_smbpasswd.c +++ b/source3/passdb/pdb_smbpasswd.c @@ -1297,6 +1297,7 @@ void pdb_endsampwent (void) BOOL pdb_getsampwent(SAM_ACCOUNT *user) { struct smb_passwd *pw_buf=NULL; + BOOL done = False; DEBUG(5,("pdb_getsampwent\n")); @@ -1313,9 +1314,19 @@ BOOL pdb_getsampwent(SAM_ACCOUNT *user) if (pw_buf == NULL) return False; - /* build the SAM_ACCOUNT entry from the smb_passwd struct. */ - if (!build_sam_account(user, pw_buf)) - return False; + while (!done) + { + /* do we have an entry? */ + pw_buf = getsmbfilepwent(global_vp); + if (pw_buf == NULL) + return False; + + /* build the SAM_ACCOUNT entry from the smb_passwd struct. + We loop in case the user in the pdb does not exist in + the local system password file */ + if (build_sam_account(user, pw_buf)) + done = True; + } DEBUG(5,("pdb_getsampwent:done\n")); |