aboutsummaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@osdl.org>2006-01-31 21:20:26 -0800
committerChris Wright <chrisw@sous-sol.org>2006-02-09 23:20:06 -0800
commit6eef6ea5bf6794c2d0938ba1c91934229ad9873e (patch)
treed4d63df01b883d1fd717d2ec1bee75df041145eb /security
parente8ef6e326e777417a4287e114751e89444d99082 (diff)
[PATCH] seclvl settime fix
Don't try to "validate" a non-existing timeval. settime() with a NULL timeval is silly but legal. Noticed by Dave Jones <davej@redhat.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org> [chrisw: seclvl only] Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'security')
-rw-r--r--security/seclvl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/seclvl.c b/security/seclvl.c
index 1caac016464..136e8eca361 100644
--- a/security/seclvl.c
+++ b/security/seclvl.c
@@ -369,7 +369,7 @@ static int seclvl_capable(struct task_struct *tsk, int cap)
static int seclvl_settime(struct timespec *tv, struct timezone *tz)
{
struct timespec now;
- if (seclvl > 1) {
+ if (tv && seclvl > 1) {
now = current_kernel_time();
if (tv->tv_sec < now.tv_sec ||
(tv->tv_sec == now.tv_sec && tv->tv_nsec < now.tv_nsec)) {