[Git][NTPsec/ntpsec][master] We don't want to allow shell escapes in ntpq

Eric S. Raymond gitlab at mg.gitlab.com
Fri Dec 2 07:40:03 UTC 2016


Eric S. Raymond pushed to branch master at NTPsec / ntpsec


Commits:
c7407d17 by Matt Selsky at 2016-12-02T02:39:01-05:00
We don't want to allow shell escapes in ntpq

Fixes GitLab issue #181

- - - - -


1 changed file:

- ntpq/ntpq


Changes:

=====================================
ntpq/ntpq
=====================================
--- a/ntpq/ntpq
+++ b/ntpq/ntpq
@@ -223,6 +223,11 @@ class Ntpq(cmd.Cmd):
                     return
         cmd.Cmd.do_help(self, arg)
 
+    def do_shell(self, line):
+        "Called when a line that starts with ! is entered in response to the prompt."
+        self.warn("***Command `!%s' unknown\n" % line)
+        return
+
     def say(self, msg):
         sys.stdout.write(polystr(msg))
         sys.stdout.flush()	# In case we're piping the output



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/c7407d17326a2ff3116b8ccba3dc316a7f9cabb6
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20161202/f537f548/attachment.html>


More information about the vc mailing list