Project

General

Profile

Actions

Bug #2817

closed

Submit #2818: Add utimensat() support

Permission checking for utimes(2) and friends are not properly honoured

Added by stateless over 9 years ago. Updated over 5 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Kernel
Target version:
-
Start date:
05/21/2015
Due date:
% Done:

0%

Estimated time:

Description

Changing the access and modification times of a file to anything other than
the current time can only be done by the owner of the file or the super-user as per
POSIX.

At present it is possible to do so just by having write access to the file.

A simple example follows:

touch foo; chown root:user foo; chmod 664 foo; touch -t 200805101024 foo

The last operation should normally fail.

I noticed this as part of my work on adding support for utimensat(). I believe
the fix can be consolidated outside of the implementation of the utimes/utimensat
system calls.

Actions

Also available in: Atom PDF