1.1 --- a/libfsserver/lib/files/ext2_file_opener.cc Tue Feb 08 00:03:32 2022 +0100
1.2 +++ b/libfsserver/lib/files/ext2_file_opener.cc Wed Feb 09 22:30:29 2022 +0100
1.3 @@ -1,7 +1,7 @@
1.4 /*
1.5 * An opener for a file provided by an Ext2-compatible filesystem.
1.6 *
1.7 - * Copyright (C) 2021 Paul Boddie <paul@boddie.org.uk>
1.8 + * Copyright (C) 2021, 2022 Paul Boddie <paul@boddie.org.uk>
1.9 *
1.10 * This program is free software; you can redistribute it and/or
1.11 * modify it under the terms of the GNU General Public License as
1.12 @@ -64,6 +64,9 @@
1.13
1.14 if (!err)
1.15 {
1.16 + if (!_ops->can_access(_user, flags, ino))
1.17 + return -L4_EPERM;
1.18 +
1.19 *fileid = (fileid_t) ino;
1.20 return L4_EOK;
1.21 }