* with GPLv3. If not then please let me know. -Ian Jackson.)
*/
-/*
- * todo
- * specify perms of /tmp/innduct.control
- */
-
-/*
- * debugging rune:
- * build-lfs/backends/innduct --connection-timeout=30 --no-daemon -C ../inn.conf -f `pwd`/fee sit localhost
- */
-
/*
* Newsfeeds file entries should look like this:
* host.name.of.site[/exclude,exclude,...]\
static const oop_rd_style peer_rd_style;
static oop_rd_call peer_rd_err, peer_rd_ok;
+
/*----- configuration options -----*/
/* when changing defaults, remember to update the manpage */
static int period_seconds=60;
static int filepoll_seconds=5;
static int max_queue_per_ipf=-1;
+static int realsockdir_any_perms=0;
static int connection_setup_timeout=200;
static int inndcomm_flush_timeout=100;
r= mkdir(realsockdir, 0700);
if (r) NOCONTROL("mkdir real socket dir %s", realsockdir);
- } else {
+ } else if (!realsockdir_any_perms) {
uid_t self= geteuid();
if (!S_ISDIR(stab.st_mode) ||
stab.st_uid != self ||
{'C',"inndconf", "F", &inndconffile, op_string },
{'P',"port", "PORT", &port, op_integer },
{0,"ctrl-sock-dir", 0, &realsockdir, op_string },
+{0,"no-ctrl-sock-dir-perms-check",0,&realsockdir_any_perms, op_setint, 0 },
{0,"help", 0, 0, help },
{0,"max-connections", "N", &max_connections, op_integer },
int val= 1;
r= SMsetup(SM_PREOPEN, &val); if (!r) warn("SMsetup SM_PREOPEN failed");
- r= SMinit(); if (!r) die("storage manager initialisation (SMinit) failed");
+// r= SMinit(); if (!r) die("storage manager initialisation (SMinit) failed");
if (!become_daemon)
control_stdio();
instead of the default
.BR inn.conf .
.TP
-.BI \-\-ctrl-sock-dir= DIR
+.BI \-\-ctrl-sock-dir= CTRL-SOCK-DIR
Use
-.I DIR
+.I CTRL-SOCK-DIR
as the directory to contain the actual control socket. See
CONTROLLING INNDUCT, below.
If
-.I DIR
+.I CTRL-SOCK-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
such situations are not fatal for innduct's startup. The default is
.BR /tmp/innduct.control .
.TP
+.BI \-\-no-ctrl-sock-dir-perms-check
+Use an existing
+.I CTRL-SOCK-DIR
+even if it has unexpected permissions and ownership. Note that this
+is not safe with the default value of
+.IR CTRL-SOCK-DIR .
+.TP
.BI \-\-port= PORT
Connect to port
.I PORT