[erlang-questions] Yaws problem with erl_ddll

Gordon Guthrie gordonguthrie@REDACTED
Mon Jan 22 09:07:03 CET 2007


Folks

Ubuntu Edgy Eft has Erlang RB10 and yaws available as packages, lovely,
lets install them.

Then trying to get yaws to run I hit the problem that other people have
with setuid_drv not being loaded  - see here
http://www.erlang.org/pipermail/erlang-questions/2006-November/023941.html

No problem uninstall the packages and install from source:
* Erlang R11B-2
* Yaws-1.66

Same problem!

First up I check if setuid_drv is on the machine and has sensible
permissions:
gordonguthrie@REDACTED:/usr/local/lib/yaws/priv$ ls -all
total 40
drwxr-xr-x 2 root root  4096 2007-01-22 07:33 .
drwxr-xr-x 6 root root  4096 2007-01-21 23:51 ..
-rwxr-xr-x 1 root root 18466 2007-01-22 07:33 epam
-rwxr-xr-x 1 root root  9695 2007-01-22 07:33 setuid_drv.so

A bit more digging shows that the setuid_drv.so is failing to load, the
relevant line in yaws.erl is in the function getuid()

	    erl_ddll:load_driver(filename:dirname(code:which(?MODULE)) ++
 				 "/../priv/", "setuid_drv"),

The return value for this isn't being checked, but returns
{error,{open_error,-10}}

The parameters being passed in seem fine:
2> filename:dirname(code:which(yaws)).
"/usr/local/lib/yaws/ebin"

So, time to look into erl_ddll.erl and see what happens, at which point
the trail goes cold.

The return code (error,{open_error,-10}} comes from these lines:
do_load_driver(Path, Driver, DriverFlags) ->
    case erl_ddll:try_load(Path, Driver,[{monitor,pending}]++DriverFlags) of

But there is no sign of the function erl_ddl:try_load...

It is not defined in erl_ddll.erl, grepping the entire source tree shows
no evidence of it...

What am I missing?

Gordon <--- scratching head!




More information about the erlang-questions mailing list