Whamcloud - gitweb
Branch b1_8
authordzogin <dzogin>
Fri, 13 Nov 2009 22:47:51 +0000 (22:47 +0000)
committerdzogin <dzogin>
Fri, 13 Nov 2009 22:47:51 +0000 (22:47 +0000)
 b=21259
 i=andrew.perepechko
 i=alexey.lyashkov
----------------------------------------------------------------------
 Modified Files:
  Tag: b1_8
  lustre/ChangeLog lustre/obdclass/linux/linux-module.c
----------------------------------------------------------------------
Details : Allow non-root access for "lfs check".

lustre/ChangeLog
lustre/obdclass/linux/linux-module.c

index 0fb42fe..62743cc 100644 (file)
@@ -10,6 +10,11 @@ tbd Sun Microsystems, Inc.
          2.6.16 - 2.6.30 vanilla (kernel.org)
        * Recommended e2fsprogs version: 1.41.6.sun1
 
+Severity   : normal
+Bugzilla   : 21259
+Description: Allow non-root access for "lfs check".
+Details    : Added a check in obd_class_ioctl() for OBD_IOC_PING_TARGET.
+
 Severity   : enhancement
 Bugzilla   : 20773
 Description: Update kernel to RHEL5.4 2.6.18-164.6.1.el5 and
index dc3ff63..f81414d 100644 (file)
@@ -204,7 +204,8 @@ static int obd_class_ioctl(struct inode *inode, struct file *filp,
         int err = 0;
         ENTRY;
 
-        if (cfs_curproc_fsuid() != 0)
+        /* Allow non-root access for OBD_IOC_PING_TARGET - used by lfs check */
+        if (!cfs_capable(CFS_CAP_SYS_ADMIN) && (cmd != OBD_IOC_PING_TARGET))
                 RETURN(err = -EACCES);
         if ((cmd & 0xffffff00) == ((int)'T') << 8) /* ignore all tty ioctls */
                 RETURN(err = -ENOTTY);