diff options
author | Damien Miller <djm@mindrot.org> | 2013-07-20 13:22:31 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2013-07-20 13:22:31 +1000 |
commit | 3009d3cbb89316b1294fb5cedb54770b5d114d04 (patch) | |
tree | afe0f434e6d12240a6be3a03f8368a07b61381b4 | |
parent | 32ecfa0f7920db31471ca8c1f4adc20ae38ed9d6 (diff) |
- djm@cvs.openbsd.org 2013/07/20 01:44:37
[ssh-keygen.c ssh.c]
More useful error message on missing current user in /etc/passwd
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | ssh-keygen.c | 4 | ||||
-rw-r--r-- | ssh.c | 4 |
3 files changed, 7 insertions, 4 deletions
@@ -9,6 +9,9 @@ - djm@cvs.openbsd.org 2013/07/20 01:43:46 [umac.c] use a union to ensure correct alignment; ok deraadt + - djm@cvs.openbsd.org 2013/07/20 01:44:37 + [ssh-keygen.c ssh.c] + More useful error message on missing current user in /etc/passwd 20130718 - (djm) OpenBSD CVS Sync diff --git a/ssh-keygen.c b/ssh-keygen.c index 1edc965d..03c444d4 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keygen.c,v 1.229 2013/07/12 05:42:03 djm Exp $ */ +/* $OpenBSD: ssh-keygen.c,v 1.230 2013/07/20 01:44:37 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -2214,7 +2214,7 @@ main(int argc, char **argv) /* we need this for the home * directory. */ pw = getpwuid(getuid()); if (!pw) { - printf("You don't exist, go away!\n"); + printf("No user exists for uid %lu\n", (u_long)getuid()); exit(1); } if (gethostname(hostname, sizeof(hostname)) < 0) { @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh.c,v 1.379 2013/07/12 05:48:55 djm Exp $ */ +/* $OpenBSD: ssh.c,v 1.380 2013/07/20 01:44:37 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -299,7 +299,7 @@ main(int ac, char **av) /* Get user data. */ pw = getpwuid(original_real_uid); if (!pw) { - logit("You don't exist, go away!"); + logit("No user exists for uid %lu", (u_long)original_real_uid); exit(255); } /* Take a copy of the returned structure. */ |