mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mesos ReviewBot <revi...@mesos.apache.org>
Subject Re: Review Request 54952: Made `getpwnam_r` error handling more robust.
Date Mon, 02 Jan 2017 18:20:17 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/54952/#review160335
-----------------------------------------------------------



Patch looks great!

Reviews applied: [54952]

Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' CONFIGURATION='--verbose'
ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker_build.sh

- Mesos ReviewBot


On Dec. 28, 2016, 9:50 p.m., Neil Conway wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/54952/
> -----------------------------------------------------------
> 
> (Updated Dec. 28, 2016, 9:50 p.m.)
> 
> 
> Review request for mesos and Alexander Rukletsov.
> 
> 
> Bugs: MESOS-6826
>     https://issues.apache.org/jira/browse/MESOS-6826
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> According to POSIX, `getpwnam_r` returns 0 (and sets `result` to the
> null pointer) when the specified user name is not found. However,
> certain versions of Linux (e.g., RHEL7, recent Arch Linux) return
> non-zero and set `errno` (to one of several different values) when
> `getpwnam_r` is passed an invalid user name.
> 
> In stout, we want to treat the "invalid user name" and "user name not
> found" cases the same. Both the POSIX spec and Linux manpages call out
> certain errno values as definitely indicating errors (e.g., EIO,
> EMFILE). Hence, we check `errno` and return an error to the caller if
> `errno` appears in that list. We treat `errno` values not in that list
> as equivalent to "user not found".
> 
> 
> Diffs
> -----
> 
>   3rdparty/stout/include/stout/os/posix/su.hpp f3f45ebf006f0f8e7e70b0f4c4ed76465530c58e

>   3rdparty/stout/tests/os_tests.cpp 8d2005b1f109b4025aa8368600763db9c829d0c5 
> 
> Diff: https://reviews.apache.org/r/54952/diff/
> 
> 
> Testing
> -------
> 
> `make check` on Arch Linux. `OsTest.User` fails without this patch but succeeds with
this patch.
> 
> 
> Thanks,
> 
> Neil Conway
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message