Re: [PATCH v3 13/22] smb: move file access permission bits definitions to common/cifspdu.h

ChenXiaoSong
2025-10-22T05:56:01Z

Should we move all file access permission bit definitions to
common/cifspdu.h?

Perhaps in the future we can change them to be the same.

On 10/20/25 1:27 PM, Namjae Jeon wrote:
>> +
>> +#define CLIENT_SET_FILE_READ_RIGHTS (FILE_READ_DATA | FILE_READ_EA | FILE_WRITE_EA \
>> + | FILE_READ_ATTRIBUTES \
>> + | FILE_WRITE_ATTRIBUTES \
>> + | DELETE | READ_CONTROL | WRITE_DAC \
>> + | WRITE_OWNER | SYNCHRONIZE)
>> +#define SERVER_SET_FILE_READ_RIGHTS (FILE_READ_DATA | FILE_READ_EA \
>> + | FILE_READ_ATTRIBUTES \
>> + | DELETE | READ_CONTROL | WRITE_DAC \
>> + | WRITE_OWNER | SYNCHRONIZE)
>> +#define CLIENT_SET_FILE_WRITE_RIGHTS (FILE_WRITE_DATA | FILE_APPEND_DATA \
>> + | FILE_READ_EA | FILE_WRITE_EA \
>> + | FILE_READ_ATTRIBUTES \
>> + | FILE_WRITE_ATTRIBUTES \
>> + | DELETE | READ_CONTROL | WRITE_DAC \
>> + | WRITE_OWNER | SYNCHRONIZE)
>> +#define SERVER_SET_FILE_WRITE_RIGHTS (FILE_WRITE_DATA | FILE_APPEND_DATA \
>> + | FILE_WRITE_EA \
>> + | FILE_DELETE_CHILD \
>> + | FILE_WRITE_ATTRIBUTES \
>> + | DELETE | READ_CONTROL | WRITE_DAC \
>> + | WRITE_OWNER | SYNCHRONIZE)
> What's the reason for moving it if the smb client and server don't share it?

--
Thanks,
ChenXiaoSong.