Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Nov 2015 11:39:30 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 204676] pw groupshow 0 does not work and gives unknown group
Message-ID:  <bug-204676-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=204676

            Bug ID: 204676
           Summary: pw groupshow 0 does not work and gives unknown group
           Product: Base System
           Version: 10.2-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: longwitz@incore.de

On FreeBSD 10.2-STABLE #0 r287473 the command 'pw groupshow 0' gives 'pw:
unknown group `0' instead of 'wheel:*:0:root'. The reason for this is an
uninitialized variable in pw_group.c.

The following patch solves this problem for me:

--- usr/src/usr.sbin/pw/pw_group.c.orig 2015-09-05 21:22:44.000000000 +0200
+++ usr/src/usr.sbin/pw/pw_group.c      2015-11-19 12:00:04.233910000 +0100
@@ -296,6 +296,7 @@
                NULL
        };

+       name = NULL;
        if (arg1 != NULL) {
                if (arg1[strspn(arg1, "0123456789")] == '\0')
                        id = pw_checkid(arg1, GID_MAX);

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



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