Lines Matching full:error
84 int i, error; in setup() local
87 error = open(fd_list[i].fd_name, O_CREAT | O_EXCL, fd_list[i].fd_mode); in setup()
88 if (error == -1) { in setup()
90 return (error); in setup()
92 close(error); in setup()
93 error = chown(fd_list[i].fd_name, fd_list[i].fd_owner, in setup()
95 if (error) { in setup()
97 return (error); in setup()
106 int error; in restoreprivilege() local
108 error = setreuid(ROOT_UID, ROOT_UID); in restoreprivilege()
109 if (error) in restoreprivilege()
110 return (error); in restoreprivilege()
112 error = setregid(WHEEL_GID, WHEEL_GID); in restoreprivilege()
113 if (error) in restoreprivilege()
114 return (error); in restoreprivilege()
124 int error; in reportprivilege() local
126 error = getresuid(&ruid, &euid, &suid); in reportprivilege()
127 if (error) { in reportprivilege()
129 return (error); in reportprivilege()
132 error = getresgid(&rgid, &egid, &sgid); in reportprivilege()
133 if (error) { in reportprivilege()
135 return (error); in reportprivilege()
149 int i, error; in cleanup() local
151 error = restoreprivilege(); in cleanup()
152 if (error) { in cleanup()
154 return (error); in cleanup()
158 error = unlink(fd_list[i].fd_name); in cleanup()
159 if (error) in cleanup()
160 return (error); in cleanup()
169 int error, errorseen; in main() local
176 error = setup(); in main()
177 if (error) { in main()
183 error = setresuid(ROOT_UID, ROOT_UID, ROOT_UID); in main()
184 if (error) { in main()
190 error = setgroups(0, NULL); in main()
191 if (error) { in main()
197 error = setresgid(WHEEL_GID, WHEEL_GID, WHEEL_GID); in main()
198 if (error) { in main()
208 error = setresuid(TEST_UID_ONE, TEST_UID_ONE, ROOT_UID); in main()
209 if (error) { in main()
217 error = access("test1", R_OK); in main()
218 if (!error) { in main()
224 error = eaccess("test1", R_OK); in main()
225 if (!error) { in main()
231 error = restoreprivilege(); in main()
232 if (error) { in main()
238 error = setresuid(TEST_UID_ONE, TEST_UID_TWO, ROOT_UID); in main()
239 if (error) { in main()
246 error = access("test2", R_OK); in main()
247 if (error) { in main()
254 error = eaccess("test3", R_OK); in main()
255 if (error) { in main()
262 error = access("test3", R_OK); in main()
263 if (!error) { in main()
270 error = eaccess("test2", R_OK); in main()
271 if (!error) { in main()
277 error = restoreprivilege(); in main()
278 if (error) { in main()
284 error = setresgid(TEST_GID_ONE, TEST_GID_TWO, WHEEL_GID); in main()
285 if (error) { in main()
292 error = setresuid(TEST_UID_ONE, TEST_UID_ONE, ROOT_UID); in main()
293 if (error) { in main()
300 error = access("test4", R_OK); in main()
301 if (!error) { in main()
306 error = eaccess("test4", R_OK); in main()
307 if (!error) { in main()
314 error = access("test5", R_OK); in main()
315 if (error) { in main()
322 error = eaccess("test6", R_OK); in main()
323 if (error) { in main()
330 error = access("test6", R_OK); in main()
331 if (!error) { in main()
338 error = eaccess("test5", R_OK); in main()
339 if (!error) { in main()
351 error = cleanup(); in main()
352 if (error) { in main()