This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / arch / ppc64 / kernel / time.c
index aea2c5c..ef44a3e 100644 (file)
@@ -49,7 +49,6 @@
 #include <linux/init.h>
 #include <linux/profile.h>
 #include <linux/cpu.h>
-#include <linux/security.h>
 
 #include <asm/segment.h>
 #include <asm/io.h>
@@ -278,9 +277,6 @@ int timer_interrupt(struct pt_regs * regs)
                        write_seqlock(&xtime_lock);
                        tb_last_stamp = lpaca->next_jiffy_update_tb;
                        do_timer(regs);
-#ifndef CONFIG_SMP
-                       update_process_times(user_mode(regs));
-#endif
                        timer_sync_xtime( cur_tb );
                        timer_check_rtc();
                        write_sequnlock(&xtime_lock);
@@ -435,7 +431,9 @@ long ppc64_sys32_stime(int __user * tptr)
 {
        int value;
        struct timespec myTimeval;
-       int err;
+
+       if (!capable(CAP_SYS_TIME))
+               return -EPERM;
 
        if (get_user(value, tptr))
                return -EFAULT;
@@ -443,10 +441,6 @@ long ppc64_sys32_stime(int __user * tptr)
        myTimeval.tv_sec = value;
        myTimeval.tv_nsec = 0;
 
-       err = security_settime(&myTimeval, NULL);
-       if (err)
-               return err;
-
        do_settimeofday(&myTimeval);
 
        return 0;
@@ -462,7 +456,9 @@ long ppc64_sys_stime(long __user * tptr)
 {
        long value;
        struct timespec myTimeval;
-       int err;
+
+       if (!capable(CAP_SYS_TIME))
+               return -EPERM;
 
        if (get_user(value, tptr))
                return -EFAULT;
@@ -470,10 +466,6 @@ long ppc64_sys_stime(long __user * tptr)
        myTimeval.tv_sec = value;
        myTimeval.tv_nsec = 0;
 
-       err = security_settime(&myTimeval, NULL);
-       if (err)
-               return err;
-
        do_settimeofday(&myTimeval);
 
        return 0;