diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2012-04-23 17:57:02 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2012-04-23 17:57:02 +0400 |
commit | 5b697ce84fa67e6d237d21001814b8f3a91342d6 (patch) | |
tree | d5d3bc0b9ebac93b72591f886f80afbf788d4476 /src/client | |
parent | bd557979172ed598e2644575af3dd0ad8fffbd47 (diff) | |
download | rspamd-5b697ce84fa67e6d237d21001814b8f3a91342d6.tar.gz rspamd-5b697ce84fa67e6d237d21001814b8f3a91342d6.zip |
* Allow full access to controller's commands without a password if
controller password is not specified in configuration.
Fix some minor stuff while I'm here.
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/rspamc.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/client/rspamc.c b/src/client/rspamc.c index d91b8cdf0..7219d35b5 100644 --- a/src/client/rspamc.c +++ b/src/client/rspamc.c @@ -395,7 +395,7 @@ learn_rspamd_stdin (gboolean is_spam) gint r = 0, len; GError *err = NULL; - if (password == NULL || (statfile == NULL && classifier == NULL)) { + if ((statfile == NULL && classifier == NULL)) { fprintf (stderr, "cannot learn message without password and symbol/classifier name\n"); exit (EXIT_FAILURE); } @@ -462,7 +462,7 @@ learn_rspamd_file (gboolean is_spam, const gchar *file) { GError *err = NULL; - if (password == NULL || (statfile == NULL && classifier == NULL)) { + if ((statfile == NULL && classifier == NULL)) { fprintf (stderr, "cannot learn message without password and symbol/classifier name\n"); exit (EXIT_FAILURE); } @@ -514,10 +514,6 @@ fuzzy_rspamd_stdin (gboolean delete) gint r = 0, len; GError *err = NULL; - if (password == NULL) { - fprintf (stderr, "cannot learn message without password\n"); - exit (EXIT_FAILURE); - } /* Add server */ add_rspamd_server (TRUE); @@ -559,11 +555,6 @@ fuzzy_rspamd_file (const gchar *file, gboolean delete) { GError *err = NULL; - if (password == NULL) { - fprintf (stderr, "cannot learn message without password\n"); - exit (EXIT_FAILURE); - } - if (!rspamd_fuzzy_file (client, file, password, weight, flag, delete, &err)) { if (err != NULL) { fprintf (stderr, "cannot learn message: %s\n", err->message); |