Re: [hackers] [ubase] Add lastlog(8) || Roberto E. Vargas Caballero

From: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
Date: Mon, 18 Aug 2014 22:07:38 +0200

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
Received on Mon Aug 18 2014 - 22:07:38 CEST

This archive was generated by hypermail 2.3.0 : Mon Aug 18 2014 - 22:12:13 CEST