I am attempting to build Zotonic, the Erlang CMS, but it errors out when compiling exec.cpp.
The section of code for the initialize function is
Line 454 is "#error setresuid(3) not supported!"
Line 456 is "< 0) {"
Reading the man page for setresuid looks like it is correct, so I'm not sure.
Code:
===>~/zotonic/_build/default/lib/erlexec/c_src/exec.cpp:454:14: error: #error setresuid(3) not supported!
#error setresuid(3) not supported!
^~~~~
~/zotonic/_build/default/lib/erlexec/c_src/exec.cpp: In function 'void initialize(int, bool, bool)':
~/zotonic/_build/default/lib/erlexec/c_src/exec.cpp:456:9: error:
expected primary-expression before '<' token
< 0) {
^
gmake: *** [GNUmakefile:27: compile] Error 1
The section of code for the initialize function is
Code:
void initialize(int userid, bool use_alt_fds, bool enable_suid)
{
if (getuid() == 0 && userid > 0) {
if (
#ifdef HAVE_SETRESUID
setresuid(-1, userid, geteuid()) // glibc, FreeBSD, OpenBSD, HP-UX
#elif HAVE_SETREUID
setreuid(-1, userid) // MacOSX, NetBSD, AIX, IRIX, Solar
is>=2.5, OSF/1, Cygwin
#else
#error setresuid(3) not supported!
#endif
< 0) {
perror("Failed to set effective userid");
exit(4);
}
if (debug)
fprintf(stderr, "Initializing: uid=0, euid=%d, userid=%d%s\r\n",
getuid(), userid, enable_suid?" enable-suid":"");
Line 454 is "#error setresuid(3) not supported!"
Line 456 is "< 0) {"
Reading the man page for setresuid looks like it is correct, so I'm not sure.