I wrote it for personal use, but now that it is going to be part of ubase maybe is better to use die in some parts of the code, no?
> + if (ferror(last)) { > + perror("error reading lastlog"); > + exit(EXIT_FAILURE); > + } ... > + if ((last = fopen(_PATH_LASTLOG, "r")) == NULL) { > + perror(_PATH_LASTLOG); > + exit(EXIT_FAILURE); > + } ... > + perror(PASSWD); > + exit(EXIT_FAILURE); > + } > + if ((p = strchr(line, ':')) == NULL) { > + fputs("incorrect password file", stderr); > + exit(-1); > + } > + *p = ' ... -- Roberto E. Vargas Caballero