summaryrefslogtreecommitdiff
path: root/source3/web/statuspage.c
diff options
context:
space:
mode:
authorbubulle <bubulle@alioth.debian.org>2011-07-26 21:45:48 +0000
committerbubulle <bubulle@alioth.debian.org>2011-07-26 21:45:48 +0000
commita0ecb11ef617c1d7de971588add58492f9cf7832 (patch)
tree6ac8680103ad144a3773935bfa762aacecc82382 /source3/web/statuspage.c
parent055c1823a4d6f723ed30fb7dec347f63fdb6a953 (diff)
downloadsamba-a0ecb11ef617c1d7de971588add58492f9cf7832.tar.gz
Load samba-3.5.10 into branches/samba/upstream.upstream/3.5.10_dfsg
git-svn-id: svn://svn.debian.org/svn/pkg-samba/branches/samba/upstream@3851 fc4039ab-9d04-0410-8cac-899223bdd6b0
Diffstat (limited to 'source3/web/statuspage.c')
-rw-r--r--source3/web/statuspage.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source3/web/statuspage.c b/source3/web/statuspage.c
index 590be1dde2..cb5c57b6ee 100644
--- a/source3/web/statuspage.c
+++ b/source3/web/statuspage.c
@@ -247,9 +247,14 @@ void status_page(void)
int nr_running=0;
bool waitup = False;
TALLOC_CTX *ctx = talloc_stackframe();
+ const char form_name[] = "status";
smbd_pid = pid_to_procid(pidfile_pid("smbd"));
+ if (!verify_xsrf_token(form_name)) {
+ goto output_page;
+ }
+
if (cgi_variable("smbd_restart") || cgi_variable("all_restart")) {
stop_smbd();
start_smbd();
@@ -326,9 +331,11 @@ void status_page(void)
initPid2Machine ();
+output_page:
printf("<H2>%s</H2>\n", _("Server Status"));
printf("<FORM method=post>\n");
+ print_xsrf_token(cgi_user_name(), cgi_user_pass(), form_name);
if (!autorefresh) {
printf("<input type=submit value=\"%s\" name=\"autorefresh\">\n", _("Auto Refresh"));