Skip to content
This repository was archived by the owner on Oct 31, 2024. It is now read-only.

Commit 30fe2a8

Browse files
namjaejeongregkh
authored andcommittedOct 4, 2024
ksmbd: allow write with FILE_APPEND_DATA
commit 2fb9b5d upstream. Windows client write with FILE_APPEND_DATA when using git. ksmbd should allow write it with this flags. Z:\test>git commit -m "test" fatal: cannot update the ref 'HEAD': unable to append to '.git/logs/HEAD': Bad file descriptor Fixes: 0626e66 ("cifsd: add server handler for central processing and tranport layers") Cc: stable@vger.kernel.org # v5.15+ Signed-off-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Steve French <stfrench@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 3c1fd66 commit 30fe2a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎fs/smb/server/vfs.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ int ksmbd_vfs_write(struct ksmbd_work *work, struct ksmbd_file *fp,
496496
int err = 0;
497497

498498
if (work->conn->connection_type) {
499-
if (!(fp->daccess & FILE_WRITE_DATA_LE)) {
499+
if (!(fp->daccess & (FILE_WRITE_DATA_LE | FILE_APPEND_DATA_LE))) {
500500
pr_err("no right to write(%pD)\n", fp->filp);
501501
err = -EACCES;
502502
goto out;

0 commit comments

Comments
 (0)