diff options
author | Sven Eden <yamakuzure@gmx.net> | 2017-01-09 05:53:00 +0100 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-03-14 10:22:32 +0100 |
commit | 4ebadef69ff96e92122a133cfecadf60816c4fa3 (patch) | |
tree | d7d65cccf110e8b12a4353c0d91db2b0b83f08dc /src/basic/util.c | |
parent | bd1ce0bdbfc97a958a6c56fe062bed892f08444a (diff) |
Prep v226: Apply missing fixes and changes to src/basic
Diffstat (limited to 'src/basic/util.c')
-rw-r--r-- | src/basic/util.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/basic/util.c b/src/basic/util.c index 473165f24..3df91488c 100644 --- a/src/basic/util.c +++ b/src/basic/util.c @@ -403,7 +403,10 @@ int parse_uid(const char *s, uid_t* ret_uid) { return -ERANGE; if (!uid_is_valid(uid)) - return -ENXIO; + return -ENXIO; /* we return ENXIO instead of EINVAL + * here, to make it easy to distuingish + * invalid numeric uids invalid + * strings. */ if (ret_uid) *ret_uid = uid; @@ -6198,6 +6201,9 @@ int openpt_in_namespace(pid_t pid, int flags) { if (master < 0) _exit(EXIT_FAILURE); + if (unlockpt(master) < 0) + _exit(EXIT_FAILURE); + cmsg = CMSG_FIRSTHDR(&mh); cmsg->cmsg_level = SOL_SOCKET; cmsg->cmsg_type = SCM_RIGHTS; |