Part 2 of Fixing a security hole in mount table.

2003-09-09 Thread Pierre A. Humblet
This is the follow up on yesterday's patch. There is no change in external behavior, just cleaning up. The main innovation is the new function cygheap_user::init that initializes the user name and sid just after the cygheap is initialized. The information can then be used in user_shared_initiali

Re: Part 2 of Fixing a security hole in mount table.

2003-09-10 Thread Corinna Vinschen
On Tue, Sep 09, 2003 at 11:54:26PM -0400, Pierre A. Humblet wrote: > 2003-09-10 Pierre Humblet <[EMAIL PROTECTED]> > > * shared_info.h (shared_info::initialize): Remove argument. > * cygheap.h (cygheap_user::init): New declaration. > * uinfo.cc (cygheap_user::init): New. >

Re: Part 2 of Fixing a security hole in mount table.

2003-09-10 Thread Pierre A. Humblet
Corinna Vinschen wrote: > > Looks good to me, except for: > > > - char name[UNLEN + 1] = ""; > > + char name[UNLEN > 127 ? UNLEN + 1 : 128] = ""; > > Huh? Why that? UNLEN is defined as 256 in lmcons.h so I don't understand > the reasoning behind that complexity. > Just being paranoid. "name

Re: Part 2 of Fixing a security hole in mount table.

2003-09-10 Thread Corinna Vinschen
On Wed, Sep 10, 2003 at 09:36:05AM -0400, Pierre A. Humblet wrote: > Corinna Vinschen wrote: > > > > Looks good to me, except for: > > > > > - char name[UNLEN + 1] = ""; > > > + char name[UNLEN > 127 ? UNLEN + 1 : 128] = ""; > > > > Huh? Why that? UNLEN is defined as 256 in lmcons.h so I don

Re: Part 2 of Fixing a security hole in mount table.

2003-09-10 Thread Pierre A. Humblet
Corinna Vinschen wrote: > > On Wed, Sep 10, 2003 at 09:36:05AM -0400, Pierre A. Humblet wrote: > > Corinna Vinschen wrote: > > > > > > Looks good to me, except for: > > > > > > > - char name[UNLEN + 1] = ""; > > > > + char name[UNLEN > 127 ? UNLEN + 1 : 128] = ""; > > > > > > Huh? Why that? UN

Re: Part 2 of Fixing a security hole in mount table.

2003-09-10 Thread Corinna Vinschen
On Wed, Sep 10, 2003 at 12:50:34PM -0400, Pierre A. Humblet wrote: > Corinna Vinschen wrote: > > > > On Wed, Sep 10, 2003 at 09:36:05AM -0400, Pierre A. Humblet wrote: > > > Corinna Vinschen wrote: > > > > > > > > Looks good to me, except for: > > > > > > > > > - char name[UNLEN + 1] = ""; > > >

Re: Part 2 of Fixing a security hole in mount table.

2003-09-10 Thread Christopher Faylor
On Wed, Sep 10, 2003 at 09:15:51PM +0200, Corinna Vinschen wrote: >On Wed, Sep 10, 2003 at 12:50:34PM -0400, Pierre A. Humblet wrote: >> OK, do you want to change that back and check it in? >> Otherwise I will do it tonight. > >Just do it tonight. I'll check it in now. I'm generating a snapshot