This is the mail archive of the cygwin-patches@sources.redhat.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: chroot("/") can't work.


Is this patch so that you can do `chroot /'?  Why would you want to do that?
Cheers,
Earnie.
--- Kazuhiro Fujieda <fujieda@jaist.ac.jp> wrote:
> ChangeLog:
> Wed Nov 29 18:25:53 2000  Kazuhiro Fujieda  <fujieda@jaist.ac.jp>
> 
> 	* cygheap.cc (chgheap_root::operator =): Check root dir properly.
> 
> Index: cygheap.cc
> ===================================================================
> RCS file: /cvs/src/src/winsup/cygwin/cygheap.cc,v
> retrieving revision 1.12
> diff -u -p -r1.12 cygheap.cc
> --- cygheap.cc	2000/11/15 00:13:08	1.12
> +++ cygheap.cc	2000/11/29 09:23:37
> @@ -305,7 +305,7 @@ cygheap_root::operator =(const char *new
>      {
>        root = cstrdup (new_root);
>        rootlen = strlen (root);
> -      if (rootlen > 1 && root[rootlen - 1] == '/')
> +      if (rootlen >= 1 && root[rootlen - 1] == '/')
>  	root[--rootlen] = '\0';
>        if (!rootlen)
>  	{
> 
> ____
>   | AIST      Kazuhiro Fujieda <fujieda@jaist.ac.jp>
>   | HOKURIKU  School of Information Science
> o_/ 1990      Japan Advanced Institute of Science and Technology


__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/

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