forked from namjaejeon/ksmbd-tools
-
Notifications
You must be signed in to change notification settings - Fork 28
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 treat global guest as share guest on config reload
When the global guest account is specified in ksmbd.conf and a share guest account is not, the global guest account definition is mistaken for the share guest account definition on config reload. This happens due to the `guest account' global parameter and the `guest account' share parameter having the same name, together with the implemented way share parameter definitions in the global section become the implicit defaults for all shares. Fix this by removing `guest account' from the parameters that are to be applied to all shares. Note that on initial startup, i.e. not on config reload, it is done in global_conf_create(). On both initial startup and config reload, create the global guest account in global_conf_fixup_missing(). This fixes another bug, where the global guest account is not recreated on config reload if both the global guest account and the share guest account are user-given, caused partially also by the first bug identified and fixed here. Finally, add usm_add_guest_account() and use it when needing to add a guest account, whether it be the global one or the share one. Note that it is purposefully identical to usm_add_new_user() when it comes to the use and lifetime of `name'. Also, tweak the debug log message when user already exists in usm_add_new_user() so that it is less ambiguous when seen with the following kill_ksmbd_user() debug log message. Signed-off-by: Atte Heikkilä <[email protected]> Signed-off-by: Namjae Jeon <[email protected]>
- Loading branch information
1 parent
68e8234
commit a09f767
Showing
4 changed files
with
34 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters