Skip to contentSkip to conversation

CD writing in future Linux (stirring up a hornets' nest) (was: Rationale for RLIMIT_MEMLOCK?)

DISCUSSION Bodo Eggert 3 participants 4 messages Jan 24, 2006 – Jan 26, 2006 17 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#11 lore raw

Joerg Schilling <[email protected]> wrote:

[...]

Quoted 7 lines

On Solaris, you (currently) use a profile enabled shell (pfsh, pfksh or pfcsh) that calls getexecuser() in order to find whether there is a specific treatment needed. If this specific treatment is needed, then the shell calls execve(/usr/bin/pfexec cmd <args>)
else it calls execve(cmd <args>)

I did recently voted to require all shells to be profile enabled by default.

Why? I asume there will only be few programs requiring to be run by a wrapper, and mv /usr/bin/foo to /usr/pfexec-bin/foo;
echo $'#!/bin/sh\n/usr/sbin/pfexec /usr/pfexec-bin/foo "$@"' > /usr/bin/foo; chmod 755 /usr/bin/foo
should be easier than patching e.g. all callers of cdrecord, and it won't slow down starting non-profiled applications.

Possibly the pfexec can tell the application to be run by the basename (like su1), in this case you'd add something like
"alias cdrecord /opt/schily/bin/cdrecord" to it's configuration and link it to /usr/bin/cdrecord.

Quoted 7 lines

With the future plans for extending fine grained privs on Solaris, sending SCSI commands will become more than one priv.

I proposed to have a low priv right to send commands like inquiry and test unit ready. These commands may e.g. be send without interfering a concurrent CD/DVD write operation.

Quoted 8 lines

The next priv could be the permission for sending simple SCSI commands that allow reading from the device.

The next priv could be the permission for sending simple SCSI Commands that allow writing.

The final priv would allow even vendor specific commands: this is what cdrecord needs.

That sounds reasonable, but I wonder how you can get access to a device file descriptor in order to do unprivileged access.

Signature · 2 lines
Ich danke GMX dafür, die Verwendung meiner Adressen mittels per SPF
verbreiteten Lügen zu sabotieren.
#12 lore raw
Quoted 9 lines · Bodo Eggert

Joerg Schilling <[email protected]> wrote:

[...]

Quoted 6 lines

On Solaris, you (currently) use a profile enabled shell (pfsh, pfksh or pfcsh) that calls getexecuser() in order to find whether there is a specific treatment needed. If this specific treatment is needed, then the shell calls execve(/usr/bin/pfexec cmd <args>)
else it calls execve(cmd <args>)

Quoted 8 lines
Quoted 1 line

I did recently voted to require all shells to be profile enabled by default.

Why? I asume there will only be few programs requiring to be run by a wrapper, and mv /usr/bin/foo to /usr/pfexec-bin/foo;
echo $'#!/bin/sh\n/usr/sbin/pfexec /usr/pfexec-bin/foo "$@"' > /usr/bin/foo; chmod 755 /usr/bin/foo
should be easier than patching e.g. all callers of cdrecord, and it won't slow down starting non-profiled applications.

Because the architecture review commitee decided this would be the right way.

Note that we are on a migration from the classical root/non-root UNIX to a fine grained privileges handling. The current documentation says that you need to have a profile enabled shell as your SHELL in order to be able to use a root-less Solaris.

Quoted 4 lines

Possibly the pfexec can tell the application to be run by the basename (like su1), in this case you'd add something like
"alias cdrecord /opt/schily/bin/cdrecord" to it's configuration and link it to /usr/bin/cdrecord.

But you are right that another way would be to use something like "isaexec"

Quoted 5 lines
Quoted 2 lines

The final priv would allow even vendor specific commands: this is what cdrecord needs.

That sounds reasonable, but I wonder how you can get access to a device file descriptor in order to do unprivileged access.

This is something that needs to be discussed. Last night, I found that there should be a way to run cdrecord without the need to have the "file_dac_read" provilege. I'll discuss this with the security group.

Jörg

Signature · 4 lines
 EMail:[email protected] (home) Jörg Schilling D-13353 Berlin
       [email protected]                (uni)  
       [email protected]     (work) Blog: http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily
#13 lore raw

Re: CD writing in future Linux (stirring up a hornets' nest)

Quoted 18 lines · Joerg Schilling
Quoted 8 lines · Bodo Eggert

Joerg Schilling <[email protected]> wrote:
[...]

Quoted 6 lines

On Solaris, you (currently) use a profile enabled shell (pfsh, pfksh or pfcsh) that calls getexecuser() in order to find whether there is a specific treatment needed. If this specific treatment is needed, then the shell calls execve(/usr/bin/pfexec cmd <args>)
else it calls execve(cmd <args>)

Quoted 8 lines
Quoted 1 line

I did recently voted to require all shells to be profile enabled by default.

Why? I asume there will only be few programs requiring to be run by a wrapper, and mv /usr/bin/foo to /usr/pfexec-bin/foo;
echo $'#!/bin/sh\n/usr/sbin/pfexec /usr/pfexec-bin/foo "$@"' > /usr/bin/foo; chmod 755 /usr/bin/foo
should be easier than patching e.g. all callers of cdrecord, and it won't slow down starting non-profiled applications.

Quoted 6 lines

Because the architecture review commitee decided this would be the right way.

Note that we are on a migration from the classical root/non-root UNIX to a fine grained privileges handling. The current documentation says that you need to have a profile enabled shell as your SHELL in order to be able to use a root-less Solaris.

If the shell was the only program calling cdrecord, this would work out as expected.

Signature · 1 line
My mail reader can beat up your mail reader. 

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#20 lore raw

Re: Rationale for RLIMIT_MEMLOCK?

Quoted 9 lines · Joerg Schilling

I could add this piece of code to the euid == 0 part of cdrecord:

LOCAL void
raise_memlock()
{

#ifdef  RLIMIT_MEMLOCK
        struct rlimit rlim;
 
        rlim.rlim_cur = rlim.rlim_max = RLIM_INFINITY;

I think you should rather use the size you're going to mlock, or at least the upper bound.

Signature · 2 lines
Ich danke GMX dafür, die Verwendung meiner Adressen mittels per SPF
verbreiteten Lügen zu sabotieren.