[icecast-dev] Latest CVS; setuid/grp and chroot.

Ian Kumlien pomac at vapor.com
Mon May 20 11:02:38 PDT 2002


The latest incarnation of this patch seems ok (Michael tested it, I haven't yet).

But there is a few things that should be ironed out... like:

       user = getpwnam(conf->user);
       group = getgrnam(conf->group);

           uid = user->pw_uid;
           fprintf(stderr, "Couldn't find user \"%s\" in password file\n", conf->user);


if(user) will segfault if the pointer is 0x0 (which it will be if passwd file isn't found.
(how it reacts if the user isn't found i don't know, but better safe than sorry)

use if((user = getpwnam(conf->user))) and you won't have that segfault.

Same goes for if(group).

//Ian Kumlien

<p>--- >8 ----
List archives:  http://www.xiph.org/archives/
icecast project homepage: http://www.icecast.org/
To unsubscribe from this list, send a message to 'icecast-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.

More information about the Icecast-dev mailing list