Re: WTMP file

Valdis.Kletnieks_at_vt.edu
Date: 11/06/03

  • Next message: A***: "Re[3]: ms03-043 questions"
    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...

    
    



  • Next message: A***: "Re[3]: ms03-043 questions"
  • Quantcast