🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
12 messages
12 total messages Started by Felix von Leitner Tue, 28 May 1996 00:00
New version of the slrn PGP patch (for slrn0.8.8.2)
#22153
Author: Felix von Leitner
Date: Tue, 28 May 1996 00:00
142 lines
4283 bytes
-----BEGIN PGP SIGNED MESSAGE-----

Hi folks,

with this patch slrn won't sign the signature any more, but sign the
body and append the signature.  The signature is stored in memory, and
there is provision for up to 11 lines.  No more!  I think this should be
enforced anyway.  I was tempted to make it 4 lines ;)

Felix

- --- slrn/src/post.c.orig	Fri May 24 17:53:28 1996
+++ slrn/src/post.c	Tue May 28 21:50:27 1996
@@ -37,6 +37,8 @@
 char *Slrn_Save_Posts_File;
 char *Slrn_Last_Message_Id;
 
+static char passphrase[1024];
+
 
 #ifdef VMS
 # define SYSTEM_OS_NAME		"VMS"
@@ -279,6 +281,7 @@
  * file for this purpose.
  */
 static int check_file_for_posting (char *file)
+
 {
    char line[1024], *the_line;
    FILE *fp;
@@ -454,11 +457,94 @@
    perform_cc = 0;
    while (1)
      {
- -	rsp = slrn_get_response ("yYnNeE", "Post the message? Y-es, N-o, E-dit");
+	rsp = slrn_get_response ("yYnNeEsSpP", "Post the message? Y-es, N-o, E-dit, S-pell check, P-GP sign");
 	rsp |= 0x20;
 	if (rsp == 'n') return -1;
 	if (rsp == 'y') break;
- -	if (slrn_edit_file (file, 1) < 0) 
+	if (rsp == 's') {
+	  char cmd[1024] = "ispell -x ";
+	  strcat( cmd, file );
+	  slrn_posix_system( cmd, 1 );
+	}
+	if (rsp == 'p') {
+	  char cmd[1024] = "pgp -als +batchmode ";
+	  char tmpfile[256];
+	  char *sig[11];
+	  int siglines=0;
+	  FILE *infp,*outfp,*pp;
+	  if (passphrase[0]==0) {
+	    if (slrn_read_input("Passphrase: ",passphrase,0) <= 0) continue;
+	  }
+	  if (NULL == (infp = fopen (file, "r+")))
+	    {
+	      slrn_error ("File not found: %s--- message not signed.", file);
+	      return -1;
+	    }
+	  outfp=slrn_open_tmpfile(tmpfile,"w");
+	  for(;;) {
+	    char line[1024];
+	    if (fgets(line,1024,infp)==NULL) {
+	      slrn_error ("No body--- message not signed.");
+	      return -1;
+	    }
+	    if (line[0]=='\n') break;
+	  }
+	  for(;;) {
+	    char line[1024];
+	    if (fgets(line,1024,infp)==NULL) break;
+	    if (siglines || strcmp(line,"-- \n")==0) {
+	      if (siglines<12) {
+		sig[siglines]=malloc(strlen(line)+1);
+		if (sig[siglines]) strcpy(sig[siglines++],line);
+	      }
+	    } else {
+	      fputs(line,outfp);
+	    }
+	  }
+	  rewind(infp);
+	  fclose(outfp);
+	  strcat(cmd,tmpfile);
+	  putenv("PGPPASSFD=0");
+	  if ((pp=slrn_popen(cmd,"w"))==NULL) {
+	    fclose(pp);
+	    return -1;
+	  }
+	  fputs(passphrase,pp);
+   	  slrn_pclose (pp);
+	  for(;;) {
+	    char line[1024];
+	    if (fgets(line,1024,infp)==NULL) {
+	      slrn_error ("No body--- message not signed.");
+	      return -1;
+	    }
+	    if (line[0]=='\n') break;
+	  }
+	  fseek(infp,0,1);
+	  unlink(tmpfile);
+	  strcat(tmpfile,".asc");
+	  if ((outfp=fopen(tmpfile,"r"))==NULL) {
+	    slrn_error ("Cannot open file:%s--- message not signed.",tmpfile);
+	    return -1;
+	  }
+	  for(;;) {
+	    char line[1024];
+	    if (fgets(line,1020,outfp)==NULL) break;
+	    fputs(line,infp);
+	  }
+	  if (siglines) {
+	    int i;
+	    fputs("\n",infp);
+	    for (i=0;i<siglines;i++) 
+	      if (sig[i]) {
+		fputs(sig[i],infp);
+		free(sig[i]);
+	      }
+	  }
+	  fclose(outfp);
+	  fclose(infp);
+	  unlink(tmpfile);
+	}
+	if (rsp=='e') if (slrn_edit_file (file, 1) < 0) 
 	  {
 	     slrn_error ("User abort.");
 	     return -1;

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: latin1

iQCVAwUBMauKuB/Da1Yoy+f1AQGZ9QP+N8J5HRPXP9f7aMD20SXxcKxjloyLuAee
5OEpLjXe+TUIDED+LehhuSgaHBpX9RS3P8xZiAzBOLxDrPUJo6DwuHIPWPeWklCW
NES1ouwSgFmblx93jvSvfMGde+Xjv5CBAfQOS/1o31x2o1zoeSJinTbTNxEQLh6Y
tMxdnFlSKAw=
=L6bG
-----END PGP SIGNATURE-----


Any UNIX newsreaders that support user login and passwords?
#22202
Author: derek chan
Date: Wed, 29 May 1996 00:00
11 lines
877 bytes
Hi. Are there any text-based UNIX newsreaders that will enable me to read 
news from a news server that requires a login name and password? I can 
use Windoze based newsreaders that support this, but I'd much rather be 
able to do this in UNIX...

Thanks...



Re: Any UNIX newsreaders that support user login and passwords?
#22213
Author: Michael Handler
Date: Wed, 29 May 1996 00:00
24 lines
1526 bytes
In <4og4ju$jcq@decaxp.HARVARD.EDU>,
derek chan <chan4@husc7.HARVARD.EDU> wrote:

> Hi. Are there any text-based UNIX newsreaders that will enable me to read 
> news from a news server that requires a login name and password? I can 
> use Windoze based newsreaders that support this, but I'd much rather be 
> able to do this in UNIX...

SLRN! SLRN! SLRN!

http://space.mit.edu/~davis/slrn.html

SLRN supports username / password authentication, as well as multiple
NNTP servers and different .newsrcs for each server.

--  
Michael Handler <handler@netaxs.com>      | DNS:       <hostmaster@netaxs.com>
Net Access sysadmin and resident cynic    | Netnews:         <news@netaxs.com>
Voice: (215) 576-8669, 9 AM - 6 PM, M - F | General:      <support@netaxs.com>
PO Box 502, Glenside, PA 19038            | * <--- Philadelphia   Perth ---> *


Re: Any UNIX newsreaders that support user login and passwords?
#22241
Author: Jonathan Kamens
Date: Thu, 30 May 1996 00:00
14 lines
1244 bytes
In article <4og4ju$jcq@decaxp.HARVARD.EDU>, chan4@husc7.HARVARD.EDU (derek chan) writes:
|> Hi. Are there any text-based UNIX newsreaders that will enable me to read 
|> news from a news server that requires a login name and password? I can 
|> use Windoze based newsreaders that support this, but I'd much rather be 
|> able to do this in UNIX...

I don't know about text-based newsreaders, but I just added user/pass
support to XRN.  The current beta, with the new support in it, can be
retrieved from:

	<URL:ftp://ftp.cam.ov.com/pub/xrn/beta.tgz>

Re: New version of the slrn PGP patch (for slrn0.8.8.2)
#22302
Author: E.
Date: Fri, 31 May 1996 00:00
26 lines
1704 bytes
On 1 Jun 1996 01:56:31 GMT, Jay Maynard <jmaynard@admin5.hsc.uth.tmc.edu> wrote:
> On 1 Jun 1996 00:08:35 GMT, Felix von Leitner <leitner@xorn.prz.tu-berlin.de> wrote:
> >There are no security implications here.
> 
> I must respectfully disagree. An insecure pgp is of little to no use, to
> either the user or others, and lends the illusion of authority when none may
> actually exist.

Um, you're absolutely right, but that wasn't the point that Felix was
making.  The pgp patch will provide the exact same level of security as the
used would get typing 'pgp' from a command line.

If THAT'S deficient, then changing the patch won't help a bit.

-E

-- 
PGP Public Key Fingerprint:  BE FC C5 FB 30 47 E5 5C
                             DC DF C3 C0 AD A5 27 17
PGP Public Key:  finger fnargle@primenet.com
Homepage:  http://www.primenet.com/~fnargle/erisson/



Re: New version of the slrn PGP patch (for slrn0.8.8.2)
#22317
Author: Lars Marowsky-Bree
Date: Fri, 31 May 1996 00:00
15 lines
1136 bytes
On 28 May 1996 23:22:50 GMT, Felix von Leitner <leitner@xorn.prz.tu-berlin.de> wrote:

> +	  char cmd[1024] = "pgp -als +batchmode ";

pgp should IMHO be invoked via an explicit path for security reasons.

-- 
Lars Marowsky-Bree   Voice: +49-571-63663   PGP-key avail. via server
HomePage: http://www.teuto.de/~lmb/    Mail: lmb@pointer.in-minden.de
PGP-Id: 0xDAB57941 / CF FC 3A F0 86 F1 D3 EB  79 8A CF 75 4F 4C 81 DF



Re: New version of the slrn PGP patch (for slrn0.8.8.2)
#22314
Author: Felix von Leitner
Date: Sat, 01 Jun 1996 00:00
38 lines
1673 bytes
-----BEGIN PGP SIGNED MESSAGE-----

On Fri, 31 May 1996 11:32:29 GMT, Lars Marowsky-Bree <lmb@pointer.in-minden.de> wrote:
> On 28 May 1996 23:22:50 GMT, Felix von Leitner <leitner@xorn.prz.tu-berlin.de> wrote:

> > +	  char cmd[1024] = "pgp -als +batchmode ";

> pgp should IMHO be invoked via an explicit path for security reasons.

"for security reasons" ?!

What do you mean, "for security reasons"?  It's not running privileged,
it does not change the environment, so it gets the PGP the user gets
if s/he types "pgp".  There are no security implications here.

HIBT?

Felix


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: latin1

iQCVAwUBMa+J9h/Da1Yoy+f1AQEeTQP7Bd4C5o7sTQWMf/uJXzeRfiyufFwR++Cy
TmDpp8TeyI9e/zq4WNg2pWo48r2ORHiHOgKFcsnbchISd/Km6GfYe++yOmjdJg/5
7d0S6OtzcXn3YKj/ys1haCWDfO0N6e2XjPG707SgWD7SyVwujxePuuHzH5DzaBwq
84YxGOuynbs=
=UdWO
-----END PGP SIGNATURE-----

-- 
Real Super Computers live in aquariums
	--Seymour Cray


Re: New version of the slrn PGP patch (for slrn0.8.8.2)
#22327
Author: Jay Maynard
Date: Sat, 01 Jun 1996 00:00
18 lines
1643 bytes
On 1 Jun 1996 00:08:35 GMT, Felix von Leitner <leitner@xorn.prz.tu-berlin.de> wrote:
>> pgp should IMHO be invoked via an explicit path for security reasons.
>What do you mean, "for security reasons"?  It's not running privileged,
>it does not change the environment, so it gets the PGP the user gets
>if s/he types "pgp".  There are no security implications here.

I must respectfully disagree. An insecure pgp is of little to no use, to
either the user or others, and lends the illusion of authority when none may
actually exist.
-- 
Jay Maynard, EMT-P, K5ZC, PP-ASEL | Never ascribe to malice that which can
http://k5zc.hsc.uth.tmc.edu       | adequately be explained by stupidity.
            "Just because I'm a superhero doesn't mean
              I have to smell poo gas." -- Freakazoid


Re: New version of the slrn PGP patch (for slrn0.8.8.2)
#22328
Author: Felix von Leitner
Date: Sat, 01 Jun 1996 00:00
23 lines
1837 bytes
On 1 Jun 1996 01:56:31 GMT, Jay Maynard <jmaynard@admin5.hsc.uth.tmc.edu> wrote:
> On 1 Jun 1996 00:08:35 GMT, Felix von Leitner <leitner@xorn.prz.tu-berlin.de> wrote:
> >> pgp should IMHO be invoked via an explicit path for security reasons.
> >What do you mean, "for security reasons"?  It's not running privileged,
> >it does not change the environment, so it gets the PGP the user gets
> >if s/he types "pgp".  There are no security implications here.

> I must respectfully disagree. An insecure pgp is of little to no use, to
> either the user or others, and lends the illusion of authority when none may
> actually exist.

Wait, since slrn does not change the PATH environment setting, it's the
same PGP that the user normally uses.  Slrn can't make any assumptions
or guarantees about it.  It would be a security implication if someone
else could smuggle his fake PGP into the user's PATH.  But in this case,
the user's PATH is broken and he could be made to execute a fake slrn,
too, which records his passphrase.

Felix


Re: New version of the slrn PGP patch (for slrn0.8.8.2)
#22336
Author: Sven Guckes
Date: Sat, 01 Jun 1996 00:00
38 lines
2424 bytes
lmb@pointer.in-minden.de (Lars Marowsky-Bree):
> > > pgp should IMHO be invoked via an explicit path for security reasons.
> > "for security reasons" ?!
> > What do you mean, "for security reasons"?  It's not running privileged,
> > it does not change the environment, so it gets the PGP the user gets
> > if s/he types "pgp".  There are no security implications here.
> I always invoke pgp with the complete path since it is always possible
> that somehow another copy got installed before the "real" one.

So - if there should be a path given for every call for PGP -
then what should the path be?  /bin, /usr/bin, /usr/loacl/bin?
I doubt that there is a standard directory on all systems where SLRN compiles.

> Ok, the possibility is almost nil, but some people keep . as the first
> entry in their path, or some malicious user might have been able to get a
> file on the system. And if the wrong pgp is executed, the passphrase might
> be captured.

Exactly!
These problems are not remedied by providing a path for the program.

And if the sys admin decides to keep PGP in a non-standard directory
(to disable some of the simple attacks) then you would not be able to use
the patch as the program does not exist in the given directory!  :-(

I don't think that it is the responsibility of someone to provide code that
makes sure that "the real PGP" is called.  Even if the program called
performs a "self check" then it is possible to easily provide a faked
"yes, i am the real one".

Sven  ["the real one" :-]

-- 
Followup-To: alt.security.pgp


Re: New version of the slrn PGP patch (for slrn0.8.8.2)
#22337
Author: Lars Marowsky-Bree
Date: Sat, 01 Jun 1996 00:00
23 lines
1793 bytes
On 1 Jun 1996 00:08:35 GMT, Felix von Leitner <leitner@xorn.prz.tu-berlin.de> wrote:

> > pgp should IMHO be invoked via an explicit path for security reasons.
> "for security reasons" ?!
> What do you mean, "for security reasons"?  It's not running privileged,
> it does not change the environment, so it gets the PGP the user gets
> if s/he types "pgp".  There are no security implications here.

I always invoke pgp with the complete path since it is always possible that
somehow another copy got installed before the "real" one. Ok, the
possibility is almost nil, but some people keep . as the first entry in
their path, or some malicious user might have been able to get a file on the
system. And if the wrong pgp is executed, the passphrase might be captured.

-- 
Lars Marowsky-Bree   Voice: +49-571-63663   PGP-key avail. via server
HomePage: http://www.teuto.de/~lmb/    Mail: lmb@pointer.in-minden.de
PGP-Id: 0xDAB57941 / CF FC 3A F0 86 F1 D3 EB  79 8A CF 75 4F 4C 81 DF



Re: New version of the slrn PGP patch (for slrn0.8.8.2)
#22417
Author: Felix von Leitner
Date: Tue, 04 Jun 1996 00:00
32 lines
1833 bytes
-----BEGIN PGP SIGNED MESSAGE-----

On Sat, 1 Jun 1996 08:42:20 GMT, Lars Marowsky-Bree <lmb@pointer.in-minden.de> wrote:
> I always invoke pgp with the complete path since it is always possible that
> somehow another copy got installed before the "real" one. Ok, the
> possibility is almost nil, but some people keep . as the first entry in
> their path, or some malicious user might have been able to get a file on the
> system. And if the wrong pgp is executed, the passphrase might be captured.

You tell me there are people who are "security conscious" enough to use
PGP but then they have "." in their PATH?  I know no mercy with them ;)

Felix


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: latin1

iQCVAwUBMbSh2R/Da1Yoy+f1AQGFIgP/cv8NjKIKFCOuCJY0QFuk351HkZVZqTc+
0KKeyAa56Yj8dEpqq2pe0Tc47FN+bH4q9ufH+JAtQd9wrOBRzxwxAQDG7d9afWu2
YpUNndY8i5g6FuHk0OOE7/zkjItUGytfrJw0RgHWSFtPonLgGFSrCFx8/XhzLUf2
vX2TfAqNOlQ=
=ejR4
-----END PGP SIGNATURE-----

-- 
Unprecedented performance:  Nothing ever ran this slow before.


Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads