[tpop3d-discuss] auth_pam fail for non-local user.

Chris Lightfoot chris at ex-parrot.com
Wed, 10 Sep 2003 11:28:43 +0100


On Wed, Sep 10, 2003 at 02:49:18PM +0800, Haris Hudji wrote:
> 
> I'm not so sure but I think the problem rely on this code:
>     /* Copy the password structure, since it is in static storage and may
>      * get overwritten by calls in the PAM code. */
>     if (!(pw2 = getpwnam(user))) return NULL;
>     pw = *pw2;

Yes. Ooops.

> and if anyone prefer my patch, it's attached.

Thanks for this, but isn't


diff -u -r1.28 auth_pam.c
--- auth_pam.c  9 Jan 2003 23:20:23 -0000       1.28
+++ auth_pam.c  10 Sep 2003 10:26:22 -0000
@@ -142,7 +142,6 @@
 
     /* Copy the password structure, since it is in static storage and may
      * get overwritten by calls in the PAM code. */
-    if (!(pw2 = getpwnam(user))) return NULL;
     pw = *pw2;
 
     /* pw now contains either the data for the real UNIX user named or the UNIX


sufficient?


-- 
Free, a., already paid for. (Peyton Jones)