From 8d7a6b312ba2a5af5105e038bfb200ef3130adce Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Thu, 26 Mar 2009 20:33:07 +0000 Subject: [PATCH] -Secure permissions on dhcpd.conf to prevent tampering using secret key git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3007 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/dhcp.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/dhcp.pm b/xCAT-server/lib/xcat/plugins/dhcp.pm index 339166a22..5e031ad15 100644 --- a/xCAT-server/lib/xcat/plugins/dhcp.pm +++ b/xCAT-server/lib/xcat/plugins/dhcp.pm @@ -332,6 +332,7 @@ sub preprocess_request sub process_request { + my $oldmask = umask 0077; $restartdhcp=0; my $req = shift; $callback = shift; @@ -612,6 +613,7 @@ sub process_request system("/etc/init.d/dhcpd restart"); system("chkconfig dhcpd on"); } + umask $oldmask; } sub putmyselffirst {