From f15929695c1154fc9959e66ecb1d4aad1558fe0a Mon Sep 17 00:00:00 2001 Message-Id: From: Mark Wooding Date: Sat, 29 Dec 2007 19:08:01 +0000 Subject: [PATCH] disorder setup-guest enforces mail_sender requirement Organization: Straylight/Edgeware From: rjk@greenend.org.uk <> --- clients/disorder.c | 2 ++ doc/disorder.1.in | 3 +++ tests/dtest.py | 1 + 3 files changed, 6 insertions(+) diff --git a/clients/disorder.c b/clients/disorder.c index 3413791..2d3cb9f 100644 --- a/clients/disorder.c +++ b/clients/disorder.c @@ -467,6 +467,8 @@ static void cf_setup_guest(char **argv) { default: fatal(0, "invalid option"); } } + if(online_registration && !config->mail_sender) + fatal(0, "you MUST set mail_sender if you want online registration"); if(disorder_adduser(getclient(), "guest", "", online_registration ? "read,register" : "read")) exit(EXIT_FAILURE); diff --git a/doc/disorder.1.in b/doc/disorder.1.in index d04cb3b..1fd94b5 100644 --- a/doc/disorder.1.in +++ b/doc/disorder.1.in @@ -204,6 +204,9 @@ allowing new users to automatically register themselves via the web interface. .IP With the option \fB--no-online-registration\fR, the "register" right is suppressed and users must be manually created by an administrator. +.IP +If online registration is desired then \fBmail_sender\fR must be set in the +configuration file. See \fBdisorder_config\fR(5). .TP .B shutdown Shut down the daemon. diff --git a/tests/dtest.py b/tests/dtest.py index 8262a03..bca2b4a 100644 --- a/tests/dtest.py +++ b/tests/dtest.py @@ -194,6 +194,7 @@ tracklength *.flac disorder-tracklength speaker_backend network broadcast 127.0.0.1 %d broadcast_from 127.0.0.1 %d +mail_sender no.such.user.sorry@greenend.org.uk """ % (testroot, testroot, testroot, top_builddir, top_builddir, port, port + 1)) -- [mdw]