This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Problem with login command


I think that the login command might be overwriteing fields in the wtmp and utmp files.
Now that we are using a longer word in the line filed of console I noticed that the last
two letters le were showing up in the id field that follows it.




First I made backups of wtmp and utmp.
Just to be sure I turncated wtmp and utmp to 0 length and exited the last of my
Cygwin windows to Windows. From windows I varified that these files were still empty.
Then I started up Cygwin in a new window and did the following:




Gary@1005-apt07 ~
$ ls -l /var/run/utmp
-rw-r--r--  1 Gary None 0 Dec 21 21:28 /var/run/utmp

Gary@1005-apt07 ~
$ ls -l /var/log/wtmp
-rw-r--r--  1 Gary None 0 Dec 21 21:28 /var/log/wtmp

Gary@1005-apt07 ~
$ login Gary
Fanfare!!!
You are successfully logged in to this server!!!

Gary@1005-apt07 ~
$ ls -l /var/run/utmp
-rw-r--r--  1 Gary None 308 Dec 21 21:31 /var/run/utmp

Gary@1005-apt07 ~
$ ls -l /var/log/wtmp
-rw-r--r--  1 Gary None 308 Dec 21 21:31 /var/log/wtmp

Gary@1005-apt07 ~
$ diff /var/run/utmp /var/log/wtmp

Gary@1005-apt07 ~
$ cat /var/run/utmp | od -c
0000000  \a  \0  \0  \0   0 026  \0  \0   c   o   n   s   o   l   e  \0
0000020  \0  \0  \0  \0  \0  \0  \0  \0   l   e  \0  \0 016 036 252   C
0000040   G   a   r   y  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000060  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
*
0000460  \0  \0  \0  \0
0000464

Gary@1005-apt07 ~
$ cygcheck -s -v -r > cygcheck.out


---------------------------------------------
So here is where I noticed the problem!
Gary@1005-apt07 ~
$ cat /var/run/utmp | od -c
0000000 \a \0 \0 \0 0 026 \0 \0 c o n s o l e \0
0000020 \0 \0 \0 \0 \0 \0 \0 \0 LOOK!!! l e \0 \0 016 036 252 C
0000040 G a r y \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
0000060 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
*
0000460 \0 \0 \0 \0
0000464




I really dont know if this is an error
or a design feature. But maybe you would be interested as it comes from such a DARK corner
of Cygwin for me since I dont use the login command on my home machine.





Thanks!


Attachment: cygcheck.out
Description: Text document

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]