Miklos Szeredi b3b4283f7e vfs: move permission checking into notify_change() for utimes(NULL)
commit f2b20f6ee842313a0d681dbbf7f87b70291a6a3b upstream.

This fixes a bug where the permission was not properly checked in
overlayfs.  The testcase is ltp/utimensat01.

It is also cleaner and safer to do the permission checking in the vfs
helper instead of the caller.

This patch introduces an additional ia_valid flag ATTR_TOUCH (since
touch(1) is the most obvious user of utimes(NULL)) that is passed into
notify_change whenever the conditions for this special permission checking
mode are met.

Reported-by: Aihua Zhang <zhangaihua1@huawei.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Tested-by: Aihua Zhang <zhangaihua1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-22 12:26:56 +02:00
..
2016-08-10 11:49:27 +02:00
2016-10-22 12:26:56 +02:00
2016-10-22 12:26:55 +02:00
2016-08-20 18:09:20 +02:00
2016-09-15 08:27:52 +02:00
2016-09-24 10:07:36 +02:00
2015-11-13 20:34:33 -05:00
2015-11-23 21:11:08 -05:00
2016-10-07 15:23:47 +02:00
2015-11-10 12:07:22 -08:00
2015-11-16 23:54:45 -08:00
2015-11-16 23:54:45 -08:00
2015-08-12 15:28:45 -05:00
2016-08-10 11:49:27 +02:00
2016-05-18 17:06:48 -07:00
2016-07-27 09:47:30 -07:00
2016-09-07 08:32:43 +02:00
2015-11-13 20:34:33 -05:00