From: Daniel J Walsh <dwalsh@redhat.com>
To: Stephen Smalley <sds@epoch.ncsc.mil>, selinux@tycho.nsa.gov
Subject: Re: SUDO package
Date: Wed, 30 Apr 2003 11:42:02 -0400 [thread overview]
Message-ID: <3EAFEECA.1090107@redhat.com> (raw)
In-Reply-To: <1051199603.20300.33.camel@moss-huskers.epoch.ncsc.mil>
[-- Attachment #1: Type: text/plain, Size: 3336 bytes --]
Stephen Smalley wrote:
>On Tue, 2003-04-22 at 16:04, Daniel J Walsh wrote:
>
>
>>I don't think you define a separate attribute for every program that
>>can be executed, since by
>>definition sudo can run every program on the system.
>>
>>
>
>Not a separate attribute for every program, but a single new attribute
>that is associated with every program type that should be executable via
>sudo. By using exec_type, you limit the freedom of other policy writers
>to create program types that they do not want to be executed via sudo.
>It would be better to define a new attribute, add it to the attribute
>list for every type that should be executable by sudo, and use that
>attribute in your sudo.te file.
>
>
>
>
>>I have changed this to
>>allow sudo_t file_type:dir search
>>It looks like sudo checks to see if the program exists before it
>>exec's it.
>>
>>
>
>I would prefer that this rule be refined down to a specific list of
>directory types, or that a new attribute be defined and added to all
>desired directory types for this purpose. Again, you want to allow
>other policy writers to be able to define directory types that cannot be
>searched by sudo in order to meet their policy goals.
>
>
I have a hard time with the previous two. Just seems to me SELinux
needs some sort
of dontallow functionality to handle these situation. Otherwise every
time I add a policy
that has a somewhat global effect on files/dir, I need to change the all
the file/directory attributes
in the policy. Has this been discussed previously?
>
>
>>I am not sure what to do here. sudo is different then newrole in that
>>it does a fork/exec and the
>>parent exits. So waiting around for the child to exit in order to set
>>the terminal ownership back is
>>changing the fundamental behavior of sudo. What is the ramifications
>>of not changing the sid of the
>>controlling terminal?
>>
>>
>
>If you don't relabel the terminal, then another process operating in the
>old domain (say user_t) can still access the terminal while the program
>in the new domain (say sysadm_t) is running. Hence, a malicious user or
>program can interfere with a more privileged process being run via sudo.
>
>
This is a problem since with Sudo you are sharing the same terminal
between the process that rand sudo
and the sudo process. So if you change the privs of the terminal one
process or the other could have
more privs. I would prefer to leave the terminal with the current privs
(Usually lower) and make the
application run by sudo change the terminal privs if it has to.
(probably seldom). Any other ideas?
>
>
>># create run file
>>type sudo_var_run_t, file_type, sysadmfile;
>>file_type_auto_trans(sudo_t,var_run_t,sudo_var_run_t);
>>allow sudo_t sudo_var_run_t:file create_file_perms;
>>allow sudo_t sudo_var_run_t:dir create_dir_perms;
>>
>>
>
>The file_type_auto_trans macro includes the necessary allow rules for
>creating files and directories in the type, so you can drop the two
>allow rules above.
>
>
Done
>
>
>># sudo
>>/usr/bin/sudo system_u:object_r:sudo_exec_t
>>/var/run/sudo system_u:object_r:sudo_var_run_t
>>
>>
>
>I think you want '/var/run/sudo(/.*)?' as your regular expression, so
>that this type will be applied to the directory and all files beneath
>it.
>
>
>
Done.
[-- Attachment #2: Type: text/html, Size: 4511 bytes --]
next prev parent reply other threads:[~2003-04-30 15:42 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-16 8:24 update question ccallen
2003-04-16 12:29 ` Stephen Smalley
2003-04-18 4:08 ` Russell Coker
2003-04-18 16:02 ` SUDO package Daniel J Walsh
2003-04-22 14:19 ` Stephen Smalley
2003-04-23 7:10 ` Russell Coker
2003-04-24 17:31 ` Stephen Smalley
2003-04-24 18:07 ` Russell Coker
2003-04-25 19:41 ` Howard Holm
[not found] ` <3EA5A040.40107@redhat.com>
[not found] ` <1051199603.20300.33.camel@moss-huskers.epoch.ncsc.mil>
2003-04-30 15:42 ` Daniel J Walsh [this message]
2003-04-30 17:43 ` Stephen Smalley
2003-04-30 19:04 ` Francois Leclerc
2003-04-30 19:18 ` Daniel J Walsh
2003-04-30 19:06 ` Daniel J Walsh
2003-04-30 19:20 ` Stephen Smalley
2003-04-30 20:13 ` Daniel J Walsh
2003-04-30 20:26 ` Stephen Smalley
2003-05-01 5:46 ` Russell Coker
2003-04-30 18:09 ` Russell Coker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3EAFEECA.1090107@redhat.com \
--to=dwalsh@redhat.com \
--cc=sds@epoch.ncsc.mil \
--cc=selinux@tycho.nsa.gov \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.