lkml.org 
[lkml]   [1999]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectautofs suggestion
Hi,

I'm using autofs here to mount a disk partition, a ZIP ATAPI drive, a
CDROM, a toaster (well, CD burner) and a floppy. Everything's OK, apart
that I cannot mount any of these peripherals read-write.

The only way I've found to do it so far is chmod 1777
/autofs/mount/point and adding the option umask=0 to the appropriate
keys. Dissatisfying, to say the least.

I just imagine that autofs could implement this: when I type, say, cp
/a/file /autofs_mount_point/floppy as a user with uid 517, it automounts
the floppy with options uid=517 - and umask 77 if paranoid.

I've tried to do it using ugly workarounds with executable maps
(greping through /proc/nnn, etc) but failed. And anyway it would be too
dirty - and insecure - a trick to use.

What would need to be done (as far as my knowledge goes) is to catch
the task_struct of the aforementioned cp process, fetch its euid field
and fill mount with the appropriate option.

But how? What needs changing and where? Not that I want to submit a
patch (I'm not at ease enough with kernel programming) but I'd
appreciate any hint on how to achieve this - you get nothing if you
don't try :)

--
fg

"Computers are like air conditioners - they stop working properly when
you open Windows"

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:50    [W:0.231 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site