From 7518d31d5061f7a8b048df912776e1fdc0dc14f0 Mon Sep 17 00:00:00 2001 From: dzogin Date: Fri, 13 Nov 2009 22:47:51 +0000 Subject: [PATCH] Branch b1_8 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 | 5 +++++ lustre/obdclass/linux/linux-module.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lustre/ChangeLog b/lustre/ChangeLog index 0fb42fe..62743cc 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -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 diff --git a/lustre/obdclass/linux/linux-module.c b/lustre/obdclass/linux/linux-module.c index dc3ff63..f81414d 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 (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); -- 1.8.3.1