Re: [Cooker] [Bug 2846] [mtools] Floppy formatter incompatible with supermount

2003-08-23 Thread Brian Tyndall
On Tue, 29 Jul 2003, Eric Fernandez wrote:

 Hi
 
 and what about using supermount-ng ? ;)
 
 Zeb
we were talking about that:
supermount-ng==andrey's supermount

d.

 
 






Re: [Cooker] [Bug 2846] [mtools] Floppy formatter incompatible with supermount

2003-08-23 Thread Brian Tyndall
On Tuesday 29 July 2003 11:00, François Pons wrote:

 
  tell Juan to include my supermount to make it possible :)

 Ah, does it means the current kernel doesn't support this functionnalities
 ?
Well, I have been trying to harrass Juan about this for a few months now. It 
would probably fix all the supermount bugs in bugzilla in one sweep. Plus it 
gives us some nice features like this one. But for some of these features 
apps have to be adepted. So we really need it a considerable time before a 
freeze.

Juan, please? Patch for latest kernel is already done for you...

d.




Re: [Cooker] [Bug 2846] [mtools] Floppy formatter incompatible with supermount

2003-08-02 Thread Andrey Borzenkov
On Wednesday 30 July 2003 14:07, François Pons wrote:
 Andrey Borzenkov [EMAIL PROTECTED] writes:
   Can you make /proc/fs/supermount/subfs owner the user who has control
   over the floppy device ?
 
  the simplest way is to use pam_console to reassign ownership.
  I'll get a look. will it be OK?


it needs even more patches in main kernel so I'd rather avoid it. What is 
wrong with this trivial helper (attached) and usermode:

pts/2}% subfs --help
Unknown option: help
Usage: /usr/sbin/subfs {options ...} dev_or_mpoint ...
-e, --enable:   enable subfs
-d, --disable:  disable subfs
-r, --release:  umount subfs
-f, --force:force umount if subfs busy
-s, --status:   show subfs status

{pts/2}% LC_ALL=C ll =subfs
lrwxrwxrwx1 root root   13 Mar 23 13:52 /usr//bin/subfs - 
consolehelper*

{pts/2}% LC_ALL=C ll /etc/security/console.apps/subfs
-rw-r--r--1 root root0 Mar 30 19:12 
/etc/security/console.apps/subfs

{pts/2}% cat /etc/pam.d/subfs
#%PAM-1.0
auth   sufficient   /lib/security/pam_rootok.so
auth   required /lib/security/pam_console.so
#auth   required/lib/security/pam_stack.so service=system-auth
accountrequired /lib/security/pam_permit.so

I guess it is more flexible than hardcoding it in kernel.


subfs
Description: Perl program


Re: [Cooker] [Bug 2846] [mtools] Floppy formatter incompatible with supermount

2003-07-30 Thread Franois Pons
Buchan Milne [EMAIL PROTECTED] writes:

 FACORAT Fabrice wrote:
 
  Maybe Juan is working on a better version ?
 
 There is no better version.
 
  In fact I don't know ( and Juan silence concerning this is disturbing ),
  but what I know is that we need a reliable and fully functionnal
  supermount,
 
 That is what supermount-ng is.
 
  or else we should better remove it and use autofs.
 
 Autofs has worse problems for removable media IMHO.
 
 Please, try a kernel with supermount-ng first, you will see it works
 much better.

I updated bug 2846 to reflects this need to supermount-ng = Andrej supermount
modified version more clearly.

François.



Re: [Cooker] [Bug 2846] [mtools] Floppy formatter incompatible with supermount

2003-07-30 Thread Andrey Borzenkov


-Original Message-

 
 Andrey Borzenkov [EMAIL PROTECTED] writes:
 
   --- Additional Comments From [EMAIL PROTECTED]  2003-28-07 19:11 ---
   Yes, a setuid wrapper could be made for exemple to solve the problem.
  
   I don't know if supermount can be modified safely to release floppy as soon as
   an application try to open /dev/fd0 in writing, but it should be possible too
   and it could be the best place to fix the problem.
  
  supermount can release device (and block further access to it);
  you have to do it manually using /proc interface.
  
  doing this automatically involves too many cnages in kernel and I
  won't do it; adding wrapper that does
  
  echo /dev/fd0 release disable  /proc/fs/supermount/subfs
  
  to GNOME formatter is far more simple.
 
 Yes, I agree, I didn't want to parse /etc/mtab and do an umount (in root, or
 practically setuid root script) if the device was mounted.


you still have to parse something to know it is supermounted and
possibly busy. of course it is possible to just attempt to disable
it, still it probably have to warn user if subfs is currently mounted.
 
   Note: formating a floppy while mounted is impossible, the device is busy, there
   is nothing to do here unless umounting the floppy (in root furthermore when
   using supermount).
  
  do not use real device name when mounting supermount; use none. Then
  nobody can ever check that /dev/fd0 is mounted by supermount.
  
  use /proc interface to release it before formatting.
  
  tell Juan to include my supermount to make it possible :)
 
 Ah, does it means the current kernel doesn't support this functionnalities ?
 

