diff options
author | djm <djm> | 2004-07-21 10:54:47 +0000 |
---|---|---|
committer | djm <djm> | 2004-07-21 10:54:47 +0000 |
commit | f41299ce593584be8d2518aa4791adb1a5848a88 (patch) | |
tree | 8be82ff1dab2f3d5840b60e0ceac4ea35133d316 /auth-pam.c | |
parent | 21f5260291c96dc291152485417483548448be78 (diff) | |
download | openssh-f41299ce593584be8d2518aa4791adb1a5848a88.tar.gz |
- (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.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -47,7 +47,7 @@ /* Based on $FreeBSD: src/crypto/openssh/auth2-pam-freebsd.c,v 1.11 2003/03/31 13:48:18 des Exp $ */ #include "includes.h" -RCSID("$Id: auth-pam.c,v 1.112 2004/07/18 23:39:11 djm Exp $"); +RCSID("$Id: auth-pam.c,v 1.113 2004/07/21 10:54:47 djm Exp $"); #ifdef USE_PAM #if defined(HAVE_SECURITY_PAM_APPL_H) @@ -365,8 +365,12 @@ sshpam_thread(void *ctxtp) const char *pam_user; pam_get_item(sshpam_handle, PAM_USER, (void **)&pam_user); - setproctitle("%s [pam]", pam_user); environ[0] = NULL; + + if (sshpam_authctxt != NULL) { + setproctitle("%s [pam]", + sshpam_authctxt->valid ? pam_user : "unknown"); + } #endif sshpam_conv.conv = sshpam_thread_conv; |