Commit:     9d013d3b14f4c81bdfe6c81fc506037d60007036
Parent:     06c65eb45578c52d1bc69d044239646d4c90e7ea
Author:     Bryan Kadzban <[EMAIL PROTECTED]>
AuthorDate: Tue Oct 16 01:28:23 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Oct 16 09:43:13 2007 -0700

    rtc: allow validated RTC_PIE_ON for non-root
    drivers/char/rtc.c allowed RTC_PIE_ON ioctls for non-root users, as long as
    the current interval (set via RTC_IRQP_SET) is <= max_user_freq.  Allow
    RTC_PIE_ON under the same conditions when /dev/rtc* is handled by the rtc
    Signed-off-by: Bryan Kadzban <[EMAIL PROTECTED]>
    Acked-by: Alessandro Zummo <[EMAIL PROTECTED]>
    Cc: David Brownell <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 drivers/rtc/rtc-dev.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/rtc/rtc-dev.c b/drivers/rtc/rtc-dev.c
index 87d4add..814583b 100644
--- a/drivers/rtc/rtc-dev.c
+++ b/drivers/rtc/rtc-dev.c
@@ -233,7 +233,8 @@ static int rtc_dev_ioctl(struct inode *inode, struct file 
        case RTC_PIE_ON:
-               if (!capable(CAP_SYS_RESOURCE))
+               if (rtc->irq_freq > rtc->max_user_freq &&
+                               !capable(CAP_SYS_RESOURCE))
                        return -EACCES;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to