• Home
  • Raw
  • Download

Lines Matching refs:err

59 	int err;  in semanage_store_test_init()  local
62 err = mkdir(rootpath, S_IRUSR | S_IWUSR | S_IXUSR); in semanage_store_test_init()
63 if (err != 0) in semanage_store_test_init()
66 err = mkdir(polpath, S_IRUSR | S_IWUSR | S_IXUSR); in semanage_store_test_init()
67 if (err != 0) in semanage_store_test_init()
70 err = mkdir(actpath, S_IRUSR | S_IWUSR | S_IXUSR); in semanage_store_test_init()
71 if (err != 0) in semanage_store_test_init()
74 err = mkdir(modpath, S_IRUSR | S_IWUSR | S_IXUSR); in semanage_store_test_init()
75 if (err != 0) in semanage_store_test_init()
91 err = semanage_check_init(sh, rootpath); in semanage_store_test_init()
92 if (err != 0) in semanage_store_test_init()
103 int err; in semanage_store_test_cleanup() local
106 err = rmdir(modpath); in semanage_store_test_cleanup()
107 if (err != 0) in semanage_store_test_cleanup()
110 err = rmdir(actpath); in semanage_store_test_cleanup()
111 if (err != 0) in semanage_store_test_cleanup()
114 err = rmdir(polpath); in semanage_store_test_cleanup()
115 if (err != 0) in semanage_store_test_cleanup()
118 err = rmdir(rootpath); in semanage_store_test_cleanup()
119 if (err != 0) in semanage_store_test_cleanup()
157 int err; in test_semanage_store_access_check() local
160 err = mknod(readlockpath, S_IRUSR | S_IWUSR, S_IFREG); in test_semanage_store_access_check()
163 err = chmod(modpath, 0); in test_semanage_store_access_check()
164 CU_ASSERT(err == 0); in test_semanage_store_access_check()
165 err = chmod(readlockpath, 0); in test_semanage_store_access_check()
166 CU_ASSERT(err == 0); in test_semanage_store_access_check()
167 err = chmod(polpath, 0); in test_semanage_store_access_check()
168 CU_ASSERT(err == 0); in test_semanage_store_access_check()
170 err = semanage_store_access_check(); in test_semanage_store_access_check()
171 CU_ASSERT(err == -1); in test_semanage_store_access_check()
174 err = chmod(polpath, S_IRUSR | S_IXUSR); in test_semanage_store_access_check()
175 CU_ASSERT(err == 0); in test_semanage_store_access_check()
176 err = chmod(readlockpath, S_IRUSR); in test_semanage_store_access_check()
177 CU_ASSERT(err == 0); in test_semanage_store_access_check()
178 err = chmod(modpath, S_IRUSR | S_IXUSR); in test_semanage_store_access_check()
179 CU_ASSERT(err == 0); in test_semanage_store_access_check()
181 err = semanage_store_access_check(); in test_semanage_store_access_check()
182 CU_ASSERT(err == SEMANAGE_CAN_READ); in test_semanage_store_access_check()
185 err = chmod(polpath, S_IRUSR | S_IWUSR | S_IXUSR); in test_semanage_store_access_check()
186 CU_ASSERT(err == 0); in test_semanage_store_access_check()
187 err = chmod(readlockpath, S_IRUSR | S_IWUSR); in test_semanage_store_access_check()
188 CU_ASSERT(err == 0); in test_semanage_store_access_check()
189 err = chmod(modpath, S_IRUSR | S_IWUSR | S_IXUSR); in test_semanage_store_access_check()
190 CU_ASSERT(err == 0); in test_semanage_store_access_check()
192 err = semanage_store_access_check(); in test_semanage_store_access_check()
193 CU_ASSERT(err == SEMANAGE_CAN_WRITE); in test_semanage_store_access_check()
196 err = chmod(polpath, S_IRUSR | S_IXUSR); in test_semanage_store_access_check()
197 CU_ASSERT(err == 0); in test_semanage_store_access_check()
198 err = chmod(readlockpath, 0); in test_semanage_store_access_check()
199 CU_ASSERT(err == 0); in test_semanage_store_access_check()
200 err = chmod(modpath, S_IRUSR | S_IXUSR); in test_semanage_store_access_check()
201 CU_ASSERT(err == 0); in test_semanage_store_access_check()
203 err = semanage_store_access_check(); in test_semanage_store_access_check()
204 CU_ASSERT(err == 0); in test_semanage_store_access_check()
207 err = chmod(polpath, S_IRUSR | S_IWUSR | S_IXUSR); in test_semanage_store_access_check()
208 CU_ASSERT(err == 0); in test_semanage_store_access_check()
209 err = chmod(readlockpath, 0); in test_semanage_store_access_check()
210 CU_ASSERT(err == 0); in test_semanage_store_access_check()
211 err = chmod(modpath, S_IRUSR | S_IWUSR | S_IXUSR); in test_semanage_store_access_check()
212 CU_ASSERT(err == 0); in test_semanage_store_access_check()
214 err = semanage_store_access_check(); in test_semanage_store_access_check()
215 CU_ASSERT(err == 0); in test_semanage_store_access_check()
218 err = remove(readlockpath); in test_semanage_store_access_check()
219 CU_ASSERT(err == 0); in test_semanage_store_access_check()
222 err = chmod(modpath, 0); in test_semanage_store_access_check()
223 CU_ASSERT(err == 0); in test_semanage_store_access_check()
224 err = chmod(polpath, 0); in test_semanage_store_access_check()
225 CU_ASSERT(err == 0); in test_semanage_store_access_check()
227 err = semanage_store_access_check(); in test_semanage_store_access_check()
228 CU_ASSERT(err == -1); in test_semanage_store_access_check()
231 err = chmod(polpath, S_IRUSR | S_IXUSR); in test_semanage_store_access_check()
232 CU_ASSERT(err == 0); in test_semanage_store_access_check()
233 err = chmod(modpath, S_IRUSR | S_IXUSR); in test_semanage_store_access_check()
234 CU_ASSERT(err == 0); in test_semanage_store_access_check()
236 err = semanage_store_access_check(); in test_semanage_store_access_check()
237 CU_ASSERT(err == 0); in test_semanage_store_access_check()
240 err = chmod(polpath, S_IRUSR | S_IWUSR | S_IXUSR); in test_semanage_store_access_check()
241 CU_ASSERT(err == 0); in test_semanage_store_access_check()
243 err = semanage_store_access_check(); in test_semanage_store_access_check()
244 CU_ASSERT(err == SEMANAGE_CAN_READ); in test_semanage_store_access_check()
247 err = chmod(polpath, S_IRUSR | S_IWUSR | S_IXUSR); in test_semanage_store_access_check()
248 CU_ASSERT(err == 0); in test_semanage_store_access_check()
249 err = chmod(modpath, S_IRUSR | S_IWUSR | S_IXUSR); in test_semanage_store_access_check()
250 CU_ASSERT(err == 0); in test_semanage_store_access_check()
252 err = semanage_store_access_check(); in test_semanage_store_access_check()
253 CU_ASSERT(err == SEMANAGE_CAN_WRITE); in test_semanage_store_access_check()
260 int err; in test_semanage_get_lock() local
263 err = semanage_get_active_lock(sh); in test_semanage_get_lock()
264 CU_ASSERT(err == 0); in test_semanage_get_lock()
267 err = semanage_get_active_lock(sh); in test_semanage_get_lock()
268 CU_ASSERT(err == 0); in test_semanage_get_lock()
274 err = semanage_get_active_lock(sh); in test_semanage_get_lock()
275 CU_ASSERT(err == 0); in test_semanage_get_lock()
281 err = semanage_get_trans_lock(sh); in test_semanage_get_lock()
282 CU_ASSERT(err == 0); in test_semanage_get_lock()
285 err = semanage_get_trans_lock(sh); in test_semanage_get_lock()
286 CU_ASSERT(err == 0); in test_semanage_get_lock()
292 err = semanage_get_trans_lock(sh); in test_semanage_get_lock()
293 CU_ASSERT(err == 0); in test_semanage_get_lock()
299 err = remove(readlockpath); in test_semanage_get_lock()
300 CU_ASSERT(err == 0); in test_semanage_get_lock()
301 err = remove(translockpath); in test_semanage_get_lock()
302 CU_ASSERT(err == 0); in test_semanage_get_lock()
311 int sourcefd, goodfd, badfd, err; in test_semanage_nc_sort() local
349 err = in test_semanage_nc_sort()
352 CU_ASSERT_FALSE(err); in test_semanage_nc_sort()
360 err = in test_semanage_nc_sort()
363 CU_ASSERT_EQUAL(err, -1); in test_semanage_nc_sort()