fixes for PR 3886, 4719, 5424
mail is more consistent in a su'd environment unset works if the variable is in the environment fixed off by one error with 'z' scrolling
This commit is contained in:
parent
96ba3fc35f
commit
11976ebb30
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cmd1.c,v 1.11 1997/10/19 14:12:27 mrg Exp $ */
|
||||
/* $NetBSD: cmd1.c,v 1.12 1999/02/09 04:51:30 dean Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1980, 1993
|
||||
@ -38,7 +38,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)cmd1.c 8.2 (Berkeley) 4/20/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: cmd1.c,v 1.11 1997/10/19 14:12:27 mrg Exp $");
|
||||
__RCSID("$NetBSD: cmd1.c,v 1.12 1999/02/09 04:51:30 dean Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -115,7 +115,7 @@ scroll(v)
|
||||
case 0:
|
||||
case '+':
|
||||
s++;
|
||||
if (s * size > msgCount) {
|
||||
if (s * size >= msgCount) {
|
||||
printf("On last screenful of messages\n");
|
||||
return(0);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cmd3.c,v 1.10 1998/10/08 17:36:55 wsanchez Exp $ */
|
||||
/* $NetBSD: cmd3.c,v 1.11 1999/02/09 04:51:30 dean Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
@ -38,7 +38,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)cmd3.c 8.2 (Berkeley) 4/20/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: cmd3.c,v 1.10 1998/10/08 17:36:55 wsanchez Exp $");
|
||||
__RCSID("$NetBSD: cmd3.c,v 1.11 1999/02/09 04:51:30 dean Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -431,7 +431,9 @@ unset(v)
|
||||
errs = 0;
|
||||
for (ap = arglist; *ap != NOSTR; ap++) {
|
||||
if ((vp2 = lookup(*ap)) == NOVAR) {
|
||||
if (!sourcing) {
|
||||
if (getenv(*ap)) {
|
||||
unsetenv(*ap);
|
||||
} else if (!sourcing) {
|
||||
printf("\"%s\": undefined variable\n", *ap);
|
||||
errs++;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: lex.c,v 1.12 1998/12/19 16:33:08 christos Exp $ */
|
||||
/* $NetBSD: lex.c,v 1.13 1999/02/09 04:51:30 dean Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
@ -38,7 +38,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)lex.c 8.2 (Berkeley) 4/20/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: lex.c,v 1.12 1998/12/19 16:33:08 christos Exp $");
|
||||
__RCSID("$NetBSD: lex.c,v 1.13 1999/02/09 04:51:30 dean Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -66,7 +66,7 @@ setfile(name)
|
||||
FILE *ibuf;
|
||||
int i;
|
||||
struct stat stb;
|
||||
char isedit = *name != '%';
|
||||
char isedit = *name != '%' || getuserid(myname) != getuid();
|
||||
char *who = name[1] ? name + 1 : myname;
|
||||
static int shudclob;
|
||||
extern char *tempMesg;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: main.c,v 1.9 1998/10/08 17:36:56 wsanchez Exp $ */
|
||||
/* $NetBSD: main.c,v 1.10 1999/02/09 04:51:30 dean Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)main.c 8.2 (Berkeley) 4/20/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: main.c,v 1.9 1998/10/08 17:36:56 wsanchez Exp $");
|
||||
__RCSID("$NetBSD: main.c,v 1.10 1999/02/09 04:51:30 dean Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -117,6 +117,7 @@ main(argc, argv)
|
||||
* Next argument is person to pretend to be.
|
||||
*/
|
||||
myname = optarg;
|
||||
unsetenv("MAIL");
|
||||
break;
|
||||
case 'i':
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user