Skip to contentSkip to conversation

Add interface ssh_search_dir

PATCH In review Alexander Miroshnichenko 1 participant 2 messages Jun 18, 2019 – Jun 20, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add interface ssh_search_dir

Create interface ssh_search_dir to allow ssh_server search for keys in non-standard location.

---
 policy/modules/services/ssh.if | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
policy/modules/services/ssh.if +18 -0
index b5bd2762ef96..7eb1cee2ef76 100644
@@ -680,6 +680,24 @@ interface(`ssh_agent_exec',`
 	can_exec($1, ssh_agent_exec_t)
 ')
 
+########################################
+## <summary>
+##      Search for keys in non-standard location
+## </summary>
+## <param name="domain">
+##      <summary>
+##      Domain allowed access.
+##      </summary>
+## </param>
+#
+interface(`ssh_search_dir',`
+        gen_require(`
+                type sshd_t;
+        ')
+
+        search_dirs_pattern(sshd_t, $1, $2)
+')
+
 ########################################
 ## <summary>
 ##	Read ssh home directory content
Signature · 1 line
2.21.0