mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2025-04-01 23:57:05 +00:00
two more cases of shelling out external programs in a more secure way, see cecda9cec5
This commit is contained in:
parent
c925f72b0b
commit
e9cde52a48
@ -5,6 +5,7 @@
|
|||||||
import os, os.path, urllib.parse, time, re
|
import os, os.path, urllib.parse, time, re
|
||||||
|
|
||||||
from mailconfig import get_mail_domains
|
from mailconfig import get_mail_domains
|
||||||
|
from utils import shell
|
||||||
|
|
||||||
def do_dns_update(env):
|
def do_dns_update(env):
|
||||||
# What domains should we serve DNS for?
|
# What domains should we serve DNS for?
|
||||||
@ -39,13 +40,13 @@ def do_dns_update(env):
|
|||||||
|
|
||||||
# Kick nsd if anything changed.
|
# Kick nsd if anything changed.
|
||||||
if len(updated_domains) > 0:
|
if len(updated_domains) > 0:
|
||||||
os.system("service nsd restart")
|
shell('check_call', ["/usr/sbin/service", "nsd", "restart"])
|
||||||
|
|
||||||
# Write the OpenDKIM configuration tables.
|
# Write the OpenDKIM configuration tables.
|
||||||
write_opendkim_tables(zonefiles, env)
|
write_opendkim_tables(zonefiles, env)
|
||||||
|
|
||||||
# Kick opendkim.
|
# Kick opendkim.
|
||||||
os.system("service opendkim restart")
|
shell('check_call', ["/usr/sbin/service", "opendkim", "restart"])
|
||||||
|
|
||||||
if len(updated_domains) == 0:
|
if len(updated_domains) == 0:
|
||||||
# if nothing was updated (except maybe DKIM), don't show any output
|
# if nothing was updated (except maybe DKIM), don't show any output
|
||||||
|
Loading…
Reference in New Issue
Block a user