diff options
author | Mattias Andrée <maandree@kth.se> | 2021-03-22 19:17:36 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2021-03-22 19:17:36 +0100 |
commit | 288b586867005aed92d61354785e58faf98e9e04 (patch) | |
tree | 0e38693a07431fb7f7b24b2bbac1ab0c255194e7 | |
parent | Correction: set value of SHELL to pw_shell, rather than pw_dir (diff) | |
download | asroot-1.1.3.tar.gz asroot-1.1.3.tar.bz2 asroot-1.1.3.tar.xz |
Fix support for long hostnames1.1.3
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rw-r--r-- | asroot.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -241,7 +241,8 @@ check_password(void) } *hostname = 0; if (!gethostname(hostname, size)) { - break; + if (!hostname[size - 2]) + break; } else if (errno != ENAMETOOLONG) { fprintf(stderr, "%s: gethostname %zu: %s\n", argv0, size, strerror(errno)); exit(EXIT_ERROR); |