Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ksmbd-tools: don't add global default `read only = yes'
Since share parameters are applied in the non-descript hash table iteration order, a share parameter should never undo the effect of an another. For example, `force user' checks `share->force_gid' such that it doesn't undo `force group' applied earlier. However, `read only' does not follow this convention since it may undo `writeable' (and so may its aliases). Since the hash table iteration order is non-descript, this means that a share with `read only = yes' and `writeable = yes' may or may not allow read-write access. With the 3.5.0 release, due to the default global `read only = yes' added in commit 54d2a02, this effect is always in play for shares that give `writeable = yes' (or its aliases) instead of `read only = no'. Fix this by not adding global default `read only = yes'. Note that not setting `KSMBD_SHARE_FLAG_READONLY' for initial shares is fine as it is only used to set `KSMBD_TREE_CONN_FLAG_READ_ONLY' which itself is unused (and was broken until commit 3f88fbe). Note also that the use of the IPC$ share is guarded by checking for `KSMBD_SHARE_FLAG_PIPE'. So if it's given `KSMBD_SHARE_FLAG_WRITEABLE' through the global section or a user-defined section, the code paths for its use should not change. Signed-off-by: Atte Heikkilä <[email protected]> Signed-off-by: Namjae Jeon <[email protected]>
- Loading branch information