Lines Matching defs:uid
26 uid_t uid;
31 uid = getuid();
35 checkuids(pw->pw_uid, uid, uid, "0");
50 if (setresuid(uid, -1, -1) == -1)
52 checkuids(uid, uid, uid, "1");
56 checkuids(uid, pw->pw_uid, uid, "2");
59 if (setresuid(-1, uid, -1) == -1)
61 checkuids(uid, uid, uid, "3");
64 * after changing our saved uid, we should be able to change
65 * our real and effective uids to that of our saved uid,
71 checkuids(uid, uid, pw->pw_uid, "4");
75 checkuids(pw->pw_uid, uid, pw->pw_uid, "5");
81 if (setresuid(uid, -1, -1) != -1)
82 errx(1, "incorrectly capable of setting real uid");
85 if (setresuid(-1, uid, -1) != -1)
86 errx(1, "incorrectly capable of setting effective uid");
89 if (setresuid(-1, -1, uid) != -1)
90 errx(1, "incorrectly capable of setting saved uid");