mirror of
git://anongit.mindrot.org/openssh.git
synced 2025-01-11 12:09:32 +00:00
- markus@cvs.openssh.org 2001/02/13 22:49:40
[auth1.c auth2.c] setproctitle(user) only if getpwnam succeeds
This commit is contained in:
parent
f9452513fc
commit
c1ba31fadc
@ -23,6 +23,9 @@
|
|||||||
- deraadt@cvs.openbsd.org 2001/02/12 22:56:09
|
- deraadt@cvs.openbsd.org 2001/02/12 22:56:09
|
||||||
[clientloop.c packet.c ssh-keyscan.c]
|
[clientloop.c packet.c ssh-keyscan.c]
|
||||||
deal with EAGAIN/EINTR selects which were skipped
|
deal with EAGAIN/EINTR selects which were skipped
|
||||||
|
- markus@cvs.openssh.org 2001/02/13 22:49:40
|
||||||
|
[auth1.c auth2.c]
|
||||||
|
setproctitle(user) only if getpwnam succeeds
|
||||||
|
|
||||||
20010214
|
20010214
|
||||||
- (djm) Don't try to close PAM session or delete credentials if the
|
- (djm) Don't try to close PAM session or delete credentials if the
|
||||||
@ -3951,4 +3954,4 @@
|
|||||||
- Wrote replacements for strlcpy and mkdtemp
|
- Wrote replacements for strlcpy and mkdtemp
|
||||||
- Released 1.0pre1
|
- Released 1.0pre1
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.765 2001/02/15 03:12:08 mouring Exp $
|
$Id: ChangeLog,v 1.766 2001/02/15 03:14:11 mouring Exp $
|
||||||
|
6
auth1.c
6
auth1.c
@ -10,7 +10,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: auth1.c,v 1.16 2001/02/12 16:16:23 markus Exp $");
|
RCSID("$OpenBSD: auth1.c,v 1.17 2001/02/13 22:49:40 markus Exp $");
|
||||||
|
|
||||||
#include "xmalloc.h"
|
#include "xmalloc.h"
|
||||||
#include "rsa.h"
|
#include "rsa.h"
|
||||||
@ -378,8 +378,6 @@ do_authentication()
|
|||||||
authctxt->user = user;
|
authctxt->user = user;
|
||||||
authctxt->style = style;
|
authctxt->style = style;
|
||||||
|
|
||||||
setproctitle("%s", user);
|
|
||||||
|
|
||||||
/* Verify that the user is a valid user. */
|
/* Verify that the user is a valid user. */
|
||||||
pw = getpwnam(user);
|
pw = getpwnam(user);
|
||||||
if (pw && allowed_user(pw)) {
|
if (pw && allowed_user(pw)) {
|
||||||
@ -391,6 +389,8 @@ do_authentication()
|
|||||||
}
|
}
|
||||||
authctxt->pw = pw;
|
authctxt->pw = pw;
|
||||||
|
|
||||||
|
setproctitle("%s", pw ? user : "unknown");
|
||||||
|
|
||||||
#ifdef USE_PAM
|
#ifdef USE_PAM
|
||||||
if (pw)
|
if (pw)
|
||||||
start_pam(user);
|
start_pam(user);
|
||||||
|
4
auth2.c
4
auth2.c
@ -23,7 +23,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#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>
|
#include <openssl/evp.h>
|
||||||
|
|
||||||
@ -189,7 +189,6 @@ input_userauth_request(int type, int plen, void *ctxt)
|
|||||||
if (authctxt->attempt++ == 0) {
|
if (authctxt->attempt++ == 0) {
|
||||||
/* setup auth context */
|
/* setup auth context */
|
||||||
struct passwd *pw = NULL;
|
struct passwd *pw = NULL;
|
||||||
setproctitle("%s", user);
|
|
||||||
pw = getpwnam(user);
|
pw = getpwnam(user);
|
||||||
if (pw && allowed_user(pw) && strcmp(service, "ssh-connection")==0) {
|
if (pw && allowed_user(pw) && strcmp(service, "ssh-connection")==0) {
|
||||||
authctxt->pw = pwcopy(pw);
|
authctxt->pw = pwcopy(pw);
|
||||||
@ -204,6 +203,7 @@ input_userauth_request(int type, int plen, void *ctxt)
|
|||||||
start_pam("NOUSER");
|
start_pam("NOUSER");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
setproctitle("%s", pw ? user : "unknown");
|
||||||
authctxt->user = xstrdup(user);
|
authctxt->user = xstrdup(user);
|
||||||
authctxt->service = xstrdup(service);
|
authctxt->service = xstrdup(service);
|
||||||
authctxt->style = style ? xstrdup(style) : NULL; /* currently unused */
|
authctxt->style = style ? xstrdup(style) : NULL; /* currently unused */
|
||||||
|
Loading…
Reference in New Issue
Block a user