aboutsummaryrefslogtreecommitdiffstats
path: root/main/mosquitto/mosquitto_passwd-flush.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/mosquitto/mosquitto_passwd-flush.patch')
-rw-r--r--main/mosquitto/mosquitto_passwd-flush.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/main/mosquitto/mosquitto_passwd-flush.patch b/main/mosquitto/mosquitto_passwd-flush.patch
new file mode 100644
index 0000000000..b2bc854578
--- /dev/null
+++ b/main/mosquitto/mosquitto_passwd-flush.patch
@@ -0,0 +1,39 @@
+diff --git a/config.mk b/config.mk
+index 41c7af6..19d98fb 100644
+--- a/config.mk
++++ b/config.mk
+@@ -21,12 +21,12 @@
+ # Disabling this will also mean that passwords must be stored in plain text. It
+ # is strongly recommended that you only disable WITH_TLS if you are not using
+ # password authentication at all.
+-WITH_TLS:=yes
++#WITH_TLS:=yes
+
+ # Comment out to disable TLS/PSK support in the broker and client. Requires
+ # WITH_TLS=yes.
+ # This must be disabled if using openssl < 1.0.
+-WITH_TLS_PSK:=yes
++#WITH_TLS_PSK:=yes
+
+ # Comment out to disable client client threading support.
+ WITH_THREADING:=yes
+diff --git a/src/mosquitto_passwd.c b/src/mosquitto_passwd.c
+index ea8c315..5b303c1 100644
+--- a/src/mosquitto_passwd.c
++++ b/src/mosquitto_passwd.c
+@@ -288,6 +288,7 @@ int get_password(char *password, int len)
+ char pw1[MAX_BUFFER_LEN], pw2[MAX_BUFFER_LEN];
+
+ printf("Password: ");
++ fflush(stdout);
+ if(gets_quiet(pw1, MAX_BUFFER_LEN)){
+ fprintf(stderr, "Error: Empty password.\n");
+ return 1;
+@@ -295,6 +296,7 @@ int get_password(char *password, int len)
+ printf("\n");
+
+ printf("Reenter password: ");
++ fflush(stdout);
+ if(gets_quiet(pw2, MAX_BUFFER_LEN)){
+ fprintf(stderr, "Error: Empty password.\n");
+ return 1;