From: Ian Jackson Date: Fri, 30 Apr 2010 23:01:34 +0000 (+0100) Subject: Option for setting realsockdir X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=inn-innduct.git;a=commitdiff_plain;h=7fd315f77acf37f9dd1e9bfb1dca6d639a230dda Option for setting realsockdir --- diff --git a/backends/innduct.c b/backends/innduct.c index 36eeda8..3225a89 100644 --- a/backends/innduct.c +++ b/backends/innduct.c @@ -2,7 +2,6 @@ * todo * - inotify not working ? * - some per-conn info thing for control - * - option for realsockdir * - manpage: document control master stuff * * debugging rune: @@ -950,7 +949,7 @@ static void control_init(void) { uid_t self= geteuid(); if (!S_ISDIR(stab.st_mode) || stab.st_uid != self || - stab.st_mode & 0077) { + stab.st_mode & 0007) { warn("no control socket, because real socket directory" " is somehow wrong (ISDIR=%d, uid=%lu (exp.%lu), mode %lo)", !!S_ISDIR(stab.st_mode), @@ -3105,6 +3104,7 @@ static const Option innduct_options[]= { {0,"no-filemon", 0, &try_filemon, op_setint, 0 }, {'C',"inndconf", "F", &inndconffile, op_string }, {'P',"port", "PORT", &port, op_integer }, +{0,"ctrl-sock-dir", 0, &realsockdir, op_string }, {0,"help", 0, 0, help }, {0,"max-connections", "N", &max_connections, op_integer }, diff --git a/doc/man/innduct.8 b/doc/man/innduct.8 index 64fd7bb..83aeade 100644 --- a/doc/man/innduct.8 +++ b/doc/man/innduct.8 @@ -106,6 +106,26 @@ Read instead of the default .BR inn.conf . .TP +.BI \-\-ctrl-sock-dir= DIR +Bind the real control socket to a unique filename in +.IR DIR . +A symlink will be made pointing to the actual file used, named +.IB feedfile _control +in the same directory as +.IR feedfile , +but since +.IR feedfile 's +path may be too long for an AF_UNIX socket path, innduct always +creates the sockets in this dedicated directory which is expected to +have a short path. If +.I DIR +does not exist it will be created with mode 0700; if it does +exist it must not be a symlink and must be owned by the user running +innduct and have no access for "other". If the control socket cannot +be set up (for this or any other reason), a warning is logged, but +such situations are not fatal for innduct's startup. The default is +.BR /tmp/innduct.control . +.TP .BI \-\-port= PORT Connect to port .I PORT