int
auth_call_pwcheck(uschar *s, uschar **errptr)
{
-uschar *reply = NULL;
-uschar *pw = Ustrrchr(s, ':');
+uschar * reply = NULL, * pw = Ustrrchr(s, ':');
-if (pw == NULL)
+if (!pw)
{
*errptr = US"pwcheck: malformed input - missing colon";
return ERROR;
auth_instance * ablock = (auth_instance *)a;
auth_cyrus_sasl_options_block * ob = a->options_block;
const uschar *list, *listptr, *buffer;
-int rc, i;
+int rc, sep;
unsigned int len;
rmark rs_point;
uschar *expanded_hostname;
log_write(0, LOG_PANIC_DIE|LOG_CONFIG_FOR, "%s authenticator: "
"couldn't initialise Cyrus SASL server connection.", a->name);
-if ((rc = sasl_listmech(conn, NULL, "", ":", "", CCSS &list, &len, &i)) != SASL_OK)
+if ((rc = sasl_listmech(conn, NULL, "", ":", "", CCSS &list, &len, NULL)) != SASL_OK)
log_write(0, LOG_PANIC_DIE|LOG_CONFIG_FOR, "%s authenticator: "
"couldn't get Cyrus SASL mechanism list.", a->name);
-i = ':';
+sep = ':';
listptr = list;
HDEBUG(D_auth)
/* loop until either we get to the end of the list, or we match the
public name of this authenticator */
-while ( (buffer = string_nextinlist(&listptr, &i, NULL, 0))
+while ( (buffer = string_nextinlist(&listptr, &sep, NULL, 0))
&& strcmpic(buffer,ob->server_mech) );
if (!buffer)
more data strings.
Arguments:
- s a colon-separated list of strings
+ s a (not-changeable-colon)-separated list of strings
errptr where to point an error message
Returns: OK if authentication succeeded
*/
static int
-auth_call_pam(const uschar *s, uschar **errptr)
+auth_call_pam(const uschar * s, uschar ** errptr)
{
pam_handle_t *pamh = NULL;
struct pam_conv pamc;
int pam_error;
-int sep = 0;
+int sep = ':'; /* Do not permit change-of-separator */
uschar *user;
/* Set up the input data structure: the address of the conversation function,