Skip to content

Commit

Permalink
Fix mosquitto_passwd -U
Browse files Browse the repository at this point in the history
  • Loading branch information
ralight committed Dec 9, 2020
1 parent 9968e35 commit bdfa5e7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ Broker:
- Fix websockets connections on Windows blocking subsequent connections.
Closes #1934.

Apps:
- Fix `mosquitto_passwd -U`

Build:
- Fix cjson include paths.
- Fix build using WITH_TLS=no when the openssl headers aren't available.
Expand Down
6 changes: 5 additions & 1 deletion apps/mosquitto_passwd/mosquitto_passwd.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,11 @@ int delete_pwuser(FILE *fptr, FILE *ftmp, const char *username)
* ====================================================================== */
static int update_file_cb(FILE *fptr, FILE *ftmp, const char *username, const char *password, const char *line, struct cb_helper *helper)
{
return output_new_password(ftmp, username, password, helper->iterations);
if(helper){
return output_new_password(ftmp, username, password, helper->iterations);
}else{
return output_new_password(ftmp, username, password, PW_DEFAULT_ITERATIONS);
}
}

int update_file(FILE *fptr, FILE *ftmp)
Expand Down

0 comments on commit bdfa5e7

Please sign in to comment.