From 84b6340522619dbc6132373876d1cea2dd7ee7b7 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Wed, 25 Nov 2020 10:51:21 -0800 Subject: [PATCH] refresh patches --- .../patches/change_invalidate_request_info_output | 12 ++++++------ debian/patches/no_debug_on_invalidate | 2 +- .../notify_systemd_about_successful_startup | 6 ++---- debian/patches/support_large_numbers_in_config | 14 +++++++------- 4 files changed, 16 insertions(+), 18 deletions(-) diff --git a/debian/patches/change_invalidate_request_info_output b/debian/patches/change_invalidate_request_info_output index 01b0396..c6993c2 100644 --- a/debian/patches/change_invalidate_request_info_output +++ b/debian/patches/change_invalidate_request_info_output @@ -4,7 +4,7 @@ Origin: debian Bug-Debian: http://bugs.debian.org/622230 --- a/nscd.c +++ b/nscd.c -@@ -2437,7 +2437,7 @@ +@@ -2442,7 +2442,7 @@ if (!arg) { /* shutdown */ xfull_write(sock, &ureq, sizeof(ureq)); @@ -12,11 +12,11 @@ Bug-Debian: http://bugs.debian.org/622230 + fprintf(stderr,"sent shutdown request, exiting\n"); } else { /* invalidate */ size_t arg_len = strlen(arg) + 1; - struct { -@@ -2449,7 +2449,9 @@ - reqdata.req.key_len = arg_len; - memcpy(reqdata.arg, arg, arg_len); - xfull_write(sock, &reqdata, arg_len + sizeof(ureq)); + char buf[sizeof(user_req_header) + arg_len]; +@@ -2453,7 +2453,9 @@ + req->key_len = arg_len; + memcpy(req + 1, arg, arg_len); + xfull_write(sock, req, sizeof(*req) + arg_len); - printf("sent invalidate(%s) request, exiting\n", arg); + if (debug) { + fprintf(stderr,"sent invalidate(%s) request, exiting\n", arg); diff --git a/debian/patches/no_debug_on_invalidate b/debian/patches/no_debug_on_invalidate index e386c87..967f169 100644 --- a/debian/patches/no_debug_on_invalidate +++ b/debian/patches/no_debug_on_invalidate @@ -1,6 +1,6 @@ --- a/nscd.c +++ b/nscd.c -@@ -2518,6 +2518,9 @@ +@@ -2522,6 +2522,9 @@ conffile = optarg; break; case 'i': diff --git a/debian/patches/notify_systemd_about_successful_startup b/debian/patches/notify_systemd_about_successful_startup index e14cc0d..a96173f 100644 --- a/debian/patches/notify_systemd_about_successful_startup +++ b/debian/patches/notify_systemd_about_successful_startup @@ -6,11 +6,9 @@ Subject: Notify systemd about successful startup nscd.c | 4 ++++ 1 file changed, 4 insertions(+) -diff --git a/nscd.c b/nscd.c -index 828eb17..4cbd7b1 100644 --- a/nscd.c +++ b/nscd.c -@@ -99,6 +99,8 @@ vda.linux@googlemail.com +@@ -99,6 +99,8 @@ /* For inet_ntoa (for debug build only) */ #include @@ -19,7 +17,7 @@ index 828eb17..4cbd7b1 100644 /* * 0.21 add SEGV reporting to worker * 0.22 don't do freeaddrinfo() in GETAI worker, it's crashy -@@ -2661,6 +2663,8 @@ int main(int argc, char **argv) +@@ -2663,6 +2665,8 @@ config.nttl[n] *= 1000; } diff --git a/debian/patches/support_large_numbers_in_config b/debian/patches/support_large_numbers_in_config index fbc7813..e59ceca 100644 --- a/debian/patches/support_large_numbers_in_config +++ b/debian/patches/support_large_numbers_in_config @@ -4,7 +4,7 @@ Origin: debian Bug-Debian: http://bugs.debian.org/676689 --- a/nscd.c +++ b/nscd.c -@@ -439,7 +439,8 @@ +@@ -443,7 +443,8 @@ char *p; unsigned long l = strtoul(str, &p, 10); /* must not overflow int even after x1000 */ @@ -14,7 +14,7 @@ Bug-Debian: http://bugs.debian.org/676689 return l; } error_and_die("malformed or too big number '%s'", str); -@@ -511,8 +512,8 @@ +@@ -515,8 +516,8 @@ const char *user; smallint srv_enable[3]; smallint check_files[3]; @@ -25,7 +25,7 @@ Bug-Debian: http://bugs.debian.org/676689 unsigned size[3]; } config = { /* We try to closely mimic glibc nscd */ -@@ -747,11 +748,11 @@ +@@ -751,11 +752,11 @@ return sizeof(user_req_header) + ureq->key_len; } @@ -39,7 +39,7 @@ Bug-Debian: http://bugs.debian.org/676689 } static void set_cache_timestamp(user_req *ureq) -@@ -1276,9 +1277,9 @@ +@@ -1280,9 +1281,9 @@ } unsigned oldest_idx = 0; @@ -51,7 +51,7 @@ Bug-Debian: http://bugs.debian.org/676689 if (age > oldest_age) { oldest_age = age; oldest_idx = i; -@@ -1295,7 +1296,7 @@ +@@ -1299,7 +1300,7 @@ return NULL; } i = oldest_idx; @@ -60,7 +60,7 @@ Bug-Debian: http://bugs.debian.org/676689 free_refcounted_ureq(&cacheline[i]); ret: -@@ -1322,11 +1323,11 @@ +@@ -1326,11 +1327,11 @@ cached_cnt--; free_refcounted_ureq(cp); } else { @@ -75,7 +75,7 @@ Bug-Debian: http://bugs.debian.org/676689 cached_cnt--; free_refcounted_ureq(cp); } else if (srv == -1) { -@@ -2646,7 +2647,7 @@ +@@ -2650,7 +2651,7 @@ } for (n = 0; n < 3; n++) { -- 2.39.2