Subject: Re: cvs commit: src/lib/libc/db/hash hash_buf.c
To: Guido van Rooij <guido@gvr.win.tue.nl>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: tech-userlevel
Date: 10/17/1996 14:14:15
On Thu, 17 Oct 1996 22:04:45 +0200 (MET DST) 
 guido@gvr.win.tue.nl (Guido van Rooij) wrote:

 > And what about a user attaching a debugger to a running ftpd...

Looking at NetBSD's ptrace(2) (see kern/sys_process.c:sys_ptrace())
system call, we see in the PT_ATTACH case that you cannot attach to
a process if:

	(1) it's the process doing the attaching,

	(2) it's already being traced,

	(3) it's not owned by you, or is set-id on exec
	    (unless you're root), or,

	(4) it's init, which controls the security level of
	    the entire system, and the system was not compiled
	    with permanently insecure mode turned on.

So, Joe Random User cannot attach to an ftpd.

Jason R. Thorpe                                       thorpej@nas.nasa.gov
NASA Ames Research Center                               Home: 408.866.1912
NAS: M/S 258-6                                          Work: 415.604.0935
Moffett Field, CA 94035                                Pager: 415.428.6939