added --subscription-vassal-required

This commit is contained in:
Roberto De Ioris
2015-08-26 06:57:58 +02:00
parent 4fe69c85ef
commit 82efdff518
3 changed files with 5 additions and 0 deletions
+3
View File
@@ -310,6 +310,9 @@ struct uwsgi_subscribe_node *uwsgi_add_subscribe_node(struct uwsgi_subscribe_slo
if ((usr->address_len > 0xff || usr->address_len == 0) && (usr->vassal_len > 0xff || usr->vassal_len == 0))
return NULL;
if (uwsgi.subscription_vassal_required && usr->vassal_len == 0)
return NULL;
if (current_slot) {
#ifdef UWSGI_SSL
if (uwsgi.subscriptions_sign_check_dir && !uwsgi_subscription_sign_check(current_slot, usr)) {
+1
View File
@@ -635,6 +635,7 @@ static struct uwsgi_option uwsgi_base_options[] = {
{"subscription-notify-socket", required_argument, 0, "set the notification socket for subscriptions", uwsgi_opt_set_str, &uwsgi.subscription_notify_socket, UWSGI_OPT_MASTER},
{"subscription-mountpoints", required_argument, 0, "enable mountpoints support for subscription system", uwsgi_opt_set_int, &uwsgi.subscription_mountpoints, UWSGI_OPT_MASTER},
{"subscription-mountpoint", required_argument, 0, "enable mountpoints support for subscription system", uwsgi_opt_set_int, &uwsgi.subscription_mountpoints, UWSGI_OPT_MASTER},
{"subscription-vassal-required", no_argument, 0, "require a vassal field for each subscription packet", uwsgi_opt_true, &uwsgi.subscription_vassal_required, UWSGI_OPT_MASTER},
#ifdef UWSGI_SSL
{"legion", required_argument, 0, "became a member of a legion", uwsgi_opt_legion, NULL, UWSGI_OPT_MASTER},
+1
View File
@@ -2813,6 +2813,7 @@ struct uwsgi_server {
int emperor_command_socket_fd;
int emperor_wait_for_command;
struct uwsgi_string_list *emperor_wait_for_command_ignore;
int subscription_vassal_required;
};
struct uwsgi_rpc {