diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2018-07-27 15:30:34 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2018-07-28 11:57:15 +0000 |
commit | 424ae0323ca3c0b448b65eefab3470a285453c31 (patch) | |
tree | ce74822fb6cdf49e9736659a9384b52eb328b75b /main/mosquitto | |
parent | 4d9d4754da62d9df1b231b19fd1576022585a8fb (diff) | |
download | aports-424ae0323ca3c0b448b65eefab3470a285453c31.tar.bz2 aports-424ae0323ca3c0b448b65eefab3470a285453c31.tar.xz |
main/mosquitto: flush output when asking for password
Diffstat (limited to 'main/mosquitto')
-rw-r--r-- | main/mosquitto/APKBUILD | 4 | ||||
-rw-r--r-- | main/mosquitto/mosquitto_passwd-flush.patch | 39 |
2 files changed, 42 insertions, 1 deletions
diff --git a/main/mosquitto/APKBUILD b/main/mosquitto/APKBUILD index 04dbd89737..301cb85681 100644 --- a/main/mosquitto/APKBUILD +++ b/main/mosquitto/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=mosquitto pkgver=1.4.15 -pkgrel=3 +pkgrel=4 pkgdesc="An Open Source MQTT v3.1 Broker" url="http://mosquitto.org/" arch="all" @@ -18,6 +18,7 @@ subpackages="$pkgname-dev $pkgname-doc $pkgname-libs++:_pp $pkgname-openrc source="http://mosquitto.org/files/source/$pkgname-$pkgver.tar.gz libressl.patch config.patch + mosquitto_passwd-flush.patch mosquitto.initd" builddir="$srcdir/$pkgname-$pkgver" @@ -89,4 +90,5 @@ clients() { sha512sums="36b06547553cf28af3ca9b728c42fc27e849c4ae84d7964572d430233ab26e2b59eee2a215ac23ddf2d0bef419e7c70e64e2a22c397fadb3e0677314d03f1100 mosquitto-1.4.15.tar.gz 53859b628f965b77f6e47910c0ceba2f2737b815131ed800dc64a80419e434d25b5ba0938ae645882e9aa5d475d4940c7d35cc6d56f54bc4937a66b32d7db4ad libressl.patch d5442373ae6ae8bc83eee59b425fbd76e80f905b9fd2bd2ed2a37a7e156fe95a9cf477c9c4dac0975c5fd90e70884de6fb8a16aefcd37b239199d5deae50b7d2 config.patch +f61ece1f708f2f56a9e8e77f960b61ad42141a1cd8a12b679d72b53fec4889861a468c2ce541190ef2467fbe53816daef11b11a4e7fcfc4da7ee3a7400e559b0 mosquitto_passwd-flush.patch 16f96d8f7f3a8b06e2b2e04d42d7e0d89a931b52277fc017e4802f7a3bc85aff4dd290b1a0c40382ea8f5568d0ceb7319c031d9be916f346d805231a002b0433 mosquitto.initd" 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; |