From 099273d942f411a06e44643b911274fc34f1fb1e Mon Sep 17 00:00:00 2001 From: dzogin Date: Thu, 10 Dec 2009 13:52:52 +0000 Subject: [PATCH] Branch HEAD b=21259 i=andrew.perepechko i=alexey.lyashkov ---------------------------------------------------------------------- Modified Files: lustre/ChangeLog lustre/obdclass/linux/linux-module.c ---------------------------------------------------------------------- Description: Allow non-root access for "lfs check". Details : Added a check in obd_class_ioctl() for OBD_IOC_PING_TARGET. --- lustre/ChangeLog | 5 +++++ lustre/obdclass/linux/linux-module.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lustre/ChangeLog b/lustre/ChangeLog index 82fd400..7f05170 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -15,6 +15,11 @@ tbd Sun Microsystems, Inc. removed cwd "./" (refer to Bugzilla 14399). 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 : normal Bugzilla : 21513 Description: Clear imp_force_reconnect correctly in ptlrpc_connect_interpret() diff --git a/lustre/obdclass/linux/linux-module.c b/lustre/obdclass/linux/linux-module.c index 520de12..5c7a38d 100644 --- a/lustre/obdclass/linux/linux-module.c +++ b/lustre/obdclass/linux/linux-module.c @@ -204,7 +204,8 @@ static int obd_class_ioctl(struct inode *inode, struct file *filp, int err = 0; ENTRY; - if (current->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); -- 1.8.3.1