[svn] dirmngr - r252 - trunk/src

svn author marcus cvs at cvs.gnupg.org
Fri Jul 27 15:06:20 CEST 2007


Author: marcus
Date: 2007-07-27 15:05:47 +0200 (Fri, 27 Jul 2007)
New Revision: 252

Modified:
   trunk/src/ChangeLog
   trunk/src/Makefile.am
   trunk/src/dirmngr.c
   trunk/src/ldap-url.h
   trunk/src/ldap.c
   trunk/src/util.h
Log:
2007-07-27  Marcus Brinkmann  <marcus at g10code.de>

	* get-path.c: New file.
	* Makefile.am (dirmngr_SOURCES): Add get-path.c.
	* util.h (default_homedir, get_dirmngr_ldap_path): New prototypes.
	* dirmngr.c (main): Use default_homedir().
	* ldap-url.h: Remove japanese white space (sorry!).


Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog	2007-07-26 19:19:13 UTC (rev 251)
+++ trunk/src/ChangeLog	2007-07-27 13:05:47 UTC (rev 252)
@@ -1,3 +1,11 @@
+2007-07-27  Marcus Brinkmann  <marcus at g10code.de>
+
+	* get-path.c: New file.
+	* Makefile.am (dirmngr_SOURCES): Add get-path.c.
+	* util.h (default_homedir, get_dirmngr_ldap_path): New prototypes.
+	* dirmngr.c (main): Use default_homedir().
+	* ldap-url.h: Remove japanese white space (sorry!).
+
 2007-07-26  Marcus Brinkmann  <marcus at g10code.de>
 
 	* ldap.c (pth_yield): Remove macro.

Modified: trunk/src/Makefile.am
===================================================================
--- trunk/src/Makefile.am	2007-07-26 19:19:13 UTC (rev 251)
+++ trunk/src/Makefile.am	2007-07-27 13:05:47 UTC (rev 252)
@@ -44,7 +44,7 @@
 	certcache.c certcache.h i18n.h util.h \
 	cdb.h cdblib.c ldap.c http.c http.h misc.c ocsp.c ocsp.h \
         estream.c estream.h estream-printf.c estream-printf.h \
-	validate.c validate.h exechelp.h exechelp.c
+	validate.c validate.h exechelp.h exechelp.c get-path.c
 
 dirmngr_LDADD = ../jnlib/libjnlib.a $(LIBOBJS) $(LIBASSUAN_PTH_LIBS)  \
 	$(LIBGCRYPT_LIBS) $(KSBA_LIBS) $(PTH_LIBS) $(LIBINTL)

Modified: trunk/src/dirmngr.c
===================================================================
--- trunk/src/dirmngr.c	2007-07-26 19:19:13 UTC (rev 251)
+++ trunk/src/dirmngr.c	2007-07-27 13:05:47 UTC (rev 252)
@@ -545,15 +545,7 @@
   if (shell && strlen (shell) >= 3 && !strcmp (shell+strlen (shell)-3, "csh") )
     csh_style = 1;
   
-  opt.homedir = getenv("GNUPGHOME");
-  if (!opt.homedir || !*opt.homedir)
-    {
-#ifdef HAVE_DRIVE_LETTERS
-      opt.homedir = "c:/gnupg";
-#else
-      opt.homedir = "~/.gnupg";
-#endif
-    }
+  opt.homedir = default_homedir ();
 
   /* Reset rereadable options to default values. */
   parse_rereadable_options (NULL, 0); 

Modified: trunk/src/ldap-url.h
===================================================================
--- trunk/src/ldap-url.h	2007-07-26 19:19:13 UTC (rev 251)
+++ trunk/src/ldap-url.h	2007-07-27 13:05:47 UTC (rev 252)
@@ -17,15 +17,15 @@
 typedef struct ldap_url_desc
 {
   struct ldap_url_desc *lud_next;
-  char *lud_scheme;
-  char *lud_host;
-  int lud_port;
-  char *lud_dn;
-  char **lud_attrs;
-  int lud_scope;
-  char *lud_filter;
-  char **lud_exts;
-  int lud_crit_exts;
+  char *lud_scheme;
+  char *lud_host;
+  int lud_port;
+  char *lud_dn;
+  char **lud_attrs;
+  int lud_scope;
+  char *lud_filter;
+  char **lud_exts;
+  int lud_crit_exts;
 } LDAPURLDesc;
 
 #define LDAP_URL_SUCCESS	0x00

Modified: trunk/src/ldap.c
===================================================================
--- trunk/src/ldap.c	2007-07-26 19:19:13 UTC (rev 251)
+++ trunk/src/ldap.c	2007-07-27 13:05:47 UTC (rev 252)
@@ -574,7 +574,7 @@
   /* Files: We need to prepare stdin and stdout.  We get stderr from
      the function.  */
   if (!opt.ldap_wrapper_program || !*opt.ldap_wrapper_program)
-    pgmname = DIRMNGR_LIBEXECDIR "/dirmngr_ldap";
+    pgmname = (char *) get_dirmngr_ldap_path ();
   else
     pgmname = opt.ldap_wrapper_program;
 

Modified: trunk/src/util.h
===================================================================
--- trunk/src/util.h	2007-07-26 19:19:13 UTC (rev 251)
+++ trunk/src/util.h	2007-07-27 13:05:47 UTC (rev 252)
@@ -80,5 +80,12 @@
                      *(p) <= 'F'? (*(p)-'A'+10):(*(p)-'a'+10))
 #define xtoi_2(p)   ((xtoi_1(p) * 16) + xtoi_1((p)+1))
 
+
+/* Set up the default home directory.  The usual --homedir option
+   should be parsed later. */
+const char *default_homedir (void);
 
+/* Find the dirmngr_ldap program image.  */
+const char *get_dirmngr_ldap_path (void);
+
 #endif /*UTIL_H*/




More information about the Gnupg-commits mailing list