Re: SECURE_FD OpenWall LSM Patch

From: Seth Arnold (sarnoldat_private)
Date: Wed Nov 21 2001 - 11:03:25 PST

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

    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"? :)
    
    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 - 14:45:51 PST