summaryrefslogtreecommitdiff
path: root/source3/web/startstop.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-03-15 02:37:52 +0000
committerAndrew Tridgell <tridge@samba.org>1998-03-15 02:37:52 +0000
commitd360320618fe3a7f53ac1f05ee3ac54323a03c82 (patch)
tree97120a8949d82c8e9aab435bb56f6f0301beed28 /source3/web/startstop.c
parent69bb6f6f5fa472d2bf5c619a09aecc3b0ce4c254 (diff)
downloadsamba-d360320618fe3a7f53ac1f05ee3ac54323a03c82.tar.gz
samba-d360320618fe3a7f53ac1f05ee3ac54323a03c82.tar.bz2
samba-d360320618fe3a7f53ac1f05ee3ac54323a03c82.zip
- added the ability to kill off individual connections from SWAT (from
the status page) - split the claim_connection() code into its own file - fixed the claim_connection() code to lock the file when manipulating it - always claim a null connection at startup - fixed a bug in the pidfile code (This used to be commit abd4a17e21d12be3d1747e94ceb1915abaf135e3)
Diffstat (limited to 'source3/web/startstop.c')
-rw-r--r--source3/web/startstop.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source3/web/startstop.c b/source3/web/startstop.c
index 19781cc220..e60b13ae66 100644
--- a/source3/web/startstop.c
+++ b/source3/web/startstop.c
@@ -91,3 +91,14 @@ void stop_nmbd(void)
kill(pid, SIGTERM);
}
+
+/* kill a specified process */
+void kill_pid(int pid)
+{
+ if (geteuid() != 0) return;
+
+ if (pid <= 0) return;
+
+ kill(pid, SIGTERM);
+ sleep(SLEEP_TIME);
+}