mirror of
https://github.com/samba-team/samba.git
synced 2025-02-25 17:57:42 +03:00
nsswitch: Only connect to the priv socket if required
This should speed up calls like "wbinfo -p" Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
parent
6120f56801
commit
fdf0b2a784
@ -401,6 +401,10 @@ static int winbind_open_pipe_sock(struct winbindd_context *ctx,
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (need_priv == 0) {
|
||||
return ctx->winbindd_fd;
|
||||
}
|
||||
|
||||
/* try and get priv pipe */
|
||||
|
||||
request.wb_flags = WBFLAG_RECURSE;
|
||||
@ -424,7 +428,7 @@ static int winbind_open_pipe_sock(struct winbindd_context *ctx,
|
||||
SAFE_FREE(response.extra_data.data);
|
||||
}
|
||||
|
||||
if ((need_priv != 0) && (ctx->is_privileged == 0)) {
|
||||
if (ctx->is_privileged == 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user