diff options
Diffstat (limited to 'source3/lib/util.c')
-rw-r--r-- | source3/lib/util.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c index 50aa4b0cbc..ee45da0900 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -1407,7 +1407,7 @@ uid_t nametouid(const char *name) char *p; uid_t u; - pass = getpwnam_alloc(talloc_autofree_context(), name); + pass = Get_Pwnam_alloc(talloc_autofree_context(), name); if (pass) { u = pass->pw_uid; TALLOC_FREE(pass); @@ -3070,3 +3070,14 @@ const char *strip_hostname(const char *s) return s; } + +bool tevent_req_poll_ntstatus(struct tevent_req *req, + struct tevent_context *ev, + NTSTATUS *status) +{ + bool ret = tevent_req_poll(req, ev); + if (!ret) { + *status = map_nt_error_from_unix(errno); + } + return ret; +} |