UTMPX_FILE
if ((uf = open(UTMPX_FILE, 0)) < 0) {
syslog(LOG_ERR, "%s: %m", UTMPX_FILE);
#ifndef UTMPX_FILE
if (stat(UTMPX_FILE, &sb) < 0) {
syslog(LOG_ERR, "main: stat: %s: %m", UTMPX_FILE);
(void) stat(UTMPX_FILE, &stb);
static char *UTMPX = UTMPX_FILE; /* Snapshot record file */
if (access(UTMPX_FILE, R_OK) != 0 || stat(UTMPX_FILE, &statbuf) != 0) {
logerror(UTMPX_FILE);
(void) snprintf(line, sizeof (line), "%s %s", UTMPX_FILE,
if (stat(UTMPX_FILE, &sbuf) < 0)
err(EXIT_FAILURE, gettext("stat error of %s"), UTMPX_FILE);
err(EXIT_FAILURE, gettext("calloc error of %s"), UTMPX_FILE);
(void) utmpxname(UTMPX_FILE);
(void) strlcat(root, UTMPX_FILE, sizeof (root));
(void) utmpxname(UTMPX_FILE);
if (stat(UTMPX_FILE, &sbuf) < 0)
err(EXIT_FAILURE, gettext("stat error of %s"), UTMPX_FILE);
err(EXIT_FAILURE, gettext("calloc error of %s"), UTMPX_FILE);
(void) utmpxname(UTMPX_FILE);
if ((uf = open64(UTMPX_FILE, 0)) < 0)
if ((lockfd = open(UTMPX_FILE, O_RDWR|O_CREAT, 0644)) < 0)
static char utmpxfile[MAXFILE+1] = UTMPX_FILE; /* Name of the current */
if (strcmp(utmpxfile, UTMPX_FILE) == 0 ||
if ((fp = fopen(UTMPX_FILE, "rF")) != NULL) {