/third_party/ltp/testcases/kernel/containers/utsname/ |
H A D | utsname04.c | 32 SAFE_SETRESUID(pw->pw_uid, pw->pw_uid, pw->pw_uid); in run()
|
/third_party/ltp/testcases/kernel/syscalls/setresuid/ |
H A D | setresuid05.c | 26 UID16_CHECK(ltpuser->pw_uid, "setresuid"); in setup() 33 TST_EXP_PASS(SETRESUID(-1, ltpuser->pw_uid, -1)); in run() 38 TST_EXP_EQ_LI(ltpuser->pw_uid, buf.st_uid); in run()
|
H A D | setresuid04.c | 33 UID16_CHECK(ltpuser->pw_uid, "setresuid"); in setup() 43 TST_EXP_PASS_SILENT(SETRESUID(-1, ltpuser->pw_uid, -1)); in run()
|
/third_party/python/Lib/test/ |
H A D | test_pwd.py | 19 self.assertEqual(e[2], e.pw_uid) 20 self.assertIsInstance(e.pw_uid, int) 32 # self.assertEqual(pwd.getpwuid(e.pw_uid), e) 46 entriesbyuid.setdefault(e.pw_uid, []).append(e) 54 self.assertIn(pwd.getpwuid(e.pw_uid), entriesbyuid[e.pw_uid])
|
/third_party/pulseaudio/src/tests/ |
H A D | usergroup-test.c | 92 if (a->pw_uid != b->pw_uid) { in compare_passwd() 93 fprintf(stderr, "pw_uid mismatch: [%lu] [%lu]\n", (unsigned long) a->pw_uid, (unsigned long) b->pw_uid); in compare_passwd() 139 pw = pa_getpwuid_malloc(reference_passwd->pw_uid); in START_TEST()
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/ |
H A D | 9-1.c | 49 if (strcmp(pw->pw_name, "root") && pw->pw_uid != getuid()) in main() 57 if (seteuid(pw->pw_uid) != 0) { in main() 67 printf("Testing with user '%s' (uid: %i)\n", pw->pw_name, pw->pw_uid); in main()
|
H A D | 8-1.c | 63 if (strcmp(pw->pw_name, "root") && pw->pw_uid != getuid()) in main() 71 if (seteuid(pw->pw_uid) != 0) { in main() 81 printf("Testing with user '%s' (uid: %i)\n", pw->pw_name, pw->pw_uid); in main()
|
/kernel/liteos_a/testsuites/unittest/libc/sys/full/ |
H A D | sys_test_019.cpp | 60 ICUNIT_GOTO_EQUAL(user1->pw_uid, 0, -1, ERROUT); in TestCase() 68 ICUNIT_GOTO_EQUAL(pwd.pw_uid, 0, -1, ERROUT); in TestCase() 78 ICUNIT_GOTO_EQUAL(user2->pw_uid, 1, -1, ERROUT); in TestCase() 88 ICUNIT_GOTO_EQUAL(user3->pw_uid, 2, -1, ERROUT); /* 2, from etc/group */ in TestCase()
|
H A D | sys_test_021.cpp | 60 ICUNIT_GOTO_EQUAL(user1->pw_uid, 0, -1, ERROUT); in TestCase() 68 ICUNIT_GOTO_EQUAL(pwd.pw_uid, 0, -1, ERROUT); in TestCase() 79 ICUNIT_GOTO_EQUAL(user2->pw_uid, 1, -1, ERROUT); in TestCase() 90 ICUNIT_GOTO_EQUAL(user3->pw_uid, 2, -1, ERROUT); /* 2, from etc/group */ in TestCase()
|
H A D | sys_test_018.cpp | 55 ICUNIT_GOTO_EQUAL(user1->pw_uid, 0, -1, ERROUT); in TestCase() 65 ICUNIT_GOTO_EQUAL(user2->pw_uid, 1, -1, ERROUT); in TestCase() 76 ICUNIT_GOTO_EQUAL(user3->pw_uid, 2, -1, ERROUT); /* 2, from etc/group */ in TestCase()
|
H A D | sys_test_020.cpp | 55 ICUNIT_GOTO_EQUAL(user1->pw_uid, 0, -1, ERROUT); in TestCase() 65 ICUNIT_GOTO_EQUAL(user2->pw_uid, 1, -1, ERROUT); in TestCase() 75 ICUNIT_GOTO_EQUAL(user3->pw_uid, 2, -1, ERROUT); /* 2, from etc/group */ in TestCase()
|
H A D | sys_test_022.cpp | 53 ICUNIT_GOTO_EQUAL(user1->pw_uid, 0, -1, ERROUT); in TestCase() 63 ICUNIT_GOTO_EQUAL(user1->pw_uid, 1, -1, ERROUT); in TestCase() 73 ICUNIT_GOTO_EQUAL(user1->pw_uid, 2, -1, ERROUT); /* 2, from etc/group */ in TestCase()
|
/third_party/ltp/testcases/kernel/syscalls/mlockall/ |
H A D | mlockall03.c | 222 if (seteuid(ltpuser->pw_uid) == -1) { in setup_test() 225 ltpuser->pw_uid, TEST_ERRNO, in setup_test() 252 if (seteuid(ltpuser->pw_uid) == -1) { in setup_test() 255 ltpuser->pw_uid, TEST_ERRNO, in setup_test()
|
H A D | mlockall02.c | 195 if (seteuid(ltpuser->pw_uid) == -1) { in setup_test() 199 ltpuser->pw_uid, TEST_ERRNO, in setup_test() 215 if (seteuid(ltpuser->pw_uid) == -1) { in setup_test() 218 ltpuser->pw_uid, TEST_ERRNO, in setup_test()
|
/third_party/toybox/toys/posix/ |
H A D | id.c | 98 uid = euid = pw->pw_uid; in do_id() 105 if (toys.optflags&FLAG_u) s_or_u(pw->pw_name, pw->pw_uid, 1); in do_id() 111 showid("uid=", pw->pw_uid, pw->pw_name); in do_id() 117 showid(" euid=", pw->pw_uid, pw->pw_name); in do_id()
|
/third_party/ltp/testcases/kernel/syscalls/creat/ |
H A D | creat09.c | 73 tst_res(TINFO, "User nobody: uid = %d, gid = %d", (int)ltpuser->pw_uid, in setup() 79 SAFE_CHOWN(WORKDIR, ltpuser->pw_uid, free_gid); in setup() 93 SAFE_SETREUID(-1, ltpuser->pw_uid); in setup()
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/shm_open/ |
H A D | 26-2.c | 73 if (strcmp(pw->pw_name, "root") && pw->pw_uid != getuid()) in main() 82 if (seteuid(pw->pw_uid) != 0) { in main() 93 printf("Testing with user '%s' (uid: %i)\n", pw->pw_name, pw->pw_uid); in main()
|
/third_party/ltp/testcases/kernel/syscalls/setreuid/ |
H A D | setreuid07.c | 35 UID16_CHECK(ltpuser->pw_uid, setreuid); in setup() 44 TST_EXP_PASS_SILENT(SETREUID(-1, ltpuser->pw_uid)); in run()
|
/third_party/ltp/testcases/kernel/syscalls/mkdir/ |
H A D | mkdir02.c | 64 SAFE_SETREUID(pw->pw_uid, pw->pw_uid); in setup()
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/sched_getparam/ |
H A D | 6-1.c | 38 if (pw->pw_uid != 0) in set_nonroot() 55 if (setuid(pw->pw_uid) != 0) { in set_nonroot()
|
/third_party/musl/libc-test/src/functionalext/supplement/passwd/ |
H A D | getpwent.c | 44 EXPECT_EQ("getpwnam_0100", ret->pw_uid, CMPFLAG); in getpwnam_0100() 70 EXPECT_EQ("getpwuid_0100", ret->pw_uid, getuid()); in getpwuid_0100()
|
/third_party/musl/src/passwd/ |
H A D | getpw_a.c | 38 || !name && (*res)->pw_uid == uid) in __getpw_a() 112 pw->pw_uid = passwdbuf[PWUID]; in __getpw_a() 126 || !name && uid != pw->pw_uid) { in __getpw_a()
|
/third_party/ltp/testcases/kernel/syscalls/openat/ |
H A D | openat04.c | 92 tst_res(TINFO, "User nobody: uid = %d, gid = %d", (int)ltpuser->pw_uid, in setup() 101 SAFE_CHOWN(WORKDIR, ltpuser->pw_uid, free_gid); in setup() 115 SAFE_SETREUID(-1, ltpuser->pw_uid); in setup()
|
/third_party/ltp/testcases/kernel/syscalls/setfsgid/ |
H A D | setfsgid03.c | 95 if (setuid(ltpuser->pw_uid) == -1) in setup() 98 ltpuser->pw_uid); in setup()
|
/third_party/ltp/testcases/kernel/syscalls/getresuid/ |
H A D | getresuid02.c | 155 pe_uid = user_id->pw_uid; in setup() 158 ps_uid = user_id->pw_uid; in setup()
|