20050202
- (dtucker) [configure.ac openbsd-compat/realpath.c] Sync up with realpath
rev 1.11 from OpenBSD and make it use fchdir if available. ok djm@
+ - (dtucker) [auth.c loginrec.h openbsd-compat/{bsd-cray,port-aix}.{c,h}]
+ Make record_failed_login() call provide hostname rather than having the
+ implementations having to do lookups themselves. Only affects AIX and
+ UNICOS (the latter only uses the "user" parameter anyway). ok djm@
20050201
- (dtucker) [log.c] Bug #973: force log_init() to open syslog, since on some
#include "misc.h"
#include "bufaux.h"
#include "packet.h"
+#include "loginrec.h"
/* import */
extern ServerOptions options;
#ifdef CUSTOM_FAILED_LOGIN
if (authenticated == 0 && strcmp(method, "password") == 0)
- record_failed_login(authctxt->user, "ssh");
+ record_failed_login(authctxt->user,
+ get_canonical_hostname(options.use_dns), "ssh");
#endif
}
logit("Invalid user %.100s from %.100s",
user, get_remote_ipaddr());
#ifdef CUSTOM_FAILED_LOGIN
- record_failed_login(user, "ssh");
+ record_failed_login(user,
+ get_canonical_hostname(options.use_dns), "ssh");
#endif
return (NULL);
}
char *line_stripname(char *dst, const char *src, int dstsize);
char *line_abbrevname(char *dst, const char *src, int dstsize);
+void record_failed_login(const char *, const char *, const char *);
+
#endif /* _HAVE_LOGINREC_H_ */
* record_failed_login: generic "login failed" interface function
*/
void
-record_failed_login(const char *user, const char *ttyname)
+record_failed_login(const char *user, const char *hostname, const char *ttyname)
{
cray_login_failure((char *)user, IA_UDBERR);
}
void cray_job_termination_handler(int);
void cray_login_failure(char *, int );
int cray_access_denied(char *);
-#define CUSTOM_FAILED_LOGIN 1
-void record_failed_login(const char *, const char *);
extern char cray_tmpdir[];
+#define CUSTOM_FAILED_LOGIN 1
+
#ifndef IA_SSHD
# define IA_SSHD IA_LOGIN
#endif
#include "auth.h"
#include "ssh.h"
#include "log.h"
-#include "servconf.h"
-#include "canohost.h"
#include "xmalloc.h"
#include "buffer.h"
#include <uinfo.h>
#include "port-aix.h"
-extern ServerOptions options;
extern Buffer loginmsg;
# ifdef HAVE_SETAUTHDB
* record_failed_login: generic "login failed" interface function
*/
void
-record_failed_login(const char *user, const char *ttyname)
+record_failed_login(const char *user, const char *hostname, const char *ttyname)
{
- char *hostname = (char *)get_canonical_hostname(options.use_dns);
-
if (geteuid() != 0)
return;
# define CUSTOM_SYS_AUTH_RECORD_LOGIN 1
int sys_auth_record_login(const char *, const char *, const char *);
# define CUSTOM_FAILED_LOGIN 1
-void record_failed_login(const char *, const char *);
#endif
void aix_setauthdb(const char *);