SELinux-Refpolicy Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] Add interface ssh_search_dir
@ 2019-06-18 12:08 Alexander Miroshnichenko
  2019-06-20 13:23 ` Alexander Miroshnichenko
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Miroshnichenko @ 2019-06-18 12:08 UTC (permalink / raw)
  To: selinux-refpolicy; +Cc: Alexander Miroshnichenko

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

Signed-off-by: Alexander Miroshnichenko <alex@millerson.name>
---
 policy/modules/services/ssh.if | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/policy/modules/services/ssh.if b/policy/modules/services/ssh.if
index b5bd2762ef96..7eb1cee2ef76 100644
--- a/policy/modules/services/ssh.if
+++ b/policy/modules/services/ssh.if
@@ -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
-- 
2.21.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Add interface ssh_search_dir
  2019-06-18 12:08 [PATCH] Add interface ssh_search_dir Alexander Miroshnichenko
@ 2019-06-20 13:23 ` Alexander Miroshnichenko
  0 siblings, 0 replies; 2+ messages in thread
From: Alexander Miroshnichenko @ 2019-06-20 13:23 UTC (permalink / raw)
  To: selinux-refpolicy

Do not merge this patch, please. I will update it soon.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-18 12:08 [PATCH] Add interface ssh_search_dir Alexander Miroshnichenko
2019-06-20 13:23 ` Alexander Miroshnichenko

SELinux-Refpolicy Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/selinux-refpolicy/0 selinux-refpolicy/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 selinux-refpolicy selinux-refpolicy/ https://lore.kernel.org/selinux-refpolicy \
		selinux-refpolicy@vger.kernel.org selinux-refpolicy@archiver.kernel.org
	public-inbox-index selinux-refpolicy

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.selinux-refpolicy


AGPL code for this site: git clone https://public-inbox.org/ public-inbox