• John Johansen's avatar
    Remove redundant check from proc_sys_setattr() · 9d0633cf
    John Johansen authored
    
    
    notify_change() already calls security_inode_setattr() before
    calling iop->setattr.
    
    Alan sayeth
    
      This is a behaviour change on all of these and limits some behaviour of
      existing established security modules
    
      When inode_change_ok is called it has side effects.  This includes
      clearing the SGID bit on attribute changes caused by chmod.  If you make
      this change the results of some rulesets may be different before or after
      the change is made.
    
      I'm not saying the change is wrong but it does change behaviour so that
      needs looking at closely (ditto all other attribute twiddles)
    Signed-off-by: default avatarSteve Beattie <sbeattie@suse.de>
    Signed-off-by: default avatarAndreas Gruenbacher <agruen@suse.de>
    Signed-off-by: default avatarJohn Johansen <jjohansen@suse.de>
    Acked-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
    Cc: James Morris <jmorris@namei.org>
    Cc: Chris Wright <chrisw@sous-sol.org>
    Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
    Cc: Christoph Hellwig <hch@lst.de>
    Signed-off-by: Andrew Morton <ak...
    9d0633cf
proc_sysctl.c 10.8 KB