marionnet doesn't run as non-root user

Bug #1194307 reported by Andy Linton
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
marionnet
Fix Committed
Medium
Unassigned

Bug Description

If I try to run as a regular user I get the following output. Running as 'root' finds global_options.ml and the system starts with a warning about running as UID=0 as it should!

MARIONNET_DEBUG=true marionnet
=======================================================
 Welcome to marionnet
 Version : 0.90.6
 Source revision : 318 - 2011-02-02 19:27:57 +0100
 Ocamlbricks revision : 229 - 2010-11-23 10:55:39 +0100

 Built in date 2013-06-24 19:58:17 +1200 on system:

        Linux 3.2.0-48-generic #74-Ubuntu SMP
        Thu Jun 6 19:43:26 UTC 2013 x86_64
        GNU/Linux

 For bug reporting, please get a launchpad account and
 either:
  - report bugs at https://bugs.launchpad.net/marionnet
 or do *all* the following:
  - add yourself to the marionnet-dev team
  - add yourself to the marionnet-dev mailing list
  - write to <email address hidden>
=======================================================
[0]: MARIONNET_DEBUG is true (debug level 1)
[0]: Searching for variable MARIONNET_TERMINAL:
[0]: Warning: MARIONNET_TERMINAL not declared.
[0]: - using default "xterm,-T,-e"
[0]: Searching for variable MARIONNET_ROUTER_FILESYSTEM:
[0]: Warning: MARIONNET_ROUTER_FILESYSTEM not declared.
[0]: - using default "default"
[0]: Searching for variable MARIONNET_ROUTER_KERNEL:
[0]: Warning: MARIONNET_ROUTER_KERNEL not declared.
[0]: - using default "default"
[0]: Searching for variable MARIONNET_MACHINE_FILESYSTEM:
[0]: Warning: MARIONNET_MACHINE_FILESYSTEM not declared.
[0]: - using default "default"
[0]: Searching for variable MARIONNET_MACHINE_KERNEL:
[0]: Warning: MARIONNET_MACHINE_KERNEL not declared.
[0]: - using default "default"
[0]: Searching for variable MARIONNET_PREFIX:
[0]: Warning: MARIONNET_PREFIX not declared.
[0]: - using default "/usr/local/share/marionnet"
[0]: Searching for variable MARIONNET_FILESYSTEMS_PATH:
[0]: Warning: MARIONNET_FILESYSTEMS_PATH not declared.
[0]: - using default "/usr/local/share/marionnet//filesystems/"
[0]: Searching for variable MARIONNET_KERNELS_PATH:
[0]: Warning: MARIONNET_KERNELS_PATH not declared.
[0]: - using default "/usr/local/share/marionnet//kernels/"
[0]: Searching for variable MARIONNET_VDE_PREFIX:
[0]: Warning: MARIONNET_VDE_PREFIX not declared.
[0]: - using default ""
[0]: Searching for variable MARIONNET_ROUTER_PORT0_DEFAULT_IPV4_CONFIG:
[0]: Warning: MARIONNET_ROUTER_PORT0_DEFAULT_IPV4_CONFIG not declared.
[0]: - using default "192.168.1.254/24"
[0]: Loading module global_options.ml
Fatal error: exception Not_found

Revision history for this message
Andy Linton (asjl) wrote :

I dug some more into this. Seems that the marionnet_from_scratch script was getting confused by the fact that I had umask set to 027

http://blogs.gentoo.org/mgorny/2011/10/18/027-umask-a-compromise-between-security-and-simplicity/

I reset the umask, reinstalled and it's now working.

Revision history for this message
Jean-Vincent Loddo (loddo) wrote : Re: [Marionnet-dev] [Bug 1194307] Re: marionnet doesn't run as non-root user

Indeed, with such umask the file `marionnet.conf' is installed (by root,
via the script marionnet_from_scratch) in /etc/marionnet/ without the
"read" permission for a normal user. Then marionnet, launched as normal
user, raises an exception.

It's a (pernicious) bug of marionnet_from_scratch, because the user has
the right to decide the umask he wants. I will fix it by calling the
bash builtin:

umask 0022

in the starting section of the script.
Thanks for the report.
Jean-Vincent

Le 25/06/2013 02:52, Andy Linton a écrit :
> I dug some more into this. Seems that the marionnet_from_scratch script
> was getting confused by the fact that I had umask set to 027
>
> http://blogs.gentoo.org/mgorny/2011/10/18/027-umask-a-compromise-
> between-security-and-simplicity/
>
> I reset the umask, reinstalled and it's now working.
>

Changed in marionnet:
importance: Undecided → Medium
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.