public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Modifying kernel so that non-root users have some root capabilities
@ 2004-05-24 22:21 Laughlin, Joseph V
  2004-05-24 23:24 ` Steve Youngs
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Laughlin, Joseph V @ 2004-05-24 22:21 UTC (permalink / raw)
  To: linux-kernel

(not sure if this is a duplicate or not.. Apologies in advance.)

I've been tasked with modifying a 2.4 kernel so that a non-root user can
do the following:

Dynamically change the priorities of processes (up and down)
Lock processes in memory
Can change process cpu affinity

Anyone got any ideas about how I could start doing this?  (I'm new to
kernel development, btw.)

Thanks,


Joe Laughlin
Phantom Works - Integrated Technology Development Labs 
The Boeing Company




^ permalink raw reply	[flat|nested] 12+ messages in thread
* RE: Modifying kernel so that non-root users have some root capabilities
@ 2004-05-24 23:41 Laughlin, Joseph V
  2004-05-24 23:49 ` Chris Wright
  0 siblings, 1 reply; 12+ messages in thread
From: Laughlin, Joseph V @ 2004-05-24 23:41 UTC (permalink / raw)
  To: Steve Youngs, Linux Kernel List


> -----Original Message-----
> From: Steve Youngs [mailto:steve@youngs.au.com] 
> Sent: Monday, May 24, 2004 4:24 PM
> To: Linux Kernel List
> Cc: Laughlin, Joseph V
> Subject: Re: Modifying kernel so that non-root users have 
> some root capabilities
> 
> 
> * Joseph V Laughlin <Laughlin> writes:
> 
>   > I've been tasked with modifying a 2.4 kernel so that a 
> non-root user can
>   > do the following:
> 
>   > Dynamically change the priorities of processes (up and down)
>   > Lock processes in memory
>   > Can change process cpu affinity
> 
> I'm assuming that there are user-land tools to do these 
> things now for root, right?  So why not look into things like 
> sudo(8) or even setuid executables? 
> 

In short, it comes down to permissions problems with NFS mounted
directories, combined with Rational ClearCase issues, combined with
stringent security requirements.

^ permalink raw reply	[flat|nested] 12+ messages in thread
[parent not found: <fa.nbdv424.kmij3i@ifi.uio.no>]
* RE: Modifying kernel so that non-root users have some root capabilities
@ 2004-05-25 19:06 Laughlin, Joseph V
  2004-05-25 21:15 ` Bill Davidsen
  0 siblings, 1 reply; 12+ messages in thread
From: Laughlin, Joseph V @ 2004-05-25 19:06 UTC (permalink / raw)
  To: Bill Davidsen, root; +Cc: linux-kernel

> -----Original Message-----
> From: Bill Davidsen [mailto:davidsen@tmr.com] 
> Sent: Tuesday, May 25, 2004 11:14 AM
> To: root@chaos.analogic.com
> Cc: Laughlin, Joseph V; linux-kernel@vger.kernel.org
> Subject: Re: Modifying kernel so that non-root users have 
> some root capabilities
> 
> 
> Richard B. Johnson wrote:
> > On Mon, 24 May 2004, Laughlin, Joseph V wrote:
> > 
> > 
> >>(not sure if this is a duplicate or not.. Apologies in advance.)
> >>
> >>I've been tasked with modifying a 2.4 kernel so that a 
> non-root user 
> >>can do the following:
> >>
> >>Dynamically change the priorities of processes (up and down) Lock 
> >>processes in memory Can change process cpu affinity
> >>
> >>Anyone got any ideas about how I could start doing this?  
> (I'm new to 
> >>kernel development, btw.)
> >>
> >>Thanks,
> > 
> > 
> > You don't modify an operating system to do that!! You just make a 
> > priviliged program (setuid) that does the things you want.
> 
> Dick, it's called capabilities, and people have already modified the 
> operating system to do that, it just doesn't work quite as 
> intended in 
> some cases. Setuid is the keys to the kingdom, you really 
> don't want to 
> use setuid root unless there's no other way.
> 
> Remember when everything used to take the BKL? Then people 
> saw a better 
> way. Capabilities is the same kind of progression, save the 
> big hammer 
> for the big nail.
> 

In what cases does changing the capabilities not have the intended
effects?

Thanks,
Joe 

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: Modifying kernel so that non-root users have some root capabilities
@ 2004-05-25 23:43 Roger Larsson
  0 siblings, 0 replies; 12+ messages in thread
From: Roger Larsson @ 2004-05-25 23:43 UTC (permalink / raw)
  To: linux-kernel

> I've been tasked with modifying a 2.4 kernel so that a non-root user can
> do the following:
> 
> Dynamically change the priorities of processes (up and down)
> Lock processes in memory
> Can change process cpu affinity
> 
> Anyone got any ideas about how I could start doing this? (I'm new to
> kernel development, btw.)

Audio development folks has a SELinux module that does almost this.

"The latest version of the realtime Linux Security Module is now
available on SourceForge...

  
http://prdownloads.sourceforge.net/realtime-lsm/realtime-lsm-0.1.1.tar.gz?download

This release handles changes to the capabilities structure introduced
in Linux 2.6.6, but still works with earlier 2.6 kernels.  There are
no functional changes.  Unless you are running 2.6.6, there is no need
to upgrade.  Changes in the 2.6.6 kernel makefiles affect the
procedure for building the realtime-lsm.  Please consult the INSTALL
instructions for details.

The realtime LSM is an installable kernel module that enables realtime
capabilities for any 2.6 kernel without needing to directly patch the
kernel.  It was written by Torben Hohn and Jack O'Quin, who make no
warranty concerning the safety, security or even stability of your
system when using it.  It is provided under the provisions of the GPL.
-- 
  joq"

Usage like this:
"Once the LSM has been installed and the kernel for which it was built
is running, the root user can load it and pass parameters as follows:

  # modprobe realtime any=1

  Any program can request realtime privileges.  This allows any local
  user to crash the system by hogging the CPU in a tight loop or
  locking down too much memory.  But, it is simple to administer.  :-)

  # modprobe realtime gid=29

  All users belonging to group 29 and programs that are setgid to that
  group have realtime privileges.  Use any group number you like.

  # modprobe realtime mlock=0

  Grants realtime scheduling privileges without the ability to lock
  memory using mlock() or mlockall() system calls.  This option can be
  used in conjunction with any of the other options.
"

/RogerL
(not subscribed but reading archives now and then)

-- 
Roger Larsson
Skellefteå
Sweden

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

end of thread, other threads:[~2004-05-25 23:48 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-24 22:21 Modifying kernel so that non-root users have some root capabilities Laughlin, Joseph V
2004-05-24 23:24 ` Steve Youngs
2004-05-24 23:29 ` Neale Banks
2004-05-25 11:28 ` Richard B. Johnson
2004-05-25 18:14   ` Bill Davidsen
2004-05-25 14:57 ` David T Hollis
  -- strict thread matches above, loose matches on Subject: below --
2004-05-24 23:41 Laughlin, Joseph V
2004-05-24 23:49 ` Chris Wright
     [not found] <fa.nbdv424.kmij3i@ifi.uio.no>
2004-05-24 23:43 ` Andy Lutomirski
2004-05-25 19:06 Laughlin, Joseph V
2004-05-25 21:15 ` Bill Davidsen
2004-05-25 23:43 Roger Larsson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox