Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Oct 1996 14:14:15 -0700
From:      Jason Thorpe <thorpej@nas.nasa.gov>
To:        guido@gvr.win.tue.nl (Guido van Rooij)
Cc:        phk@critter.tfs.com, guido@freebsd.org, freebsd-hackers@freebsd.org, tech-userlevel@netbsd.org
Subject:   Re: cvs commit: src/lib/libc/db/hash hash_buf.c 
Message-ID:  <199610172114.OAA07806@lestat.nas.nasa.gov>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199610172114.OAA07806>