diff options
Diffstat (limited to 'freebsd/lib/libc/rpc/auth_unix.c')
-rw-r--r-- | freebsd/lib/libc/rpc/auth_unix.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/freebsd/lib/libc/rpc/auth_unix.c b/freebsd/lib/libc/rpc/auth_unix.c index ea8f44c9..3629fcc3 100644 --- a/freebsd/lib/libc/rpc/auth_unix.c +++ b/freebsd/lib/libc/rpc/auth_unix.c @@ -191,20 +191,27 @@ authunix_create_default(void) gid_t gid; gid_t *gids; +#ifndef __rtems__ ngids_max = sysconf(_SC_NGROUPS_MAX) + 1; gids = malloc(sizeof(gid_t) * ngids_max); if (gids == NULL) return (NULL); +#endif /* __rtems__ */ if (gethostname(machname, sizeof machname) == -1) abort(); machname[sizeof(machname) - 1] = 0; uid = geteuid(); gid = getegid(); +#ifndef __rtems__ if ((ngids = getgroups(ngids_max, gids)) < 0) abort(); if (ngids > NGRPS) ngids = NGRPS; +#else /* __rtems__ */ + ngids = 0; + gids = NULL; +#endif /* __rtems__ */ /* XXX: interface problem; we should translate from uid_t and gid_t */ auth = authunix_create(machname, uid, gid, ngids, gids); free(gids); |