diff options
author | Chris Johns <chrisj@rtems.org> | 2021-08-31 18:46:37 +1000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2021-09-01 15:18:09 +1000 |
commit | 7a6b5dd0b50fb97ed8650c5912462ee39223d288 (patch) | |
tree | 29e8ec187ae86b6cd003f135c308e5c4348fb1d0 /freebsd/lib/libc/rpc/auth_unix.c | |
parent | 882425fe547f73a1a77caa4938dec369cfd1063d (diff) |
rtemsbsd/nfs: Add support to mount NFSv2p7-4475-nfs-busspace-testsuite-nowait-dc-unkphy-5-nfsv2-1
- NFSv2 requires userland RPC calls to determine the version of
NFS and the FH. This is passed to the kernel.
- Port more libc/rpc.
Update #4475
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); |