Re: Silly question about ktrace(1) and non-root users

2011-06-20 Thread David Laight
On Mon, Jun 20, 2011 at 04:29:05PM -0700, Brian Buhrow wrote: > For reference, I used the ktrcanset() function from kern_ktrace.c from > NetBSD-3.0 sources because it was easier to read than following the chain > of layers down through the secmodel infrastructure and finding where > exactly the pe

write alignment matters?

2011-06-20 Thread der Mouse
I've just run into something (on 4.0.1) which looks to me as though write() buffer alignment matters. This sounds to me like a bug, but it appears to have something to do with the hardware, and I'd appreciate any thoughts on how I might best track it down. I tried to run one of my tools (a disk v

Re: Silly question about ktrace(1) and non-root users

2011-06-20 Thread Brian Buhrow
hello. Ok. I figured out the answer. And, yes, it's obvious, as I suspected. Mouse had it right. The problem is that both sshd and imapd, the two processes I was interested in looking at, while not having the setuid or setgid bits set in the filesystem, do perform a setuid(2) a

Re: Silly question about ktrace(1) and non-root users

2011-06-20 Thread Brian Buhrow
Hello. Looks like the processes are running with egid, gid and rgid of the primary group of the users in question. So, it must bee something else? -thanks -Brian On Jun 20, 7:58pm, David Holland wrote: } Subject: Re: Silly question about ktrace(1) and non-root users } On Mon, Jun 20, 201

Re: Silly question about ktrace(1) and non-root users

2011-06-20 Thread der Mouse
> %ps -uw28755 > USER PID %CPU %MEM VSZ RSS TTY STAT STARTEDTIME COMMAND > buhrow 28755 0.1 0.0 408 932 ? S24May11 0:03.27 sshd: buhrow@ttyp2 > %whoami > buhrow > %ktrace -p 28755 > ktrace: file ktrace.out, pid 28755: Operation not permitted See sys/kern/kern_ktrace.c. This is pr

Re: Silly question about ktrace(1) and non-root users

2011-06-20 Thread David Holland
On Mon, Jun 20, 2011 at 12:32:25PM -0700, Brian Buhrow wrote: > I don't think this is a bug as it behaves this way on NetBS-3.x, 4.x and > 5.x. Can anyone provide clue? Check the group memberships of the processes? -- David A. Holland dholl...@netbsd.org

Silly question about ktrace(1) and non-root users

2011-06-20 Thread Brian Buhrow
Hello. I'm sure this is a pilot error question, but I'm wondering if someone can enlighten me as to why the behavior I'm seeing is happening. It's not obvious to me, but I'm sure I'm missing something obvious. My understanding of ktrace(1) and the associated ktrace(2) call is that