[PATCH] Creation of record_failed_login() in sshlogin.c

Wendy Palm wendyp at cray.com
Tue Jan 28 05:18:51 EST 2003


such a lame excuse.....

:)

i tested it out and while it works, it introduces compiler warnings about the "const"
in the call line.
record_failed_login(const char *user, const char *host, const char *ttyname)

all the functions called in cray_login_failure() spit when user is a const char *.
can you change it to
record_failed_login(char *user, const char *host, const char *ttyname)


  diff -c sshlogin.c.orig sshlogin.c
*** sshlogin.c.orig     Mon Jan 27 11:54:28 2003
--- sshlogin.c  Mon Jan 27 12:17:20 2003
***************
*** 42,47 ****
--- 42,48 ----
   RCSID("$OpenBSD: sshlogin.c,v 1.5 2002/08/29 15:57:25 stevesk Exp $");

   #include "loginrec.h"
+ #include "log.h"

   /*
    * Returns the time when the user last logged in.  Returns 0 if the
***************
*** 99,101 ****
--- 100,117 ----
     login_logout(li);
     login_free_entry(li);
   }
+
+ /* Record a failed login attempt. */
+ void
+ record_failed_login(char *user, const char *host, const char *ttyname)
+ {
+       debug3("%s user %s host %s tty %s", __func__, user, host, ttyname);
+
+ #ifdef WITH_AIXAUTHENTICATE
+       loginfailed(user, host, ttyname);
+ #endif
+
+ #ifdef _UNICOS
+       cray_login_failure(user, IA_UDBERR);
+ #endif /* _UNICOS */
+ }


Darren Tucker wrote:

> Darren Tucker wrote:
> 
>>+record_failed_login(const char *user, const char *host, const char *ttyname)
>>
> [snip]
> 
>>+#ifdef _UNICOS
>>+       cray_login_failure(authctxt->user, IA_UDBERR);
>>+#endif /* _UNICOS */
>>
> 
> Damn.  Make that "cray_login_failure(user, IA_UDBERR);".  My excuse is I
> don't have a Cray to try it on :-).
> 
> 


-- 
wendy palm
Cray OS Sustaining Engineering, Cray Inc.
wendyp at cray.com, 651-605-9154




More information about the openssh-unix-dev mailing list