summaryrefslogtreecommitdiffstats
path: root/bin/drakguard
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2013-03-15 18:43:19 +0000
committerThierry Vignaud <tv@mageia.org>2013-03-15 18:43:19 +0000
commit81d52af363cd4020f6dfc414a82d1eda54697c5e (patch)
tree0cf43a3e412c8e2d9a75005e9ad35df990ebd696 /bin/drakguard
parentb0c07d76ba658d696cbdca7e1f4c2ea0018ab074 (diff)
downloaddrakguard-81d52af363cd4020f6dfc414a82d1eda54697c5e.tar
drakguard-81d52af363cd4020f6dfc414a82d1eda54697c5e.tar.gz
drakguard-81d52af363cd4020f6dfc414a82d1eda54697c5e.tar.bz2
drakguard-81d52af363cd4020f6dfc414a82d1eda54697c5e.tar.xz
drakguard-81d52af363cd4020f6dfc414a82d1eda54697c5e.zip
simplify
Diffstat (limited to 'bin/drakguard')
-rwxr-xr-xbin/drakguard4
1 files changed, 1 insertions, 3 deletions
diff --git a/bin/drakguard b/bin/drakguard
index 92bb3d6..ee35cd8 100755
--- a/bin/drakguard
+++ b/bin/drakguard
@@ -531,14 +531,12 @@ sub set_permissions {
sub restore_permissions {
my ($line) = @_;
- foreach ($line) {
- my ($fich, $usrname, $grpname, $mode) = /^(.*)\t(\w+)\.(\w+)\t(\d+)\s*/ or next;
+ my ($fich, $usrname, $grpname, $mode) = $line =~ /^(.*)\t(\w+)\.(\w+)\t(\d+)\s*/ or return;
$mode = sprintf "%04d", $mode;#make number with 4 digits
my $guid = getgrnam($grpname);
my $uid = getpwnam($usrname);
chown $uid, $guid, $fich;
chmod oct($mode), $fich;
- }
}
sub subst_config_line {