diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2022-08-04 12:51:14 -0400 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2022-10-05 01:15:37 -0500 |
commit | c22180a5e2a9e1426fab01d9e54011ec531b1b52 (patch) | |
tree | 0f5f1dd91fca58c1499a67d7184d8bd7c30b29e3 /fs/ksmbd/smbacl.c | |
parent | 369c1634cc7ae8645a5cba4c7eb874755c2a6a07 (diff) | |
download | lwn-c22180a5e2a9e1426fab01d9e54011ec531b1b52.tar.gz lwn-c22180a5e2a9e1426fab01d9e54011ec531b1b52.zip |
ksmbd: constify struct path
... in particular, there should never be a non-const pointers to
any file->f_path.
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/ksmbd/smbacl.c')
-rw-r--r-- | fs/ksmbd/smbacl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/ksmbd/smbacl.c b/fs/ksmbd/smbacl.c index 3781bca2c8fc..85c4de640ed3 100644 --- a/fs/ksmbd/smbacl.c +++ b/fs/ksmbd/smbacl.c @@ -991,7 +991,7 @@ static void smb_set_ace(struct smb_ace *ace, const struct smb_sid *sid, u8 type, } int smb_inherit_dacl(struct ksmbd_conn *conn, - struct path *path, + const struct path *path, unsigned int uid, unsigned int gid) { const struct smb_sid *psid, *creator = NULL; @@ -1185,7 +1185,7 @@ bool smb_inherit_flags(int flags, bool is_dir) return false; } -int smb_check_perm_dacl(struct ksmbd_conn *conn, struct path *path, +int smb_check_perm_dacl(struct ksmbd_conn *conn, const struct path *path, __le32 *pdaccess, int uid) { struct user_namespace *user_ns = mnt_user_ns(path->mnt); @@ -1352,7 +1352,7 @@ err_out: } int set_info_sec(struct ksmbd_conn *conn, struct ksmbd_tree_connect *tcon, - struct path *path, struct smb_ntsd *pntsd, int ntsd_len, + const struct path *path, struct smb_ntsd *pntsd, int ntsd_len, bool type_check) { int rc; |