diff --git a/lib/daemon.py b/lib/daemon.py index 66239fc45277f58c643b83434ef8ce43abab5eb6..1685e84c566efb7405330e743955e63af50ac3f6 100644 --- a/lib/daemon.py +++ b/lib/daemon.py @@ -621,6 +621,7 @@ def _VerifyDaemonUser(daemon_name): constants.NODED: getents.noded_uid, constants.CONFD: getents.confd_uid, } + assert daemon_name in daemon_uids, "Invalid daemon %s" % daemon_name return (daemon_uids[daemon_name] == running_uid, running_uid, daemon_uids[daemon_name]) diff --git a/lib/runtime.py b/lib/runtime.py index 5180486fcae7bcb240af7add07c95e5a06998d34..b2db408b38de8790d81f9992879c8d60bac7aab8 100644 --- a/lib/runtime.py +++ b/lib/runtime.py @@ -171,7 +171,7 @@ def GetEnts(resolver=GetentResolver): """Singleton wrapper around resolver instance. As this method is accessed by multiple threads at the same time - we need to take thread-safty carefully + we need to take thread-safety carefully. """ # We need to use the global keyword here