Hello,
Mark Miesfeld wrote:
> Rainer,
>
> Didn't you have a problem in the past picking up the old rxapi?
>
>   
Not really :-)
But this time it looks like the UID switch causes the problem.
I have disabled this functionality and now its working.

I have changes this:

APIService.cpp

// run as nobody
#define ENABLE_NOBODY_no

// Add signal handler for SIGTERM
#define ENABLE_SIGTERM

// Add AIX SRC
#define ENABLE_AIX_SRC

static bool morph2daemon(void)
{

#ifdef ENABLE_NOBODY
    // We start out with root privileges. This is bad from a security
perspective. So
    // switch to the nobody user so we do not have previleges we do not
need.
    struct passwd *pw;
    pw = getpwnam("nobody");
    if (pw != NULL) {
        setuid(pw->pw_uid);
    }
#endif
...
}
and

int main(int argc, char *argv[])
{
...
    // run the server
#if defined(ENABLE_AIX_SRC)
    if (run_as_daemon == false) {
        printf("Starting request processing loop.\n");
    } else {
        (void) setsid();

#ifdef ENABLE_NOBODY
        // We start out with root privileges. This is bad from a
security perspective. So
        // switch to the nobody user so we do not have previleges we do
not need.
        struct passwd *pw;
        pw = getpwnam("nobody");
        if (pw != NULL) {
            setuid(pw->pw_uid);
        }
#endif

...
}

With this changes I am back in business. Right now I have no idea why
the rxapi daemon does not work
when switched to nobody.

Any ideas ?
> Also, don't forget that the the port number used by rxapi has changed.
>  On Windows, where I had a previous ooRexx version installed, I didn't
> get a clean build when I tried to build the first time after the port
> number changed.  Things would hang.  I had to completely remove ooRexx
> from the system and completely redo the build.
>
>   
Unfortunately thats not the problem.
> --
> Mark Miesfeld
>   
Bye
  Rainer



------------------------------------------------------------------------------
_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to