Print messages in mosquitto_passwd when adding/updating passwords.

Closes #2544. Thanks to Shruti Nanda.
pull/2559/head
Roger A. Light 3 years ago
parent fe32e2506b
commit e3246f547c

@ -57,6 +57,8 @@ Broker:
to trust default CA certificates. Closes #2473.
- Add `--test-config` option which can be used to test a configuration file
before trying to use it in a live broker. Closes #2521.
- Print messages in mosquitto_passwd when adding/updating passwords.
Closes #2544.
Plugins / plugin interface:
- Add persist-sqlite plugin.

@ -336,8 +336,10 @@ static int update_pwuser(FILE *fptr, FILE *ftmp, const char *username, const cha
rc = pwfile_iterate(fptr, ftmp, update_pwuser_cb, &helper);
if(helper.found){
printf("Updating password for user %s\n", username);
return rc;
}else{
printf("Adding password for user %s\n", username);
return output_new_password(ftmp, username, password, iterations);
}
}
@ -606,6 +608,7 @@ int main(int argc, char *argv[])
return 1;
}
free(password_file);
printf("Adding password for user %s\n", username);
rc = output_new_password(fptr, username, password_cmd, iterations);
fclose(fptr);
return rc;

Loading…
Cancel
Save