All of lore.kernel.org
 help / color / mirror / Atom feed
* utimensat EACCES vs. EPERM in 4.8+
@ 2017-01-16 15:46 ` Jan Stancek
  0 siblings, 0 replies; 34+ messages in thread
From: Jan Stancek @ 2017-01-16 15:46 UTC (permalink / raw)
  To: linux-fsdevel
  Cc: jstancek, viro, guaneryu, mszeredi, Cyril Hrubis, ltp, mtk.manpages

Hi,

we seem to have a conflict between kernel and man pages.
>From utimensat man page:

EACCES times is NULL, or both tv_nsec values are UTIME_NOW, and either:
       *  the effective user ID of the caller does not match the owner of the
          file, the caller does not  have  write  access  to  the file, and the
          caller is not privileged (Linux: does not have either the CAP_FOWNER
          or the CAP_DAC_OVERRIDE capability); or,
       *  the file is marked immutable (see chattr(1)).

But following 2 commits gradually replaced EACCES with EPERM.

commit 337684a1746f93ae107e05d90977b070bb7e39d8
Author: Eryu Guan <guaneryu@gmail.com>
Date:   Tue Aug 2 19:58:28 2016 +0800
    fs: return EPERM on immutable inode

commit f2b20f6ee842313a0d681dbbf7f87b70291a6a3b
Author: Miklos Szeredi <mszeredi@redhat.com>
Date:   Fri Sep 16 12:44:20 2016 +0200
    vfs: move permission checking into notify_change() for utimes(NULL)

4.9 kernel and simple touch on immutable file gives me:
utimensat(AT_FDCWD, "afile", NULL, 0)   = -1 EPERM (Operation not permitted)

while an older kernel it gives me:
utimensat(AT_FDCWD, "afile", NULL, 0)   = -1 EACCES (Permission denied)

Do we need to update man page or fix kernel back to return EACCES?

Thanks,
Jan

^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2017-01-31 12:25 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-16 15:46 utimensat EACCES vs. EPERM in 4.8+ Jan Stancek
2017-01-16 15:46 ` [LTP] " Jan Stancek
2017-01-16 15:53 ` Miklos Szeredi
2017-01-16 15:53   ` [LTP] " Miklos Szeredi
2017-01-17  0:04   ` Michael Kerrisk (man-pages)
2017-01-17  0:04     ` [LTP] " Michael Kerrisk
2017-01-17  4:50     ` Carlos O'Donell
2017-01-17  4:50       ` [LTP] " Carlos O'Donell
2017-01-17  4:50       ` Carlos O'Donell
2017-01-17  7:51     ` Jan Stancek
2017-01-17  7:51       ` [LTP] " Jan Stancek
2017-01-17  7:51       ` Jan Stancek
2017-01-17  7:57       ` Cyril Hrubis
2017-01-17  7:57         ` [LTP] " Cyril Hrubis
2017-01-17  9:39         ` Miklos Szeredi
2017-01-17  9:39           ` [LTP] " Miklos Szeredi
2017-01-17  9:39           ` Miklos Szeredi
2017-01-17 15:43           ` Cyril Hrubis
2017-01-17 15:43             ` [LTP] " Cyril Hrubis
2017-01-17 15:43             ` Cyril Hrubis
2017-01-18  8:23           ` Michael Kerrisk (man-pages)
2017-01-18  8:23             ` [LTP] " Michael Kerrisk
2017-01-18  8:23             ` Michael Kerrisk (man-pages)
2017-01-31 12:09             ` Cyril Hrubis
2017-01-31 12:09               ` [LTP] " Cyril Hrubis
2017-01-31 12:09               ` Cyril Hrubis
2017-01-17  4:41 ` Theodore Ts'o
2017-01-17  4:41   ` [LTP] " Theodore Ts'o
2017-01-17 19:35   ` J. Bruce Fields
2017-01-17 19:35     ` [LTP] " J. Bruce Fields
2017-01-17 21:04     ` Theodore Ts'o
2017-01-17 21:04       ` [LTP] " Theodore Ts'o
2017-01-18  8:17       ` Michael Kerrisk (man-pages)
2017-01-18  8:17         ` [LTP] " Michael Kerrisk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.