mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-23 22:05:06 +02:00
- (dtucker) [auth.h sshd.c openbsd-compat/port-aix.c] Bug #1006: fix bug in
handling of password expiry messages returned by AIX's authentication routines, originally reported by robvdwal at sara.nl.
This commit is contained in:
parent
83d5a9866d
commit
f3bb434177
@ -12,6 +12,9 @@
|
|||||||
- jmc@cvs.openbsd.org 2005/03/18 17:05:00
|
- jmc@cvs.openbsd.org 2005/03/18 17:05:00
|
||||||
[sshd_config.5]
|
[sshd_config.5]
|
||||||
typo;
|
typo;
|
||||||
|
- (dtucker) [auth.h sshd.c openbsd-compat/port-aix.c] Bug #1006: fix bug in
|
||||||
|
handling of password expiry messages returned by AIX's authentication
|
||||||
|
routines, originally reported by robvdwal at sara.nl.
|
||||||
|
|
||||||
20050329
|
20050329
|
||||||
- (dtucker) [contrib/aix/buildbff.sh] Bug #1005: Look up only the user we're
|
- (dtucker) [contrib/aix/buildbff.sh] Bug #1005: Look up only the user we're
|
||||||
@ -2402,4 +2405,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.3731 2005/03/31 11:33:50 dtucker Exp $
|
$Id: ChangeLog,v 1.3732 2005/03/31 11:39:25 dtucker Exp $
|
||||||
|
4
auth.h
4
auth.h
@ -30,6 +30,7 @@
|
|||||||
|
|
||||||
#include "key.h"
|
#include "key.h"
|
||||||
#include "hostfile.h"
|
#include "hostfile.h"
|
||||||
|
#include "buffer.h"
|
||||||
#include <openssl/rsa.h>
|
#include <openssl/rsa.h>
|
||||||
|
|
||||||
#ifdef HAVE_LOGIN_CAP
|
#ifdef HAVE_LOGIN_CAP
|
||||||
@ -68,6 +69,7 @@ struct Authctxt {
|
|||||||
char *krb5_ticket_file;
|
char *krb5_ticket_file;
|
||||||
char *krb5_ccname;
|
char *krb5_ccname;
|
||||||
#endif
|
#endif
|
||||||
|
Buffer *loginmsg;
|
||||||
void *methoddata;
|
void *methoddata;
|
||||||
};
|
};
|
||||||
/*
|
/*
|
||||||
@ -185,6 +187,8 @@ void auth_debug_reset(void);
|
|||||||
|
|
||||||
struct passwd *fakepw(void);
|
struct passwd *fakepw(void);
|
||||||
|
|
||||||
|
int sys_auth_passwd(Authctxt *, const char *);
|
||||||
|
|
||||||
#define AUTH_FAIL_MSG "Too many authentication failures for %.100s"
|
#define AUTH_FAIL_MSG "Too many authentication failures for %.100s"
|
||||||
|
|
||||||
#define SKEY_PROMPT "\nS/Key Password: "
|
#define SKEY_PROMPT "\nS/Key Password: "
|
||||||
|
@ -151,7 +151,7 @@ aix_valid_authentications(const char *user)
|
|||||||
* returns 0.
|
* returns 0.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
sys_auth_passwd(Authctxt *ctxt, const char *password, Buffer *loginmsg)
|
sys_auth_passwd(Authctxt *ctxt, const char *password)
|
||||||
{
|
{
|
||||||
char *authmsg = NULL, *msg, *name = ctxt->pw->pw_name;
|
char *authmsg = NULL, *msg, *name = ctxt->pw->pw_name;
|
||||||
int authsuccess = 0, expired, reenter, result;
|
int authsuccess = 0, expired, reenter, result;
|
||||||
@ -181,7 +181,7 @@ sys_auth_passwd(Authctxt *ctxt, const char *password, Buffer *loginmsg)
|
|||||||
*/
|
*/
|
||||||
expired = passwdexpired(name, &msg);
|
expired = passwdexpired(name, &msg);
|
||||||
if (msg && *msg) {
|
if (msg && *msg) {
|
||||||
buffer_append(loginmsg, msg, strlen(msg));
|
buffer_append(ctxt->loginmsg, msg, strlen(msg));
|
||||||
aix_remove_embedded_newlines(msg);
|
aix_remove_embedded_newlines(msg);
|
||||||
}
|
}
|
||||||
debug3("AIX/passwdexpired returned %d msg %.100s", expired, msg);
|
debug3("AIX/passwdexpired returned %d msg %.100s", expired, msg);
|
||||||
|
2
sshd.c
2
sshd.c
@ -1673,6 +1673,8 @@ main(int ac, char **av)
|
|||||||
authctxt = xmalloc(sizeof(*authctxt));
|
authctxt = xmalloc(sizeof(*authctxt));
|
||||||
memset(authctxt, 0, sizeof(*authctxt));
|
memset(authctxt, 0, sizeof(*authctxt));
|
||||||
|
|
||||||
|
authctxt->loginmsg = &loginmsg;
|
||||||
|
|
||||||
/* XXX global for cleanup, access from other modules */
|
/* XXX global for cleanup, access from other modules */
|
||||||
the_authctxt = authctxt;
|
the_authctxt = authctxt;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user