xref: /386bsd/usr/share/man/cat2/setgroups.0 (revision a2142627)
1SETGROUPS(2)              386BSD Programmer's Manual              SETGROUPS(2)
2
3NNAAMMEE
4     sseettggrroouuppss - set group access list
5
6SSYYNNOOPPSSIISS
7     ##iinncclluuddee <<uunniissttdd..hh>>
8     ##iinncclluuddee <<ssyyss//ppaarraamm..hh>>
9
10     _i_n_t
11     sseettggrroouuppss(_i_n_t _n_g_r_o_u_p_s, _c_o_n_s_t _i_n_t *_g_i_d_s_e_t)
12
13DDEESSCCRRIIPPTTIIOONN
14     SSeettggrroouuppss() sets the group access list of the current user process
15     according to the array _g_i_d_s_e_t. The parameter _n_g_r_o_u_p_s indicates the number
16     of entries in the array and must be no more than NGROUPS, as defined in
17     <_s_y_s/_p_a_r_a_m._h>.
18
19     Only the super-user may set new groups.
20
21RREETTUURRNN VVAALLUUEESS
22     A 0 value is returned on success, -1 on error, with an error code stored
23     in _e_r_r_n_o.
24
25EERRRROORRSS
26     The sseettggrroouuppss() call will fail if:
27
28     [EPERM]       The caller is not the super-user.
29
30     [EFAULT]      The address specified for _g_i_d_s_e_t is outside the process
31                   address space.
32
33SSEEEE AALLSSOO
34     getgroups(2),  initgroups(3)
35
36BBUUGGSS
37     The _g_i_d_s_e_t array should be of type _g_i_d__t, but remains integer for
38     compatibility with earlier systems.
39
40HHIISSTTOORRYY
41     The sseettggrroouuppss function call appeared in 4.2BSD.
42
434.2 Berkeley Distribution       March 10, 1991                               1
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67