[svn] GnuPG - r3991 - trunk/g10

svn author dshaw cvs at cvs.gnupg.org
Sun Jan 22 22:40:27 CET 2006


Author: dshaw
Date: 2006-01-22 22:40:20 +0100 (Sun, 22 Jan 2006)
New Revision: 3991

Modified:
   trunk/g10/ChangeLog
   trunk/g10/keyserver.c
   trunk/g10/misc.c
Log:
* keyserver.c (keyserver_spawn): Include the EXEEXT so we can find
keyserver helpers on systems that use extensions.

* misc.c (path_access) [HAVE_DRIVE_LETTERS]: Do the right thing with
drive letter systems.


Modified: trunk/g10/ChangeLog
===================================================================
--- trunk/g10/ChangeLog	2006-01-22 21:38:02 UTC (rev 3990)
+++ trunk/g10/ChangeLog	2006-01-22 21:40:20 UTC (rev 3991)
@@ -1,3 +1,11 @@
+2006-01-22  David Shaw  <dshaw at jabberwocky.com>
+
+	* keyserver.c (keyserver_spawn): Include the EXEEXT so we can find
+	keyserver helpers on systems that use extensions.
+
+	* misc.c (path_access) [HAVE_DRIVE_LETTERS]: Do the right thing
+	with drive letter systems.
+
 2006-01-17  David Shaw  <dshaw at jabberwocky.com>
 
 	* keydb.h, passphrase.c (next_to_last_passphrase): New.  "Touch" a

Modified: trunk/g10/keyserver.c
===================================================================
--- trunk/g10/keyserver.c	2006-01-22 21:38:02 UTC (rev 3990)
+++ trunk/g10/keyserver.c	2006-01-22 21:40:20 UTC (rev 3991)
@@ -946,7 +946,7 @@
       /* If exec-path was set, and DISABLE_KEYSERVER_PATH is
 	 undefined, then don't specify a full path to gpgkeys_foo, so
 	 that the PATH can work. */
-      command=xmalloc(GPGKEYS_PREFIX_LEN+strlen(scheme)+3+1);
+      command=xmalloc(GPGKEYS_PREFIX_LEN+strlen(scheme)+3+strlen(EXEEXT)+1);
       command[0]='\0';
     }
   else
@@ -954,7 +954,7 @@
     {
       /* Specify a full path to gpgkeys_foo. */
       command=xmalloc(strlen(libexecdir)+strlen(DIRSEP_S)+
-		      GPGKEYS_PREFIX_LEN+strlen(scheme)+3+1);
+		      GPGKEYS_PREFIX_LEN+strlen(scheme)+3+strlen(EXEEXT)+1);
       strcpy(command,libexecdir);
       strcat(command,DIRSEP_S);
     }
@@ -967,6 +967,8 @@
   if(keyserver->flags.direct_uri)
     strcat(command,"uri");
 
+  strcat(command,EXEEXT);
+
 #ifdef GPGKEYS_CURL
   if(!curl_cant_handle(scheme,keyserver->flags.direct_uri)
      && path_access(command,X_OK)!=0)

Modified: trunk/g10/misc.c
===================================================================
--- trunk/g10/misc.c	2006-01-22 21:38:02 UTC (rev 3990)
+++ trunk/g10/misc.c	2006-01-22 21:40:20 UTC (rev 3991)
@@ -1251,7 +1251,15 @@
 
   envpath=getenv("PATH");
 
-  if(file[0]=='/' || !envpath)
+  if(!envpath
+#ifdef HAVE_DRIVE_LETTERS
+     || (((file[0]>='A' && file[0]<='Z')
+	  || (file[0]>='a' && file[0]<='z'))
+	 && file[1]==':')
+#else
+     || file[0]=='/'
+#endif
+     )
     return access(file,mode);
   else
     {




More information about the Gnupg-commits mailing list