Re: WTMP file
Valdis.Kletnieks_at_vt.edu
Date: 11/06/03
- Previous message: Odhner, Christian: "RE: WTMP file"
- In reply to: BORJA RUIZ CASTRO MORON: "WTMP file"
- Next in thread: Dan Yefimov: "Re: WTMP file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
To: BORJA RUIZ CASTRO MORON <padre@fedro.ugr.es> Date: Wed, 05 Nov 2003 19:51:26 -0500
On Wed, 05 Nov 2003 17:58:42 +0100, BORJA RUIZ CASTRO MORON <padre@fedro.ugr.es> said:
> while((acceso=getpwent())!=NULL) {
> lseek(fd,sizeof(struct utmp)*acceso->pw_uid,SEEK_SET);
> pututline(&rosita);
> }
So if you're going to smash every single entry, why did you bother
doing a test for the username?
Other issues:
Your system may use a utmpx format rather than utmp.
Note the distinction between utmp and wtmp files.
Use the _PATH_UTMP and/or _PATH_WTMP macros that most sane systems give you,
in case the file isn't in /var/log...
- application/pgp-signature attachment: stored
- Previous message: Odhner, Christian: "RE: WTMP file"
- In reply to: BORJA RUIZ CASTRO MORON: "WTMP file"
- Next in thread: Dan Yefimov: "Re: WTMP file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]