From: Richard Cochran Date: Mon, 4 Apr 2011 15:31:23 +0000 (-0700) Subject: ntp: fix non privileged system time shifting X-Git-Tag: v2.6.39-rc2~27 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4352d9d44b935e4d000be6ec89ddb55c2bf35f24;p=pandora-kernel.git ntp: fix non privileged system time shifting The ADJ_SETOFFSET bit added in commit 094aa188 ("ntp: Add ADJ_SETOFFSET mode bit") also introduced a way for any user to change the system time. Sneaky or buggy calls to adjtimex() could set ADJ_OFFSET_SS_READ | ADJ_SETOFFSET which would result in a successful call to timekeeping_inject_offset(). This patch fixes the issue by adding the capability check. Signed-off-by: Richard Cochran Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed