summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-01-11 11:20:57 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-01-11 11:20:57 +0000
commit7e9b07f85193bb3ae3ebe638bc43a7901913cd4b (patch)
treeb8e7d0f7da8c9bf2fa06a81bd8e55ce04b5b1751
parentc6364f6d73340136f687a7fed734b0ddf8537956 (diff)
downloaddrakx-7e9b07f85193bb3ae3ebe638bc43a7901913cd4b.tar
drakx-7e9b07f85193bb3ae3ebe638bc43a7901913cd4b.tar.gz
drakx-7e9b07f85193bb3ae3ebe638bc43a7901913cd4b.tar.bz2
drakx-7e9b07f85193bb3ae3ebe638bc43a7901913cd4b.tar.xz
drakx-7e9b07f85193bb3ae3ebe638bc43a7901913cd4b.zip
do not log the encrypted password
-rw-r--r--perl-install/any.pm2
-rw-r--r--perl-install/run_program.pm3
2 files changed, 3 insertions, 2 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 1d7d34f43..c4a903e6f 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -72,7 +72,7 @@ sub create_user {
}
}
require authentication;
- run_program::rooted($::prefix,
+ run_program::raw({ root => $::prefix, sensitive_arguments => 1 },
'adduser',
'-p', authentication::user_crypted_passwd($u, $isMD5),
if_($uid, '-u', $uid), if_($gid, '-g', $gid),
diff --git a/perl-install/run_program.pm b/perl-install/run_program.pm
index e431bf8f8..c396df49f 100644
--- a/perl-install/run_program.pm
+++ b/perl-install/run_program.pm
@@ -47,7 +47,8 @@ sub raw {
($stdout_mode, $stdout_raw, @args) = @args if $args[0] =~ /^>>?$/;
($stderr_mode, $stderr_raw, @args) = @args if $args[0] =~ /^2>>?$/;
- log::l("running: $real_name @args" . ($root ? " with root $root" : ""));
+ my $args = $options->{sensitive_arguments} ? '<hidden arguments>' : join(' ', @args);
+ log::l("running: $real_name$args" . ($root ? " with root $root" : ""));
return 1 if $root && $<;