SVR3 passwd changes mode of passwd file
Chris Bertin
chris at cetia.UUCP
Mon Sep 26 22:14:03 AEST 1988
To change the mode of a file without being requested to is one thing, but
SYSV does much better when it comes to the 'utmp' handling. For fun, do
$ cp /etc/passwd /tmp
$ ls -l /tmp/passwd
$ who /tmp/passwd
$ ls -l /tmp/passwd
If the utmp code finds that the file you are doing 'who' on is not in 'utmp'
format, it ZEROES the file!!! Thank you AT&T.
The code is in libc/gen/getut.c. The wonderful comment says:
/* Make sure file is a multiple of 'utmp' entries long */
and if the file is not a multiple, it does an 'unlink' and a 'creat'...
Chris
--
Chris Bertin | CETIA
| 150, Av Marcelin Berthelot, Z.I. Toulon-Est
+33(94)212005 | 83088 Toulon Cedex, France
Ext: 239 | inria!cetia
More information about the Comp.unix.questions
mailing list