OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /v/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   01-Nov-2006 15:00:05
  Branch: HEAD                             Handle: 2006110114000500

  Modified files:
    openpkg-src/pks         pks.patch

  Log:
    even more upstream fixes plus some code cleanups from me

  Summary:
    Revision    Changes     Path
    1.10        +90 -11     openpkg-src/pks/pks.patch
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/pks/pks.patch
  ============================================================================
  $ cvs diff -u -r1.9 -r1.10 pks.patch
  --- openpkg-src/pks/pks.patch 1 Nov 2006 13:43:54 -0000       1.9
  +++ openpkg-src/pks/pks.patch 1 Nov 2006 14:00:05 -0000       1.10
  @@ -1,6 +1,21 @@
  +Index: armor.c
  +--- armor.c.orig     2002-09-05 15:12:16 +0200
  ++++ armor.c  2006-11-01 14:58:20 +0100
  +@@ -323,9 +323,9 @@
  + }
  + 
  + const unsigned char headerline_head[] = "-----BEGIN PGP ";
  +-const unsigned char headerline_tail[] = ("-----\n"
  ++const unsigned char headerline_tail[] = "-----\n"
  +                                      "Version: PGP Key Server "
  +-                                     PKS_VERSION "\n\n");
  ++                                     PKS_VERSION "\n\n";
  + const unsigned char tailline_head[] = "-----END PGP ";
  + const unsigned char tailline_tail[] = "-----\n";
  + 
   Index: kd_delete.c
   --- kd_delete.c.orig 2002-11-12 06:03:36 +0100
  -+++ kd_delete.c      2006-11-01 14:42:16 +0100
  ++++ kd_delete.c      2006-11-01 14:57:18 +0100
   @@ -207,7 +207,7 @@
       /* fatal errors */
    
  @@ -12,7 +27,7 @@
    
   Index: kd_generic.c
   --- kd_generic.c.orig        2002-09-08 22:54:24 +0200
  -+++ kd_generic.c     2006-11-01 14:42:16 +0100
  ++++ kd_generic.c     2006-11-01 14:57:18 +0100
   @@ -41,7 +41,7 @@
    DB *worddb = NULL;
    DB *timedb = NULL;
  @@ -56,7 +71,7 @@
    
   Index: kd_get.c
   --- kd_get.c.orig    2002-10-08 06:04:42 +0200
  -+++ kd_get.c 2006-11-01 14:42:16 +0100
  ++++ kd_get.c 2006-11-01 14:57:18 +0100
   @@ -163,7 +163,7 @@
       /* fatal errors */
    
  @@ -68,7 +83,7 @@
    
   Index: kd_index.c
   --- kd_index.c.orig  2003-01-26 20:54:45 +0100
  -+++ kd_index.c       2006-11-01 14:42:16 +0100
  ++++ kd_index.c       2006-11-01 14:57:18 +0100
   @@ -107,7 +107,7 @@
       char buf[512];
    
  @@ -87,9 +102,30 @@
           ke->primary->uidprint);
    
       if (!xbuffer_append_str(s->xb, buf))
  +@@ -283,7 +283,7 @@
  +        ke->keyidbits.buf[5],
  +        ke->keyidbits.buf[6],
  +        ke->keyidbits.buf[7],
  +-       ke->keytype,ke->modsigbits,ke->create_time,
  ++       ke->keytype,ke->modsigbits,(unsigned long)ke->create_time,
  +        ke->revocation.len?"r":"",
  +        ke->disabled?"d":""
  +        );
  +Index: kd_search.c
  +--- kd_search.c.orig 2003-02-02 18:22:27 +0100
  ++++ kd_search.c      2006-11-01 14:57:18 +0100
  +@@ -397,7 +397,7 @@
  +       {
  +      ddesc keyid;
  +      long sigclass;
  +-     long sig_time;
  ++     time_t sig_time;
  +      sigs_elem *se;
  +      int ret;
  +          static unsigned char maxid[8] = {0xff, 0xff, 0xff, 0xff,
   Index: kd_since.c
   --- kd_since.c.orig  2002-09-04 23:00:23 +0200
  -+++ kd_since.c       2006-11-01 14:42:16 +0100
  ++++ kd_since.c       2006-11-01 14:57:18 +0100
   @@ -123,11 +123,13 @@
       ows.err = err;
       ows.append = kd_keys_elem_marshall;
  @@ -120,7 +156,7 @@
    
   Index: mail_req.c
   --- mail_req.c.orig  2002-09-08 21:27:34 +0200
  -+++ mail_req.c       2006-11-01 14:42:16 +0100
  ++++ mail_req.c       2006-11-01 14:57:18 +0100
   @@ -236,6 +236,7 @@
    
       if (hfrom == -1 || hfrom_len == 0) {
  @@ -131,7 +167,7 @@
    
   Index: pgputil.c
   --- pgputil.c.orig   2003-01-26 17:08:58 +0100
  -+++ pgputil.c        2006-11-01 14:42:16 +0100
  ++++ pgputil.c        2006-11-01 14:57:18 +0100
   @@ -121,6 +121,11 @@
       if (!decode_num(data, 2, &(mpi->nbits)))
          return(0);
  @@ -156,7 +192,7 @@
         keyid->offset = 0;
   Index: pks_socket.c
   --- pks_socket.c.orig        2002-09-04 22:48:53 +0200
  -+++ pks_socket.c     2006-11-01 14:42:16 +0100
  ++++ pks_socket.c     2006-11-01 14:57:18 +0100
   @@ -208,7 +208,7 @@
    #ifdef HAVE_SOCKLEN_T
       socklen_t sunlen;
  @@ -166,9 +202,32 @@
    #endif
       int srv;
    
  +Index: pks_www.c
  +--- pks_www.c.orig   2003-01-06 19:52:27 +0100
  ++++ pks_www.c        2006-11-01 14:57:18 +0100
  +@@ -95,6 +95,7 @@
  + void w_error(int fd, int vers, unsigned char *str, long len)
  + {
  +    xbuffer xb;
  ++   const char *no_match = "No matching keys in database";
  + 
  +    xbuffer_alloc(&xb);
  + 
  +@@ -104,7 +105,10 @@
  +       log_fatal("w_error", "constructing reply");
  +    }
  + 
  +-   w_reply(fd, vers, NULL, xb.buf, xb.len);
  ++   if (strstr((const char *)str, no_match))
  ++       www_reply(fd, vers, 404, "Not Found", NULL, xb.buf, xb.len);
  ++   else /* generic error handler - w_reply hands back 200. wrong! */
  ++       www_reply(fd, vers, 500, "Server Error", NULL, xb.buf, xb.len);
  + 
  +    xbuffer_free(&xb);
  + }
   Index: pkscheck.c
   --- pkscheck.c.orig  2003-02-07 02:01:21 +0100
  -+++ pkscheck.c       2006-11-01 14:42:16 +0100
  ++++ pkscheck.c       2006-11-01 14:57:18 +0100
   @@ -83,6 +83,12 @@
          log_error("main", buf);
       }
  @@ -194,7 +253,7 @@
                    ((unsigned char *) kkey.data)[1],
   Index: www.c
   --- www.c.orig       2003-02-07 02:01:21 +0100
  -+++ www.c    2006-11-01 14:42:55 +0100
  ++++ www.c    2006-11-01 14:57:18 +0100
   @@ -33,7 +33,6 @@
        #define TCPDSERVICE "pksd"
        int allow_severity=LOG_WARNING ;
  @@ -237,7 +296,27 @@
            xbuffer_free(xb);
            log_fatal("www_reply", "failed constructing www error reply");
         }
  -@@ -423,7 +430,7 @@
  +@@ -387,12 +394,18 @@
  +      }
  +       }
  +    } else if (is_token(input+s->method, s->method_len, post, post_len, 0)) {
  +-      if ((s->content_length == 0) || readonly) {
  ++      if (s->content_length == 0) {
  +      www_reply(fd, 1000, 400, bad_request, NULL, NULL, 0);
  +      mp_delete_read(fd);
  +      xbuffer_free(&(s->xb));
  +      free(s);
  +      return;
  ++      }else if (readonly) {
  ++         www_reply (fd, 1000, 403, "Forbidden", NULL, NULL, 0);
  ++         mp_delete_read(fd);
  ++         xbuffer_free(&(s->xb));
  ++         free(s);
  ++         return;
  +       }
  +    } else {
  +       www_reply(fd, 1000, 400, bad_request, NULL, NULL, 0);
  +@@ -423,7 +436,7 @@
    #ifdef HAVE_SOCKLEN_T
       socklen_t sinlen;
    #else
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [email protected]

Reply via email to