gnupg/keyserver (ChangeLog ksutil.c)

cvs user dshaw cvs at cvs.gnupg.org
Sun Jun 5 16:13:20 CEST 2005


    Date: Sunday, June 5, 2005 @ 16:34:47
  Author: dshaw
    Path: /cvs/gnupg/gnupg/keyserver

Modified: ChangeLog ksutil.c

* ksutil.c (init_ks_options, parse_ks_options): Provide a default "/"
path unless overridden by the config.  Allow config to specify items
multiple times and take the last specified item.


-----------+
 ChangeLog |    6 ++++++
 ksutil.c  |   12 ++++++++++++
 2 files changed, 18 insertions(+)


Index: gnupg/keyserver/ChangeLog
diff -u gnupg/keyserver/ChangeLog:1.130 gnupg/keyserver/ChangeLog:1.131
--- gnupg/keyserver/ChangeLog:1.130	Sun Jun  5 01:09:27 2005
+++ gnupg/keyserver/ChangeLog	Sun Jun  5 16:34:47 2005
@@ -1,3 +1,9 @@
+2005-06-05  David Shaw  <dshaw at jabberwocky.com>
+
+	* ksutil.c (init_ks_options, parse_ks_options): Provide a default
+	"/" path unless overridden by the config.  Allow config to specify
+	items multiple times and take the last specified item.
+
 2005-06-04  David Shaw  <dshaw at jabberwocky.com>
 
 	* gpgkeys_hkp.c, gpgkeys_oldhkp.c: Add support for HKP servers
Index: gnupg/keyserver/ksutil.c
diff -u gnupg/keyserver/ksutil.c:1.11 gnupg/keyserver/ksutil.c:1.12
--- gnupg/keyserver/ksutil.c:1.11	Wed Jun  1 21:08:56 2005
+++ gnupg/keyserver/ksutil.c	Sun Jun  5 16:34:47 2005
@@ -87,6 +87,12 @@
       opt->action=KS_UNKNOWN;
       opt->flags.check_cert=1;
       opt->timeout=DEFAULT_KEYSERVER_TIMEOUT;
+      opt->path=strdup("/");
+      if(!opt->path)
+	{
+	  free(opt);
+	  opt=NULL;
+	}
     }
 
   return opt;
@@ -144,6 +150,7 @@
   if(sscanf(line,"HOST %" MKSTRING(MAX_HOST) "s\n",host)==1)
     {
       host[MAX_HOST]='\0';
+      free(opt->host);
       opt->host=strdup(host);
       if(!opt->host)
 	return KEYSERVER_NO_MEMORY;
@@ -153,6 +160,7 @@
   if(sscanf(line,"PORT %" MKSTRING(MAX_PORT) "s\n",port)==1)
     {
       port[MAX_PORT]='\0';
+      free(opt->port);
       opt->port=strdup(port);
       if(!opt->port)
 	return KEYSERVER_NO_MEMORY;
@@ -162,6 +170,7 @@
   if(sscanf(line,"SCHEME %" MKSTRING(MAX_SCHEME) "s\n",scheme)==1)
     {
       scheme[MAX_SCHEME]='\0';
+      free(opt->scheme);
       opt->scheme=strdup(scheme);
       if(!opt->scheme)
 	return KEYSERVER_NO_MEMORY;
@@ -171,6 +180,7 @@
   if(sscanf(line,"AUTH %" MKSTRING(MAX_AUTH) "s\n",auth)==1)
     {
       auth[MAX_AUTH]='\0';
+      free(opt->auth);
       opt->auth=strdup(auth);
       if(!opt->auth)
 	return KEYSERVER_NO_MEMORY;
@@ -180,6 +190,7 @@
   if(sscanf(line,"PATH %" MKSTRING(URLMAX_PATH) "s\n",path)==1)
     {
       path[URLMAX_PATH]='\0';
+      free(opt->path);
       opt->path=strdup(path);
       if(!opt->path)
 	return KEYSERVER_NO_MEMORY;
@@ -189,6 +200,7 @@
   if(sscanf(line,"OPAQUE %" MKSTRING(MAX_OPAQUE) "s\n",opaque)==1)
     {
       opaque[MAX_OPAQUE]='\0';
+      free(opt->opaque);
       opt->opaque=strdup(opaque);
       if(!opt->opaque)
 	return KEYSERVER_NO_MEMORY;




More information about the Gnupg-commits mailing list