From 48bce9639bfc6185e48f033040ad563ea29c1cc3 Mon Sep 17 00:00:00 2001 From: Bob Gray Date: Tue, 19 Jul 1983 18:33:17 -0800 Subject: [PATCH] security fixes SCCS-vsn: usr.bin/uucp/sdmail.c 5.2 SCCS-vsn: usr.bin/uucp/libuu/mailst.c 5.2 SCCS-vsn: usr.bin/uucp/includes/uucp.h 5.2 --- usr/src/usr.bin/uucp/includes/uucp.h | 3 ++- usr/src/usr.bin/uucp/libuu/mailst.c | 5 ++--- usr/src/usr.bin/uucp/sdmail.c | 5 ++--- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/usr/src/usr.bin/uucp/includes/uucp.h b/usr/src/usr.bin/uucp/includes/uucp.h index 7de1a2abca..6f13800d0c 100644 --- a/usr/src/usr.bin/uucp/includes/uucp.h +++ b/usr/src/usr.bin/uucp/includes/uucp.h @@ -1,4 +1,4 @@ -/* uucp.h 5.1 83/07/02 */ +/* uucp.h 5.2 83/07/19 */ #include "stdio.h" @@ -268,3 +268,4 @@ extern char *ttyname(), *strcpy(), *strcat(), *index(), *rindex(), *fgets(), *calloc(), *malloc(), *cfgets(); extern long lseek(); +extern FILE *rpopen(); diff --git a/usr/src/usr.bin/uucp/libuu/mailst.c b/usr/src/usr.bin/uucp/libuu/mailst.c index b5993d4a33..49c667f5b0 100644 --- a/usr/src/usr.bin/uucp/libuu/mailst.c +++ b/usr/src/usr.bin/uucp/libuu/mailst.c @@ -1,5 +1,5 @@ #ifndef lint -static char sccsid[] = "@(#)mailst.c 5.1 (Berkeley) %G%"; +static char sccsid[] = "@(#)mailst.c 5.2 (Berkeley) %G%"; #endif #include "uucp.h" @@ -17,12 +17,11 @@ mailst(user, str, file) char *user, *str, *file; { register FILE *fp, *fi; - extern FILE *popen(), *pclose(); char cmd[100], buf[BUFSIZ]; register int nc; sprintf(cmd, "mail %s", user); - if ((fp = popen(cmd, "w")) == NULL) + if ((fp = rpopen(cmd, "w")) == NULL) return; fprintf(fp, "%s", str); diff --git a/usr/src/usr.bin/uucp/sdmail.c b/usr/src/usr.bin/uucp/sdmail.c index 83393ab65c..1c2984583a 100644 --- a/usr/src/usr.bin/uucp/sdmail.c +++ b/usr/src/usr.bin/uucp/sdmail.c @@ -1,5 +1,5 @@ #ifndef lint -static char sccsid[] = "@(#)sdmail.c 5.1 (Berkeley) %G%"; +static char sccsid[] = "@(#)sdmail.c 5.2 (Berkeley) %G%"; #endif #include "uucp.h" @@ -48,11 +48,10 @@ mailst(user, str) char *user, *str; { register FILE *fp; - extern FILE *popen(), *pclose(); char cmd[100]; sprintf(cmd, "mail %s", user); - if ((fp = popen(cmd, "w")) == NULL) + if ((fp = rpopen(cmd, "w")) == NULL) return; /* \n added to mail message. uw-beave!jim (Jim Rees) */ fprintf(fp, "%s\n", str); -- 2.20.1