summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorRichard Cochran <richard.cochran@omicron.at>2011-02-01 13:50:58 +0000
committerThomas Gleixner <tglx@linutronix.de>2011-02-02 15:28:11 +0100
commit1e6d767924c74929c0cfe839ae8f37bcee9e544e (patch)
tree4ace06971e2b3519e556bea2f7e3e999e860eedd /security
parent7cf37e87dd2cfa17a64f28ea7f31eed4525f79e4 (diff)
downloadlinux-3.10-1e6d767924c74929c0cfe839ae8f37bcee9e544e.tar.gz
linux-3.10-1e6d767924c74929c0cfe839ae8f37bcee9e544e.tar.bz2
linux-3.10-1e6d767924c74929c0cfe839ae8f37bcee9e544e.zip
time: Correct the *settime* parameters
Both settimeofday() and clock_settime() promise with a 'const' attribute not to alter the arguments passed in. This patch adds the missing 'const' attribute into the various kernel functions implementing these calls. Signed-off-by: Richard Cochran <richard.cochran@omicron.at> Acked-by: John Stultz <johnstul@us.ibm.com> LKML-Reference: <20110201134417.545698637@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'security')
-rw-r--r--security/commoncap.c2
-rw-r--r--security/security.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/security/commoncap.c b/security/commoncap.c
index 64c2ed9c901..dbfdaed4cc6 100644
--- a/security/commoncap.c
+++ b/security/commoncap.c
@@ -93,7 +93,7 @@ int cap_capable(struct task_struct *tsk, const struct cred *cred, int cap,
* Determine whether the current process may set the system clock and timezone
* information, returning 0 if permission granted, -ve if denied.
*/
-int cap_settime(struct timespec *ts, struct timezone *tz)
+int cap_settime(const struct timespec *ts, const struct timezone *tz)
{
if (!capable(CAP_SYS_TIME))
return -EPERM;
diff --git a/security/security.c b/security/security.c
index 739e40362f4..b995428f1c9 100644
--- a/security/security.c
+++ b/security/security.c
@@ -202,7 +202,7 @@ int security_syslog(int type)
return security_ops->syslog(type);
}
-int security_settime(struct timespec *ts, struct timezone *tz)
+int security_settime(const struct timespec *ts, const struct timezone *tz)
{
return security_ops->settime(ts, tz);
}