geteuid / getpwnam not implemented

Emery Hemingway ehmry at
Tue Nov 27 13:48:27 CET 2018

Hello Wouter,

The geteuid() function is not implemented but getpwnam() will be part
of the next release.
There is a runscript at 'repos/libports/run/' that
shows how to configure the new 'getpwnam' feature. The next release
is at the end of this week, or you may build from git master for
'getpwnam'. When 'getuid' is called a warning is printed and '0' is
returned, so if you configure the passwd facade to pretend that UID 0
is "mosquitto" that may be enough to get things working. If having
UID 0 is a problem, perhaps it is sufficient to override the
implementation locally like so:

extern "C" uid_t getuid(void) { return 1000; }

As for 'exec_static_constructors', this can be safely ignored in your


On Tuesday, November 27, 2018 12:40:21 PM CET, Wouter van Oijen wrote:
> Hello,
> I succeeded in building and starting Mosquitto under Genode, but it
> fails due to the not-implemented functions geteuid() and getpwnam().
> See log below. Are these functions already implemented somewhere? How
> should I continue from here?
> Also, what does the warning about exec_static_constructors() mean?
> [init -> mosquitto] lwIP Nic interface up address=
> netmask= gateway=
> [init -> mosquitto] Warning: Don't call
> Genode::Env::exec_static_constructors() in components without static
> globals
> [init -> mosquitto] 1543318260: mosquitto version 1.5.4 starting
> [init -> mosquitto] 1543318260: Using default config.
> [init -> mosquitto] 1543318260: Opening ipv4 listen socket on port 1883.
> [init -> mosquitto] Warning: geteuid: geteuid not implemented
> [init -> mosquitto] Warning: getpwnam: getpwnam not implemented
> [init -> mosquitto] 1543318260: Error: Invalid user 'mosquitto'.
> [init] child "mosquitto" exited with exit value 1
> Best regards,
> Wouter

More information about the users mailing list