paul@144 | 1 | /* |
paul@144 | 2 | * A resource supporting the creation of user-specific ext2 filesystem opener |
paul@144 | 3 | * resources. |
paul@144 | 4 | * |
paul@144 | 5 | * Copyright (C) 2021 Paul Boddie <paul@boddie.org.uk> |
paul@144 | 6 | * |
paul@144 | 7 | * This program is free software; you can redistribute it and/or |
paul@144 | 8 | * modify it under the terms of the GNU General Public License as |
paul@144 | 9 | * published by the Free Software Foundation; either version 2 of |
paul@144 | 10 | * the License, or (at your option) any later version. |
paul@144 | 11 | * |
paul@144 | 12 | * This program is distributed in the hope that it will be useful, |
paul@144 | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
paul@144 | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
paul@144 | 15 | * GNU General Public License for more details. |
paul@144 | 16 | * |
paul@144 | 17 | * You should have received a copy of the GNU General Public License |
paul@144 | 18 | * along with this program; if not, write to the Free Software |
paul@144 | 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, |
paul@144 | 20 | * Boston, MA 02110-1301, USA |
paul@144 | 21 | */ |
paul@144 | 22 | |
paul@144 | 23 | #pragma once |
paul@144 | 24 | |
paul@144 | 25 | #include <ext2fs/ext2fs.h> |
paul@144 | 26 | |
paul@148 | 27 | #include <fsserver/ext2_file_operations.h> |
paul@144 | 28 | #include <fsserver/filesystem_resource.h> |
paul@144 | 29 | |
paul@144 | 30 | |
paul@144 | 31 | |
paul@144 | 32 | /* Support for providing access to user-specific filesystems. */ |
paul@144 | 33 | |
paul@144 | 34 | class Ext2Filesystem : public FilesystemResource |
paul@144 | 35 | { |
paul@144 | 36 | protected: |
paul@148 | 37 | Ext2FileOperations *_ops; |
paul@144 | 38 | |
paul@144 | 39 | public: |
paul@148 | 40 | explicit Ext2Filesystem(Pages *pages, ext2_filsys fs); |
paul@148 | 41 | |
paul@148 | 42 | virtual ~Ext2Filesystem(); |
paul@144 | 43 | |
paul@144 | 44 | /* Filesystem interface methods. */ |
paul@144 | 45 | |
paul@144 | 46 | virtual long open_for_user(sys_uid_t uid, sys_gid_t gid, sys_mode_t umask, |
paul@144 | 47 | l4_cap_idx_t *opener); |
paul@144 | 48 | }; |
paul@144 | 49 | |
paul@144 | 50 | // vim: tabstop=4 expandtab shiftwidth=4 |