summaryrefslogtreecommitdiff
path: root/auth1.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-02-15 03:14:11 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-02-15 03:14:11 +0000
commitc1ba31fadc1146ed56bf33ae0fca2cfe1f1b9f94 (patch)
tree435ba79b3fc934bf71390db76002cf357cc07624 /auth1.c
parentf9452513fcf92be881809006ce3c210805d5f2ad (diff)
- markus@cvs.openssh.org 2001/02/13 22:49:40
[auth1.c auth2.c] setproctitle(user) only if getpwnam succeeds
Diffstat (limited to 'auth1.c')
-rw-r--r--auth1.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/auth1.c b/auth1.c
index 2649924f..11c56a51 100644
--- a/auth1.c
+++ b/auth1.c
@@ -10,7 +10,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: auth1.c,v 1.16 2001/02/12 16:16:23 markus Exp $");
+RCSID("$OpenBSD: auth1.c,v 1.17 2001/02/13 22:49:40 markus Exp $");
#include "xmalloc.h"
#include "rsa.h"
@@ -378,8 +378,6 @@ do_authentication()
authctxt->user = user;
authctxt->style = style;
- setproctitle("%s", user);
-
/* Verify that the user is a valid user. */
pw = getpwnam(user);
if (pw && allowed_user(pw)) {
@@ -391,6 +389,8 @@ do_authentication()
}
authctxt->pw = pw;
+ setproctitle("%s", pw ? user : "unknown");
+
#ifdef USE_PAM
if (pw)
start_pam(user);