Displaying 20 results from an estimated 24 matches for "get_last_login_tim".
Did you mean:
get_last_login_time
2013 Jul 29
4
[Bug 2134] New: invalid prototype for get_last_login_time()
https://bugzilla.mindrot.org/show_bug.cgi?id=2134
Bug ID: 2134
Summary: invalid prototype for get_last_login_time()
Product: Portable OpenSSH
Version: 6.2p1
Hardware: Other
OS: FreeBSD
Status: NEW
Severity: enhancement
Priority: P5
Component: Build system
Assignee: unassigned-bugs at mindrot.org
Report...
2000 Nov 14
0
2.3.0p1, Solaris 7 and last login (fwd)
...ar symptoms 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
...by 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...
2002 Apr 10
1
openssh-3.1p1 on GNU/Hurd
...+ 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));
- }
+ &hostname);
/* Record that there was a login on that tty from the remote host. */
record_login(pid, s->tty, pw->pw_name, pw->pw_uid,
@@ -715,14 +714,17 @@
printf("%s\n", aixloginmsg);
#en...
2000 Dec 27
1
PrintLastLog option is not honored
...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, '\n'))
|...
2001 Mar 03
0
[PATCH] PrintLastLog option
...>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,
+ hostname, sizeof(host...
2001 Oct 12
2
bug report: last login time vs PAM in portability release
...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 the remote host.
:*/
:...
2000 Jan 31
0
New liblogin 0.3alpha
.../liblogin.html
This version fixes a few bugs and has implementations for the full API,
including 'get last login time' support, even for systems without
lastlog.
New OpenSSH patches against 1.2.2 are also available, to enable the last
login time features. Again, the function (in this case
get_last_login_time() ) reduces to four lines as the busy-work is
shipped out of openssh-main and into the library.
It's tested and running well on Linux, OpenBSD, HPUX10.20 and
Solaris. Please check it out, and let me know how you get on. I'm
particularly keen to see how it does on other platforms.
The mai...
2000 Apr 24
2
OpenSSH 1.2.3, HPUX 10.20 [TCB]
...etc/ssh
and get after a make:
gcc -O2 -Wall -D_HPUX_SOURCE -I/usr/local/include -I/opt/include
-DETCDIR=\"/etc/ssh\" -DSSH_PROGRAM=\"/opt/bin/ssh\"
-DSSH_ASKPASS_DEFAULT=\"/opt/libexec/ssh/ssh-askpass\"
-DHAVE_CONFIG_H -c login.c
login.c: In function `get_last_login_time':
login.c:57: storage size of `ll' isn't known
login.c:57: warning: unused variable `ll'
login.c:131: warning: control reaches end of non-void function
login.c: In function `record_login':
login.c:143: storage size of `ll' isn't known
login.c:143: warning: unused variab...
2001 Nov 20
0
PATCH: Fixing last/utmpx for Solaris
...d Jul 4 00:46:58 2001
+++ sshlogin.h Mon Nov 19 12:08:34 2001
@@ -17,7 +17,7 @@
void
record_login(pid_t, const char *, const char *, uid_t,
const char *, struct sockaddr *);
-void record_logout(pid_t, const char *);
+void record_logout(pid_t, const char *, const char *);
u_long get_last_login_time(uid_t, const char *, char *, u_int);
#endif
2003 Jan 07
0
[Bug 463] New: PrintLastLog doesn't work in privsep mode
...Portable OpenSSH
Version: -current
Platform: All
OS/Version: All
Status: NEW
Severity: trivial
Priority: P2
Component: sshd
AssignedTo: openssh-unix-dev at mindrot.org
ReportedBy: djm at mindrot.org
The call to get_last_login_time() in session.c happens in the child without
being wrapped in the monitor. Only root gets the lastlog time printed if the
lastlog file isn't world-readable.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
1999 Dec 23
0
Patch to make pre19 work with NetBSD
...ID) && defined(HAVE_SETREUID) */
+
+#if defined(HAVE_LASTLOG_H) && !defined(HAVE_LASTLOG)
+# define HAVE_LASTLOG
+#endif /* defined (HAVE_LASTLOG_H) && !defined(HAVE_LASTLOG) */
--- login.c.orig Thu Dec 23 13:34:04 1999
+++ login.c Thu Dec 23 13:40:37 1999
@@ -53,7 +53,7 @@
get_last_login_time(uid_t uid, const char *logname,
char *buf, unsigned int bufsize)
{
-#if defined(HAVE_LASTLOG_H) && !defined(DISABLE_LASTLOG)
+#if defined(HAVE_LASTLOG) && !defined(DISABLE_LASTLOG)
struct lastlog ll;
char *lastlog;
int fd;
--- configure.in.orig Thu Dec 23 13:41:02 199...
2002 Jan 29
0
[Bug 84] New: last command provides incorrect information on Solaris 8
...Jul 4 00:46:58 2001
+++ sshlogin.h Tue Jan 29 10:56:59 2002
@@ -17,7 +17,7 @@
void
record_login(pid_t, const char *, const char *, uid_t,
const char *, struct sockaddr *);
-void record_logout(pid_t, const char *);
+void record_logout(pid_t, const char *, const char *);
u_long get_last_login_time(uid_t, const char *, char *, u_int);
#endif
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
2000 Jun 12
1
AIX and 2.1.1p1
...@@
/* 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_pam_session(pw->pw_name, s->tty);
--
Tom Bertelson "Any sufficiently advanced technology
RHI Consulting is indistinguishable from magic."
tbert at abac.com...
2000 May 15
1
AIX authenticate patches
...quot;$blibpath"; then
blibpath="/usr/lib:/lib:/usr/local/lib"
fi
+ AC_CHECK_FUNC(authenticate, [AC_DEFINE(WITH_AIXAUTHENTICATE)])
AC_DEFINE(BROKEN_GETADDRINFO)
;;
*-*-hpux10*)
--- login.c.orig Tue May 9 13:11:36 2000
+++ login.c Tue May 9 13:10:40 2000
@@ -53,6 +53,10 @@
get_last_login_time(uid_t uid, const char *logname,
char *buf, unsigned int bufsize)
{
+#if defined(WITH_AIXAUTHENTICATE)
+ /* This is done in do_authentication */
+ return (unsigned long) 0;
+#else
#if defined(_PATH_LASTLOG) && !defined(DISABLE_LASTLOG)
struct lastlog ll;
char *lastlog;
@@ -128,...
2001 Nov 15
1
Patch for "last" providing incorrect information on Solaris 8
...u Nov 15 09:35:02 2001
+++ sshlogin.h Thu Nov 15 09:38:01 2001
@@ -17,7 +17,7 @@
void
record_login(pid_t, const char *, const char *, uid_t,
const char *, struct sockaddr *);
-void record_logout(pid_t, const char *);
+void record_logout(pid_t, const char *, const char *);
u_long get_last_login_time(uid_t, const char *, char *, u_int);
#endif
2001 Mar 22
0
Solaris UseLogin problem
...(packet_get_connection_in(),
- (struct sockaddr *) & from, &fromlen) < 0) {
- debug("getpeername: %.100s", strerror(errno));
- fatal_cleanup();
- }
- }
-
/* 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));
-
- /* 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);
#ifdef USE_PAM
/*
2005 May 06
7
[Bug 1032] PrintLastLog is not working with UseLogin yes
http://bugzilla.mindrot.org/show_bug.cgi?id=1032
Summary: PrintLastLog is not working with UseLogin yes
Product: Portable OpenSSH
Version: 4.0p1
Platform: All
OS/Version: HP-UX
Status: NEW
Severity: normal
Priority: P2
Component: sshd
AssignedTo: openssh-bugs at mindrot.org
ReportedBy:
2001 Apr 04
1
Solaris UseLogin problems
...FILE *f;
+ char *time_string;
+ char buf[256];
+ char hostname[MAXHOSTNAMELEN];
+ struct stat st;
+ time_t last_login_time;
+ struct passwd * pw = s->pw;
+
+ call_record_login(s);
+
/* 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));
- /* 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);
-
#ifdef USE_PAM
/*
* If pass...
2007 Jan 17
0
login_get_lastlog - nss enviornment - works in shell env, doesn't work when sshd calls it.
...printf("U: %s\n",li.username);
printf("Done.\n");
}
/*
* Returns the time when the user last logged in. Returns 0 if the
* information is not available. This must be called before record_login.
* The host the user logged in from will be returned in buf.
*/
time_t
get_last_login_time(uid_t uid, const char *logname,
char *buf, size_t bufsize)
{
struct logininfo li;
login_get_lastlog(&li, uid);
strlcpy(buf, li.hostname, bufsize);
return (time_t)li.tv_sec;
}
/**
** getlast_entry: Call low-level functions to retrieve the last login
**...