Index: head/sys/compat/linux/linux_misc.c =================================================================== --- head/sys/compat/linux/linux_misc.c +++ head/sys/compat/linux/linux_misc.c @@ -1599,14 +1599,11 @@ return (0); } - int linux_getsid(struct thread *td, struct linux_getsid_args *args) { - struct getsid_args bsd; - bsd.pid = args->pid; - return (sys_getsid(td, &bsd)); + return (kern_getsid(td, args->pid)); } int Index: head/sys/kern/kern_prot.c =================================================================== --- head/sys/kern/kern_prot.c +++ head/sys/kern/kern_prot.c @@ -190,14 +190,21 @@ int sys_getsid(struct thread *td, struct getsid_args *uap) { + + return (kern_getsid(td, uap->pid)); +} + +int +kern_getsid(struct thread *td, pid_t pid) +{ struct proc *p; int error; - if (uap->pid == 0) { + if (pid == 0) { p = td->td_proc; PROC_LOCK(p); } else { - p = pfind(uap->pid); + p = pfind(pid); if (p == NULL) return (ESRCH); error = p_cansee(td, p); Index: head/sys/sys/syscallsubr.h =================================================================== --- head/sys/sys/syscallsubr.h +++ head/sys/sys/syscallsubr.h @@ -140,6 +140,7 @@ int kern_getpeername(struct thread *td, int fd, struct sockaddr **sa, socklen_t *alen); int kern_getrusage(struct thread *td, int who, struct rusage *rup); +int kern_getsid(struct thread *td, pid_t pid); int kern_getsockname(struct thread *td, int fd, struct sockaddr **sa, socklen_t *alen); int kern_getsockopt(struct thread *td, int s, int level, int name,