Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 5 Jul 1998 04:15:41 -0300 (EST)
From:      Joao Carlos Mendes Luis <jonny@jonny.eng.br>
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   ports/7167: elm cannot pgp for more than one recipient
Message-ID:  <199807050715.EAA02017@roma.coe.ufrj.br>

next in thread | raw e-mail | index | archive | help

>Number:         7167
>Category:       ports
>Synopsis:       elm cannot pgp for more than one recipient
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports
>State:          open
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jul  5 00:20:00 PDT 1998
>Last-Modified:
>Originator:     Joao Carlos Mendes Luis
>Organization:
COPPE/UFRJ
>Release:        FreeBSD 2.2.6-STABLE i386
>Environment:

	FreeBSD-stable, elm from current ports

>Description:

	When sending encrypted mail for more than one recipient,
	elm cannot find the second and other recipients' key.

>How-To-Repeat:

	Send pgp encrypted mail for more than one recipient.

>Fix:
	
	Here's a patch that worked for me.  Since this behaviour
	in elm is relatively recent, and according to the patches
	below, the "bug" was introduced in a (maybe not so) "recent" 
	fix in FreeBSD's pclose.c.  I would send the patch to the
	author, but could not find the right address, although I
	must confess I did not search enough.

	BTW: While you are there, verify that elm does not package.  :)

--- src/pgp.c.org	Sat Mar 28 02:23:20 1998
+++ src/pgp.c	Sun Jul  5 03:47:06 1998
@@ -65,6 +65,8 @@
   char buf[STRING], address[STRING], *c, **keys=0, *pc, userpart[STRING];
   int i=0, keys_len=0, keys_max=0, return_val=0, start=0;
   FILE *p;
+  pid_t pid;
+  int status;
 
   if (!name || !target)
     return(-1);
@@ -106,7 +108,7 @@
 
     while (*c && isspace (*c)) c++; /* move past any leading space! */
     
-    if (fork () == 0) {
+    if ( ( pid = fork () ) == 0) {
       int tmp;
       
       setgid(groupid);
@@ -160,7 +162,8 @@
 	++keys_len;
       }
     }
-    pclose(p);
+    fclose(p);
+    waitpid(pid, &status, 0);
     if (keys_len > 0 || i > 1)
       break;
     else {
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199807050715.EAA02017>