Project

General

Profile

Bug #2817

Submit #2818: Add utimensat() support

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

Added by stateless almost 2 years ago. Updated almost 2 years ago.

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

0%


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.

History

#1 Updated by dillon almost 2 years ago

  • Assignee set to dillon
  • Parent task set to #2818

Set parent task to the main submission thread for utimesnsat().

-Matt

Also available in: Atom PDF