All of lore.kernel.org
 help / color / mirror / Atom feed
* [uml-devel] hostfs / current->fsuid
@ 2004-06-21  3:44 Trent Lloyd
  2004-06-22 13:50 ` Cameron Patrick
  0 siblings, 1 reply; 6+ messages in thread
From: Trent Lloyd @ 2004-06-21  3:44 UTC (permalink / raw)
  To: user-mode-linux-devel

Hi Guys,

I was looking into trying to modify hostfs so if UML ran as root it
would keep the same permissions

And to start, I am aware of humfs, i guess my next question could be,
would humfs work with two UMLs accessing the filesystem, if yes, the
rest of this is redundant.

I was looking at making hostfs set the right owner at create time,
however current->fsuid seems just to be root, and not the person who
called the process (this is in hostfs_kern.c)

Sorry if I'm off the mark here and this is wrong, could someone tell me
if either I've buggered up somewhere and it should be right, or if I'm
using the wrong thing completely and how I could get the uid of the user
who requested the file operation.

Cheers,
Trent
Bur.st

-- 
Trent Lloyd <lathiat@bur.st>
Bur.st Networking Inc.


-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

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

* Re: [uml-devel] hostfs / current->fsuid
  2004-06-21  3:44 [uml-devel] hostfs / current->fsuid Trent Lloyd
@ 2004-06-22 13:50 ` Cameron Patrick
  2004-06-22 18:35   ` BlaisorBlade
  0 siblings, 1 reply; 6+ messages in thread
From: Cameron Patrick @ 2004-06-22 13:50 UTC (permalink / raw)
  To: Trent Lloyd; +Cc: user-mode-linux-devel

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

Hi Trent,

Since no-one else has answered yet, I'll have a shot...

On Mon, Jun 21, 2004 at 11:44:35AM +0800, Trent Lloyd wrote:

| I was looking into trying to modify hostfs so if UML ran as root it
| would keep the same permissions

I've no idea about modifying hostfs, but have you looked into using
NFS instead?  Sure, it's a security nightmare, but it can't be worse
than running UML as root!  Performance might suck though.

Cameron.



[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [uml-devel] hostfs / current->fsuid
  2004-06-22 13:50 ` Cameron Patrick
@ 2004-06-22 18:35   ` BlaisorBlade
  2004-06-23  0:48     ` Trent Lloyd
  0 siblings, 1 reply; 6+ messages in thread
From: BlaisorBlade @ 2004-06-22 18:35 UTC (permalink / raw)
  To: Cameron Patrick, Trent Lloyd; +Cc: user-mode-linux-devel

Alle 15:50, martedì 22 giugno 2004, Cameron Patrick ha scritto:
> Hi Trent,
>
> Since no-one else has answered yet, I'll have a shot...
>
> On Mon, Jun 21, 2004 at 11:44:35AM +0800, Trent Lloyd wrote:
> | I was looking into trying to modify hostfs so if UML ran as root it
> | would keep the same permissions
>
> I've no idea about modifying hostfs, but have you looked into using
> NFS instead?  Sure, it's a security nightmare, but it can't be worse
> than running UML as root!  Performance might suck though.

No, on the uml-user list there are some reports NFS is faster than hostfs (not 
actual benchmarks, just feelings): I think that this can be true due to the 
super-optimization of NFS gone in for years; also it's difficult to optimize 
something when you cannot use inline functions for some things (i.e. the 
distinction between userspace and kernelspace files).

Bye
-- 
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729



-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

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

