-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow setting user for all modules and capabilities per module
When setting system_user="myuser" property under settings in a config file all modules are started as this user and its default gid. After starting all modules the manager also switches to this user. For each module, special Linux capabilities can be specified with e.g. capabilities: "cap_chown+ep" in the module section. The manager will need to start as root or sufficient capabilities to do that. If no user/capabilities are specified no change happens. Implementation changes - using SECBITS_KEEP_CAP in order to keep capabilities, when changing real user id - using ambient capability set, in order to keep capabilities, when execve'ing - changed name from 'system_user' to 'run_as_user' - changed schema for capabilities in config file from string to array of strings - dropped 'run_as_user' from ModuleStartInfo, could be added back, when configuration is possible - known bugs: - incomplete error handling, when setting of capabilities fails - manager process doesn't change user yet (otherwise restarting of modules won't work), should use effective user id here - controller process doesn't get terminated, when forking process fails due to permission problems Signed-off-by: aw <aw@pionix.de> Signed-off-by: Cornelius Claussen <cc@pionix.de>
- Loading branch information
1 parent
3887a64
commit 1237657
Showing
9 changed files
with
401 additions
and
119 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
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
Oops, something went wrong.