Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-3]: src/lib/libpam/modules/pam_ftpusers Pull up revision 1.5 (req...



details:   https://anonhg.NetBSD.org/src/rev/8940f78db5a6
branches:  netbsd-3
changeset: 576555:8940f78db5a6
user:      tron <tron%NetBSD.org@localhost>
date:      Mon Jul 11 11:31:18 2005 +0000

description:
Pull up revision 1.5 (requested by lukem in ticket #539):
Fix getgrnam -> getgrnam_r

diffstat:

 lib/libpam/modules/pam_ftpusers/pam_ftpusers.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (43 lines):

diff -r 8413e6d2f814 -r 8940f78db5a6 lib/libpam/modules/pam_ftpusers/pam_ftpusers.c
--- a/lib/libpam/modules/pam_ftpusers/pam_ftpusers.c    Mon Jul 11 11:31:12 2005 +0000
+++ b/lib/libpam/modules/pam_ftpusers/pam_ftpusers.c    Mon Jul 11 11:31:18 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pam_ftpusers.c,v 1.2.2.2 2005/07/11 11:19:34 tron Exp $        */
+/*     $NetBSD: pam_ftpusers.c,v 1.2.2.3 2005/07/11 11:31:18 tron Exp $        */
 
 /*-
  * Copyright (c) 2001 Networks Associates Technology, Inc.
@@ -38,7 +38,7 @@
 #ifdef __FreeBSD__
 __FBSDID("$FreeBSD: src/lib/libpam/modules/pam_ftpusers/pam_ftpusers.c,v 1.1 2002/05/08 00:30:10 des Exp $");
 #else
-__RCSID("$NetBSD: pam_ftpusers.c,v 1.2.2.2 2005/07/11 11:19:34 tron Exp $");
+__RCSID("$NetBSD: pam_ftpusers.c,v 1.2.2.3 2005/07/11 11:31:18 tron Exp $");
 #endif
 
 #include <ctype.h>
@@ -61,13 +61,13 @@
     int argc __unused, const char *argv[] __unused)
 {
        struct passwd *pwd, pwres;
-       struct group *grp;
+       struct group *grp, grres;
        const char *user;
        int pam_err, found, allow;
        char *line, *name, **mem;
        size_t len, ulen;
        FILE *f;
-       char pwbuf[1024];
+       char pwbuf[1024], grbuf[1024];
 
        pam_err = pam_get_user(pamh, &user, NULL);
        if (pam_err != PAM_SUCCESS)
@@ -102,7 +102,7 @@
                        fclose(f);
                        return (PAM_BUF_ERR);
                }
-               grp = getgrnam(name);
+               (void)getgrnam_r(name, &grres, grbuf, sizeof(grbuf), &grp);
                free(name);
                if (grp == NULL)
                        continue;



Home | Main Index | Thread Index | Old Index