This is the mail archive of the cygwin@sourceware.cygnus.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]

Re: rpm and chroot


In article <Pine.BSF.3.96.970920231208.1023B-100000@zippy.dyn.ml.org>,
Alex  <garbanzo@hooked.net> wrote:
>To the people who were working on getting rpm to work.  I was just up late
>thinging, here's an idea (which I can't try as gnu-win32 isn't working for
>me right now).
>
>In the main file (I'm guessing main.c), make a global variable (say 
>rootdir) char rootdir[1023]="/" (last I checked maximum path length in
>FreeBSD was 1023, over that and it will return ENAMETOOLONG.
>[snip]

Actually, I think that getting chroot to work would be trivially easy in
cygwin as long as it is understood that it would only affect cygwin
processes and not any other Windows processes.

Since cygwin.dll already performs translations on all of the pathnames
it receives, "all" you have to do is add one more level to translate
the first slash to whatever you've chrooted to.  This information would
have to be inherited by all of the child processes but that too is doable.
-- 
http://www.bbc.com/	cgf@bbc.com			"Strange how unreal
VMS=>UNIX Solutions	Boston Business Computing	 the real can be."
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


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