Skip to content

Commit 311d943

Browse files
igawchucklever
authored andcommitted
tlshd: always link .nvme default keyring into the session
A common use case for tlshd is to authenticate TLS sessions for the nvme subsystem. Currently, the user has to explicitly list a keyring (even the defautl one) in the configuration file so that tlshd running as daemon (started via systemd) to find any key. Thus always link the default .nvme keyring into the current session, which makes the daemon work out of the box for default configurations. Signed-off-by: Daniel Wagner <[email protected]>
1 parent 236756a commit 311d943

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/tlshd/config.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,17 @@ bool tlshd_config_init(const gchar *pathname)
9191
"keyrings", &length, NULL);
9292
if (keyrings) {
9393
for (i = 0; i < length; i++) {
94+
if (!strcmp(keyrings[i], ".nvme"))
95+
continue;
9496
tlshd_keyring_link_session(keyrings[i]);
9597
}
9698
g_strfreev(keyrings);
9799
}
100+
/*
101+
* Always link the default nvme subsystem keyring into the
102+
* session.
103+
*/
104+
tlshd_keyring_link_session(".nvme");
98105

99106
return true;
100107
}

0 commit comments

Comments
 (0)