[Bug 208774] bsdconfig bug when editing users

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sun Sep 11 20:29:02 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=208774

--- Comment #1 from Martin Waschbüsch <martin at waschbuesch.de> ---
Created attachment 174664
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=174664&action=edit
strip appended group name from _user_gid before using it with the pw command

Although there is code that attempts to add the group name to the dialog
display starting in line 1023 of user_input.subr:

        # Attempt to translate a numeric GID into `number (name)'
        if f_isinteger "$user_gid"; then
                local user_group
                user_group=$( pw groupshow -g "$user_gid" 2> /dev/null ) &&
                        user_gid="$user_gid (${user_group%%:*})"
        fi

I could not identify any existing code for bsdconfig that was meant to strip
the (<groupname>) out again.

Albeit not elegant, the attached patch solves the problem for me (on
10.3-STABLE).

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list