summaryrefslogtreecommitdiff
path: root/auth-pam.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2004-07-21 20:54:47 +1000
committerDamien Miller <djm@mindrot.org>2004-07-21 20:54:47 +1000
commit2d2ed3d63379668c80878b4008de51c00e1d9b86 (patch)
tree8ee5e34eb23dae3fa94e72058b51967dd00a35b1 /auth-pam.c
parent10a445b9e509086dc4c97e39d5a3d1342c2228fd (diff)
- (djm) [auth-pam.c] Portable parts of bz#899: Don't display invalid
usernames in setproctitle from peak AT argo.troja.mff.cuni.cz;
Diffstat (limited to 'auth-pam.c')
-rw-r--r--auth-pam.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/auth-pam.c b/auth-pam.c
index 63515c311..7d610d0bb 100644
--- a/auth-pam.c
+++ b/auth-pam.c
@@ -47,7 +47,7 @@
47 47
48/* Based on $FreeBSD: src/crypto/openssh/auth2-pam-freebsd.c,v 1.11 2003/03/31 13:48:18 des Exp $ */ 48/* Based on $FreeBSD: src/crypto/openssh/auth2-pam-freebsd.c,v 1.11 2003/03/31 13:48:18 des Exp $ */
49#include "includes.h" 49#include "includes.h"
50RCSID("$Id: auth-pam.c,v 1.112 2004/07/18 23:39:11 djm Exp $"); 50RCSID("$Id: auth-pam.c,v 1.113 2004/07/21 10:54:47 djm Exp $");
51 51
52#ifdef USE_PAM 52#ifdef USE_PAM
53#if defined(HAVE_SECURITY_PAM_APPL_H) 53#if defined(HAVE_SECURITY_PAM_APPL_H)
@@ -365,8 +365,12 @@ sshpam_thread(void *ctxtp)
365 const char *pam_user; 365 const char *pam_user;
366 366
367 pam_get_item(sshpam_handle, PAM_USER, (void **)&pam_user); 367 pam_get_item(sshpam_handle, PAM_USER, (void **)&pam_user);
368 setproctitle("%s [pam]", pam_user);
369 environ[0] = NULL; 368 environ[0] = NULL;
369
370 if (sshpam_authctxt != NULL) {
371 setproctitle("%s [pam]",
372 sshpam_authctxt->valid ? pam_user : "unknown");
373 }
370#endif 374#endif
371 375
372 sshpam_conv.conv = sshpam_thread_conv; 376 sshpam_conv.conv = sshpam_thread_conv;