From 1cb94b24efb7c00dbf551e6973b33bb4ad0eef48 Mon Sep 17 00:00:00 2001 From: Ermal Date: Mon, 12 Mar 2012 19:28:04 +0000 Subject: Looking at pw code : chars are invalid in a comment fieldgit diff! Replace those to just space --- etc/inc/auth.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'etc/inc/auth.inc') diff --git a/etc/inc/auth.inc b/etc/inc/auth.inc index a694efb..5464ecc 100644 --- a/etc/inc/auth.inc +++ b/etc/inc/auth.inc @@ -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)); -- cgit v1.1