From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 24 04:14:28 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6800916A417 for ; Tue, 24 Jul 2007 04:14:28 +0000 (UTC) (envelope-from freebsd@bitfreak.org) Received: from mail.twinthornes.com (mail.twinthornes.com [65.75.198.147]) by mx1.freebsd.org (Postfix) with ESMTP id 4728F13C465 for ; Tue, 24 Jul 2007 04:14:28 +0000 (UTC) (envelope-from freebsd@bitfreak.org) Received: from [10.9.70.101] (pool-72-90-106-233.ptldor.fios.verizon.net [72.90.106.233]) by mail.twinthornes.com (Postfix) with ESMTP id A7B19A59; Mon, 23 Jul 2007 20:54:12 -0700 (PDT) Message-ID: <46A577BB.5020400@bitfreak.org> Date: Mon, 23 Jul 2007 20:53:31 -0700 From: Darren Pilgrim User-Agent: Thunderbird 1.5.0.12 (Windows/20070509) MIME-Version: 1.0 To: dmw@unete.cl References: <200707232052.58485.dmw@unete.cl> In-Reply-To: <200707232052.58485.dmw@unete.cl> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD Hackers Subject: Re: A few questions... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jul 2007 04:14:28 -0000 Daniel Molina Wegener wrote: > Hello, > > I need information about few things, I hope someone can help > me and thanks in advance. > > a) Is there any function or variable that tells me which is the > root user UID in the system, or root always have 0 and it's > an "elegant" option to compare the variables or structure > members against zero. Root is always UID 0. Checking UID == 0 is the common practice for determining if the effective UID has root priveleges. > b) Can normal users look for system processes or kernel threads? Yes, depending on the value of the security.bsd.see_other_uids sysctl. If security.bsd.see_other_uids=0, non-root users can only see their own processes. > c) Can root look for system processes or kernel threads? Yes, regardless of the value of security.bsd.see_other_uids.