All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel J Walsh <dwalsh@redhat.com>
To: Stephen Smalley <sds@epoch.ncsc.mil>
Cc: selinux@tycho.nsa.gov
Subject: Re: SUDO package
Date: Wed, 30 Apr 2003 15:06:48 -0400	[thread overview]
Message-ID: <3EB01EC8.7070602@redhat.com> (raw)
In-Reply-To: <1051724624.1028.65.camel@moss-huskers.epoch.ncsc.mil>

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

Stephen Smalley wrote:

>On Wed, 2003-04-30 at 11:42, Daniel J Walsh wrote:
>  
>
>>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?
>>    
>>
>
>True.  The problem is more severe for exec_type than for the directory
>access; IMHO, it isn't too much to ask you to enumerate the major
>directory types in which binaries to be executed by sudo might live, and
>most (all?) of those types should be part of the basic policy
>definition, not package-specific, e.g. bin_t, sbin_t, etc.  You don't
>even need to define an attribute for that purpose; you can just list
>them in your allow rule, or pull them from a macro definition added to
>the global macros.
>  
>
I am still not sure I can do this.  Are you are stating that I would 
have to have an allow rule for
each *exec_t?  Just searching domains/programs I found  > 100 of these 
in the default policy.  
Maybe we are at odds with what sudo can do.  I consider sudo to be a 
shortcut from doing
su,newrole,COMMAND.  So sudo needs all the rights that su/newrole has 
for a particular role.  
Now you might be against this because of the security ramifications, 
which is ok.  But if users
are going to use a SELinux system they are going to expect this behaviour.

>  
>
>>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?
>>    
>>
>
>I'm not clear as to why you can't implement something akin to what
>newrole does.  Otherwise, what prevents another process of lower
>privilege from arbitrarily accessing the privileged process' terminal?
>You can't rely on the DAC protections.
>
>  
>
Ok I just went back and read the code again and it looks like I can 
implement the terminal stuff.
There is a -b option on the sudo command that allows sudo to run in 
background.  Or using job
control you could run the command in background.

sudo -r sysadm_r /usr/bin/PROGRAM &

So what happens to control over the terminal in this situation?

Dan


[-- Attachment #2: Type: text/html, Size: 3171 bytes --]

  parent reply	other threads:[~2003-04-30 19:07 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
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 [this message]
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=3EB01EC8.7070602@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.