privsep patch, Please test

Tim Rice tim at multitalents.net
Thu May 30 12:48:31 EST 2002


On Thu, 30 May 2002, Mathias Koerber wrote:

> > This was talked about a few posts ago.  Go to where the mmap() call is for
> > the alternation version and change MAP_PRIVATE to MAP_SHARED
>
> If I do that (after applying Tim's privsep.patch),thusly:
>
>  #ifdef HAVE_MMAP
>  #ifdef HAVE_WORKING_MAP_ANONYMOUS
>          address = mmap(NULL, size, PROT_WRITE|PROT_READ,
> MAP_ANON|MAP_SHARED,
>              -1, 0);
>  #else
> +        address = mmap(NULL, size, PROT_WRITE|PROT_READ, MAP_PRIVATE,
> -        address = mmap(NULL, size, PROT_WRITE|PROT_READ, MAP_SHARED,

This looks backwards. My patch had,
       address = mmap(NULL, size, PROT_WRITE|PROT_READ, MAP_PRIVATE,
should have had,
        address = mmap(NULL, size, PROT_WRITE|PROT_READ, MAP_SHARED,

What platform are you on?


>              open("/dev/zero", O_RDWR), 0);
>  #endif
>          if (address == MAP_FAILED)
>                  fatal("mmap(%lu)", (u_long)size);
>
> I get the original problem back, ie, mmap(65535) fails immediately.
>
> _______________________________________________
> openssh-unix-dev at mindrot.org mailing list
> http://www.mindrot.org/mailman/listinfo/openssh-unix-dev
>

-- 
Tim Rice				Multitalents	(707) 887-1469
tim at multitalents.net





More information about the openssh-unix-dev mailing list