]> git.donarmstrong.com Git - unscd.git/commitdiff
refresh patches
authorDon Armstrong <don@donarmstrong.com>
Wed, 25 Nov 2020 18:51:21 +0000 (10:51 -0800)
committerDon Armstrong <don@donarmstrong.com>
Wed, 25 Nov 2020 18:51:21 +0000 (10:51 -0800)
debian/patches/change_invalidate_request_info_output
debian/patches/no_debug_on_invalidate
debian/patches/notify_systemd_about_successful_startup
debian/patches/support_large_numbers_in_config

index 01b03962ea36950aa19b8a7c3072ff673cf2e3e3..c6993c255b85cfd4d7a49ba57dac9b75caa0733f 100644 (file)
@@ -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);
index e386c877652c61c4f858ce2df87059634132886d..967f1693bf1638b6942369da0f2593f514a87012 100644 (file)
@@ -1,6 +1,6 @@
 --- a/nscd.c
 +++ b/nscd.c
-@@ -2518,6 +2518,9 @@
+@@ -2522,6 +2522,9 @@
                        conffile = optarg;
                        break;
                case 'i':
index e14cc0d3583d5a174008aa962877d52bdcb7479c..a96173f73a565bb683d139ca93982fa787543ceb 100644 (file)
@@ -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 <arpa/inet.h>
  
@@ -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;
        }
  
index fbc7813b266d58b4a404c82e14272e0f206161ac..e59cecab4f32fad4d68525199942259067abffbe 100644 (file)
@@ -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++) {