diff --git a/CHANGES b/CHANGES index 69f091b..7e02db2 100644 --- a/CHANGES +++ b/CHANGES @@ -78,6 +78,9 @@ Corrections: DCCP_CONNECT_MAXCHILDREN OPENSSL_CONNECT_MAXCHILDREN SOCKS4_MAXCHILDREN SOCKS5_CONNECT_MAXCHILDREN PROXY_CONNECT_MAXCHILDREN + On failure of getpwuid() (used in options su and su-d) now consider + errno. + Features: POSIXMQ-RECV now takes option o-nonblock; this, in combination with -T, makes it possible to terminate Socat in case the queue is empty. diff --git a/xioopts.c b/xioopts.c index 71d5cf4..505305d 100644 --- a/xioopts.c +++ b/xioopts.c @@ -3944,8 +3944,12 @@ int applyopt_spec( { struct passwd *pwd; if ((pwd = getpwuid(opt->value.u_uidt)) == NULL) { - Error1("getpwuid("F_uid"): no such user", - opt->value.u_uidt); + if (errno != 0) + Error2("getpwuid("F_uid"): %s", + opt->value.u_uidt, strerror(errno)); + else + Error1("getpwuid("F_uid"): no such user", + opt->value.u_uidt); return -1; } if (Initgroups(pwd->pw_name, pwd->pw_gid) < 0) {