diff options
author | Tobias C. Berner <tcberner@FreeBSD.org> | 2019-08-28 18:09:16 +0000 |
---|---|---|
committer | Tobias C. Berner <tcberner@FreeBSD.org> | 2019-08-28 18:09:16 +0000 |
commit | e3c89c4f6122a85f6730cbea5b39fa71c494db23 (patch) | |
tree | 079c28e2fad53145cb8585c2070cf7c8aaad390b /security/plasma5-kwallet-pam | |
parent | 79f6a476d04db3293357862025ab1e129e1ecfd7 (diff) | |
download | ports-e3c89c4f6122a85f6730cbea5b39fa71c494db23.tar.gz ports-e3c89c4f6122a85f6730cbea5b39fa71c494db23.zip |
Notes
Diffstat (limited to 'security/plasma5-kwallet-pam')
-rw-r--r-- | security/plasma5-kwallet-pam/Makefile | 7 | ||||
-rw-r--r-- | security/plasma5-kwallet-pam/files/patch-pam__kwallet.c | 21 | ||||
-rw-r--r-- | security/plasma5-kwallet-pam/files/patch-pam__kwallet__init | 10 | ||||
-rw-r--r-- | security/plasma5-kwallet-pam/pkg-plist | 2 |
4 files changed, 39 insertions, 1 deletions
diff --git a/security/plasma5-kwallet-pam/Makefile b/security/plasma5-kwallet-pam/Makefile index ac6724dbedba..4809cc321bb5 100644 --- a/security/plasma5-kwallet-pam/Makefile +++ b/security/plasma5-kwallet-pam/Makefile @@ -2,6 +2,7 @@ PORTNAME= kwallet-pam DISTVERSION= ${KDE_PLASMA_VERSION} +PORTREVISION= 1 CATEGORIES= security kde kde-plasma MAINTAINER= kde@FreeBSD.org @@ -17,4 +18,10 @@ USE_KDE= ecm wallet USE_QT= gui \ buildtools_build qmake_build +post-patch: + @${REINPLACE_CMD} -e 's,socat,nc,' -e 's,/security,,' \ + ${WRKSRC}/CMakeLists.txt + @${REINPLACE_CMD} 's,/usr/bin/kwalletd,${LOCALBASE}/bin/kwalletd,' \ + ${WRKSRC}/pam_kwallet.c + .include <bsd.port.mk> diff --git a/security/plasma5-kwallet-pam/files/patch-pam__kwallet.c b/security/plasma5-kwallet-pam/files/patch-pam__kwallet.c new file mode 100644 index 000000000000..c53436f2df7e --- /dev/null +++ b/security/plasma5-kwallet-pam/files/patch-pam__kwallet.c @@ -0,0 +1,21 @@ +---pam_kwallet.c 2019-08-28 10:45:20.619019000 +0200 ++++ pam_kwallet.c 2019-08-28 10:47:11.632255000 +0200 +@@ -390,7 +390,7 @@ static void execute_kwallet(pam_handle_t *pamh, struct + struct sockaddr_un local; + local.sun_family = AF_UNIX; + +- if (strlen(fullSocket) > sizeof(local.sun_path)) { ++ if (strlen(fullSocket) >= sizeof(local.sun_path)) { + syslog(LOG_ERR, "%s: socket path %s too long to open", + logPrefix, fullSocket); + free(fullSocket); +@@ -403,8 +403,7 @@ static void execute_kwallet(pam_handle_t *pamh, struct + + syslog(LOG_DEBUG, "%s: final socket path: %s", logPrefix, local.sun_path); + +- size_t len = strlen(local.sun_path) + sizeof(local.sun_family); +- if (bind(envSocket, (struct sockaddr *)&local, len) == -1) { ++ if (bind(envSocket, (struct sockaddr *)&local, sizeof(local)) == -1) { + syslog(LOG_INFO, "%s-kwalletd: Couldn't bind to local file\n", logPrefix); + goto cleanup; + } diff --git a/security/plasma5-kwallet-pam/files/patch-pam__kwallet__init b/security/plasma5-kwallet-pam/files/patch-pam__kwallet__init new file mode 100644 index 000000000000..ccc444322cbb --- /dev/null +++ b/security/plasma5-kwallet-pam/files/patch-pam__kwallet__init @@ -0,0 +1,10 @@ +--- pam_kwallet_init.orig 2019-08-09 12:51:25.200806000 +0200 ++++ pam_kwallet_init 2019-08-09 12:51:41.765221000 +0200 +@@ -1,6 +1,6 @@ + #!/bin/sh + + if test -n "$PAM_KWALLET5_LOGIN" ; then +- env | socat STDIN UNIX-CONNECT:$PAM_KWALLET5_LOGIN ++ env | nc -U "$PAM_KWALLET5_LOGIN" | : + fi + diff --git a/security/plasma5-kwallet-pam/pkg-plist b/security/plasma5-kwallet-pam/pkg-plist index 6b657df8dbe8..22422cbe1aec 100644 --- a/security/plasma5-kwallet-pam/pkg-plist +++ b/security/plasma5-kwallet-pam/pkg-plist @@ -1,3 +1,3 @@ etc/xdg/autostart/pam_kwallet_init.desktop lib/libexec/pam_kwallet_init -lib/security/pam_kwallet5.so +lib/pam_kwallet5.so |