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


Good idea, except that I'd personally prefer a mount point in stead of a 
symlink but that's just personal preference.. (Personally, I'd prefer that
the Cygwin DLL make /WINDOWS a "magical" mountpoint to the likeness of 
/dev, /proc, etc. so as to make it completely transparent and make sure no
user can "accidentally" remove the symlink, so as to make sure that the
programs can actually rely on it being there and on it to behave as a "normal"
directory..)

rlc


On Mon, Dec 08, 2003 at 11:29:27AM +0100, Corinna Vinschen wrote:
> 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/WINDOWS/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
> -- 
> Corinna Vinschen                  Please, send mails regarding Cygwin to
> Cygwin Developer                                mailto:cygwin@cygwin.com
> Red Hat, Inc.

-- 
Double!


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