Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Mar 2014 03:33:03 +0000 (UTC)
From:      Devin Teske <dteske@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r263147 - head/usr.sbin/bsdconfig/usermgmt/share
Message-ID:  <201403140333.s2E3X3ue051732@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dteske
Date: Fri Mar 14 03:33:03 2014
New Revision: 263147
URL: http://svnweb.freebsd.org/changeset/base/263147

Log:
  Fix a bug preventing errors from pw(8) from filtering up to a dialog.
  Programs running as rvalue to pipe cannot access current namespace.

Modified:
  head/usr.sbin/bsdconfig/usermgmt/share/group.subr

Modified: head/usr.sbin/bsdconfig/usermgmt/share/group.subr
==============================================================================
--- head/usr.sbin/bsdconfig/usermgmt/share/group.subr	Fri Mar 14 03:28:21 2014	(r263146)
+++ head/usr.sbin/bsdconfig/usermgmt/share/group.subr	Fri Mar 14 03:33:03 2014	(r263147)
@@ -202,8 +202,8 @@ f_group_add()
 		if [ "$group_password_disable" ]; then
 			f_eval_catch -k err $funcname pw '%s -h -' "$cmd"
 		elif [ "$group_password" ]; then
-			echo "$group_password" | f_eval_catch -k err \
-				$funcname pw '%s -h 0' "$cmd"
+			err=$( echo "$group_password" | f_eval_catch -de \
+				$funcname pw '%s -h 0' "$cmd" 2>&1 )
 		else
 			f_eval_catch -k err $funcname pw '%s' "$cmd"
 		fi
@@ -458,8 +458,8 @@ f_group_edit()
 		if [ "$group_password_disable" ]; then
 			f_eval_catch -k err $funcname pw '%s -h -' "$cmd"
 		elif [ "$group_password" -o "$null_password" ]; then
-			echo "$group_password" | f_eval_catch -k err \
-				$funcname pw '%s -h 0' "$cmd"
+			err=$( echo "$group_password" | f_eval_catch -de \
+				$funcname pw '%s -h 0' "$cmd" 2>&1 )
 		else
 			f_eval_catch -k err $funcname pw '%s' "$cmd"
 		fi



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403140333.s2E3X3ue051732>