privsep patch, Please test
Tim Rice
tim at multitalents.net
Thu May 30 10:29:12 EST 2002
On Wed, 29 May 2002, Ben Lindstrom wrote:
> On Wed, 29 May 2002, Tim Rice wrote:
>
> > On Wed, 29 May 2002, Tom Rudnick wrote:
> >
> > > >
> > > > Read README.privsep
> > > > You'll have to set up a sshd user and group and create /var/empty
> > > >
> > > Got it. That's what I get for not paying attention.
> > >
> > > Now, here's what happens. It works fine unless I enable compression,
> > > at which point it get the following errors:
> >
> > Rats, I didn't try compresion. I'll look into it when I get a chance.
> >
> [..]
> +#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,
> + open("/dev/zero", O_RDWR), 0);
> +#endif
>
> I still don't agree with the alternative mmap()
>
> Can you change 'MAP_PRIVATE' to 'MAP_SHARED' and retest? I makes no ense
> to open a mmap() where you will be sharing the compressed data over and
> then not map it as MAP_SHARE.
That fixed it. Cool.
There was some discussion before on mmap() that led me to believe that
MAP_PRIVATE was correct. Oh well, MAP_SHARED works. Hard to argue with
sucess. :-)
>
> - Ben
>
--
Tim Rice Multitalents (707) 887-1469
tim at multitalents.net
More information about the openssh-unix-dev
mailing list