View Issue Details

IDProjectCategoryView StatusLast Update
0002100unrealircdpublic2007-04-27 05:36
Reporteradrianp Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
Status closedResolutionwont fix 
Platformi386OSNetBSDOS Version2.0_BETA
Product Version3.2.1 
Summary0002100: Patch for run-time configuration of setuid/setgid user and group.
DescriptionThe setuid/setgid configuration of unrealircd currently require a user to hack config.h and define a IRC_UID and IRC_GID at compile time. When the server is run it then does a setuid/setgid to that user/group.

In terms of portability (i.e. compiling a pre-made binary and transporting it to another system) this is a bit of a limitation. It means that on the new system a new user/group has to be created with the same uid/gid that is compiled into the binary.

The simple way round this is to allow the uid/gid to be specified run-time as opposed to compile time.

I've attached a set of patches to achieve this. When you run ircd all you have to do is specify -u user:group (e.g. ./ircd -u nobody:nogroup) and that's it. No hardcoded uid/gid. I've tested this on NetBSD and the code seems ok. It should be pretty portable as well to other UNIX-like OS'es.
Additional InformationThe patch is primarily based on the way that ntpd 4.2.0 deals with the same issue.

The main people this should benefit is any OS (NetBSD, FreeBSD, Linux, OpenBSD etc.) that have pre-packaged binaries available for their users.
TagsNo tags attached.
Attached Files
unrealircd.zip (2,551 bytes)
3rd party modules

Activities

stskeeps

2007-04-27 05:36

reporter   ~0013824

Please re-submit for 3.3 or 3.2.6/7 instead.

Issue History

Date Modified Username Field Change
2004-09-30 00:22 adrianp New Issue
2004-09-30 00:22 adrianp File Added: unrealircd.zip
2007-04-27 05:36 stskeeps Status new => closed
2007-04-27 05:36 stskeeps Note Added: 0013824
2007-04-27 05:36 stskeeps Resolution open => wont fix