search for: last_login_time

Displaying 17 results from an estimated 17 matches for "last_login_time".

2000 Dec 27
1
PrintLastLog option is not honored
...M.) The option is scanned and > converted to a flag variable, but that flag variable is never examined, > so the patch does no good. |--- openssh-2.2.0p1/session.c Tue Aug 29 15:21:22 2000 |+++ openssh-2.2.0p1z/session.c Mon Sep 18 09:55:01 2000 |@@ -686,7 +686,7 @@ | */ | last_login_time = get_last_login_time(pw->pw_uid, pw->pw_name, | buf, sizeof(buf)); |- if (last_login_time != 0) { |+ if (last_login_time != 0 && options.print_lastlog) { | time_string = ctime(&last_login_time); | if (strchr(time_string, '\...
2000 Nov 14
0
2.3.0p1, Solaris 7 and last login (fwd)
...ymptoms was fixed in 2.3.0p1, but unfortunately, this does not fix the problem for me. The fix in question was the removal of an erroneous call to write_login() which happened before getting the last login details. However, I found out that the call to do_pam_session(), which happens before the get_last_login_time() call, also writes a last login entry in my case. I made a workaround for the problem, but I'm sure it is not the way to do it. One good reason is that my patch does not take the result of do_login() into account and always prints the last login message. My patch is included in an attachment....
2002 Jan 30
0
[Bug 87] New: Last logon that gets reported upon login is the current login time
...Benn Oshrin on 10/12/2001, and he sent in a patch that moved the do_pam_session call into the do_login function in session.c. I can't find any discussion about why that patch did not get applied, but it hasn't, so I propose, instead of moving the do_pam_session call, to move the call to get_last_login_time into do_exec_pty and pass the resultant information to do_login. This has the unfortunate result of getting information that you may never use, but it seems that the portable release does have a few things in it explicit for one system or another, so this may be viable. The definition of do_login c...
2001 Mar 03
0
[PATCH] PrintLastLog option
...tr = &options->print_lastlog; goto parse_flag; Index: session.c --- session.c.prev +++ session.c Thu Feb 22 20:59:45 2001 @@ -708,8 +708,10 @@ do_login(Session *s, const char *command } - /* Get the time and hostname when the user last logged in. */ - hostname[0] = '\0'; - last_login_time = get_last_login_time(pw->pw_uid, pw->pw_name, - hostname, sizeof(hostname)); + if (options.print_lastlog) { + /* Get the time and hostname when the user last logged in. */ + hostname[0] = '\0'; + last_login_time = get_last_login_time(pw->pw_uid, pw->pw_name, +...
2002 Apr 10
1
openssh-3.1p1 on GNU/Hurd
...sion.h" +#include "xgethostname.h" #ifdef HAVE_CYGWIN #include <windows.h> @@ -659,7 +660,7 @@ do_login(Session *s, const char *command) { char *time_string; - char hostname[MAXHOSTNAMELEN]; + char *hostname; socklen_t fromlen; struct sockaddr_storage from; time_t last_login_time; @@ -681,11 +682,9 @@ } /* Get the time and hostname when the user last logged in. */ - if (options.print_lastlog) { - hostname[0] = '\0'; + if (options.print_lastlog) last_login_time = get_last_login_time(pw->pw_uid, pw->pw_name, - hostname, sizeof(hostname)); - } +...
2001 Apr 04
1
Solaris UseLogin problems
...remote; } -/* administrative, login(1)-like work */ void -do_login(Session *s, const char *command) +call_record_login(Session *s) { - FILE *f; - char *time_string; - char buf[256]; - char hostname[MAXHOSTNAMELEN]; socklen_t fromlen; struct sockaddr_storage from; - struct stat st; - time_t last_login_time; struct passwd * pw = s->pw; pid_t pid = getpid(); @@ -714,15 +712,30 @@ } } + /* Record that there was a login on that tty from the remote host. */ + record_login(pid, s->tty, pw->pw_name, pw->pw_uid, + get_remote_name_or_ip(), (struct sockaddr *)&from); +} + +/* adm...
2001 Sep 04
0
AIX Warning for expired password
...#ifdef WITH_IRIX_PROJECT #include <proj.h> #endif /* WITH_IRIX_PROJECT */ @@ -675,13 +679,14 @@ void do_login(Session *s, const char *command) { - char *time_string; + char *time_string,*msg; char hostname[MAXHOSTNAMELEN]; socklen_t fromlen; struct sockaddr_storage from; time_t last_login_time; struct passwd * pw = s->pw; pid_t pid = getpid(); + int retval; /* * Get IP address of client. If the connection is not a socket, let @@ -730,6 +735,44 @@ #ifdef WITH_AIXAUTHENTICATE if (aixloginmsg && *aixloginmsg) printf("%s\n", aixloginmsg); +#endif /* WITH...
2002 Apr 22
0
[Bug 101] session.c modifications for correct UNICOS behavior
..._CRAY */ #ifdef HAVE_CYGWIN if (is_winnt) cygwin_set_impersonation_token(INVALID_HANDLE_VALUE); @@ -668,6 +686,7 @@ printf("%s\n", aixloginmsg); #endif /* WITH_AIXAUTHENTICATE */ +#ifndef _CRAY if (options.print_lastlog && s->last_login_time != 0) { time_string = ctime(&s->last_login_time); if (strchr(time_string, '\n')) @@ -678,6 +697,7 @@ printf("Last login: %s from %s\r\n", time_string, s->hostname); } +#endif /* !...
2002 Feb 04
0
[Bug 101] New: session.c modifications for correct UNICOS behavior
...ndif /* _CRAY */ #ifdef HAVE_CYGWIN if (is_winnt) cygwin_set_impersonation_token(INVALID_HANDLE_VALUE); @@ -743,6 +760,7 @@ printf("%s\n", aixloginmsg); #endif /* WITH_AIXAUTHENTICATE */ +#ifndef _CRAY if (options.print_lastlog && last_login_time != 0) { time_string = ctime(&last_login_time); if (strchr(time_string, '\n')) @@ -752,6 +770,7 @@ else printf("Last login: %s from %s\r\n", time_string, hostna me); } +#endif /* ! _CRAY */...
2000 Jun 12
1
AIX and 2.1.1p1
...es) ], [ - AC_MSG_RESULT(no), + AC_MSG_RESULT(no) system_lastlog_path=no ]) ] --- session.c.orig Mon Jun 12 16:52:59 2000 +++ session.c Mon Jun 12 16:54:24 2000 @@ -524,6 +524,9 @@ /* Get remote host name. */ hostname = get_canonical_hostname(); +#if defined(DISABLE_LASTLOG) + last_login_time = 0; +#else /* * Get the time when the user last logged in. Buf will be set to * contain the hostname the last login was from. @@ -532,6 +535,7 @@ last_login_time = get_last_login_time(pw->pw_uid, pw->pw_name, buf, sizeof(buf)); } +#endif #ifdef USE_PAM do_pa...
2001 Mar 22
0
Solaris UseLogin problem
...dif + /* Do common processing for the child, such as execing the command. */ do_child(s, command); /* NOTREACHED */ @@ -700,35 +726,14 @@ char *time_string; char buf[256]; char hostname[MAXHOSTNAMELEN]; - socklen_t fromlen; - struct sockaddr_storage from; struct stat st; time_t last_login_time; struct passwd * pw = s->pw; - pid_t pid = getpid(); - /* - * Get IP address of client. If the connection is not a socket, let - * the address be 0.0.0.0. - */ - memset(&from, 0, sizeof(from)); - if (packet_connection_is_on_socket()) { - fromlen = sizeof(from); - if (getpeername(pac...
2001 Oct 12
2
bug report: last login time vs PAM in portability release
...41,11 @@ : ptyfd = s->ptyfd; : ttyfd = s->ttyfd; : :+#if defined(USE_PAM) :+ do_pam_session(s->pw->pw_name, s->tty); :+ do_pam_setcred(1); :+#endif :+ : /* Fork the child. */ : if ((pid = fork()) == 0) { : :@@ -698,11 +703,6 @@ : last_login_time = get_last_login_time(pw->pw_uid, :pw->pw_name, : hostname, sizeof(hostname)); : } :- :-#if defined(USE_PAM) :- do_pam_session(s->pw->pw_name, s->tty); :- do_pam_setcred(1); :-#endif : : /* Record that there was a login on that tty from th...
2001 Jan 03
0
AIX loginsuccess and aixloginmsg ?
...#endif /* USE_PAM */ #ifdef WITH_AIXAUTHENTICATE - if (aixloginmsg && *aixloginmsg) + if (aixloginmsg && *aixloginmsg) { printf("%s\n", aixloginmsg); + free(aixloginmsg); + } #endif /* WITH_AIXAUTHENTICATE */ if (last_login_time != 0) { Also what about the loginrestrictions call ? Should openssh free the loginmsg from loginrestrictions call ? The aix docs are not clear about this. -Jarno -- Jarno Huuskonen - System Administrator | Jarno.Huuskonen at uku.fi University of Kuopio - Computer Centre | Work: +358 17...
2003 May 10
7
[Bug 463] PrintLastLog doesn't work in privsep mode
...gzilla.mindrot.org/show_bug.cgi?id=463 ------- Additional Comments From dtucker at zip.com.au 2003-05-10 12:59 ------- I've had a look at the OpenBSD source and I don't think OpenBSD *needs* a "Buffer loginmsg" right now. PrintLastLog can be easily fixed by updating s->last_login_time before the privsep split. So, is there another reason OpenBSD needs (or wants) a "Buffer loginmsg"? Or should it be -portable only? Have I overlooked something? And what's the feeling on the montitor call in attachment #235? ------- You are receiving this mail because: ------...
2003 Jul 05
0
[PATCH] Replace AIX loginmsg with generic Buffer loginmsg
...+ + /* display post-login message */ + if (buffer_len(&loginmsg) > 0) { + buffer_append(&loginmsg, "\0", 1); + printf("%s\n", (char *)buffer_ptr(&loginmsg)); + } + buffer_free(&loginmsg); #ifndef NO_SSH_LASTLOG if (options.print_lastlog && s->last_login_time != 0) { Index: sshd.c =================================================================== RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/sshd.c,v retrieving revision 1.252 diff -u -r1.252 sshd.c --- sshd.c 3 Jul 2003 03:46:57 -0000 1.252 +++ sshd.c 5 Jul 2003 01:57:47 -0000 @@ -201,6 +20...
2002 Sep 23
19
Call for testing for 3.5 OpenSSH
OpenBSD tree is heading into a lock and this includes OpenSSH. So we are winding up for a 3.5 release. If we can get people to test the current snapshots and report any problems that would improve the odds that your platform won't be broke for 3.5. Issues I know off of right now. 1. I can't test NeXT. So I TRULY need someone in that community to test for me. Last I heard there was
2002 Nov 20
0
[PATCH #9] Password expiration via /bin/passwd.
...ENTICATE */ + if (!password_changed) + printf("%s", (char *)buffer_ptr(&expire_message)); + + buffer_append(&login_message, "\0", 1); + printf("%s", (char *)buffer_ptr(&login_message)); #ifndef NO_SSH_LASTLOG if (options.print_lastlog && s->last_login_time != 0) { Index: openbsd-compat/port-aix.c =================================================================== RCS file: /cvs/openssh/openbsd-compat/port-aix.c,v retrieving revision 1.6 diff -u -r1.6 port-aix.c --- openbsd-compat/port-aix.c 7 Jul 2002 02:17:36 -0000 1.6 +++ openbsd-compat/port-aix.c...