This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: /WINDOWS


Igor Pechtchanski wrote:
> On Mon, 8 Dec 2003, Corinna Vinschen wrote:
> 
>> Hi,
>> 
>> There are a bunch of applications, which, for security reasons, want
>> to set $PATH to a fixed value.  This approach is a bit tricky on
>> Windows, since the needed paths to the Windows system directories
>> are not fixed values as it's on POSIX systems.  A lot of
>> applications are falling back to values like _PATH_DEFPATH or
>> _PATH_STDPATH and use them to set $PATH before starting another
>> application.  Sshd, login, cron are just three of them.  The current
>> patches to all three applications are so that the code which sets
>> $PATH before exec'ing another process is not executed when built for
>> Cygwin.  
>> 
>> I think a better approach is this:  Let's generalize the idea of a
>> fixed path to the Windows system directories.  I suggest, that one
>> of the base install scripts creates a symlink "/WINDOWS" like this:
>> 
>>   ln -s `cygpath -m "$WINDIR"` /WINDOWS
>> 
>> This allows to keep the above described code to set $PATH in the
>> affected tools, just by redefining, say _PATH_DEFPATH like this:
>> 
>> #ifdef _PATH_DEFPATH
>> #undef _PATH_DEFPATH
>> #define _PATH_DEFPATH
> "/usr/bin:/bin:/WINDOWS/system32:/WINDOWS:/WINDOWS/COMMAND/WIN
> DOWS/system32/Wbem"
>> #endif
>> 
>> which contains both, NT and 9x paths.  We could perhaps even change
>> /usr/include/paths.h to reflect this, at one point.
>> 
>> Opinions?
>> Corinna
> 
> FWIW, I agree that it's a good idea to have a fixed pointer to the
> windows directory, but I don't think "/" is the right place to have
> it.  Could we make it "/mnt/WINDOWS" or "/opt/WINDOWS" or something? 
> I don't like cluttering up the root directory unnecessarily...

I like the /mnt idea :)
I'd also like it to have /cygdrive/[insert drive letter here]/
as /mnt/[insert drive letter here]/ too (possibly instead of?)

J.

PS, I know I can change what /cygdrive is refered to as.


==========================================================================
Information in this e-mail and any attachments are confidential, and may 
not be copied or used by anyone other than the addressee, nor disclosed 
to any third party without our permission. There is no intention to 
create any legally binding contract or other binding commitment through 
the use of this electronic communication unless it is issued in accordance 
with the Experian Limited standard terms and conditions of purchase or 
other express written agreement between Experian Limited and the recipient 
Experian Limited (registration number 653331) Registered office: 
Talbot House, Talbot Street, Nottingham NG80 1TH

Although Experian has taken reasonable steps to ensure that this communication 
and any attachments are free from computer virus, you are advised to take 
your own steps to ensure that they are actually virus free.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]