From bce9718b36eaa3d3aafda9d315be735d7556308a Mon Sep 17 00:00:00 2001 From: Mark Murray Date: Sat, 14 Jul 2001 08:29:19 +0000 Subject: [PATCH] Usse a better method to get a user's credentials, as uid's may be legally duplicated. Requested by: ache --- contrib/opie/opiepasswd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contrib/opie/opiepasswd.c b/contrib/opie/opiepasswd.c index 9cccb997aeb..6cb272898e8 100644 --- a/contrib/opie/opiepasswd.c +++ b/contrib/opie/opiepasswd.c @@ -41,6 +41,8 @@ License Agreement applies to this software. Modified heavily at NRL for OPIE 2.0. Written at Bellcore for the S/Key Version 1 software distribution (skeyinit.c). + + $FreeBSD$ */ #include "opie_cfg.h" @@ -117,7 +119,7 @@ int main FUNCTION((argc, argv), int argc AND char *argv[]) memset(seed, 0, sizeof(seed)); - if (!(pp = getpwuid(getuid()))) { + if (!(pp = getpwnam(getlogin()))) { fprintf(stderr, "Who are you?"); return 1; }