post a message to logged in users
Hi,
is there an interface available to post a message to every logged in user, for example generated via /usr/bin/wall?
cheers
Stefan
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 2 lines · Stefan Schulze Frielinghaus
is there an interface available to post a message to every logged in user, for example generated via
/usr/bin/wall?
OK I'm pretty sure there is no interface for just writing to every logged in user, the attached patch solves this.
I could use the "term_use_all_terms" interface but this is not really what I wanted because /usr/bin/wall does not need to read all the consoles/ptys/ttys. Write access is enough.
Chris, is this patch OK?
terminal.if +23 -0
@@ -178,6 +178,29 @@ ######################################## ## <summary> +## Write the console, all +## ttys and all ptys. +## </summary> +## <param name="domain"> +## <summary> +## Domain allowed access. +## </summary> +## </param> +## <rolecap/> +# +interface(`term_write_all_terms',` + gen_require(` + attribute ttynode, ptynode; + type console_device_t, devpts_t, tty_device_t; + ') + + dev_list_all_dev_nodes($1) + allow $1 devpts_t:dir list_dir_perms; + allow $1 { console_device_t tty_device_t ttynode ptynode }:chr_file write_chr_file_perms; +') + +######################################## +## <summary> ## Write to the console. ## </summary> ## <param name="domain">
Quoted 11 lines · Stefan Schulze Frielinghaus
Quoted 2 lines · Stefan Schulze Frielinghaus
is there an interface available to post a message to every logged in user, for example generated via
/usr/bin/wall?OK I'm pretty sure there is no interface for just writing to every logged in user, the attached patch solves this.
I could use the "term_use_all_terms" interface but this is not really what I wanted because/usr/bin/walldoes not need to read all the consoles/ptys/ttys. Write access is enough.Chris, is this patch OK?
Yes. Merged.
Quoted 43 lines
differences
between files
attachment
(terminal.if.patch)terminal.if 2009-09-06 15:09:19.000000000 +0200 renamed from terminal.if 2009-09-06 15:04:36.000000000 +0200 +23
-0@@ -178,6 +178,29 @@ ######################################## ## <summary> +## Write the console, all +## ttys and all ptys. +## </summary> +## <param name="domain"> +## <summary> +## Domain allowed access. +## </summary> +## </param> +## <rolecap/> +# +interface(`term_write_all_terms',` + gen_require(` + attribute ttynode, ptynode; + type console_device_t, devpts_t, tty_device_t; + ') + + dev_list_all_dev_nodes($1) + allow $1 devpts_t:dir list_dir_perms; + allow $1 { console_device_t tty_device_t ttynode ptynode }:chr_file write_chr_file_perms; +') + +######################################## +## <summary> ## Write to the console. ## </summary> ## <param name="domain">
Signature · 9 lines
Chris PeBenito Tresys Technology, LLC (410) 290-1411 x150 -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.