- (djm) [auth-pam.c] Portable parts of bz#899: Don't display invalid

usernames in setproctitle from peak AT argo.troja.mff.cuni.cz;
This commit is contained in:
Damien Miller 2004-07-21 20:54:47 +10:00
Родитель 10a445b9e5
Коммит 2d2ed3d633
2 изменённых файлов: 9 добавлений и 3 удалений

Просмотреть файл

@ -11,6 +11,8 @@
- djm@cvs.openbsd.org 2004/07/21 10:36:23 - djm@cvs.openbsd.org 2004/07/21 10:36:23
[gss-serv-krb5.c] [gss-serv-krb5.c]
fix function declaration fix function declaration
- (djm) [auth-pam.c] Portable parts of bz#899: Don't display invalid
usernames in setproctitle from peak AT argo.troja.mff.cuni.cz;
20040720 20040720
- (djm) [log.c] bz #111: Escape more control characters when sending data - (djm) [log.c] bz #111: Escape more control characters when sending data
@ -1557,4 +1559,4 @@
- (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Trim deprecated options from INSTALL. Mention UsePAM
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
$Id: ChangeLog,v 1.3486 2004/07/21 10:49:39 djm Exp $ $Id: ChangeLog,v 1.3487 2004/07/21 10:54:47 djm Exp $

Просмотреть файл

@ -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 $ */ /* Based on $FreeBSD: src/crypto/openssh/auth2-pam-freebsd.c,v 1.11 2003/03/31 13:48:18 des Exp $ */
#include "includes.h" #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 #ifdef USE_PAM
#if defined(HAVE_SECURITY_PAM_APPL_H) #if defined(HAVE_SECURITY_PAM_APPL_H)
@ -365,8 +365,12 @@ sshpam_thread(void *ctxtp)
const char *pam_user; const char *pam_user;
pam_get_item(sshpam_handle, PAM_USER, (void **)&pam_user); pam_get_item(sshpam_handle, PAM_USER, (void **)&pam_user);
setproctitle("%s [pam]", pam_user);
environ[0] = NULL; environ[0] = NULL;
if (sshpam_authctxt != NULL) {
setproctitle("%s [pam]",
sshpam_authctxt->valid ? pam_user : "unknown");
}
#endif #endif
sshpam_conv.conv = sshpam_thread_conv; sshpam_conv.conv = sshpam_thread_conv;