Lines Matching defs:uap

125 sys_getpid(struct thread *td, struct getpid_args *uap)
144 sys_getppid(struct thread *td, struct getppid_args *uap)
168 sys_getpgrp(struct thread *td, struct getpgrp_args *uap)
185 sys_getpgid(struct thread *td, struct getpgid_args *uap)
190 if (uap->pid == 0) {
194 p = pfind(uap->pid);
217 sys_getsid(struct thread *td, struct getsid_args *uap)
220 return (kern_getsid(td, uap->pid));
254 sys_getuid(struct thread *td, struct getuid_args *uap)
271 sys_geteuid(struct thread *td, struct geteuid_args *uap)
285 sys_getgid(struct thread *td, struct getgid_args *uap)
307 sys_getegid(struct thread *td, struct getegid_args *uap)
321 sys_getgroups(struct thread *td, struct getgroups_args *uap)
329 if (uap->gidsetsize == 0) {
333 if (uap->gidsetsize < ngrp)
336 error = copyout(cred->cr_groups, uap->gidset, ngrp * sizeof(gid_t));
349 sys_setsid(struct thread *td, struct setsid_args *uap)
409 sys_setpgid(struct thread *td, struct setpgid_args *uap)
417 if (uap->pgid < 0)
426 if (uap->pid != 0 && uap->pid != curp->p_pid) {
427 if ((targp = pfind(uap->pid)) == NULL) {
458 if (uap->pgid == 0)
459 uap->pgid = targp->p_pid;
460 if ((pgrp = pgfind(uap->pgid)) == NULL) {
461 if (uap->pgid == targp->p_pid) {
462 error = enterpgrp(targp, uap->pgid, newpgrp,
646 sys_setcred(struct thread *td, struct setcred_args *uap)
648 return (user_setcred(td, uap->flags, uap->wcred, uap->size, false));
870 sys_setuid(struct thread *td, struct setuid_args *uap)
878 uid = uap->uid;
992 sys_seteuid(struct thread *td, struct seteuid_args *uap)
1000 euid = uap->euid;
1048 sys_setgid(struct thread *td, struct setgid_args *uap)
1055 gid = uap->gid;
1146 sys_setegid(struct thread *td, struct setegid_args *uap)
1153 egid = uap->egid;
1193 sys_setgroups(struct thread *td, struct setgroups_args *uap)
1208 gidsetsize = uap->gidsetsize;
1217 error = copyin(uap->gidset, groups, gidsetsize * sizeof(gid_t));
1298 sys_setreuid(struct thread *td, struct setreuid_args *uap)
1306 euid = uap->euid;
1307 ruid = uap->ruid;
1373 sys_setregid(struct thread *td, struct setregid_args *uap)
1380 egid = uap->egid;
1381 rgid = uap->rgid;
1438 sys_setresuid(struct thread *td, struct setresuid_args *uap)
1446 euid = uap->euid;
1447 ruid = uap->ruid;
1448 suid = uap->suid;
1525 sys_setresgid(struct thread *td, struct setresgid_args *uap)
1532 egid = uap->egid;
1533 rgid = uap->rgid;
1534 sgid = uap->sgid;
1592 sys_getresuid(struct thread *td, struct getresuid_args *uap)
1598 if (uap->ruid)
1600 uap->ruid, sizeof(cred->cr_ruid));
1601 if (uap->euid)
1603 uap->euid, sizeof(cred->cr_uid));
1604 if (uap->suid)
1606 uap->suid, sizeof(cred->cr_svuid));
1619 sys_getresgid(struct thread *td, struct getresgid_args *uap)
1625 if (uap->rgid)
1627 uap->rgid, sizeof(cred->cr_rgid));
1628 if (uap->egid)
1630 uap->egid, sizeof(cred->cr_groups[0]));
1631 if (uap->sgid)
1633 uap->sgid, sizeof(cred->cr_svgid));
1644 sys_issetugid(struct thread *td, struct issetugid_args *uap)
1661 sys___setugid(struct thread *td, struct __setugid_args *uap)
1667 switch (uap->flag) {
2916 sys_getlogin(struct thread *td, struct getlogin_args *uap)
2922 if (uap->namelen > MAXLOGNAME)
2923 uap->namelen = MAXLOGNAME;
2926 len = strlcpy(login, p->p_session->s_login, uap->namelen) + 1;
2929 if (len > uap->namelen)
2931 return (copyout(login, uap->namebuf, len));
2944 sys_setlogin(struct thread *td, struct setlogin_args *uap)
2955 error = copyinstr(uap->namebuf, logintmp, sizeof(logintmp), NULL);