summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2002-03-22 03:08:30 +0000
committerBen Lindstrom <mouring@eviladmin.org>2002-03-22 03:08:30 +0000
commitf34e4eb6c730fa38640aeef5f6801035caaba460 (patch)
tree93a790ff9e8bc626d00b45f9c81096c005985a69
parent7ebb635d812d68772ce3fb0b64d798c54fbfab71 (diff)
- markus@cvs.openbsd.org 2002/03/19 15:31:47
[auth.c] check for NULL; from provos@
-rw-r--r--ChangeLog5
-rw-r--r--auth.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 43bdf3c4..ed52bdc9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -97,6 +97,9 @@
- markus@cvs.openbsd.org 2002/03/19 14:27:39
[auth.c auth1.c auth2.c]
make getpwnamallow() allways call pwcopy()
+ - markus@cvs.openbsd.org 2002/03/19 15:31:47
+ [auth.c]
+ check for NULL; from provos@
20020317
- (tim) [configure.ac] Assume path given with --with-pid-dir=PATH is wanted,
@@ -7943,4 +7946,4 @@
- Wrote replacements for strlcpy and mkdtemp
- Released 1.0pre1
-$Id: ChangeLog,v 1.1952 2002/03/22 03:04:08 mouring Exp $
+$Id: ChangeLog,v 1.1953 2002/03/22 03:08:30 mouring Exp $
diff --git a/auth.c b/auth.c
index f368faf2..a9f981d1 100644
--- a/auth.c
+++ b/auth.c
@@ -23,7 +23,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: auth.c,v 1.40 2002/03/19 14:27:39 markus Exp $");
+RCSID("$OpenBSD: auth.c,v 1.41 2002/03/19 15:31:47 markus Exp $");
#ifdef HAVE_LOGIN_H
#include <login.h>
@@ -470,5 +470,7 @@ getpwnamallow(const char *user)
auth_close(as);
#endif
#endif
- return (pwcopy(pw));
+ if (pw != NULL)
+ return (pwcopy(pw));
+ return (NULL);
}