search for: do_login

Displaying 20 results from an estimated 30 matches for "do_login".

2002 Jan 30
0
[Bug 87] New: Last logon that gets reported upon login is the current login time
...y: wknox at mitre.org The last login time that gets reported with a Solaris PAM enabled build of OpenSSH 3.0.2p1 is the login time of the current session. Examining the mail archive, this was reported 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 unfortun...
2001 Oct 12
2
bug report: last login time vs PAM in portability release
...t 12 13:10:52 2001 from starscream.cc.c : SunOS hola 5.7 Generic_106541-09 sun4u sparc SUNW,Ultra-60 : You have new mail. : benno[~] hola% : :Note that the last login time reported is two seconds after the connection :is initiated. It appears that this is because pam_open_session is called :before do_login. pam_open_session updates the lastlog file. When do_login :is called, it reads the already updated lastlog file and reports the time :of the session just started. To fix this, I moved the pam_open_session :call into do_login: : :--- session.c Fri Oct 12 13:05:58 2001 :+++ .snapshot/nightly.3/s...
2004 Apr 06
1
No motd, lastlog, stored pam messages displayed
Hi while testing a new pam module i found this problem: System: Linux 2.4.18/OpenSSH 3.8p1 client/server The output from do_login() in session.c (motd, lastlog, stored pam messages) isn't displayed when Privilege Separation is enabled. I added a fflush(stdout) as the last line of do_login(), now it works. Frank
2009 Feb 25
3
InvalidAuthenticityToken error with db sessions
...ig.action_controller.session_store = :active_record_store" line in the environment.rb file, and the :secret in the application.rb file. Now, when I try to login I get the error InvalidAuthenticityToken. Here''s my login form: <% form_for :user, :url => { :action => ''do_login'' } do |f| %> <p>user: <%= f.text_field :user_name %></p> <p>pass: <%= f.password_field :password %></p> <%= f.submit ''login'' %> <% end %> I checked the markup and the hidden field with the token appears. I'...
2007 Jul 17
12
Getting past my login system
...is that is keeps redirecting to my login page at http://test.host/login. I tried then setting session[:user] and doing a post to my login page to simulate a login so that I could access the correct page, but that does not seem to work. I tried a number of things, including the following: def do_login @user = User.find(:first, :conditions => [''username = ?'' , ''ryan''] ) session[:user] = @user.id post :login, :path => [] end describe StudentsController do it "should be successful" do do_login get :index response.should be_suc...
2001 Apr 13
0
Fixed patch for Digital Unix SIA
Okay, here is a fixed version of the patch I sent before for fixing the problems I know about with Digital Unix SIA: displaying too much info (MOTD, last login, etc.) when access is denied, and the loss of the error message sometimes when access is denied. It does break some code out of do_login into a couple of separate functions. I did this to avoid duplicating the code in a couple of places. If that's a problem, I can generate a patch that doesn't touch anything else (but duplicates code); just let me know. This is against CVS as of a little while ago. -- Chris Adams <cma...
2001 Apr 04
1
Solaris UseLogin problems
...solete utmp and wtmp in solaris2.x) Index: session.c @@ -126,6 +126,7 @@ void session_proctitle(Session *s); void do_exec_pty(Session *s, const char *command, struct passwd * pw); void do_exec_no_pty(Session *s, const char *command, struct passwd * pw); +void call_record_login(Session *s); void do_login(Session *s, const char *command); void do_child(Session *s, const char *command); @@ -632,6 +633,10 @@ /* record login, etc. similar to login(1) */ if (!(options.use_login && command == NULL)) do_login(s, command); +#ifdef LOGIN_NEEDS_UTMPX + else + call_record_login(s); +#en...
2001 Sep 06
1
lastlog on Solaris with PAM (patch included)
...calls pam_session before reading the lastlog file, SSH logins to systems with this configuration (as well as similar ones, I'd imagine) report the last login time and remote host as the values from the current session. My solution to this problem is to call pam_open_session in the child, after do_login has been called and the last login information has been retrieved and printed. This can result in the lastlog file being updated twice, but we'll need to live with that, since there's no way short of reading it directly to find out whether or not it has been updated, and even then, there...
2002 May 09
0
functions : server_input_channel_req userauth_pubkey
...; void session_proctitle(Session *); int session_setup_x11fwd(Session *); - -void do_exec_pty(Session *, const char *); +void do_exec_pty(Session *, const char *, const char *realname); void do_exec_no_pty(Session *, const char *); - -void do_exec(Session *, const char *); - -void do_login(Session *, const char *); +void do_exec(Session *, const char *, const char *realname); +void do_login(Session *, const char *, const char *realname); #ifdef LOGIN_NEEDS_UTMPX static void do_pre_login(Session *s); #endif @@ -109,8 +109,8 @@ void do_motd(void); int check_quietlogin(...
2001 Apr 29
2
PATCH: UseLogin fix for 2.9p1 (w/improved last-login time)
...tmp_only(struct logininfo *li); +#endif /** End of public functions */ Index: session.c --- session.c 2001/04/18 15:29:34 1.111 +++ session.c 2001/04/29 18:12:41 @@ -127,6 +127,9 @@ void do_exec_pty(Session *s, const char *command); void do_exec_no_pty(Session *s, const char *command); void do_login(Session *s, const char *command); +#ifdef LOGIN_NEEDS_UTMPX +void do_pre_login(Session *s); +#endif void do_child(Session *s, const char *command); void do_motd(void); int check_quietlogin(Session *s, const char *command); @@ -644,6 +647,10 @@ #ifndef HAVE_OSF_SIA if (!(options.use_login &am...
2005 Dec 29
1
Posting to a separate controller in a functional test
Hi, I need to post to a controller to log in a user in a functional test, but I''m not sure what to do to post to a separate controller. I''ve tried: post { :controller => :account, :action => :do_login }, { bla bla bla } But that doesnt seem to have worked. Help? Mitch -- Posted via http://www.ruby-forum.com/.
2001 Mar 03
0
[PATCH] PrintLastLog option
...55,4 +560,8 @@ parse_flag: case sPrintMotd: intptr = &options->print_motd; + goto parse_flag; + + case sPrintLastLog: + intptr = &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 host...
2000 Nov 14
0
2.3.0p1, Solaris 7 and last login (fwd)
...ls. 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. Hope that I've been any help, Boi Ps. did I mention that in general, OpenSSH rocks? :) -- UNIX System Administrator - Boi Sletterink Phone: +31-15-278 2504 -------------- next part --------------...
2001 Jun 18
2
Patch for changing expired passwords
...8 13:59:57 2001 --- session.c Mon Jun 18 14:15:29 2001 *************** *** 93,98 **** --- 93,99 ---- void session_close(Session *s); void do_exec_pty(Session *s, const char *command); void do_exec_no_pty(Session *s, const char *command); + void do_exec(Session *s, const char *command); void do_login(Session *s, const char *command); void do_child(Session *s, const char *command); void do_motd(void); *************** *** 270,286 **** command = NULL; packet_integrity_check(plen, 0, type); } ! if (forced_command != NULL) { ! original_command = command; ! command = f...
2015 Apr 17
0
[Bug 378] sshd does not update utmp/utmpx records correctly when "UseLogin" feature on
...g> --- 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 are the assignee for the bug. You are watching the assignee of the bug. You are watching someone on the CC list of the bug.
2001 Sep 04
0
AIX Warning for expired password
...0 2001 @@ -57,6 +57,10 @@ #include "canohost.h" #include "session.h" +#ifdef WITH_AIXAUTHENTICATE +#include "misc.h" +#endif /* WITH_AIXAUTHENTICATE */ + #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 cli...
2001 Sep 28
0
openssh-2.9.9p2 session.c uses two undeclared void functions
...leanup(void *); void session_proctitle(Session *); int session_setup_x11fwd(Session *); void do_exec_pty(Session *, const char *); +#ifdef LOGIN_NEEDS_UTMPX +static void do_pre_login(Session *s); +#endif void do_exec_no_pty(Session *, const char *); void do_exec(Session *, const char *); void do_login(Session *, const char *); @@ -147,6 +150,7 @@ extern int debug_flag; extern u_int utmp_len; extern int startup_pipe; extern void destroy_sensitive_data(void); +extern void record_utmp_only(pid_t, const char *, const char *, const char *, struct sockaddr *); /* original command from peer. */...
2002 Apr 22
0
[Bug 101] session.c modifications for correct UNICOS behavior
.../* record login, etc. similar to login(1) */ #ifndef HAVE_OSF_SIA if (!(options.use_login && command == NULL)) + { +# ifdef _CRAY + cray_init_job(s->pw); /* set up cray jid and tmpdir */ +# endif /* _CRAY */ do_login(s, command); + } # ifdef LOGIN_NEEDS_UTMPX else do_pre_login(s); @@ -528,6 +543,9 @@ do_child(s, command); /* NOTREACHED */ } +#ifdef _CRAY + signal(WJSIGNAL, cray_job_termination_handler); +#endif...
2003 Jan 10
0
Core dump from sshd fatal_cleanup()
...ore/core.sshd.27549 [snip] #0 0x00000000 in ?? () (gdb) bt #0 0x00000000 in ?? () #1 0x0003ccb4 in fatal_cleanup () at ../log.c:254 #2 0x00038988 in fatal (fmt=0xf0c00 "") at ../fatal.c:39 #3 0x00023400 in do_tty_change_password (pw=0x10e690) at ../auth-passwd.c:300 #4 0x00029884 in do_login (s=0x101b4c, command=0x0) at ../session.c:764 #5 0x00029518 in do_exec_pty (s=0x101b4c, command=0x0) at ../session.c:617 #6 0x000296c0 in do_exec (s=0x101b4c, command=0x0) at ../session.c:710 #7 0x0002b1b0 in session_shell_req (s=0x101b4c) at ../session.c:1729 #8 0x0002b358 in session_input_cha...
2002 Feb 04
0
[Bug 101] New: session.c modifications for correct UNICOS behavior
...record login, etc. similar to login(1) */ #ifndef HAVE_OSF_SIA if (!(options.use_login && command == NULL)) + { +# ifdef _CRAY + cray_init_job(s->pw); /* set up cray jid and tmpdir */ +# endif /* _CRAY */ do_login(s, command); + } # ifdef LOGIN_NEEDS_UTMPX else do_pre_login(s); @@ -597,6 +611,9 @@ do_child(s, command); /* NOTREACHED */ } +#ifdef _CRAY + signal(WJSIGNAL, cray_job_termination_handler); +#endif...