On Tue, Sep 18, 2018 at 03:07:54PM +0200, Alexander Bluhm wrote:
> On Sat, Sep 15, 2018 at 08:42:19PM -0600, Todd C. Miller wrote:
> > CVSROOT:    /cvs
> > Module name:        src
> > Changes by: [email protected] 2018/09/15 20:42:19
> > 
> > Modified files:
> >     usr.bin/stat   : stat.c 
> > 
> > Log message:
> > Use user_from_uid(3) and group_from_gid(3) to avoid extra passwd
> > and group file lookups.  This required a bit of reordering of the
> > file mode handling bits to deal with the const char *.  OK tb@
> 
> This commit broke regress/bin/chmod.

A typo, sorry for missing this. This fixes the chmod regress.

Index: usr.bin/stat/stat.c
===================================================================
RCS file: /var/cvs/src/usr.bin/stat/stat.c,v
retrieving revision 1.22
diff -u -p -r1.22 stat.c
--- usr.bin/stat/stat.c 16 Sep 2018 02:42:19 -0000      1.22
+++ usr.bin/stat/stat.c 18 Sep 2018 14:46:18 -0000
@@ -598,7 +598,7 @@ format1(const struct stat *st,
        case SHOW_st_gid:
                small = (sizeof(st->st_gid) == 4);
                data = st->st_gid;
-               sdata = group_from_gid(st->st_uid, 1);
+               sdata = group_from_gid(st->st_gid, 1);
                if (sdata == NULL) {
                        snprintf(sid, sizeof(sid), "(%ld)", (long)st->st_gid);
                        sdata = sid;

Reply via email to