Home
last modified time | relevance | path

Searched refs:pw_uid (Results 1 – 25 of 234) sorted by relevance

12345678910

/third_party/ltp/testcases/kernel/syscalls/setreuid/
Dsetreuid04.c54 &nobody.pw_uid, &nobody.pw_uid, &nobody, &nobody,
121 UID16_CHECK(root.pw_uid, setreuid, cleanup); in setup()
124 UID16_CHECK(nobody.pw_uid, setreuid, cleanup); in setup()
135 if ((getuid() != ru->pw_uid) || (geteuid() != eu->pw_uid)) { in uid_verify()
139 ru->pw_uid, eu->pw_uid); in uid_verify()
/third_party/ltp/testcases/kernel/syscalls/setresuid/
Dsetresuid05.c71 UID16_CHECK(ltpuser->pw_uid, "setresuid", cleanup) in setup()
78 TEST(SETRESUID(cleanup, -1, ltpuser->pw_uid, -1)); in setresuid_verify()
89 if (ltpuser->pw_uid == buf.st_uid) { in setresuid_verify()
94 ltpuser->pw_uid, buf.st_uid); in setresuid_verify()
/third_party/pulseaudio/src/tests/
Dusergroup-test.c92 if (a->pw_uid != b->pw_uid) { in compare_passwd()
93 …tf(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/python/Lib/test/
Dtest_pwd.py19 self.assertEqual(e[2], e.pw_uid)
20 self.assertIsInstance(e.pw_uid, int)
46 entriesbyuid.setdefault(e.pw_uid, []).append(e)
54 self.assertIn(pwd.getpwuid(e.pw_uid), entriesbyuid[e.pw_uid])
/third_party/ltp/testcases/kernel/syscalls/mlockall/
Dmlockall02.c196 if (seteuid(ltpuser->pw_uid) == -1) { in setup_test()
200 ltpuser->pw_uid, TEST_ERRNO, in setup_test()
219 if (seteuid(ltpuser->pw_uid) == -1) { in setup_test()
222 ltpuser->pw_uid, TEST_ERRNO, in setup_test()
Dmlockall03.c222 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()
/third_party/ltp/testcases/kernel/syscalls/geteuid/
Dgeteuid02.c56 UID16_CHECK(pwent->pw_uid, geteuid, cleanup); in main()
57 if (pwent->pw_uid != TEST_RETURN) in main()
60 "value, %ld", pwent->pw_uid, in main()
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/
D9-1.c49 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()
D8-1.c63 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()
/third_party/toybox/toys/posix/
Did.c98 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/open_posix_testsuite/conformance/interfaces/shm_open/
D26-2.c73 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/creat/
Dcreat09.c55 tst_res(TINFO, "User nobody: uid = %d, gid = %d", (int)ltpuser->pw_uid, in setup()
61 SAFE_CHOWN(WORKDIR, ltpuser->pw_uid, free_gid); in setup()
75 SAFE_SETREUID(-1, ltpuser->pw_uid); in setup()
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/sched_getparam/
D6-1.c38 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/
Dgetpwent.c44 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/
Dgetpw_a.c38 || !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/mkdir/
Dmkdir02.c64 SAFE_SETREUID(pw->pw_uid, pw->pw_uid); in setup()
/third_party/ltp/testcases/kernel/syscalls/setfsuid/
Dsetfsuid03.c95 if (setuid(ltpuser->pw_uid) == -1) in setup()
97 "to set the effective uid to %d", ltpuser->pw_uid); in setup()
/third_party/ltp/testcases/kernel/syscalls/setfsgid/
Dsetfsgid03.c95 if (setuid(ltpuser->pw_uid) == -1) in setup()
98 ltpuser->pw_uid); in setup()
/third_party/ltp/testcases/kernel/syscalls/lchown/
Dlchown02.c176 if (setgid(ltpuser->pw_uid) == -1) in setup()
210 if (seteuid(ltpuser->pw_uid) == -1) in setup_eperm()
211 tst_resm(TBROK | TERRNO, "seteuid(%d) failed", ltpuser->pw_uid); in setup_eperm()
/third_party/ltp/testcases/kernel/syscalls/fchmod/
Dfchmod05.c66 SAFE_CHOWN(TESTDIR, ltpuser->pw_uid, free_gid); in setup()
69 SAFE_SETEUID(ltpuser->pw_uid); in setup()
Dfchmod04.c153 if (seteuid(ltpuser->pw_uid) == -1) { in setup()
155 "to set the effective uid to %d", ltpuser->pw_uid); in setup()
/third_party/ltp/testcases/kernel/syscalls/chmod/
Dchmod05.c87 SAFE_CHOWN(TESTDIR, nobody_u->pw_uid, free_gid); in setup()
91 SAFE_SETEUID(nobody_u->pw_uid); in setup()
/third_party/ltp/testcases/kernel/syscalls/getresuid/
Dgetresuid02.c155 pe_uid = user_id->pw_uid; in setup()
158 ps_uid = user_id->pw_uid; in setup()
/third_party/pulseaudio/src/daemon/
Dmain.c275 PA_SYSTEM_USER, (unsigned long) pw->pw_uid, in change_user()
286 if (pa_make_secure_dir(PA_SYSTEM_RUNTIME_PATH, 0755, pw->pw_uid, gr->gr_gid, true) < 0) { in change_user()
291 if (pa_make_secure_dir(PA_SYSTEM_STATE_PATH, 0700, pw->pw_uid, gr->gr_gid, true) < 0) { in change_user()
320 r = setresuid(pw->pw_uid, pw->pw_uid, pw->pw_uid); in change_user()
322 if ((r = setuid(pw->pw_uid)) >= 0) in change_user()
323 r = seteuid(pw->pw_uid); in change_user()
325 r = setreuid(pw->pw_uid, pw->pw_uid); in change_user()
/third_party/libwebsockets/lib/plat/unix/
Dunix-caps.c104 *puid = p->pw_uid;
151 context->uid = p->pw_uid;
154 context->username, (unsigned int)p->pw_uid);

12345678910