Vulnerability Development mailing list archives
Re: WTMP file
From: Valdis.Kletnieks () vt edu
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...
Attachment:
_bin
Description:
Current thread:
- WTMP file BORJA RUIZ CASTRO MORON (Nov 05)
- Re: WTMP file Valdis . Kletnieks (Nov 06)
- Re: WTMP file Dan Yefimov (Nov 06)
- <Possible follow-ups>
- RE: WTMP file Odhner, Christian (Nov 06)