1SETUID(3) 386BSD Programmer's Manual SETUID(3) 2 3NNAAMMEE 4 sseettuuiidd, sseetteeuuiidd, sseettrruuiidd, sseettggiidd, sseetteeggiidd, sseettrrggiidd - set user and group 5 ID 6 7SSYYNNOOPPSSIISS 8 ##iinncclluuddee <<ssyyss//ttyyppeess..hh>> 9 10 _i_n_t 11 sseettuuiidd(_u_i_d__t _u_i_d) 12 13 _i_n_t 14 sseetteeuuiidd(_u_i_d__t _e_u_i_d) 15 16 _i_n_t 17 sseettrruuiidd(_u_i_d__t _r_u_i_d) 18 19 _i_n_t 20 sseettggiidd(_g_i_d__t _g_i_d) 21 22 _i_n_t 23 sseetteeggiidd(_g_i_d__t _e_g_i_d) 24 25 _i_n_t 26 sseettrrggiidd(_g_i_d__t _r_g_i_d) 27 28DDEESSCCRRIIPPTTIIOONN 29 The sseettuuiidd() function (sseettggiidd()) sets both the real and effective user ID 30 (group ID) of the current process as specified. 31 32 The sseetteeuuiidd() function (sseetteeggiidd()) sets the effective user ID (group ID) 33 of the current process. 34 35 The sseettrruuiidd() function (sseettrrggiidd()) sets the real user ID (group ID) of 36 the current process. 37 38RREETTUURRNN VVAALLUUEESS 39 Upon success, these functions return 0; otherwise -1 is returned. 40 41 If the user is not the super user, or the uid specified is not the real 42 or effective ID, these functions return -1. 43 44SSEEEE AALLSSOO 45 setreuid(2), setregid(2), getuid(2), getgid(2) 46 47HHIISSTTOORRYY 48 A sseettuuiidd() and sseettggiidd() syscall appeared in Version 6 AT&T UNIX. 49 504.2 Berkeley Distribution April 19, 1991 1 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67