Hello hackers... We got for example a kld module and we have catched some syscall. Now we want to change effective uid of process, but not curproc. How to lock this process?
struct proc *proc; uid_t olduid; [...] if ((proc = pfind(123)) == NULL) return (ESRCH); olduid = pc->pc_ucred->cr_uid; change_euid(proc, 0); /* now some simple action */ change_euid(proc, olduid); How to be sure that process 'proc' arn't running on other CPU? Function lockmgr() is used for problems like this one? Where I could find some more information about it? For now I've wrote only comments in /sys/sys/lock.h, etc. There are any papers about programming in SMP? -- Pawel Jakub Dawidek UNIX Systems Administrator http://garage.freebsd.pl Am I Evil? Yes, I Am.
msg37494/pgp00000.pgp
Description: PGP signature