summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--auth1.c6
-rw-r--r--auth2.c4
3 files changed, 9 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 6ffe51708..4827a8a3c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -23,6 +23,9 @@
23 - deraadt@cvs.openbsd.org 2001/02/12 22:56:09 23 - deraadt@cvs.openbsd.org 2001/02/12 22:56:09
24 [clientloop.c packet.c ssh-keyscan.c] 24 [clientloop.c packet.c ssh-keyscan.c]
25 deal with EAGAIN/EINTR selects which were skipped 25 deal with EAGAIN/EINTR selects which were skipped
26 - markus@cvs.openssh.org 2001/02/13 22:49:40
27 [auth1.c auth2.c]
28 setproctitle(user) only if getpwnam succeeds
26 29
2720010214 3020010214
28 - (djm) Don't try to close PAM session or delete credentials if the 31 - (djm) Don't try to close PAM session or delete credentials if the
@@ -3951,4 +3954,4 @@
3951 - Wrote replacements for strlcpy and mkdtemp 3954 - Wrote replacements for strlcpy and mkdtemp
3952 - Released 1.0pre1 3955 - Released 1.0pre1
3953 3956
3954$Id: ChangeLog,v 1.765 2001/02/15 03:12:08 mouring Exp $ 3957$Id: ChangeLog,v 1.766 2001/02/15 03:14:11 mouring Exp $
diff --git a/auth1.c b/auth1.c
index 2649924fd..11c56a519 100644
--- a/auth1.c
+++ b/auth1.c
@@ -10,7 +10,7 @@
10 */ 10 */
11 11
12#include "includes.h" 12#include "includes.h"
13RCSID("$OpenBSD: auth1.c,v 1.16 2001/02/12 16:16:23 markus Exp $"); 13RCSID("$OpenBSD: auth1.c,v 1.17 2001/02/13 22:49:40 markus Exp $");
14 14
15#include "xmalloc.h" 15#include "xmalloc.h"
16#include "rsa.h" 16#include "rsa.h"
@@ -378,8 +378,6 @@ do_authentication()
378 authctxt->user = user; 378 authctxt->user = user;
379 authctxt->style = style; 379 authctxt->style = style;
380 380
381 setproctitle("%s", user);
382
383 /* Verify that the user is a valid user. */ 381 /* Verify that the user is a valid user. */
384 pw = getpwnam(user); 382 pw = getpwnam(user);
385 if (pw && allowed_user(pw)) { 383 if (pw && allowed_user(pw)) {
@@ -391,6 +389,8 @@ do_authentication()
391 } 389 }
392 authctxt->pw = pw; 390 authctxt->pw = pw;
393 391
392 setproctitle("%s", pw ? user : "unknown");
393
394#ifdef USE_PAM 394#ifdef USE_PAM
395 if (pw) 395 if (pw)
396 start_pam(user); 396 start_pam(user);
diff --git a/auth2.c b/auth2.c
index 3cd946877..0a627bf80 100644
--- a/auth2.c
+++ b/auth2.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: auth2.c,v 1.41 2001/02/12 16:16:23 markus Exp $"); 26RCSID("$OpenBSD: auth2.c,v 1.42 2001/02/13 22:49:40 markus Exp $");
27 27
28#include <openssl/evp.h> 28#include <openssl/evp.h>
29 29
@@ -189,7 +189,6 @@ input_userauth_request(int type, int plen, void *ctxt)
189 if (authctxt->attempt++ == 0) { 189 if (authctxt->attempt++ == 0) {
190 /* setup auth context */ 190 /* setup auth context */
191 struct passwd *pw = NULL; 191 struct passwd *pw = NULL;
192 setproctitle("%s", user);
193 pw = getpwnam(user); 192 pw = getpwnam(user);
194 if (pw && allowed_user(pw) && strcmp(service, "ssh-connection")==0) { 193 if (pw && allowed_user(pw) && strcmp(service, "ssh-connection")==0) {
195 authctxt->pw = pwcopy(pw); 194 authctxt->pw = pwcopy(pw);
@@ -204,6 +203,7 @@ input_userauth_request(int type, int plen, void *ctxt)
204 start_pam("NOUSER"); 203 start_pam("NOUSER");
205#endif 204#endif
206 } 205 }
206 setproctitle("%s", pw ? user : "unknown");
207 authctxt->user = xstrdup(user); 207 authctxt->user = xstrdup(user);
208 authctxt->service = xstrdup(service); 208 authctxt->service = xstrdup(service);
209 authctxt->style = style ? xstrdup(style) : NULL; /* currently unused */ 209 authctxt->style = style ? xstrdup(style) : NULL; /* currently unused */