linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* /dev/vme Permissions for users other than root...
@ 2002-01-22 22:57 jdweyer
  2002-01-23  8:32 ` Didier Kryn
  2002-01-23 18:43 ` Wolfgang Grandegger
  0 siblings, 2 replies; 3+ messages in thread
From: jdweyer @ 2002-01-22 22:57 UTC (permalink / raw)
  To: linuxppc-embedded


(disregard prior email; subject was not included)

Greetings,

We are using Linux version 2.2.12 with Gabriel Paubert's patches for the
Motorola MVME2600 platform.   I have
my application working opening /dev/vme and then doing ioctl calls to set
the attributes.  It works
fine only when I am root.  When another user tries to run the application,
the ioctl (not the open) fails.
I have changed the permissions of /dev/vme to rw for all (ugo) and have
even gone as far as
changing ownership and group to the user's instead of root, but to no
avail.  The permissions
of /dev/vme are crwxrwxrwx.  I realize the execute (x) permission is
ineffective, but I'm trying everything.

Do you have any ideas of what to try?

Thanks for any help you can provide,

JoAnna Weyer


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* Re: /dev/vme Permissions for users other than root...
  2002-01-22 22:57 /dev/vme Permissions for users other than root jdweyer
@ 2002-01-23  8:32 ` Didier Kryn
  2002-01-23 18:43 ` Wolfgang Grandegger
  1 sibling, 0 replies; 3+ messages in thread
From: Didier Kryn @ 2002-01-23  8:32 UTC (permalink / raw)
  To: jdweyer; +Cc: linuxppc-embedded


	Hi JoAnna.

	I'm just a user of the driver of Gabriel and I need to use
it in normal user applications. Givint public r/w permission to /dev/vme
is not enough, since the driver will not accept to change the
attribute if you are not root. I have found the following
workaround, which works well:

	Consider that the path is shared between the user process and
any of its childs that inherits it. If a child has the root priviledge,
it can change the attributes and this change reflects to its parent.

	Then you just need to write a program which takes the attributes
in argument, belongs to root and has the uid bit set, which sets the
attributes and exits. You write a function to call it easily from
user applications and it is done.

	One question I did not address up to now is the following:
Do the attributes apply only to processes inheriting the same path or to
all the processes using simultaneously /dev/vme ?

	Greetings.	Didier

jdweyer@rockwellcollins.com wrote:
>
> We are using Linux version 2.2.12 with Gabriel Paubert's patches for the
> Motorola MVME2600 platform.   I have
> my application working opening /dev/vme and then doing ioctl calls to set
> the attributes.  It works
> fine only when I am root.  When another user tries to run the application,
> the ioctl (not the open) fails.
> I have changed the permissions of /dev/vme to rw for all (ugo) and have
> even gone as far as
> changing ownership and group to the user's instead of root, but to no
> avail.  The permissions
> of /dev/vme are crwxrwxrwx.  I realize the execute (x) permission is
> ineffective, but I'm trying everything.
>
> Do you have any ideas of what to try?

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* Re: /dev/vme Permissions for users other than root...
  2002-01-22 22:57 /dev/vme Permissions for users other than root jdweyer
  2002-01-23  8:32 ` Didier Kryn
@ 2002-01-23 18:43 ` Wolfgang Grandegger
  1 sibling, 0 replies; 3+ messages in thread
From: Wolfgang Grandegger @ 2002-01-23 18:43 UTC (permalink / raw)
  To: jdweyer; +Cc: linuxppc-embedded


Hi JoAnna,

I think the following code fragments in the ioctl function of the VME driver
simply prevent normal users from doing "bad" things:

                /* Is this the right capability to use ? Everybody seems
to use
                 * CAPS_SYS_ADMIN as a default to replace suser().
                 */
                error = -EPERM;
                if (!capable(CAP_SYS_ADMIN)) break;

Hope it helps,

Wolfgang.


jdweyer@rockwellcollins.com wrote:

>(disregard prior email; subject was not included)
>
>Greetings,
>
>We are using Linux version 2.2.12 with Gabriel Paubert's patches for the
>Motorola MVME2600 platform.   I have
>my application working opening /dev/vme and then doing ioctl calls to set
>the attributes.  It works
>fine only when I am root.  When another user tries to run the application,
>the ioctl (not the open) fails.
>I have changed the permissions of /dev/vme to rw for all (ugo) and have
>even gone as far as
>changing ownership and group to the user's instead of root, but to no
>avail.  The permissions
>of /dev/vme are crwxrwxrwx.  I realize the execute (x) permission is
>ineffective, but I'm trying everything.
>
>Do you have any ideas of what to try?
>
>Thanks for any help you can provide,
>
>JoAnna Weyer
>
>
>
>


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

end of thread, other threads:[~2002-01-23 18:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-01-22 22:57 /dev/vme Permissions for users other than root jdweyer
2002-01-23  8:32 ` Didier Kryn
2002-01-23 18:43 ` Wolfgang Grandegger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).