public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] RFC: iotop needs to run as root after kernel change
@ 2012-04-04  6:32 justin
  2012-04-04  6:43 ` "Paweł Hajdan, Jr."
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: justin @ 2012-04-04  6:32 UTC (permalink / raw
  To: gentoo-dev

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

Hi,

after this change

https://github.com/torvalds/linux/commit/1a51410abe7d0ee4b1d112780f46df87d3621043

iotop cannot be used as user anymore.
Any suggestions how to proceed?

The solution I see are

1.
Leave it to root (Fedora and Suses way)
2.
suid it (bad in my view)
3.
file capabilities (can this be done with portage)

Please comment and help me with the right proceeding.

justin


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

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

* Re: [gentoo-dev] RFC: iotop needs to run as root after kernel change
  2012-04-04  6:32 [gentoo-dev] RFC: iotop needs to run as root after kernel change justin
@ 2012-04-04  6:43 ` "Paweł Hajdan, Jr."
  2012-04-04 10:01   ` vivo75
  2012-04-04 10:20 ` Chí-Thanh Christopher Nguyễn
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: "Paweł Hajdan, Jr." @ 2012-04-04  6:43 UTC (permalink / raw
  To: gentoo-dev

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

On 4/4/12 8:32 AM, justin wrote:
> 1.
> Leave it to root (Fedora and Suses way)

I think that's the best option, at least for now.

> 2.
> suid it (bad in my view)

Agreed, that'd be very bad, any crashing bug in it could become a
privilege escalation problem.

> 3.
> file capabilities (can this be done with portage)

Slightly better than the above, but I still prefer #1.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 203 bytes --]

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

* Re: [gentoo-dev] RFC: iotop needs to run as root after kernel change
  2012-04-04  6:43 ` "Paweł Hajdan, Jr."
@ 2012-04-04 10:01   ` vivo75
  0 siblings, 0 replies; 10+ messages in thread
From: vivo75 @ 2012-04-04 10:01 UTC (permalink / raw
  To: gentoo-dev

Il 04/04/2012 08:43, "Paweł Hajdan, Jr." ha scritto:
> On 4/4/12 8:32 AM, justin wrote:
>> 1.
>> Leave it to root (Fedora and Suses way)
> I think that's the best option, at least for now.
>
>> 2.
>> suid it (bad in my view)
> Agreed, that'd be very bad, any crashing bug in it could become a
> privilege escalation problem.
>
>> 3.
>> file capabilities (can this be done with portage)
> Slightly better than the above, but I still prefer #1.

Or default to 1. but provide a use flag to achieve 3.
net-wireless/kismet uses 'suid', maybe other use 'caps' use flags?
Hopefully others can answer on how to apply capabilities to executables




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

* Re: [gentoo-dev] RFC: iotop needs to run as root after kernel change
  2012-04-04  6:32 [gentoo-dev] RFC: iotop needs to run as root after kernel change justin
  2012-04-04  6:43 ` "Paweł Hajdan, Jr."
@ 2012-04-04 10:20 ` Chí-Thanh Christopher Nguyễn
  2012-04-04 10:25   ` Alec Warner
  2012-04-04 10:50 ` Ciaran McCreesh
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Chí-Thanh Christopher Nguyễn @ 2012-04-04 10:20 UTC (permalink / raw
  To: gentoo-dev

justin schrieb:
> iotop cannot be used as user anymore.
> Any suggestions how to proceed?
>
> Leave it to root (Fedora and Suses way)
> suid it (bad in my view)

I suggest to have a suid USE flag (disabled by default) so the user can
choose between the two. Maybe advertise this change in an elog message.


Best regards,
Chí-Thanh Christopher Nguyễn




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

* Re: [gentoo-dev] RFC: iotop needs to run as root after kernel change
  2012-04-04 10:20 ` Chí-Thanh Christopher Nguyễn
@ 2012-04-04 10:25   ` Alec Warner
  0 siblings, 0 replies; 10+ messages in thread
From: Alec Warner @ 2012-04-04 10:25 UTC (permalink / raw
  To: gentoo-dev

2012/4/4 Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org>:
> justin schrieb:
>> iotop cannot be used as user anymore.
>> Any suggestions how to proceed?
>>
>> Leave it to root (Fedora and Suses way)
>> suid it (bad in my view)
>
> I suggest to have a suid USE flag (disabled by default) so the user can
> choose between the two. Maybe advertise this change in an elog message.

Doesn't FEATURES=suidctl already cover crap like this?

-A

>
>
> Best regards,
> Chí-Thanh Christopher Nguyễn
>
>



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

* Re: [gentoo-dev] RFC: iotop needs to run as root after kernel change
  2012-04-04  6:32 [gentoo-dev] RFC: iotop needs to run as root after kernel change justin
  2012-04-04  6:43 ` "Paweł Hajdan, Jr."
  2012-04-04 10:20 ` Chí-Thanh Christopher Nguyễn
@ 2012-04-04 10:50 ` Ciaran McCreesh
  2012-04-05  1:18   ` [gentoo-dev] " Duncan
  2012-04-04 12:56 ` [gentoo-dev] " Greg KH
  2012-04-04 13:47 ` Mike Gilbert
  4 siblings, 1 reply; 10+ messages in thread
From: Ciaran McCreesh @ 2012-04-04 10:50 UTC (permalink / raw
  To: gentoo-dev

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

On Wed, 04 Apr 2012 08:32:41 +0200
justin <jlec@gentoo.org> wrote:
> 3.
> file capabilities (can this be done with portage)

It can't. We've had discussions about caps before, and I imagine it
would get into EAPI 5 without objections if you can come up with a spec
that describes how it should work (bear in mind that some of the target
filesystems might not support caps).

-- 
Ciaran McCreesh

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: [gentoo-dev] RFC: iotop needs to run as root after kernel change
  2012-04-04  6:32 [gentoo-dev] RFC: iotop needs to run as root after kernel change justin
                   ` (2 preceding siblings ...)
  2012-04-04 10:50 ` Ciaran McCreesh
@ 2012-04-04 12:56 ` Greg KH
  2012-04-04 13:22   ` justin
  2012-04-04 13:47 ` Mike Gilbert
  4 siblings, 1 reply; 10+ messages in thread
From: Greg KH @ 2012-04-04 12:56 UTC (permalink / raw
  To: gentoo-dev

On Wed, Apr 04, 2012 at 08:32:41AM +0200, justin wrote:
> Hi,
> 
> after this change
> 
> https://github.com/torvalds/linux/commit/1a51410abe7d0ee4b1d112780f46df87d3621043
> 
> iotop cannot be used as user anymore.
> Any suggestions how to proceed?
> 
> The solution I see are
> 
> 1.
> Leave it to root (Fedora and Suses way)

Please leave it this way, the information leakage otherwise is too big
of a risk to do anything else.

greg k-h



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

* Re: [gentoo-dev] RFC: iotop needs to run as root after kernel change
  2012-04-04 12:56 ` [gentoo-dev] " Greg KH
@ 2012-04-04 13:22   ` justin
  0 siblings, 0 replies; 10+ messages in thread
From: justin @ 2012-04-04 13:22 UTC (permalink / raw
  To: gentoo-dev

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

On 04/04/12 14:56, Greg KH wrote:

> On Wed, Apr 04, 2012 at 08:32:41AM +0200, justin wrote:
>> Hi,
>>
>> after this change
>>
>> https://github.com/torvalds/linux/commit/1a51410abe7d0ee4b1d112780f46df87d3621043
>>
>> iotop cannot be used as user anymore.
>> Any suggestions how to proceed?
>>
>> The solution I see are
>>
>> 1.
>> Leave it to root (Fedora and Suses way)
> 
> Please leave it this way, the information leakage otherwise is too big
> of a risk to do anything else.
> 
> greg k-h
> 



Thanks for all your responses. I will follow what was suggested by
upstream and what is the best from my feelings and restrict it to be
root only.

justin


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

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

* Re: [gentoo-dev] RFC: iotop needs to run as root after kernel change
  2012-04-04  6:32 [gentoo-dev] RFC: iotop needs to run as root after kernel change justin
                   ` (3 preceding siblings ...)
  2012-04-04 12:56 ` [gentoo-dev] " Greg KH
@ 2012-04-04 13:47 ` Mike Gilbert
  4 siblings, 0 replies; 10+ messages in thread
From: Mike Gilbert @ 2012-04-04 13:47 UTC (permalink / raw
  To: gentoo-dev

On Wed, Apr 4, 2012 at 2:32 AM, justin <jlec@gentoo.org> wrote:
> 2.
> suid it (bad in my view)
> 3.
> file capabilities (can this be done with portage)
>

iotop is a python script, so these were not really options anyway.
Unless you wrote a wrapper in C or something. :)



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

* [gentoo-dev] Re: RFC: iotop needs to run as root after kernel change
  2012-04-04 10:50 ` Ciaran McCreesh
@ 2012-04-05  1:18   ` Duncan
  0 siblings, 0 replies; 10+ messages in thread
From: Duncan @ 2012-04-05  1:18 UTC (permalink / raw
  To: gentoo-dev

Ciaran McCreesh posted on Wed, 04 Apr 2012 11:50:54 +0100 as excerpted:

> On Wed, 04 Apr 2012 08:32:41 +0200 justin <jlec@gentoo.org> wrote:
>> 3.
>> file capabilities (can this be done with portage)
> 
> It can't. We've had discussions about caps before, and I imagine it
> would get into EAPI 5 without objections if you can come up with a spec
> that describes how it should work (bear in mind that some of the target
> filesystems might not support caps).

Isn't that what portage's xattr USE flag is all about, supporting caps, 
etc, via xattr?  Altho as you said, it does require support on both 
PORTAGE_TMPDIR and the live filesystem.  (I believe portage's install 
warns if the USE flag is on and either tmpfs or the live filesystem 
doesn't support it.)

But that's a fairly new feature, probably not in stable, yet, and for all 
I know, 2.2 only.  And while I guess a few packages support it via 
USE=caps, full and proper EAPI support couldn't be a bad thing.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman




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

end of thread, other threads:[~2012-04-05  1:19 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-04  6:32 [gentoo-dev] RFC: iotop needs to run as root after kernel change justin
2012-04-04  6:43 ` "Paweł Hajdan, Jr."
2012-04-04 10:01   ` vivo75
2012-04-04 10:20 ` Chí-Thanh Christopher Nguyễn
2012-04-04 10:25   ` Alec Warner
2012-04-04 10:50 ` Ciaran McCreesh
2012-04-05  1:18   ` [gentoo-dev] " Duncan
2012-04-04 12:56 ` [gentoo-dev] " Greg KH
2012-04-04 13:22   ` justin
2012-04-04 13:47 ` Mike Gilbert

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