=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mail/v7.local.c,v retrieving revision 1.1 retrieving revision 1.2 diff -c -r1.1 -r1.2 *** src/usr.bin/mail/v7.local.c 1995/10/18 08:45:39 1.1 --- src/usr.bin/mail/v7.local.c 1996/06/11 12:53:53 1.2 *************** *** 1,3 **** --- 1,6 ---- + /* $OpenBSD: v7.local.c,v 1.2 1996/06/11 12:53:53 deraadt Exp $ */ + /* $NetBSD: v7.local.c,v 1.7 1996/06/08 19:48:44 christos Exp $ */ + /* * Copyright (c) 1980, 1993 * The Regents of the University of California. All rights reserved. *************** *** 32,39 **** */ #ifndef lint ! static char sccsid[] = "from: @(#)v7.local.c 8.1 (Berkeley) 6/6/93"; ! static char rcsid[] = "$Id: v7.local.c,v 1.1 1995/10/18 08:45:39 deraadt Exp $"; #endif /* not lint */ /* --- 35,45 ---- */ #ifndef lint ! #if 0 ! static char sccsid[] = "@(#)v7.local.c 8.1 (Berkeley) 6/6/93"; ! #else ! static char rcsid[] = "$OpenBSD: v7.local.c,v 1.2 1996/06/11 12:53:53 deraadt Exp $"; ! #endif #endif /* not lint */ /* *************** *** 83,90 **** username() { char *np; if ((np = getenv("USER")) != NOSTR) return np; ! return getname(getuid()); } --- 89,100 ---- username() { char *np; + uid_t uid; if ((np = getenv("USER")) != NOSTR) return np; ! if ((np = getname(uid = getuid())) != NOSTR) ! return np; ! printf("Cannot associate a name with uid %d\n", uid); ! return NOSTR; }