Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Message-ID: <41B4A7D9.3ADA0F94@dessent.net>
Date: Mon, 06 Dec 2004 10:41:29 -0800
From: Brian Dessent <brian@dessent.net>
Organization: My own little world...
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: Environment variables & system privilages
References: <41B1A1C4.6020102@ieee.org> <Pine.GSO.4.61.0412041531410.3217@slinky.cs.nyu.edu> <41B305B2.7030805@ieee.org>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Reply-To: cygwin@cygwin.com

Jason Pearce wrote:
> 
> Thanks. This works well enough. But I take it there is no universal
> command to check for system permissions.
> The procedure is just try a command that needs system privilages and
> watch the exit status.

Well, if you really want to check for this you could try comparing the
output of "id -u" to 18, the UID of the SYSTEM account.  I don't know if
the system account's id varies across different versions (eg 98 vs.
2k3), though.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

