is there a way to express permission to access any tcp or udp socket?
hi, i'm in the process of getting this fireflier policy right, and it (like lsof) reads /proc/NNNN/fd/N to obtain the name of the program that's actually using a tcp or udp socket - and then allowing the user the option of banning or allowing that program to send or receive tcp or udp traffic (on demand. it's really cool).
of course, fireflier needs to do a stat of /proc/NNNN/fd/N in order to find out its inode - hence the getattr.
i've patched fireflierd to stop it doing a stat of EVVEERRYY single damn file descriptor (!!!) but there are still
i don't want to have to add permission for postfix_t, sendmail_t, exim_t, nntp_t, sshd_t, lpd_t, every_single_server_i_can_think_of_and_all_those_that_i_can't_t:
allow fireflier_t rpcd_t:tcp_socket { getattr };
allow fireflier_t rpcd_t:udp_socket { getattr };
allow fireflier_t sshd_t:tcp_socket { getattr };
allow fireflier_t user_t:udp_socket { getattr };
allow fireflier_t user_t:tcp_socket { getattr };does anyone know of a way to do something like, oh, this:
allow fireflier_t absolutely_everything_t:tcp_socket { getattr };
allow fireflier_t absolutely_everything_t:udp_socket { getattr };what should i put in the absolutely_everything_t?
much appreciated,
l.
Signature · 14 lines
-- Information I post is with honesty, integrity, and the expectation that you will take full responsibility if acting on the information contained, and that, should you find it to be flawed or even mildly useful, you will act with both honesty and integrity in return - and tell me. -- <a href="http://lkcl.net"> lkcl.net </a> <br /> <a href="mailto:[email protected]"> [email protected] </a> <br /> -- 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.
due to the terribly bad taste of replying to your own posts, i had better phrase this as a question in need of confirmation:
allow fireflier_t domain:{ tcp_socket udp_socket } { getattr };is this right? :)
l.
Quoted 32 lines · Luke Kenneth Casson Leighton
hi, i'm in the process of getting this fireflier policy right, and it (like lsof) reads
/proc/NNNN/fd/Nto obtain the name of the program that's actually using a tcp or udp socket - and then allowing the user the option of banning or allowing that program to send or receive tcp or udp traffic (on demand. it's really cool).of course, fireflier needs to do a stat of
/proc/NNNN/fd/Nin order to find out its inode - hence the getattr.i've patched fireflierd to stop it doing a stat of EVVEERRYY single damn file descriptor (!!!) but there are still
i don't want to have to add permission for
postfix_t,sendmail_t,exim_t,nntp_t,sshd_t,lpd_t, every_single_server_i_can_think_of_and_all_those_that_i_can't_t:allow fireflier_t rpcd_t:tcp_socket { getattr }; allow fireflier_t rpcd_t:udp_socket { getattr }; allow fireflier_t sshd_t:tcp_socket { getattr }; allow fireflier_t user_t:udp_socket { getattr }; allow fireflier_t user_t:tcp_socket { getattr };does anyone know of a way to do something like, oh, this:
allow fireflier_t absolutely_everything_t:tcp_socket { getattr }; allow fireflier_t absolutely_everything_t:udp_socket { getattr };what should i put in the
absolutely_everything_t?much appreciated,
l.
Signature · 14 lines
-- Information I post is with honesty, integrity, and the expectation that you will take full responsibility if acting on the information contained, and that, should you find it to be flawed or even mildly useful, you will act with both honesty and integrity in return - and tell me. -- <a href="http://lkcl.net"> lkcl.net </a> <br /> <a href="mailto:[email protected]"> [email protected] </a> <br /> -- 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.