diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2005-09-01 09:34:53 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2005-09-01 09:34:53 +0000 |
commit | 851c9511085247b751c81500d83b2a53f3a43327 (patch) | |
tree | 7e7d0631c777efe35b121aa7dca0803255db668f /perl-install/authentication.pm | |
parent | 3693753b57d952dd6148852818cb413012071a37 (diff) | |
download | drakx-851c9511085247b751c81500d83b2a53f3a43327.tar drakx-851c9511085247b751c81500d83b2a53f3a43327.tar.gz drakx-851c9511085247b751c81500d83b2a53f3a43327.tar.bz2 drakx-851c9511085247b751c81500d83b2a53f3a43327.tar.xz drakx-851c9511085247b751c81500d83b2a53f3a43327.zip |
allow removing lines in krb5_conf_update() (for vguardiola)
Diffstat (limited to 'perl-install/authentication.pm')
-rw-r--r-- | perl-install/authentication.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/perl-install/authentication.pm b/perl-install/authentication.pm index 1affd1a9c..be861cc81 100644 --- a/perl-install/authentication.pm +++ b/perl-install/authentication.pm @@ -586,11 +586,11 @@ sub krb5_conf_update { if (my $i = /^\s*\[\Q$category\E\]/i ... /^\[/) { if ($i =~ /E/) { #- for last line of category chomp $s; $s .= "\n"; - $s .= " $_->[0] = $_->[1]\n" foreach values %subst; + $s .= " $_->[0] = $_->[1]\n" foreach grep { defined($_->[1]) } values %subst; %subst = (); } elsif (/^\s*([^=]*?)\s*=/) { if (my $e = delete $subst{lc($1)}) { - $_ = " $1 = $e->[1]\n"; + $_ = defined($e->[1]) ? " $1 = $e->[1]\n" : ''; } } } @@ -601,7 +601,7 @@ sub krb5_conf_update { if (keys %subst) { chomp $s; $s .= "\n[$category]\n"; - $s .= " $_->[0] = $_->[1]\n" foreach values %subst; + $s .= " $_->[0] = $_->[1]\n" foreach grep { defined($_->[1]) } values %subst; } MDK::Common::File::output($file, $s); |