summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViktor Dukhovni <viktor@twosigma.com>2016-12-19 19:09:45 -0500
committerViktor Dukhovni <viktor@twosigma.com>2016-12-19 19:09:45 -0500
commit94bb5275e348c51675ae3d52947afc48b8e9e57b (patch)
tree50e4abfdbf4b006d917b196eed0f6030189f1525
parent7a1f7499bd28447159000c31a6638b48ab2d9596 (diff)
Avoid interposing pidfile(), use rk_pidfile() instead
-rw-r--r--kcm/main.c2
-rw-r--r--kdc/main.c2
-rw-r--r--kpasswd/kpasswdd.c2
-rw-r--r--lib/kadm5/ipropd_master.c2
-rw-r--r--lib/kadm5/ipropd_slave.c2
-rw-r--r--lib/roken/detach.c2
-rw-r--r--lib/roken/roken.h.in3
-rw-r--r--lib/roken/write_pid.c3
8 files changed, 8 insertions, 10 deletions
diff --git a/kcm/main.c b/kcm/main.c
index 38c577fb8..ee691d5f2 100644
--- a/kcm/main.c
+++ b/kcm/main.c
@@ -88,7 +88,7 @@ main(int argc, char **argv)
#endif
if (detach_from_console && !launchd_flag && daemon_child == -1)
roken_detach_prep(argc, argv, "--daemon-child");
- pidfile(NULL);
+ rk_pidfile(NULL);
if (launchd_flag) {
heim_sipc mach;
diff --git a/kdc/main.c b/kdc/main.c
index a2bd56680..f5355ed5b 100644
--- a/kdc/main.c
+++ b/kdc/main.c
@@ -169,7 +169,7 @@ main(int argc, char **argv)
signal(SIGPIPE, SIG_IGN);
#endif
#endif
- pidfile(NULL);
+ rk_pidfile(NULL);
switch_environment();
diff --git a/kpasswd/kpasswdd.c b/kpasswd/kpasswdd.c
index dd60eea07..967bf9383 100644
--- a/kpasswd/kpasswdd.c
+++ b/kpasswd/kpasswdd.c
@@ -901,7 +901,7 @@ main(int argc, char **argv)
signal(SIGTERM, sigterm);
#endif
- pidfile(NULL);
+ rk_pidfile(NULL);
return doit(keytab, port);
}
diff --git a/lib/kadm5/ipropd_master.c b/lib/kadm5/ipropd_master.c
index 755942649..d0fdc8e26 100644
--- a/lib/kadm5/ipropd_master.c
+++ b/lib/kadm5/ipropd_master.c
@@ -1128,7 +1128,7 @@ main(int argc, char **argv)
if (detach_from_console && daemon_child == -1)
roken_detach_prep(argc, argv, "--daemon-child");
- pidfile(NULL);
+ rk_pidfile(NULL);
ret = krb5_init_context(&context);
if (ret)
diff --git a/lib/kadm5/ipropd_slave.c b/lib/kadm5/ipropd_slave.c
index 0c58db8c5..72cadbcd3 100644
--- a/lib/kadm5/ipropd_slave.c
+++ b/lib/kadm5/ipropd_slave.c
@@ -707,7 +707,7 @@ main(int argc, char **argv)
if (detach_from_console && daemon_child == -1)
roken_detach_prep(argc, argv, "--daemon-child");
- pidfile(NULL);
+ rk_pidfile(NULL);
ret = krb5_init_context(&context);
if (ret)
diff --git a/lib/roken/detach.c b/lib/roken/detach.c
index 2b8bc924c..e3ab10dc7 100644
--- a/lib/roken/detach.c
+++ b/lib/roken/detach.c
@@ -163,7 +163,7 @@ roken_detach_finish(const char *dir, int daemon_child_fd)
ssize_t bytes;
int fd;
- pidfile(NULL);
+ rk_pidfile(NULL);
if (pipefds[1] == -1 && daemon_child_fd != -1)
pipefds[1] = daemon_child_fd;
if (pipefds[0] != -1)
diff --git a/lib/roken/roken.h.in b/lib/roken/roken.h.in
index 9add023b5..0f2c27741 100644
--- a/lib/roken/roken.h.in
+++ b/lib/roken/roken.h.in
@@ -759,8 +759,7 @@ readv(int, const struct iovec *, int);
#ifdef NO_PIDFILES
#define pidfile(x) ((void) 0)
#else
-#define pidfile rk_pidfile
-ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL pidfile (const char*);
+ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL rk_pidfile (const char*);
#endif
#ifndef HAVE_BSWAP64
diff --git a/lib/roken/write_pid.c b/lib/roken/write_pid.c
index 308e17696..310c85ac7 100644
--- a/lib/roken/write_pid.c
+++ b/lib/roken/write_pid.c
@@ -87,7 +87,7 @@ pidfile_cleanup(void)
}
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
-pidfile(const char *bname)
+rk_pidfile(const char *bname)
{
/*
* If the OS has a pidfile(), call that, but still call
@@ -95,7 +95,6 @@ pidfile(const char *bname)
* writing it twice will still work.
*/
#ifdef HAVE_PIDFILE
-#undef pidfile
pidfile(bname);
#endif