static void
killer (int sig)
{
- log (L_FATAL, "Caught signal %d, un-registering and exiting.", sig);
+ note (N_FATAL, "Caught signal %d, un-registering and exiting.", sig);
if (!(run_mode & MODE_NOTIFY_ONLY))
pmap_unset (SM_PROG, SM_VERS);
{
strcat(buf,"Notify-Only ");
}
- log(L_WARNING,buf);
+ note(N_WARNING,buf);
/* future: IP aliasing
if (run_mode & MODE_NOTIFY_ONLY)
{
- dprintf(L_DEBUG,"Notify IP: %s",svr_addr);
+ dprintf(N_DEBUG,"Notify IP: %s",svr_addr);
} */
}
fprintf(fp, "%d\n", getpid());
pidfd = dup(fileno(fp));
if (fclose(fp) < 0)
- log(L_WARNING, "Flushing pid file failed.\n");
+ note(N_WARNING, "Flushing pid file failed.\n");
}
static void truncate_pidfile(void)
st.st_uid = 0;
if (st.st_uid == 0) {
- log(L_WARNING, "statd running as root. chown %s to choose different user\n",
+ note(N_WARNING, "statd running as root. chown %s to choose different user\n",
SM_DIR);
return;
}
setgroups(0, NULL);
if (setgid(st.st_gid) == -1
|| setuid(st.st_uid) == -1) {
- log(L_ERROR, "Fail to drop privileges");
+ note(N_ERROR, "Fail to drop privileges");
exit(1);
}
}