summaryrefslogtreecommitdiff
path: root/auth2.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 /auth2.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 'auth2.c')
-rw-r--r--auth2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/auth2.c b/auth2.c
index 3cd94687..0a627bf8 100644
--- a/auth2.c
+++ b/auth2.c
@@ -23,7 +23,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: auth2.c,v 1.41 2001/02/12 16:16:23 markus Exp $");
+RCSID("$OpenBSD: auth2.c,v 1.42 2001/02/13 22:49:40 markus Exp $");
#include <openssl/evp.h>
@@ -189,7 +189,6 @@ input_userauth_request(int type, int plen, void *ctxt)
if (authctxt->attempt++ == 0) {
/* setup auth context */
struct passwd *pw = NULL;
- setproctitle("%s", user);
pw = getpwnam(user);
if (pw && allowed_user(pw) && strcmp(service, "ssh-connection")==0) {
authctxt->pw = pwcopy(pw);
@@ -204,6 +203,7 @@ input_userauth_request(int type, int plen, void *ctxt)
start_pam("NOUSER");
#endif
}
+ setproctitle("%s", pw ? user : "unknown");
authctxt->user = xstrdup(user);
authctxt->service = xstrdup(service);
authctxt->style = style ? xstrdup(style) : NULL; /* currently unused */