Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/from Try $LOGNAME first, then fall back to $USER.
details: https://anonhg.NetBSD.org/src/rev/943ed57e8392
branches: trunk
changeset: 517587:943ed57e8392
user: kleink <kleink%NetBSD.org@localhost>
date: Thu Nov 15 14:16:11 2001 +0000
description:
Try $LOGNAME first, then fall back to $USER.
diffstat:
usr.bin/from/from.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r ec68dc907eb9 -r 943ed57e8392 usr.bin/from/from.c
--- a/usr.bin/from/from.c Thu Nov 15 13:05:35 2001 +0000
+++ b/usr.bin/from/from.c Thu Nov 15 14:16:11 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: from.c,v 1.13 2001/07/01 00:09:46 mjl Exp $ */
+/* $NetBSD: from.c,v 1.14 2001/11/15 14:16:11 kleink Exp $ */
/*
* Copyright (c) 1980, 1988, 1993
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)from.c 8.1 (Berkeley) 6/6/93";
#endif
-__RCSID("$NetBSD: from.c,v 1.13 2001/07/01 00:09:46 mjl Exp $");
+__RCSID("$NetBSD: from.c,v 1.14 2001/11/15 14:16:11 kleink Exp $");
#endif /* not lint */
#include <sys/types.h>
@@ -101,7 +101,8 @@
if (!(file = getenv("MAIL"))) {
if (!(pwd = getpwuid(getuid())))
errx(1, "no password file entry for you");
- if ((file = getenv("USER")) != NULL) {
+ if ((file = getenv("LOGNAME")) != NULL ||
+ (file = getenv("USER")) != NULL) {
(void)snprintf(buf, sizeof(buf),
"%s/%s", _PATH_MAILDIR, file);
file = buf;
Home |
Main Index |
Thread Index |
Old Index