diff options
author | Lee Duncan <lduncan@suse.com> | 2022-05-16 17:29:30 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-16 17:29:30 -0700 |
commit | 433fad9ddadd62e5edf9597493f32a3b9443cc59 (patch) | |
tree | c3ac5f0733cc34595e970f027e13ac392e5c340a /usr/iscsid.c | |
parent | 9dc06a2a75438907cbac0a1523f4d235d28ab58b (diff) | |
parent | 4b377041ef88f7c683b0a880e937e71a773c2c68 (diff) | |
download | open-iscsi-433fad9ddadd62e5edf9597493f32a3b9443cc59.tar.gz |
Merge pull request #350 from ericwmackay/ipc_auth_uid
Add ability for MGMT IPC to check UID only
Diffstat (limited to 'usr/iscsid.c')
-rw-r--r-- | usr/iscsid.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/usr/iscsid.c b/usr/iscsid.c index d97738c..8441037 100644 --- a/usr/iscsid.c +++ b/usr/iscsid.c @@ -383,6 +383,7 @@ int main(int argc, char *argv[]) char *initiatorname_file = INITIATOR_NAME_FILE; char *pid_file = PID_FILE; char *safe_logout; + char *ipc_auth_uid; int ch, longindex; uid_t uid = 0; struct sigaction sa_old; @@ -583,6 +584,11 @@ int main(int argc, char *argv[]) daemon_config.safe_logout = 1; free(safe_logout); + ipc_auth_uid = cfg_get_string_param(config_file, "iscsid.ipc_auth_uid"); + if (ipc_auth_uid && !strcmp(ipc_auth_uid, "Yes")) + ipc->auth_type = ISCSI_IPC_AUTH_UID; + free(ipc_auth_uid); + /* see if we have any stale sessions to recover */ sessions_to_recover = iscsi_sysfs_count_sessions(); if (sessions_to_recover) { |