/etc/passwd dependency of cygwin

Vishal Jain vxj45@hotmail.com
Sat Mar 22 14:22:00 GMT 2003


fopen doesn't work if I have my own implementation of seteuid. fopen call 
which goes to fhandler.cc:open->
security.cc:set_security_attribute->
security.cc:alloc_sd
relies on uid to sid mapping in /etc/passwd or on the current uid set in the 
heap(which would be incorrect in my case as I have my own implementation of 
seteuid).

If there is a way to disable nt security in cygwin on win2k then this might 
work as security descriptor won't be created in that case.

Vishal
On Tue, 18 Mar 2003, Vishal Jain wrote:

>Hi,
>How does cygwin library depend on uid's and gid's in /etc/passwd?
>If I replace it with my custom /etc/passwd file and replace cygwin's
>seteuid/geteuid calls with custom implementation, will my application work?
>How does cygwin internally uses uid's and gid's?
>thanks,
>Vishal

Vishal,

AFAIU, there has to be some way of mapping Windows SIDs to Cygwin's
[ug]ids (on NT systems), and the [ug]ids have to be unique, but I don't
think they are constrained much otherwise.  You might find out more by
searching the Cygwin documentation, especially the User's Guide and the
API reference, for "ntsec".

If you plan to make a fundamental change like that to your Cygwin DLL, you
might want to read the recent discussions regarding ntsec on the
cygwin-developers list carefully.  There are some tricky issues, IIRC.

And, as always, the code itself is the best (or, at least, the most
up-to-date) documentation...  "Use the source, Luke!" ;-)




_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list