slackbuilds_ponce/network/nss-tls/per_user_dir.diff
B. Watson 9a766de5bd
network/nss-tls: Added (dns over https).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
2024-01-20 01:00:45 +07:00

23 lines
887 B
Diff

diff -Naur nss-tls-1.1/nss-tls.c nss-tls-1.1.patched/nss-tls.c
--- nss-tls-1.1/nss-tls.c 2020-07-16 19:09:59.000000000 -0400
+++ nss-tls-1.1.patched/nss-tls.c 2024-01-17 15:57:03.989437314 -0500
@@ -68,7 +68,7 @@
if (geteuid() == 0)
strcpy(sun.sun_path, NSS_TLS_SOCKET_PATH);
else {
- dir = getenv("XDG_RUNTIME_DIR");
+ dir = getenv("HOME");
if (dir) {
len = strlen(dir);
if (len > sizeof(sun.sun_path) - sizeof("/"NSS_TLS_SOCKET_NAME))
@@ -77,6 +77,10 @@
memcpy(sun.sun_path, dir, len);
sun.sun_path[len] = '/';
++len;
+ memcpy(sun.sun_path + len, ".cache", 6);
+ len += 6;
+ sun.sun_path[len] = '/';
+ ++len;
strncpy(sun.sun_path + len,
NSS_TLS_SOCKET_NAME,
sizeof(sun.sun_path) - len);