[elbe-devel] [PATCH 05/12] pylint esoap: mak shutdown_initvm() @authenticated_admin and no-self-use
Torben Hohn
torben.hohn at linutronix.de
Thu Sep 26 15:33:25 CEST 2019
shutdown_initvm is only supposed to be called by an admin, and it
did not evaluate the uid anyways.
switch to @authenticated_admin and ignore the no-self-use pylint message
Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>
---
elbepack/daemons/soap/esoap.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/elbepack/daemons/soap/esoap.py b/elbepack/daemons/soap/esoap.py
index e3255b651..aeb43e418 100644
--- a/elbepack/daemons/soap/esoap.py
+++ b/elbepack/daemons/soap/esoap.py
@@ -379,10 +379,10 @@ class ESoap (ServiceBase):
return msg
@rpc()
- @authenticated_uid
+ @authenticated_admin
@soap_faults
- def shutdown_initvm(self, uid):
- # pylint: disable=unused-argument
+ def shutdown_initvm(self):
+ # pylint: disable=no-self-use
system("systemctl --no-block poweroff")
@rpc(String)
--
2.20.1
More information about the elbe-devel
mailing list