getpwnam() failing is a serious error (corrupt smbpasswd database)
authorLuke Leighton <lkcl@samba.org>
Thu, 15 Oct 1998 21:28:04 +0000 (21:28 +0000)
committerLuke Leighton <lkcl@samba.org>
Thu, 15 Oct 1998 21:28:04 +0000 (21:28 +0000)
(This used to be commit 18e628ac1516cbd9773608cb5a9f4b784cf4dd9e)

source3/passdb/smbpass.c

index 085ece0f5ec417d3c0a18b1fe4617f8f170d9b04..eefc30382b700fbf7a887fe1e72789bc253ff629 100644 (file)
@@ -328,7 +328,12 @@ static struct sam_passwd *getsmbfile21pwent(void *vp)
        if (pw_buf == NULL) return NULL;
 
        pwfile = getpwnam(pw_buf->smb_name);
-       if (pwfile == NULL) return NULL;
+       if (pwfile == NULL)
+       {
+               DEBUG(0,"getsmbfile21pwent: smbpasswd database is corrupt!\n"));
+               DEBUG(0,"getsmbfile21pwent: username %s not in unix passwd database!\n", pw_buf->smb_name));
+               return NULL;
+       }
 
        pdb_init_sam(&user);