Re: SECURE_FD OpenWall LSM Patch

From: Nick Bellinger (nickbat_private)
Date: Wed Nov 21 2001 - 21:07:27 PST

  • Next message: Nick Bellinger: "Re: SECURE_FD OpenWall LSM Patch"

    On Wed, 2001-11-21 at 12:03, Seth Arnold wrote:
    > On Tue, Nov 20, 2001 at 06:48:15PM -0700, Nick Bellinger wrote:
    > 
    > Nick, this is great. :) Many thanks to you, Emily, and Richard. ("Mr
    > Offer" :)
    > 
    > I am a little curious if the following is a typo, or if this is really
    > what is intended:
    > 
    > > +static void do_owlsm_binprm_free_security(struct linux_binprm *bprm)
    > > +{
    > > +       int i;
    > > +       struct secure_fds *s_fds = ( struct secure_fds *)
    > > &bprm->security;
    > > +
    > > +       if (s_fds->fd_mask) {
    > > +               for (i = 0; i <= 2; i++) {
    > > +                       if ( s_fds->fd_mask & ( 1 << 1 ))
    >                                                  ~~~~~~~~
    > > +                               (void) sys_close(i);
    > > +               }
    > > +       }
    > > +
    > > +       kfree(bprm->security);
    > > +
    > > +}
    > 
    > Should that read: "1 << i" ? If it really *does* mean to read "1 << 1",
    > would the code be cleaner to just use "2"? :)
    > 
    
    
    Woops,  chalk that one up to poor eyesight.
    
    
    > Thanks again. :)
    > 
    > -- 
    > The Bill of Rights: 7 out of 10 rights haven't been sold yet! Contact
    > your congressman for details how *you* can buy one today!
    
    
    
    
    _______________________________________________
    linux-security-module mailing list
    linux-security-moduleat_private
    http://mail.wirex.com/mailman/listinfo/linux-security-module
    



    This archive was generated by hypermail 2b30 : Wed Nov 21 2001 - 22:10:54 PST