privsep patch, Please test

Ben Lindstrom mouring at etoh.eviladmin.org
Thu May 30 09:59:34 EST 2002


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.

- Ben




More information about the openssh-unix-dev mailing list