Re: How to check root powers on a struct proc ?

2005-06-17 Thread John Baldwin
On Friday 17 June 2005 03:03 pm, Julian Elischer wrote: > Aziz Kezzou wrote: > >>Aziz Kezzou wrote: > >>>Hi all, > >>>I am trying to check that a process (struct proc) has root powers when > >>>it calls my KLD system call. > >>>I know from kern_jail.c that I can use suser() but this function takes

Re: How to check root powers on a struct proc ?

2005-06-17 Thread Julian Elischer
Aziz Kezzou wrote: Aziz Kezzou wrote: Hi all, I am trying to check that a process (struct proc) has root powers when it calls my KLD system call. I know from kern_jail.c that I can use suser() but this function takes a struct thread* instead of struct proc* although the credentials (stru

Re: How to check root powers on a struct proc ?

2005-06-17 Thread Aziz Kezzou
> Aziz Kezzou wrote: > > Hi all, > > I am trying to check that a process (struct proc) has root powers when > > it calls my KLD system call. > > I know from kern_jail.c that I can use suser() but this function takes > > a struct thread* instead of struct proc* although the credentials > > (struct u

Re: How to check root powers on a struct proc ?

2005-06-17 Thread Julian Elischer
Aziz Kezzou wrote: Hi all, I am trying to check that a process (struct proc) has root powers when it calls my KLD system call. I know from kern_jail.c that I can use suser() but this function takes a struct thread* instead of struct proc* although the credentials (struct ucred *p_ucred;) are stor

Re: How to check root powers on a struct proc ?

2005-06-17 Thread Joseph Koshy
> I am trying to check that a process (struct proc) has root > powers when it calls my KLD system call. Don't you get a 'struct thread *' as an argument to your system call entry point? The 'flag' argument to suser_cred(9) is documented in its manual page. -- FreeBSD Volunteer, http://peop

How to check root powers on a struct proc ?

2005-06-17 Thread Aziz Kezzou
Hi all, I am trying to check that a process (struct proc) has root powers when it calls my KLD system call. I know from kern_jail.c that I can use suser() but this function takes a struct thread* instead of struct proc* although the credentials (struct ucred *p_ucred;) are stored in proc ! Is ther

Re: kern/80642: [patch] IPFW small patch - new RULE OPTION

2005-06-17 Thread Andrey V. Elsukov
Robert Watson wrote: > This patch breaks the ABI by inserting a new type into an implicitly > numbered enumeration, renumbering all entries later in the enum. > O_BOUND, if added, should be appended to the end, and/or we should > number the operations explicitly. Ok. I have corrected thi

Re: 0xdeadc0de

2005-06-17 Thread Andrey Simonenko
On Thu, Jun 16, 2005 at 11:15:49PM +0300, Alex Lyashkov wrote: > > With kernel from RELENG_5_4 (and RELENG_5) compiled with INVARIANTS > i have - > gw# sysctl -a | grep debug\.kdb\.available | hexdump -C > 64 65 62 75 67 2e 6b 64 62 2e 61 76 61 69 6c 61 > |debug.kdb.availa| > 0010