Looking at pw code : chars are invalid in a comment fieldgit diff! Replace those to just space

This commit is contained in:
Ermal 2012-03-12 19:28:04 +00:00
parent 966f359e02
commit 1cb94b24ef

View File

@ -421,10 +421,11 @@ function local_user_set(& $user) {
$user_op = "usermod";
}
$comment = str_replace(array(":", "!", "@"), " ", $user['descr']);
/* add or mod pw db */
$cmd = "/usr/sbin/pw {$user_op} -q -u {$user_uid} -n {$user_name}".
" -g {$user_group} -s {$user_shell} -d {$user_home}".
" -c ".escapeshellarg($user['descr'])." -H 0 2>&1";
" -c ".escapeshellarg($comment)." -H 0 2>&1";
if($debug)
log_error(sprintf(gettext("Running: %s"), $cmd));