This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: [PATCH] root-uid: new module
- From: Charles Wilson <cygwin at cwilson dot fastmail dot fm>
- To: cygwin at cygwin dot com
- Date: Wed, 27 Jun 2012 09:58:33 -0400
- Subject: Re: [PATCH] root-uid: new module
- References: <4FEA4A72.8090003@cs.ucla.edu> <4FEA4D53.3090409@redhat.com> <4FEA4FDB.5030105@cs.ucla.edu> <4FEA5161.6010503@redhat.com>
- Reply-to: Charles Wilson <cygwin at cwilson dot fastmail dot fm>
On 6/26/2012 8:18 PM, Eric Blake wrote:
> Broadening the question, does the cygwin community have advice on the
> best implementation of a function that returns true if the argument is a
> uid with full privileges (for example, if the uid is a member of the
> Administrator group, and can therefore read files in spite of chown()
> disabling all the read permissions)? We're trying to improve gnulib
> (and therefore coreutils, findutils, tar, ...) to use an
> implementation-appropriate check rather than the more traditional
> hard-coded check of uid==0, since that doesn't quite work everywhere.
There is some support code for doing various Win32-related group/user
analysis like this in cygwin's login package. The files you'd be
interested in -- winsec.c and winpriv.c, along with test_winsec.c --
were written by Chris Rodgers, me, and I'm sure Corinna contributed a
few patches along the way. Those three files are under slightly
different licenses, but are MIT/X-ish.
--
Chuck
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple