user = "*@172.16.0.0/12";
user = "*test@123D:B567:*";
+ /* auth_user: The username (authenticated via SASL or PASS) allowed
+ * to connect. You are able to put multiple auth_user lines. If people
+ * are authenticating via SASL in this way, it is recommended to comment
+ * out the password option below. You will also *NEED* to specify a user
+ * line above auth_user, this can safely be "*@*", however.
+ */
+ auth_user = "jilles";
+ auth_user = "jdhore";
+
/* password: an optional password that is required to use this block.
* By default this is not encrypted, specify the flag "encrypted" in
* flags = ...; below if it is.
user = "*@172.16.0.0/12";
user = "*test@123D:B567:*";
+ /* auth_user: The username (authenticated via SASL or PASS) allowed
+ * to connect. You are able to put multiple auth_user lines. If people
+ * are authenticating via SASL in this way, it is recommended to comment
+ * out the password option below. You will also *NEED* to specify a user
+ * line above auth_user, this can safely be "*@*", however.
+ */
+ auth_user = "jilles";
+ auth_user = "jdhore";
+
/* password: an optional password that is required to use this block.
* By default this is not encrypted, specify the flag "encrypted" in
* flags = ...; below if it is.
static int mr_authenticate(struct Client *, struct Client *, int, const char **);
static int me_sasl(struct Client *, struct Client *, int, const char **);
+static int server_auth_sasl(struct Client *);
static void abort_sasl(struct Client *);
static void abort_sasl_exit(hook_data_client_exit *);
sendto_one(target_p, form_str(RPL_SASLSUCCESS), me.name, EmptyString(target_p->name) ? "*" : target_p->name);
target_p->preClient->sasl_complete = 1;
ServerStats.is_ssuc++;
+ server_auth_sasl(target_p);
}
*target_p->preClient->sasl_agent = '\0'; /* Blank the stored agent so someone else can answer */
}
return 0;
}
+static int server_auth_sasl(struct Client *client_p)
+{
+ char *auth_user;
+
+ if (client_p->localClient->auth_user)
+ {
+ memset(client_p->localClient->auth_user, 0,
+ strlen(client_p->localClient->auth_user));
+ rb_free(client_p->localClient->auth_user);
+ client_p->localClient->auth_user = NULL;
+ }
+
+ auth_user = rb_strndup(client_p->user->suser, PASSWDLEN);
+
+ /* pointless check here */
+ if (auth_user)
+ client_p->localClient->auth_user = rb_strndup(auth_user, PASSWDLEN);
+
+ return 0;
+}
+
/* If the client never finished authenticating but is
* registering anyway, abort the exchange.
*/