All of lore.kernel.org
 help / color / mirror / Atom feed
* rssh.{te,fc}
@ 2003-07-07  4:22 Colin Walters
  2003-07-07 10:14 ` rssh.{te,fc} Russell Coker
  0 siblings, 1 reply; 4+ messages in thread
From: Colin Walters @ 2003-07-07  4:22 UTC (permalink / raw)
  To: SE Linux; +Cc: Russell Coker

[-- Attachment #1: Type: text/plain, Size: 426 bytes --]

I've written a quick rssh.te; this is for the rssh program:
http://pizzashack.org/rssh/

Basically rssh is a restricted shell that just allows people to execute
scp.

This is my first from-scratch .te file, so I'd appreciate if people
could give it a sanity check.  To set this all up, I added another user
(in this case named haskelluser), then added:

user haskelluser roles { rssh_r };

to /etc/selinux/users.  Make sense?

[-- Attachment #2: rssh.te --]
[-- Type: text/plain, Size: 909 bytes --]

#DESC Rssh - Restricted (scp/sftp) only shell
#
# Authors: Colin Walters <walters@verbum.org>
# X-Debian-Package: rssh
#

type rssh_t, domain, privlog, privfd;

role rssh_r types rssh_t;
allow system_r rssh_r;

type rssh_exec_t, file_type, sysadmfile, exec_type;
type rssh_archive_t, file_type, sysadmfile;
type rssh_home_t, file_type, sysadmfile;

general_domain_access(rssh_t);
uses_shlib(rssh_t);
base_file_read_access(rssh_t);
r_dir_file(rssh_t, etc_t);
r_dir_file(rssh_t, etc_runtime_t);
r_dir_file(rssh_t, locale_t);
can_exec(rssh_t, bin_t);

r_dir_file(rssh_t, rssh_home_t);
rw_dir_create_file(rssh_t, rssh_archive_t);

ifdef(`ssh.te',`
allow rssh_t sshd_t:fd use;
allow rssh_t sshd_t:tcp_socket rw_stream_socket_perms;
allow rssh_t sshd_t:unix_stream_socket rw_stream_socket_perms;
domain_auto_trans(sshd_t, rssh_exec_t, rssh_t);
r_dir_file(sshd_t, rssh_home_t);
')


[-- Attachment #3: rssh.fc --]
[-- Type: text/plain, Size: 55 bytes --]

# rssh
/usr/bin/rssh			system_u:object_r:rssh_exec_t

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

end of thread, other threads:[~2003-07-07 17:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-07-07  4:22 rssh.{te,fc} Colin Walters
2003-07-07 10:14 ` rssh.{te,fc} Russell Coker
2003-07-07 12:39   ` rssh.{te,fc} Tom
2003-07-07 17:39   ` rssh.{te,fc} Colin Walters

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.