View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0004152||unreal||ircd||public||2012-12-26 14:39||2012-12-26 15:54|
|Fixed in Version||3.2.10|
|Summary||0004152: ircd.log is created with unusable permissions (user) if unrealircd does a seteuid|
|Description||unreal used with IRC_USER and IRC_GROUP (i.e. to have it setuid/setgid) will first log something before changing user, thus creating ircd.log as root if it doesn't exist.|
After changing user it tries to open the log again and fails (it's opened/closed everytime someone calls ircd_log)
|Steps To Reproduce||Compile unreal with IRC_USER and IRC_GROUP set then:|
./unreal start as root
(I need to run it as root and let it change user for chroot)
|Additional Information||Happened on earlier versions, but there's a new check in ircd_log(), src/s_extra.c that makes unreal exit if it fails during startup|
- not use ircd_log before setuid? *cough*
- open the log file once and for all, not everytime there's a message to log?
- chown the file before doing the setuid? Or eventually after it got created?
|Tags||No tags attached.|
|3rd party modules|
chown() might be a good idea. After all, the ircd may hit (size) limits as defined in the log block and the log file may have to be 'restarted'.. all when running under the low-privileged user.
I've fixed this in 3.2.10 and updated the download.
Tested it locally and where - indeed - the ircd didn't start before this fix, it does now work OK.
So.. issue resolved ;)
|2012-12-26 14:39||asmadeus||New Issue|
|2012-12-26 15:53||syzop||Note Added: 0017278|
|2012-12-26 15:53||syzop||Status||new => resolved|
|2012-12-26 15:53||syzop||Fixed in Version||=> 3.2.10|
|2012-12-26 15:53||syzop||Resolution||open => fixed|
|2012-12-26 15:53||syzop||Assigned To||=> syzop|