]> git.ipfire.org Git - thirdparty/suricata-update.git/commit
Improve permission warning
authorVagisha Gupta <vagishagupta23@gmail.com>
Tue, 28 May 2019 07:20:29 +0000 (12:50 +0530)
committerJason Ish <jason.ish@oisf.net>
Wed, 28 Aug 2019 21:56:28 +0000 (15:56 -0600)
commit80e2f0e7d561b13dc3bf05eba1909df49264336e
tree08776b3fe35677dcf07616ccc7a37cdf9abef651
parent47334cc5c8df83b9d38e6c679353dc22b8cf710f
Improve permission warning

Improve permission warning when Suricata-update runs with the wrong user

When suricata-update runs with a non-root user, it gives an ugly traceback.
To avoid those ugly tracebacks, try except block is put around the operation
that are being performed on the file i.e. shutil.copyfile(src, dest) and
exit cleanly with an error in the log.
Also, to avoid ugly tracebacks for permission of suricata.yaml, try-except
is put around where it is accessed and exit cleanly.
suricata/update/main.py