Poldi bug report: better scdaemon handling

View: New views
4 Messages — Rating Filter:   Alert me  

Poldi bug report: better scdaemon handling

by Lionel Elie Mamane-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

 - don't clutter the display with scdaemon stderr

 - use a global configuration file for scdaemon

--- poldi-0.4.1.orig/conf/Makefile.am
+++ poldi-0.4.1/conf/Makefile.am
@@ -33,5 +33,11 @@
  install -m 644 -T $(top_srcdir)/conf/poldi.conf.skel \
                   $(DESTDIR)$(POLDI_CONF_DIRECTORY)/poldi.conf; \
  fi
+ if test -e $(DESTDIR)$(POLDI_CONF_DIRECTORY)/scdaemon.conf; then \
+ echo "$(DESTDIR)$(POLDI_CONF_DIRECTORY)/scdaemon.conf exists, doing nothing here"; \
+ else \
+ install -m 644 -T $(top_srcdir)/conf/scdaemon.conf.skel \
+                  $(DESTDIR)$(POLDI_CONF_DIRECTORY)/scdaemon.conf; \
+ fi
 
-EXTRA_DIST = poldi.conf.skel users.skel README.keys
+EXTRA_DIST = poldi.conf.skel users.skel scdaemon.conf.skel README.keys
--- poldi-0.4.1.orig/src/scd/scd.c
+++ poldi-0.4.1/src/scd/scd.c
@@ -326,7 +326,7 @@
  fallback: spawn a new scdaemon.  */
 
       const char *pgmname;
-      const char *argv[3];
+      const char *argv[6];
       int no_close_list[3];
       int i;
 
@@ -352,7 +352,13 @@
 
       argv[0] = pgmname;
       argv[1] = "--server";
-      argv[2] = NULL;
+      argv[2] = "--options";
+      argv[3] = "/etc/poldi/scdaemon.conf";
+      if (flags & SCD_FLAG_VERBOSE)
+ argv[4] = "-v";
+      else
+ argv[4] = NULL;
+      argv[5] = NULL;
 
       i=0;
 
@@ -362,7 +368,8 @@
       if (log_get_fd () != -1)
         no_close_list[i++] = log_get_fd ();
 #endif
-      no_close_list[i++] = fileno (stderr);
+      if (flags & SCD_FLAG_VERBOSE)
+ no_close_list[i++] = fileno (stderr);
       no_close_list[i] = -1;
 
       /* connect to the agent and perform initial handshaking */


--
Lionel

_______________________________________________
Gnupg-devel mailing list
Gnupg-devel@...
http://lists.gnupg.org/mailman/listinfo/gnupg-devel

Re: Poldi bug report: better scdaemon handling

by Lionel Elie Mamane-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Jul 30, 2009 at 07:58:43PM +0200, Lionel Elie Mamane wrote:

>  - don't clutter the display with scdaemon stderr

>  - use a global configuration file for scdaemon

I just realised that diff does not handle empty files. I had created
an empty "conf/scdaemon.conf.skel" file. Just put "#" in it to make it
non-empty or even better a real skeleton. Possibly the gnupg2 sources
actually contain a good skeleton you can just copy?

--
Lionel

_______________________________________________
Gnupg-devel mailing list
Gnupg-devel@...
http://lists.gnupg.org/mailman/listinfo/gnupg-devel

Re: Poldi bug report: better scdaemon handling

by Moritz Schulte-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dear Lionel,

in the SVN trunk of Poldi I have implemented an (experimental[0]) Poldi
option named "scdaemon-options". This option can be used to specify the
scdaemon configuration file to use for spawning new scdaemon instancens
right in poldi.conf. I guess this is better than hard-coding the name of
the configuration file.

Regarding the stderr issue: I agree we better find a fix for this, but
I'm not yet sure if the fix you proposed is the most appropriate one. I
put this one my todo list.

Thanks,
mo

[0] Needless to say, since _Poldi_ is still considered experimental.



_______________________________________________
Gnupg-devel mailing list
Gnupg-devel@...
http://lists.gnupg.org/mailman/listinfo/gnupg-devel

signature.asc (277 bytes) Download Attachment

Re: Poldi bug report: better scdaemon handling

by Lionel Elie Mamane-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sat, Aug 08, 2009 at 08:01:53PM +0200, Moritz Schulte wrote:

> in the SVN trunk of Poldi I have implemented an (experimental[0]) Poldi
> option named "scdaemon-options". This option can be used to specify the
> scdaemon configuration file to use for spawning new scdaemon instancens
> right in poldi.conf. I guess this is better than hard-coding the name of
> the configuration file.

Yes, it is. Thanks.

> Regarding the stderr issue: I agree we better find a fix for this,
> but I'm not yet sure if the fix you proposed is the most appropriate
> one.

Another thing to consider is to redirect the scdaemon stderr to the
poldi logfile?

--
Lionel

_______________________________________________
Gnupg-devel mailing list
Gnupg-devel@...
http://lists.gnupg.org/mailman/listinfo/gnupg-devel