All of lore.kernel.org
 help / color / mirror / Atom feed
* [refpolicy] [PATCH 1/2] Add fcontext for sshd pidfile and directory used for privsep
@ 2014-02-05 21:23 Laurent Bigonville
  2014-02-05 21:23 ` [refpolicy] [PATCH 2/2] Move the ifdef at the end of the declaration block Laurent Bigonville
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Laurent Bigonville @ 2014-02-05 21:23 UTC (permalink / raw)
  To: refpolicy

From: Laurent Bigonville <bigon@bigon.be>

Also allow sshd_t domain to chroot(2) in this directory as explained in
the README.privsep file in the openssh tarball.

Thanks to Russell Coker for this patch
---
 policy/modules/services/ssh.fc | 2 ++
 policy/modules/services/ssh.if | 1 +
 2 files changed, 3 insertions(+)

diff --git a/policy/modules/services/ssh.fc b/policy/modules/services/ssh.fc
index 76d9f66..8168244 100644
--- a/policy/modules/services/ssh.fc
+++ b/policy/modules/services/ssh.fc
@@ -13,4 +13,6 @@ HOME_DIR/\.ssh(/.*)?			gen_context(system_u:object_r:ssh_home_t,s0)
 
 /usr/sbin/sshd			--	gen_context(system_u:object_r:sshd_exec_t,s0)
 
+/var/run/sshd(/.*)?			gen_context(system_u:object_r:sshd_var_run_t,s0)
 /var/run/sshd\.init\.pid	--	gen_context(system_u:object_r:sshd_var_run_t,s0)
+/var/run/sshd\.pid		--	gen_context(system_u:object_r:sshd_var_run_t,s0)
diff --git a/policy/modules/services/ssh.if b/policy/modules/services/ssh.if
index fe0c682..48eb1c8 100644
--- a/policy/modules/services/ssh.if
+++ b/policy/modules/services/ssh.if
@@ -196,6 +196,7 @@ template(`ssh_server_template', `
 	manage_files_pattern($1_t, $1_tmpfs_t, $1_tmpfs_t)
 	fs_tmpfs_filetrans($1_t, $1_tmpfs_t, file)
 
+	allow $1_t $1_var_run_t:dir search_dir_perms;
 	allow $1_t $1_var_run_t:file manage_file_perms;
 	files_pid_filetrans($1_t, $1_var_run_t, file)
 
-- 
1.9.rc1

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

end of thread, other threads:[~2014-02-06 14:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-05 21:23 [refpolicy] [PATCH 1/2] Add fcontext for sshd pidfile and directory used for privsep Laurent Bigonville
2014-02-05 21:23 ` [refpolicy] [PATCH 2/2] Move the ifdef at the end of the declaration block Laurent Bigonville
2014-02-06 14:03   ` Christopher J. PeBenito
2014-02-06 11:57 ` [refpolicy] [PATCH 1/2] Add fcontext for sshd pidfile and directory used for privsep Laurent Bigonville
2014-02-06 14:03   ` Christopher J. PeBenito
2014-02-06 14:03 ` Christopher J. PeBenito

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.