[erlang-questions] where is os:getuid() ?
Fri Nov 27 17:08:18 CET 2015
On Thu, Nov 26, 2015 at 09:20:43PM -0500, Mark Steele wrote:
> Happened across a post to the mailing list regarding getuid.
> Just added it here:
> Add it to your rebar config, and you're good to go.
A few comments:
* getuid(2), seteuid(2), etc take and return uid_t's and gid_t's. These
are unsigned 32-bit integers on the platforms I checked, not signed
values. In particular, passing a signed value into seteuid(2) may have
* the getpw* calls are blocking and may take some time to complete since
names may be resolved against network services like NIS or LDAP.
* there are problems portably using setuid(2) and seteuid(2) that were
documented in "Setuid Demystified":
A more predictable interface is setresuid(2) which seems to be available
on all Unixes except Solaris.
> Mark Steele
> CISSP, GPEN, GCIA, CSM
> (647) 677-4064
> LinkedIn: https://ca.linkedin.com/in/markrsteele
> Github: https://github.com/marksteele
> Personal: http://www.control-alt-del.org
> erlang-questions mailing list
More information about the erlang-questions