xref: /386bsd/usr/share/man/cat3/getmode.0 (revision a2142627)
1SETMODE(3)                386BSD Programmer's Manual                SETMODE(3)
2
3NNAAMMEE
4     ggeettmmooddee, sseettmmooddee - modify mode bits
5
6SSYYNNOOPPSSIISS
7     _m_o_d_e__t
8     ggeettmmooddee(_c_o_n_s_t _v_o_i_d *_s_e_t, _m_o_d_e__t _m_o_d_e)
9
10     _v_o_i_d
11     sseettmmooddee(_c_o_n_s_t _c_h_a_r *_m_o_d_e__s_t_r)
12
13DDEESSCCRRIIPPTTIIOONN
14     The ggeettmmooddee() function returns a copy of the file permission bits _m_o_d_e as
15     altered by the values pointed to by _s_e_t. While only the mode bits are
16     altered, other parts of the file mode may be examined.
17
18     The sseettmmooddee() function takes an absolute (octal) or symbolic value, as
19     described in chmod(1),  as an argument and returns a pointer to mode
20     values to be supplied to ggeettmmooddee().  Because some of the symbolic values
21     are relative to the file creation mask, sseettmmooddee() may call umask(2).  If
22     this occurs, the file creation mask will be restored before sseettmmooddee()
23     returns.  If the calling program changes the value of its file creation
24     mask after calling sseettmmooddee(), sseettmmooddee() must be called again if ggeettmmooddee()
25     is to modify future file modes correctly.
26
27     If the mode passed to sseettmmooddee() is invalid, sseettmmooddee() returns NULL.
28
29EERRRROORRSS
30     The sseettmmooddee() function may fail and set errno for any of the errors
31     specified for the library routine malloc(3).
32
33SSEEEE AALLSSOO
34     chmod(1),  stat(2),  umask(2),  malloc(3)
35
36HHIISSTTOORRYY
37     The ggeettmmooddee() and sseettmmooddee() functions are currently under development.
38
39BSD Experimental                April 19, 1991                               1
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67