summaryrefslogtreecommitdiffstats
path: root/qarsh.c
diff options
context:
space:
mode:
Diffstat (limited to 'qarsh.c')
-rw-r--r--qarsh.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/qarsh.c b/qarsh.c
index a8bb7ab..4fa8687 100644
--- a/qarsh.c
+++ b/qarsh.c
@@ -483,11 +483,11 @@ again:
*sp = '\0';
}
}
- if (!(pw = getpwuid(getuid()))) {
- fprintf(stderr, "qarsh: unknown user id.\n");
- exit(1);
- }
if (remuser == NULL) {
+ if (!(pw = getpwuid(getuid()))) {
+ fprintf(stderr, "qarsh: can not look up local username.\n");
+ exit(1);
+ }
remuser = strdup(pw->pw_name);
}