2.6 kernel package in cooker does AFAIK :)

 Can you make /proc/fs/supermount/subfs owner the user who has control over the
 floppy device ?

the simplest way is to use pam_console to reassign ownership.
I'll get a look. will it be OK?

else it seems possible; would something like

capable(CAP_SYS_RAWIO) || sys_access(/dev/fd0, W_OK)

do or we need better capability?

 It is maybe already the case but it will be much safer to allow
 the same user and only him to release the supermounted floppy.


the same - which one? I could add mout option to specify uid/gid
but is it not bloat?

I suggest trying pam_console first, if we hit problems. let's solve
them. /proc/fs/supermount/subfs is available as soon as supermount
modules is loaded so it does not depend on mounting/unmounting.
 
 Franois.
 



Re: [Cooker] [Bug 2846] [mtools] Floppy formatter incompatible with supermount

2003-07-30 Thread Franois Pons
Andrey Borzenkov [EMAIL PROTECTED] writes:

  Can you make /proc/fs/supermount/subfs owner the user who has control over the
  floppy device ?
 
 the simplest way is to use pam_console to reassign ownership.
 I'll get a look. will it be OK?

Yes, but I didn't checked if it was not working, but since it is a big problem
if trying to umount the device, it will be much nicer to have this
functionnalities.

And yes, it still need to parse /etc/mtab (or maybe if the format fail, trying
to unlock the device and re-opens ?).

  It is maybe already the case but it will be much safer to allow
  the same user and only him to release the supermounted floppy.
 
 
 the same - which one? I could add mout option to specify uid/gid
 but is it not bloat?
 
 I suggest trying pam_console first, if we hit problems. let's solve
 them. /proc/fs/supermount/subfs is available as soon as supermount
 modules is loaded so it does not depend on mounting/unmounting.

Yes, in fact I didn't check but checked umount was not working in such case.

François.



Re: [Cooker] [Bug 2846] [mtools] Floppy formatter incompatible with supermount

2003-07-29 Thread Franois Pons
Andrey Borzenkov [EMAIL PROTECTED] writes:

  --- Additional Comments From [EMAIL PROTECTED]  2003-28-07 19:11 ---
  Yes, a setuid wrapper could be made for exemple to solve the problem.
 
  I don't know if supermount can be modified safely to release floppy as soon as
  an application try to open /dev/fd0 in writing, but it should be possible too
  and it could be the best place to fix the problem.
 
 supermount can release device (and block further access to it);
 you have to do it manually using /proc interface.
 
 doing this automatically involves too many cnages in kernel and I
 won't do it; adding wrapper that does
 
 echo /dev/fd0 release disable  /proc/fs/supermount/subfs
 
 to GNOME formatter is far more simple.

Yes, I agree, I didn't want to parse /etc/mtab and do an umount (in root, or
practically setuid root script) if the device was mounted.

  Note: formating a floppy while mounted is impossible, the device is busy, there
  is nothing to do here unless umounting the floppy (in root furthermore when
  using supermount).
 
 do not use real device name when mounting supermount; use none. Then
 nobody can ever check that /dev/fd0 is mounted by supermount.
 
 use /proc interface to release it before formatting.
 
 tell Juan to include my supermount to make it possible :)

Ah, does it means the current kernel doesn't support this functionnalities ?

Can you make /proc/fs/supermount/subfs owner the user who has control over the
floppy device ? It is maybe already the case but it will be much safer to allow
the same user and only him to release the supermounted floppy.

François.



Re: [Cooker] [Bug 2846] [mtools] Floppy formatter incompatible with supermount

2003-07-29 Thread Danny Tholen
On Tuesday 29 July 2003 11:00, François Pons wrote:

 
  tell Juan to include my supermount to make it possible :)

 Ah, does it means the current kernel doesn't support this functionnalities
 ?
Well, I have been trying to harrass Juan about this for a few months now. It 
would probably fix all the supermount bugs in bugzilla in one sweep. Plus it 
gives us some nice features like this one. But for some of these features 
apps have to be adepted. So we really need it a considerable time before a 
freeze.

Juan, please? Patch for latest kernel is already done for you...

d.



Re: [Cooker] [Bug 2846] [mtools] Floppy formatter incompatible with supermount

2003-07-29 Thread Eric Fernandez
Hi

and what about using supermount-ng ? ;)

Zeb




Re: [Cooker] [Bug 2846] [mtools] Floppy formatter incompatible with supermount

2003-07-29 Thread danny
On Tue, 29 Jul 2003, Eric Fernandez wrote:

 Hi
 
 and what about using supermount-ng ? ;)
 
 Zeb
we were talking about that:
supermount-ng==andrey's supermount

d.