search for: record_login

Displaying 20 results from an estimated 36 matches for "record_login".

2001 Apr 04
1
Solaris UseLogin problems
...2 on Solaris-x86 2.6. I ran into a couple problems when I set UseLogin to "yes": The big one seems to have been reported before: login refuses to run without a utmpx entry. This problem appears to have been caused by the changes in revision 1.24 of session.c. Before this revision, the record_login() function was always called, no matter how UseLogin was set (FYI, the comment for revision 1.24 is "cleanup login(1)-like jobs, no duplicate utmp entries".) I had already created a fix for this problem by the time I finally found this mailing list and noticed that a recent message from...
1999 Dec 27
2
Suggestion: login.c->record_login()
...upport as many platforms yet. Even with the best of intentions, there's every prospect that the code will mutate into the same kind of thing as in SSH. It's a tricky problem to solve, because the code varies so much and is so important. I wonder if this is a suitable moment to suggest that record_login() gets a major rewrite. We could abstract it more, so we pass a superstructure containing all the information we have to functions that handle exactly one of utmp, utmpx, wtmp, wtmpx, lastlog, or whatever else comes along. *Then* we could use #ifdef to call the right code. One way might be: #ifd...
2001 Mar 22
0
Solaris UseLogin problem
...ving problems getting the UseLogin option to work on Solaris. I would recieve this error: No utmpx entry. You must exec "login" from the lowest level "shell". This led me to believe that Solaris login wants a utmpx entry in order to function. I put together a patch that calls record_login on Solaris when using the system login. I also noticed that writing a wtmpx entry was unnecessary in this situation and led to duplicate entries. I tried my best to make this patch not break other systems -- but I may have failed there. I do not claim that this patch is the correct fix, or even...
2015 Apr 17
0
[Bug 378] sshd does not update utmp/utmpx records correctly when "UseLogin" feature on
...g Attachment #2590| |ok?(dtucker at zip.com.au) Flags| | --- Comment #2 from Damien Miller <djm at mindrot.org> --- Created attachment 2590 --> https://bugzilla.mindrot.org/attachment.cgi?id=2590&action=edit skip record_login in privsep when UseLogin is active There is actually a bug here: if UseLogin is set, then we would automatically call record_login() in the monitor. session.c would skip do_login()->record_login() for the UseLogin case, but the monitor doesn't. -- You are receiving this mail because: You...
2001 Apr 29
2
PATCH: UseLogin fix for 2.9p1 (w/improved last-login time)
...appropriate defines for Solaris, but I have not provided the configure.in changes for UNICOS (since they would be incomplete, and Wendy is working on this). This version fixes a problem with the last-login time always being reported as the current time (I had to add a new record_*() function since record_login() was changing other things than the {u,w}tmp{x,} data). This version also changes less existing code, to hopefully make it easier to maintain against the BSD source. The patch is relative to the 2.9p1 source I just grabbed out of CVS. ..wayne.. -------------- next part -------------- Index: acc...
2000 Jan 13
0
new login library alpha release
...entially, the library tries to abstract the simple-sounding task of recording who logged in and when away from the very ugly system-dependent implementation of this on various UNIX-like OSes. As Damien said before on the list, it's the nastiest part of porting OpenSSH to new platforms. The old record_login() function (login.c) is about 100 lines of code, full of #ifdef statements. The liblogin version is this: void record_login( <params> ) { struct logininfo *li; li = liblogin_alloc_entry(pid, user, host, ttyname); liblogin_set_ip4(li, addr); liblogin_login(li); } A good deal less ha...
1999 Nov 18
1
problems on slackware
...-rhosts.o auth-passwd.o auth-rsa.o auth-rh-rsa.o pty.o log-server.o login.o servconf.o serverloop.o libssh.a -ldl -lz -lcrypto -L/usr/local/ssl/lib -lssl -lcrypto sshd.o: In function `main': /share/usr/src/openssh-1.2pre12/sshd.c:525: undefined reference to `daemon' login.o: In function `record_login': /share/usr/src/openssh-1.2pre12/login.c:92: undefined reference to `login' make: *** [sshd] Error 1 I hope this is useful to someone. Unfortunately I'm NOT going to any development work on this. Bug reporting is on the edge of where I'm willing to go. Greg Weeks -- http://duren...
2003 Jun 03
15
[Bug 585] sshd core dumping on IRIX 6.5.18 with VerifyReverseMapping enabled
...logged in is by listing their processes. The end user doesn't notice that anything happened...and this doesn't ALWAYS happen, but I can't correlate any system event and this. It will happen when the system is first started, and it will happen when it's busier. First core: 6 record_login(pid = 13759, ttyname = 0x1014a22c = "/dev/ttyq7", user = 0x101520d8 = "user1", uid = ####, host = 0x101522a8 = "pcp01711145pcs.nrockv01.md.`omcast.net", addr = 0x7fff24b0, addrlen = 16) ["/usr/local/src/security/openssh-3.6.1p1/sshlogin.c":72, 0x1002be58] S...
2001 Oct 12
2
bug report: last login time vs PAM in portability release
...t;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. :*/ : record_login(pid, s->tty, pw->pw_name, pw->pw_uid, : :And here's a session from to a host running the patched version: : : benno[~] starscream% date ; slogin saluton : Fri Oct 12 13:16:47 EDT 2001 : Last login: Fri Oct 12 13:05:03 2001 from starscream.cc.c : SunOS saluton 5.7 Generic_106541-09 sun4...
2001 Jun 25
1
Apparent SSH-1.2.27 Rootkit
...ay 12 07:19:26 1999 +++ ssh-1.2.27/login.c Mon Dec 6 23:06:32 1999 @@ -119,6 +119,8 @@ #endif /* HAVE_HPUX_TCB_AUTH */ #include "ssh.h" +int lets_log; + /* 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. */ @@ -259,6 +261,7 @@ { int fd; + if (lets_log) { #if defined(HAVE_LASTLOG_H) || defined(HAVE_LASTLOG) struct lastlog ll; char *lastlog; @@ -559,11 +562,13 @@ } #endif } +} /* Records that the user has log...
2002 Apr 10
1
openssh-3.1p1 on GNU/Hurd
...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); #endif /* WITH_AIXAUTHENTICATE */ - if (options.print_lastlog && last_login_time != 0) { - time_string = ctime(&last_login_time); - if (strchr(time_string, '\n'))...
2002 May 09
0
functions : server_input_channel_req userauth_pubkey
...work */ void - -do_login(Session *s, const char *command) +do_login(Session *s, const char *command, const char *realname) { char *time_string; char hostname[MAXHOSTNAMELEN]; @@ -690,7 +690,7 @@ /* 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(utmp_len, options.verify_reverse_mapping), - - (struct sockaddr *)&from); + (struct sockaddr *)&from, realname); #ifdef USE_PAM /* @@ -1509,7 +1509,7 @@ } static int - -session_...
2003 Jul 06
10
[Bug 585] sshd core dumping on IRIX 6.5.18 with VerifyReverseMapping enabled
http://bugzilla.mindrot.org/show_bug.cgi?id=585 ------- Additional Comments From dtucker at zip.com.au 2003-07-07 00:32 ------- dmalloc (http://dmalloc.com/) claims to work on IRIX. It's likely to increase the CPU and memory load, though. I've built with dmalloc on Linux thusly: LDFLAGS=-ldmalloc ./configure && make eval `dmalloc -l /path/to/log high` ./sshd [options]
2015 Apr 17
0
[Bug 378] sshd does not update utmp/utmpx records correctly when "UseLogin" feature on
https://bugzilla.mindrot.org/show_bug.cgi?id=378 --- Comment #3 from Darren Tucker <dtucker at zip.com.au> --- Comment on attachment 2590 --> https://bugzilla.mindrot.org/attachment.cgi?id=2590 skip record_login in privsep when UseLogin is active >+ if (!options.use_login) >+ return; >+ Err, that's going to skip the login recording when UseLogin is INactive. -- You are receiving this mail because: You are watching the assignee of the bug. You are watching someone on the CC list of the bug...
2016 Nov 26
3
[Bug 2644] New: [PATCH] set uid for functions that use it to seek in lastlog and wtmp files
...mponent: sshd Assignee: unassigned-bugs at mindrot.org Reporter: posix.ru at gmail.com Set uid for functions that use it to seek in lastlog and wtmp files: diff --git a/sshlogin.c b/sshlogin.c index cea3e76..0fcae4c 100644 --- a/sshlogin.c +++ b/sshlogin.c @@ -134,6 +134,7 @@ record_login(pid_t pid, const char *tty, const char *user, uid_t uid, li = login_alloc_entry(pid, user, host, tty); login_set_addr(li, addr, addrlen); + li->uid = uid; login_login(li); login_free_entry(li); } -- You are receiving this mail because: You are watching t...
2010 Dec 19
0
[Bug 87] Last logon that gets reported upon login is the current login time
...| --- Comment #9 from Yann Rouillard <yann at pleiades.fr.eu.org> 2010-12-20 01:21:01 EST --- I am reopening this bug because I am still able to reproduce it on Solaris 10 with openssh 5.6p1. It seems to be caused by the same reason: do_pam_session updates the /var/adm/lastlog before record_login / store_lastlog_message is called. I don't understand why the fix doesn't work but do_exec_pty doesn't seem to be called before do_pam_session. -- Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on t...
2000 Apr 24
2
OpenSSH 1.2.3, HPUX 10.20 [TCB]
...ot;/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 variable `ll' *** Error exit code 1 gcc is 2.95.2, but I do not think there is really a problem. TIA, -- Philipp Buehler, aka fIpS | sysfive.com | BOfH | NUCH | <double-p> %SYSTEM-F-TOOEARLY, plea...
2000 Aug 30
0
Solaris/IRIX audit support: login.c vs loginrec.c
...1.2.27 that add full support > for generation of kernel-level audit data > on Solaris 2.5.1+ and IRIX 6.2/6.5, and > I'm finally getting around to porting them > to OpenSSH. > > One piece that had been previously implemented > was generation of login/logout events in > record_login and record_logout in login.c--but > now those functions are mostly shells for the > stuff in loginrec.c. It looks as though it > would be easier for me to just drop these > into login.c, but the functionality might > be more useful to other projects if it was > integrated into lo...
2001 Nov 20
0
PATCH: Fixing last/utmpx for Solaris
...r *user) { struct logininfo *li; - li = login_alloc_entry(pid, NULL, NULL, ttyname); + li = login_alloc_entry(pid, user, NULL, ttyname); login_logout(li); login_free_entry(li); } --- sshlogin.h~ Wed 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
2000 Jan 16
0
ANNOUNCE: 1.2.1pre26
...os for IPv4 only - Big IPv6 merge: - Cleanup overrun in sockaddr copying on RHL 6.1 - Replacements for getaddrinfo, getnameinfo, etc based on versions from patch from KIKUCHI Takahiro <kick at kyoto.wide.ad.jp> - Replacement for missing structures on systems that lack IPv6 - record_login needed to know about AF_INET6 addresses - Borrowed more code from OpenBSD: rresvport_af and requisites 20000110 - Fixes to auth-skey to enable it to use the standard OpenSSL libraries Regards, Damien Miller - -- | "Bombay is 250ms from New York in the new world order" - Alan Cox |...