• Torben Hohn's avatar
    posix-clocks: Check write permissions in posix syscalls · 6e6823d1
    Torben Hohn authored
    pc_clock_settime() and pc_clock_adjtime() do not check whether the fd
    was opened in write mode, so a clock can be set with a read only fd.
    
    [ tglx: We deliberately do not return -EPERM as we want this to be
      	distingushable from the capability based permission check ]
    Signed-off-by: default avatarTorben Hohn <torbenh@gmx.de>
    LKML-Reference: <1299173174-348-4-git-send-email-torbenh@gmx.de>
    Cc: Richard Cochran <richard.cochran@omicron.at>
    Cc: John Stultz <johnstul@us.ibm.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    6e6823d1
posix-clock.c 8.48 KB