* Re: [uml-devel] hostfs / current->fsuid
  2004-06-22 18:35   ` BlaisorBlade
@ 2004-06-23  0:48     ` Trent Lloyd
  2004-06-23  4:09       ` [uml-devel] " Sven Köhler
  0 siblings, 1 reply; 6+ messages in thread
From: Trent Lloyd @ 2004-06-23  0:48 UTC (permalink / raw)
  To: user-mode-linux-devel

Yes, however NFS has a remarkable ability to fuck up locking more often
than not (at least on linux)

> Alle 15:50, marted? 22 giugno 2004, Cameron Patrick ha scritto:
> > Hi Trent,
> >
> > Since no-one else has answered yet, I'll have a shot...
> >
> > On Mon, Jun 21, 2004 at 11:44:35AM +0800, Trent Lloyd wrote:
> > | I was looking into trying to modify hostfs so if UML ran as root it
> > | would keep the same permissions
> >
> > I've no idea about modifying hostfs, but have you looked into using
> > NFS instead?  Sure, it's a security nightmare, but it can't be worse
> > than running UML as root!  Performance might suck though.
> 
> No, on the uml-user list there are some reports NFS is faster than hostfs (not 
> actual benchmarks, just feelings): I think that this can be true due to the 
> super-optimization of NFS gone in for years; also it's difficult to optimize 
> something when you cannot use inline functions for some things (i.e. the 
> distinction between userspace and kernelspace files).
> 
> Bye
> -- 
> Paolo Giarrusso, aka Blaisorblade
> Linux registered user n. 292729

-- 
Trent Lloyd <lathiat@bur.st>
Bur.st Networking Inc.


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

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

* [uml-devel] Re: hostfs / current->fsuid
  2004-06-23  0:48     ` Trent Lloyd
@ 2004-06-23  4:09       ` Sven Köhler
  2004-06-23  6:02         ` Trent Lloyd
  0 siblings, 1 reply; 6+ messages in thread
From: Sven Köhler @ 2004-06-23  4:09 UTC (permalink / raw)
  To: user-mode-linux-devel

> Yes, however NFS has a remarkable ability to fuck up locking more often
> than not (at least on linux)

beside that, i think that the network-protocol could have been designed 
much simpler and more firewall-friendly.

BTW: i am one of those, that think that NFS is faster than hostfs.
I cannot explain why, but i would guess, that - at least for parallel 
file-access - the networking-code required less context-switches, since 
the network-packets are perhaps queued before giving them to the 
host-system.

That's just a guess, so you may prove me wrong ;-)



-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

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

* Re: [uml-devel] Re: hostfs / current->fsuid
  2004-06-23  4:09       ` [uml-devel] " Sven Köhler
@ 2004-06-23  6:02         ` Trent Lloyd
  0 siblings, 0 replies; 6+ messages in thread
From: Trent Lloyd @ 2004-06-23  6:02 UTC (permalink / raw)
  To: user-mode-linux-devel

Speed is not so much an issue.

Does anyone have any pointers on getting current->fsuid or equivalent to
get the uid of the calling user?

> >Yes, however NFS has a remarkable ability to fuck up locking more often
> >than not (at least on linux)
> 
> beside that, i think that the network-protocol could have been designed 
> much simpler and more firewall-friendly.
> 
> BTW: i am one of those, that think that NFS is faster than hostfs.
> I cannot explain why, but i would guess, that - at least for parallel 
> file-access - the networking-code required less context-switches, since 
> the network-packets are perhaps queued before giving them to the 
> host-system.
> 
> That's just a guess, so you may prove me wrong ;-)
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email sponsored by Black Hat Briefings & Training.
> Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
> digital self defense, top technical experts, no vendor pitches, 
> unmatched networking opportunities. Visit www.blackhat.com
> _______________________________________________
> User-mode-linux-devel mailing list
> User-mode-linux-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

-- 
Trent Lloyd <lathiat@bur.st>
Bur.st Networking Inc.


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

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

end of thread, other threads:[~2004-06-23  6:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-21  3:44 [uml-devel] hostfs / current->fsuid Trent Lloyd
2004-06-22 13:50 ` Cameron Patrick
2004-06-22 18:35   ` BlaisorBlade
2004-06-23  0:48     ` Trent Lloyd
2004-06-23  4:09       ` [uml-devel] " Sven Köhler
2004-06-23  6:02         ` Trent Lloyd

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.