Bug 15196 - O_APPEND not translated to FILE_APPEND_DATA open flag
Summary: O_APPEND not translated to FILE_APPEND_DATA open flag
Status: NEW
Alias: None
Product: CifsVFS
Classification: Unclassified
Component: kernel fs (show other bugs)
Version: 5.x
Hardware: All All
: P5 normal
Target Milestone: ---
Assignee: Steve French
QA Contact: cifs QA contact
Depends on:
Reported: 2022-10-09 01:20 UTC by Björn Jacke
Modified: 2023-11-28 16:53 UTC (History)
2 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Björn Jacke 2022-10-09 01:20:23 UTC
While testing the "append data" ACL permission, I wantted to try this out with cifs vfs against a Windows 10 machine as server.

"tee -a" is using O_APPEND but it looks like cifs vfs is not translating O_APPEND open calls to SMB's FILE_APPEND_DATA. So files that have "append only" permission but not "write data" permission will not be "append writable" by cifs vfs  in cases where they shold.
Comment 1 Christian Ambach 2023-11-28 16:53:49 UTC
O_APPEND is not looked at by the Linux kernel yet, see https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/smb/client/file.c#n374

Let's see if I can change this and make it my first Linux kernel contribution.