summaryrefslogtreecommitdiff
path: root/source3/web
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2012-07-19 16:36:18 -0700
committerJeremy Allison <jra@samba.org>2012-07-19 16:36:18 -0700
commite8dbf2889f0f5c6d213e92cbfd97b6a874aedb03 (patch)
tree21f7c585011d551de323c74faac8f545d7f90857 /source3/web
parentf58d8feabc4b2c75681af1effeb4fb062cee74bd (diff)
downloadsamba-e8dbf2889f0f5c6d213e92cbfd97b6a874aedb03.tar.gz
samba-e8dbf2889f0f5c6d213e92cbfd97b6a874aedb03.tar.bz2
samba-e8dbf2889f0f5c6d213e92cbfd97b6a874aedb03.zip
Move everything to use the common pidfile functions.
The extra code in source3/lib/pidfile.c is no longer needed.
Diffstat (limited to 'source3/web')
-rw-r--r--source3/web/startstop.c8
-rw-r--r--source3/web/statuspage.c3
2 files changed, 6 insertions, 5 deletions
diff --git a/source3/web/startstop.c b/source3/web/startstop.c
index ef2871ccd3..ec8f802ae9 100644
--- a/source3/web/startstop.c
+++ b/source3/web/startstop.c
@@ -20,7 +20,7 @@
#include "includes.h"
#include "web/swat_proto.h"
#include "dynconfig/dynconfig.h"
-
+#include "../lib/util/pidfile.h"
/** Startup smbd from web interface. */
void start_smbd(void)
@@ -86,7 +86,7 @@ void start_winbindd(void)
/* stop smbd */
void stop_smbd(void)
{
- pid_t pid = pidfile_pid_s3("smbd");
+ pid_t pid = pidfile_pid(lp_piddir(), "smbd");
if (geteuid() != 0) return;
@@ -98,7 +98,7 @@ void stop_smbd(void)
/* stop nmbd */
void stop_nmbd(void)
{
- pid_t pid = pidfile_pid_s3("nmbd");
+ pid_t pid = pidfile_pid(lp_piddir(), "nmbd");
if (geteuid() != 0) return;
@@ -110,7 +110,7 @@ void stop_nmbd(void)
/* stop winbindd */
void stop_winbindd(void)
{
- pid_t pid = pidfile_pid_s3("winbindd");
+ pid_t pid = pidfile_pid(lp_piddir(), "winbindd");
if (geteuid() != 0) return;
diff --git a/source3/web/statuspage.c b/source3/web/statuspage.c
index d04554901c..d257970643 100644
--- a/source3/web/statuspage.c
+++ b/source3/web/statuspage.c
@@ -23,6 +23,7 @@
#include "locking/proto.h"
#include "librpc/gen_ndr/open_files.h"
#include "lib/conn_tdb.h"
+#include "../lib/util/pidfile.h"
#define _(x) lang_msg_rotate(talloc_tos(),x)
@@ -253,7 +254,7 @@ void status_page(void)
TALLOC_CTX *ctx = talloc_stackframe();
const char form_name[] = "status";
- smbd_pid = pid_to_procid(pidfile_pid_s3("smbd"));
+ smbd_pid = pid_to_procid(pidfile_pid(lp_piddir(), "smbd"));
if (!verify_xsrf_token(form_name)) {
goto output_page;