Bugzilla – Attachment 896 Details for
Bug 1030
sshd writes twice to wtmp when "UseLogin" is yes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for one wtmp entry if uselogin is enabled
UseLogin-2entry.patch (text/plain), 1.87 KB, created by
senthilkumar
on 2005-05-05 15:54:04 AEST
(
hide
)
Description:
Patch for one wtmp entry if uselogin is enabled
Filename:
MIME Type:
Creator:
senthilkumar
Created:
2005-05-05 15:54:04 AEST
Size:
1.87 KB
patch
obsolete
>--- openssh-4.0p1/loginrec.c 2005-02-15 16:49:28.000000000 +0530 >+++ openssh-4.0p1-2entry/loginrec.c 2005-05-05 11:02:49.000000000 +0530 >@@ -458,7 +458,7 @@ > > #ifdef LOGIN_NEEDS_UTMPX > int >-login_utmp_only(struct logininfo *li) >+login_utmp_only(struct logininfo *li,int loginflag) > { > li->type = LTYPE_LOGIN; > login_set_current_time(li); >@@ -466,13 +466,15 @@ > utmp_write_entry(li); > # endif > # ifdef USE_WTMP >- wtmp_write_entry(li); >+ if(loginflag==0) >+ wtmp_write_entry(li); > # endif > # ifdef USE_UTMPX > utmpx_write_entry(li); > # endif > # ifdef USE_WTMPX >- wtmpx_write_entry(li); >+ if(loginflag==0) >+ wtmpx_write_entry(li); > # endif > return (0); > } >diff -Nur openssh-4.0p1/loginrec.h openssh-4.0p1-2entry/loginrec.h >--- openssh-4.0p1/loginrec.h 2005-02-02 11:40:11.000000000 +0530 >+++ openssh-4.0p1-2entry/loginrec.h 2005-05-05 10:50:34.000000000 +0530 >@@ -106,7 +106,7 @@ > int login_login (struct logininfo *li); > int login_logout(struct logininfo *li); > #ifdef LOGIN_NEEDS_UTMPX >-int login_utmp_only(struct logininfo *li); >+int login_utmp_only(struct logininfo *li,int); > #endif > > /** End of public functions */ >diff -Nur openssh-4.0p1/sshlogin.c openssh-4.0p1-2entry/sshlogin.c >--- openssh-4.0p1/sshlogin.c 2004-08-13 16:51:47.000000000 +0530 >+++ openssh-4.0p1-2entry/sshlogin.c 2005-05-05 10:52:01.000000000 +0530 >@@ -122,10 +122,13 @@ > const char *host, struct sockaddr * addr, socklen_t addrlen) > { > struct logininfo *li; >+ int loginflag=0; > > li = login_alloc_entry(pid, user, host, ttyname); > login_set_addr(li, addr, addrlen); >- login_utmp_only(li); >+ if(options.use_login) >+ loginflag=1; >+ login_utmp_only(li,loginflag); > login_free_entry(li); > } > #endif
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1030
:
896
|
908