setgroups (2)
Leading comments
Copyright (c) 1983, 1991, 1993, 1994 The Regents of the University of California. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and t...
NAME
setgroups - set group access listLIBRARY
Lb libcSYNOPSIS
In sys/param.h In unistd.h Ft int Fn setgroups int ngroups const gid_t *gidsetDESCRIPTION
The Fn setgroups system call sets the group access list of the current user process according to the array Fa gidset . The Fa ngroups argument indicates the number of entries in the array and must be no more than {NGROUPS_MAX}+1Only the super-user may set a new group list.
RETURN VALUES
Rv -std setgroupsERRORS
The Fn setgroups system call will fail if:- Bq Er EPERM
- The caller is not the super-user.
- Bq Er EINVAL
- The number specified in the Fa ngroups argument is larger than the {NGROUPS_MAX}+1 limit.
- Bq Er EFAULT
- The address specified for Fa gidset is outside the process address space.