
SETMODE(3)                 UNIX Programmer's Manual                 SETMODE(3)

NNAAMMEE
     ggeettmmooddee, sseettmmooddee - modify mode bits

SSYYNNOOPPSSIISS
     _m_o_d_e___t
     ggeettmmooddee(_c_o_n_s_t _v_o_i_d _*_s_e_t, _m_o_d_e___t _m_o_d_e)

     _v_o_i_d
     sseettmmooddee(_c_o_n_s_t _c_h_a_r _*_m_o_d_e___s_t_r)

DDEESSCCRRIIPPTTIIOONN
     The ggeettmmooddee() function returns a copy of the file permission bits _m_o_d_e as
     altered by the values pointed to by _s_e_t. While only the mode bits are al-
     tered, other parts of the file mode may be examined.

     The sseettmmooddee() function takes an absolute (octal) or symbolic value, as
     described in chmod(1),  as an argument and returns a pointer to mode val-
     ues to be supplied to ggeettmmooddee().  Because some of the symbolic values are
     relative to the file creation mask, sseettmmooddee() may call umask(2).  If this
     occurs, the file creation mask will be restored before sseettmmooddee() returns.
     If the calling program changes the value of its file creation mask after
     calling sseettmmooddee(), sseettmmooddee() must be called again if ggeettmmooddee() is to mod-
     ify future file modes correctly.

     If the mode passed to sseettmmooddee() is invalid, sseettmmooddee() returns NULL.

EERRRROORRSS
     The sseettmmooddee() function may fail and set errno for any of the errors spec-
     ified for the library routine malloc(3).

SSEEEE AALLSSOO
     chmod(1),  stat(2),  umask(2),  malloc(3)

HHIISSTTOORRYY
     The ggeettmmooddee() and sseettmmooddee() functions are currently under development.

BSD Experimental                April 19, 1991                               1


























