summaryrefslogtreecommitdiffstats
path: root/src/sbin
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2015-01-16 03:53:00 +0100
committerAlexander Sulfrian <alexander@sulfrian.net>2015-02-25 18:35:00 +0100
commitf69d2c18d1351d49f4c1ffd2a6c282df0fa3d8e3 (patch)
treea8861e9ce11b6a5c320c2c1f9ba23cb152f6c20a /src/sbin
parent12b769d5864c9e04235184d38a5089f1ee655c8c (diff)
downloadbcfg2-f69d2c18d1351d49f4c1ffd2a6c282df0fa3d8e3.tar.gz
bcfg2-f69d2c18d1351d49f4c1ffd2a6c282df0fa3d8e3.tar.bz2
bcfg2-f69d2c18d1351d49f4c1ffd2a6c282df0fa3d8e3.zip
Server/Core: drop privileges even if not running as daemon
Diffstat (limited to 'src/sbin')
-rwxr-xr-xsrc/sbin/bcfg2-info2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/sbin/bcfg2-info b/src/sbin/bcfg2-info
index a6c3149bc..2c97a9b91 100755
--- a/src/sbin/bcfg2-info
+++ b/src/sbin/bcfg2-info
@@ -726,6 +726,8 @@ Bcfg2 client itself.""")
def run(self, args): # pylint: disable=W0221
try:
+ if os.getuid() == 0:
+ self._drop_privileges()
self.load_plugins()
self.block_for_fam_events(handle_events=True)
if args: