|
|
1.1 ! root 1: .\" Copyright (c) 1983 Regents of the University of California. ! 2: .\" All rights reserved. The Berkeley software License Agreement ! 3: .\" specifies the terms and conditions for redistribution. ! 4: .\" ! 5: .\" @(#)setgroups.2 6.4 (Berkeley) 4/10/87 ! 6: .\" ! 7: .TH SETGROUPS 2 "April 10, 1987" ! 8: .UC 5 ! 9: .SH NAME ! 10: setgroups \- set group access list ! 11: .SH SYNOPSIS ! 12: .nf ! 13: .ft B ! 14: #include <sys/param.h> ! 15: .PP ! 16: .ft B ! 17: setgroups(ngroups, gidset) ! 18: int ngroups, *gidset; ! 19: .fi ! 20: .SH DESCRIPTION ! 21: .I Setgroups ! 22: sets the group access list of the current user process ! 23: according to the array ! 24: .IR gidset . ! 25: The parameter ! 26: .I ngroups ! 27: indicates the number of entries in the array and must be no ! 28: more than NGROUPS, as defined in ! 29: .RI < sys/param.h >. ! 30: .PP ! 31: Only the super-user may set new groups. ! 32: .SH "RETURN VALUE ! 33: A 0 value is returned on success, \-1 on error, with ! 34: a error code stored in \fIerrno\fP. ! 35: .SH "ERRORS ! 36: The \fIsetgroups\fP call will fail if: ! 37: .TP 15 ! 38: [EPERM] ! 39: The caller is not the super-user. ! 40: .TP 15 ! 41: [EFAULT] ! 42: The address specified for \fIgidset\fP is outside the process ! 43: address space. ! 44: .SH "SEE ALSO ! 45: getgroups(2), initgroups(3) ! 46: .SH BUGS ! 47: The ! 48: .I gidset ! 49: array should be of type ! 50: .BR gid_t , ! 51: but remains integer for compatibility with earlier systems.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.