Home
last modified time | relevance | path

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

1234567891011

/external/ltp/testcases/kernel/syscalls/setreuid/
Dsetreuid03.c58 &nobody.pw_uid, &nobody.pw_uid, &pass, &nobody, &nobody,
60 &neg_one, &nobody.pw_uid, &pass, &nobody, &nobody,
62 &nobody.pw_uid, &neg_one, &pass, &nobody, &nobody,
66 &neg_one, &root.pw_uid, &fail, &nobody, &nobody,
68 &root.pw_uid, &neg_one, &fail, &nobody, &nobody,
70 &root.pw_uid, &root.pw_uid, &fail, &nobody, &nobody,
72 &root.pw_uid, &nobody.pw_uid, &fail, &nobody, &nobody,
74 &root.pw_uid, &bin.pw_uid, &fail, &nobody, &nobody,
76 &bin.pw_uid, &root.pw_uid, &fail, &nobody, &nobody,
78 &bin.pw_uid, &neg_one, &fail, &nobody, &nobody,
[all …]
Dsetreuid05.c51 &nobody.pw_uid, &root.pw_uid, &pass, &nobody, &root, "Initially"}, {
52 &neg_one, &nobody.pw_uid, &pass, &nobody, &nobody,
54 &neg_one, &root.pw_uid, &pass, &nobody, &root,
56 &daemonpw.pw_uid, &neg_one, &pass, &daemonpw, &root,
58 &neg_one, &bin.pw_uid, &pass, &daemonpw, &bin,
60 &neg_one, &root.pw_uid, &fail, &daemonpw, &bin,
62 &neg_one, &nobody.pw_uid, &fail, &daemonpw, &bin,
64 &neg_one, &daemonpw.pw_uid, &pass, &daemonpw, &daemonpw,
66 &neg_one, &bin.pw_uid, &pass, &daemonpw, &bin,
68 &bin.pw_uid, &daemonpw.pw_uid, &pass, &bin, &daemonpw,
[all …]
Dsetreuid02.c52 &nobody.pw_uid, &neg_one, &nobody, &root, "After setreuid(nobody, -1)"},
54 &root.pw_uid, &neg_one, &root, &root, "After setreuid(root,-1),"}, {
55 &neg_one, &daemonpw.pw_uid, &root, &daemonpw,
57 &neg_one, &root.pw_uid, &root, &root, "After setreuid(-1,root),"}, {
58 &bin.pw_uid, &neg_one, &bin, &root, "After setreuid(bin, -1)"}, {
59 &root.pw_uid, &neg_one, &root, &root, "After setreuid(-1, root)"},};
116 UID16_CHECK(root.pw_uid, setreuid, cleanup); in setup()
119 UID16_CHECK(nobody.pw_uid, setreuid, cleanup); in setup()
122 UID16_CHECK(daemonpw.pw_uid, setreuid, cleanup); in setup()
125 UID16_CHECK(bin.pw_uid, setreuid, cleanup); in setup()
[all …]
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()
/external/openssh/
Duidswap.c77 (u_int)pw->pw_uid, (u_int)pw->pw_gid, in temporarily_use_uid()
139 if (seteuid(pw->pw_uid) == -1) in temporarily_use_uid()
140 fatal("seteuid %u: %.100s", (u_int)pw->pw_uid, in temporarily_use_uid()
231 debug("permanently_set_uid: %u/%u", (u_int)pw->pw_uid, in permanently_set_uid()
235 if (pw->pw_uid == AID_SHELL) { in permanently_set_uid()
267 if (setresuid(pw->pw_uid, pw->pw_uid, pw->pw_uid) < 0) in permanently_set_uid()
268 fatal("setresuid %u: %.100s", (u_int)pw->pw_uid, strerror(errno)); in permanently_set_uid()
272 if (old_gid != pw->pw_gid && pw->pw_uid != 0 && in permanently_set_uid()
286 if (old_uid != pw->pw_uid && in permanently_set_uid()
292 if (getuid() != pw->pw_uid || geteuid() != pw->pw_uid) { in permanently_set_uid()
[all …]
Dsshpty.c225 if (st.st_uid != pw->pw_uid || st.st_gid != gid) { in pty_setowner()
226 if (chown(tty, pw->pw_uid, gid) < 0) { in pty_setowner()
228 (st.st_uid == pw->pw_uid || st.st_uid == 0)) in pty_setowner()
230 tty, (u_int)pw->pw_uid, (u_int)gid, in pty_setowner()
234 tty, (u_int)pw->pw_uid, (u_int)gid, in pty_setowner()
/external/ltp/testcases/kernel/syscalls/setresuid/
Dsetresuid01.c179 UID16_CHECK((root_pw_uid = root.pw_uid), "setresuid", cleanup) in setup()
182 UID16_CHECK((nobody_pw_uid = nobody.pw_uid), "setresuid", cleanup) in setup()
185 UID16_CHECK((bin_pw_uid = bin.pw_uid), "setresuid", cleanup) in setup()
210 if ((cur_ru != ru->pw_uid) || (cur_eu != eu->pw_uid) || (cur_su != in uid_verify()
211 su->pw_uid)) { in uid_verify()
215 "saved uid = %d", ru->pw_uid, eu->pw_uid, su->pw_uid); in uid_verify()
Dsetresuid03.c200 UID16_CHECK((root_pw_uid = root.pw_uid), "setresuid", cleanup) in setup()
203 UID16_CHECK((nobody_pw_uid = nobody.pw_uid), "setresuid", cleanup) in setup()
206 UID16_CHECK((bin_pw_uid = bin.pw_uid), "setresuid", cleanup) in setup()
234 if ((cur_ru != ru->pw_uid) || (cur_eu != eu->pw_uid) || (cur_su != in uid_verify()
235 su->pw_uid)) { in uid_verify()
239 "saved uid = %d", ru->pw_uid, eu->pw_uid, su->pw_uid); in uid_verify()
Dsetresuid02.c190 UID16_CHECK((nobody_pw_uid = nobody.pw_uid), "setresuid", cleanup) in setup()
193 UID16_CHECK((bin_pw_uid = bin.pw_uid), "setresuid", cleanup) in setup()
221 if ((cur_ru != ru->pw_uid) || (cur_eu != eu->pw_uid) || (cur_su != in uid_verify()
222 su->pw_uid)) { in uid_verify()
226 "saved uid = %d", ru->pw_uid, eu->pw_uid, su->pw_uid); in uid_verify()
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()
/external/python/cpython3/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])
/external/python/cpython2/Lib/test/
Dtest_pwd.py18 self.assertEqual(e[2], e.pw_uid)
19 self.assertIsInstance(e.pw_uid, (int, long))
45 entriesbyuid.setdefault(e.pw_uid, []).append(e)
53 self.assertIn(pwd.getpwuid(e.pw_uid), entriesbyuid[e.pw_uid])
/external/ltp/testcases/kernel/syscalls/kill/
Dkill05.c163 if (setreuid(ltpuser1->pw_uid, ltpuser1->pw_uid) == -1) { in do_master_child()
178 if (setreuid(ltpuser2->pw_uid, ltpuser2->pw_uid) == -1) { in do_master_child()
/external/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()
/external/openssh/openbsd-compat/
Dport-irix.c59 jid = jlimit_startjob(pw->pw_name, pw->pw_uid, "interactive"); in irix_setusercontext()
82 debug("Setting sat id to %d", (int) pw->pw_uid); in irix_setusercontext()
83 if (satsetid(pw->pw_uid)) in irix_setusercontext()
/external/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()
/external/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()
/external/ltp/testcases/kernel/syscalls/getuid/
Dgetuid03.c64 UID16_CHECK(pwent->pw_uid, getuid, cleanup); in main()
66 if (pwent->pw_uid != TEST_RETURN) in main()
69 "value, %ld", pwent->pw_uid, in main()
/external/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()
/external/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()
/external/selinux/sandbox/
Dseunshare.c394 if (cmdbuf && spawn_command(cmdbuf, pwd->pw_uid) != 0) { in cleanup_tmpdir()
408 if (cmdbuf && spawn_command(cmdbuf, pwd->pw_uid) != 0) rc++; in cleanup_tmpdir()
419 if ((uid_t)setfsuid(pwd->pw_uid) != 0) { in cleanup_tmpdir()
444 if ((uid_t)setfsuid(pwd->pw_uid) != 0) in create_tmpdir()
465 if ((uid_t)setfsuid(0) != pwd->pw_uid) in create_tmpdir()
521 if ((uid_t)setfsuid(pwd->pw_uid) != 0) in create_tmpdir()
529 if ((uid_t)setfsuid(0) != pwd->pw_uid) in create_tmpdir()
532 if (cmdbuf && spawn_command(cmdbuf, pwd->pw_uid) != 0) { in create_tmpdir()
/external/ltp/testcases/kernel/syscalls/mkdir/
Dmkdir04.c58 nobody_uid = pw->pw_uid; in setup()
60 bin_uid = pw->pw_uid; in setup()
/external/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()

1234567891011