View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002100 | unreal | ircd | public | 2004-09-30 00:22 | 2007-04-27 05:36 |
Reporter | adrianp | Assigned To | |||
Priority | normal | Severity | feature | Reproducibility | always |
Status | closed | Resolution | wont fix | ||
Platform | i386 | OS | NetBSD | OS Version | 2.0_BETA |
Product Version | 3.2.1 | ||||
Summary | 0002100: Patch for run-time configuration of setuid/setgid user and group. | ||||
Description | The 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 Information | The 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. | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
3rd party modules | |||||