1. 19 Nov, 2002 2 commits
    • Patrick Mochel's avatar
      sysfs: do permission checking on open. · 0de8c962
      Patrick Mochel authored
      sysfs has always had a bug that would allow a read-only file to be opened 
      for writing. It has also returned 0 on write when there was no store method
      defined for the file. 
      
      This addresses both via sysfs_open_file(). It checks the flags the file was
      opened with and compares them with the mode of the inode. If the mode does
      not support the flags passed, -EPERM is returned.
      
      If the sysfs_ops for the object does not have the correct method for the 
      flags, -EACCESS is returned. 
      
      Since all checks happen on open(), the corresponding checks in the read()
      and write() methods have been removed. 
      0de8c962
    • Patrick Mochel's avatar
      Merge osdl.org:/home/mochel/src/kernel/devel/linux-2.5-virgin · bb4be78a
      Patrick Mochel authored
      into osdl.org:/home/mochel/src/kernel/devel/linux-2.5-kobject
      bb4be78a
  2. 18 Nov, 2002 38 commits