Date: Fri, 19 Jun 2015 21:32:20 +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: r284609 - head/usr.sbin/bsdconfig/usermgmt/share Message-ID: <201506192132.t5JLWKsU071974@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dteske Date: Fri Jun 19 21:32:20 2015 New Revision: 284609 URL: https://svnweb.freebsd.org/changeset/base/284609 Log: Interim fix for "Login not found" error. PR: bin/196514 MFC after: 3 days X-MFC-to: stable/10 Modified: head/usr.sbin/bsdconfig/usermgmt/share/group.subr head/usr.sbin/bsdconfig/usermgmt/share/user.subr Modified: head/usr.sbin/bsdconfig/usermgmt/share/group.subr ============================================================================== --- head/usr.sbin/bsdconfig/usermgmt/share/group.subr Fri Jun 19 21:30:45 2015 (r284608) +++ head/usr.sbin/bsdconfig/usermgmt/share/group.subr Fri Jun 19 21:32:20 2015 (r284609) @@ -82,9 +82,9 @@ f_group_add() # # NB: pw(8) has a ``feature'' wherein `-n name' can be taken as GID # instead of name. Work-around is to also pass `-g GID' at the same - # time (any GID will do; but `-1' is appropriate for this context). + # time (the GID is ignored in this case, so any GID will do). # - if [ "$input" ] && f_quietly pw groupshow -n "$input" -g -1; then + if [ "$input" ] && f_quietly pw groupshow -n "$input" -g 1337; then f_show_err "$msg_group_already_used" "$input" return $FAILURE fi @@ -182,7 +182,7 @@ f_group_add() 1) # Group Name (prompt for new group name) f_dialog_input_group_name input "$group_name" || continue - if f_quietly pw groupshow -n "$input" -g -1; then + if f_quietly pw groupshow -n "$input" -g 1337; then f_show_err "$msg_group_already_used" "$input" continue fi @@ -368,9 +368,9 @@ f_group_edit() # # NB: pw(8) has a ``feature'' wherein `-n name' can be taken as GID # instead of name. Work-around is to also pass `-g GID' at the same - # time (any GID will do; but `-1' is appropriate for this context). + # time (the GID is ignored in this case, so any GID will do). # - if [ "$input" ] && ! f_quietly pw groupshow -n "$input" -g -1; then + if [ "$input" ] && ! f_quietly pw groupshow -n "$input" -g 1337; then f_show_err "$msg_group_not_found" "$input" return $FAILURE fi Modified: head/usr.sbin/bsdconfig/usermgmt/share/user.subr ============================================================================== --- head/usr.sbin/bsdconfig/usermgmt/share/user.subr Fri Jun 19 21:30:45 2015 (r284608) +++ head/usr.sbin/bsdconfig/usermgmt/share/user.subr Fri Jun 19 21:32:20 2015 (r284609) @@ -231,9 +231,9 @@ f_user_add() # # NB: pw(8) has a ``feature'' wherein `-n name' can be taken as UID # instead of name. Work-around is to also pass `-u UID' at the same - # time (any UID will do; but `-1' is appropriate for this context). + # time (the UID is ignored in this case, so any UID will do). # - if [ "$input" ] && f_quietly pw usershow -n "$input" -u -1; then + if [ "$input" ] && f_quietly pw usershow -n "$input" -u 1337; then f_show_err "$msg_login_already_used" "$input" return $FAILURE fi @@ -414,7 +414,7 @@ f_user_add() 1) # Login (prompt for new login name) f_dialog_input_name input "$user_name" || continue - if f_quietly pw usershow -n "$input" -u -1; then + if f_quietly pw usershow -n "$input" -u 1337; then f_show_err "$msg_login_already_used" "$input" continue fi @@ -920,9 +920,9 @@ f_user_edit() # # NB: pw(8) has a ``feature'' wherein `-n name' can be taken as UID # instead of name. Work-around is to also pass `-u UID' at the same - # time (any UID will do; but `-1' is appropriate for this context). + # time (the UID is ignored in this case, so any UID will do). # - if [ "$input" ] && ! f_quietly pw usershow -n "$input" -u -1; then + if [ "$input" ] && ! f_quietly pw usershow -n "$input" -u 1337; then f_show_err "$msg_login_not_found" "$input" return $FAILURE fi
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201506192132.t5JLWKsU071974>