Ignore:
Timestamp:
Nov 21, 2024, 12:14:30 PM (7 weeks ago)
Author:
bouyer
Message:

FIx for getgrouplist() different return value between BSD and linux

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/software/tty/readtty_command.c

    r16 r17  
    8989                        err(1, "getpwuid(%d)", getuid());
    9090                }
    91                 if ((i = getgrouplist(pwp->pw_name, pwp->pw_gid, mygroups, &ngroups))
    92                     != 0) {
     91                if ((i = getgrouplist(pwp->pw_name, pwp->pw_gid, mygroups, &ngroups)) < 0) {
    9392                        fprintf(stderr, "getgrouplist(%s,%d) fail: %d %d\n",
    9493                            pwp->pw_name, pwp->pw_gid, i, ngroups);
Note: See TracChangeset for help on using the changeset viewer.