summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/control.c
diff options
context:
space:
mode:
authorEric Faurot <eric@cvs.openbsd.org>2014-02-17 13:33:57 +0000
committerEric Faurot <eric@cvs.openbsd.org>2014-02-17 13:33:57 +0000
commite2c5383b17cb37461ca1e9454885277c09d3cb5a (patch)
tree3806acd87a939a9f38b6bcf7956e1ce3be7ac253 /usr.sbin/smtpd/control.c
parentb818425e724d2d16e3268de0ba202642c0c7099b (diff)
new "smtpctl show status" command to show if mta/mda/smtp are currently running or paused.
Diffstat (limited to 'usr.sbin/smtpd/control.c')
-rw-r--r--usr.sbin/smtpd/control.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/control.c b/usr.sbin/smtpd/control.c
index 38320819564..d3b97b43076 100644
--- a/usr.sbin/smtpd/control.c
+++ b/usr.sbin/smtpd/control.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: control.c,v 1.96 2014/02/04 15:22:39 eric Exp $ */
+/* $OpenBSD: control.c,v 1.97 2014/02/17 13:33:56 eric Exp $ */
/*
* Copyright (c) 2012 Gilles Chehade <gilles@poolp.org>
@@ -721,6 +721,14 @@ control_dispatch_ext(struct mproc *p, struct imsg *imsg)
m_forward(p_mta, imsg);
return;
+ case IMSG_CTL_SHOW_STATUS:
+ if (c->euid)
+ goto badcred;
+
+ m_compose(p, IMSG_CTL_SHOW_STATUS, 0, 0, -1, &env->sc_flags,
+ sizeof(env->sc_flags));
+ return;
+
case IMSG_CTL_MTA_BLOCK:
case IMSG_CTL_MTA_UNBLOCK:
if (c->euid)