git.samba.org
/
gd
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6120f56
)
nsswitch: Only connect to the priv socket if required
author
Volker Lendecke
<vl@samba.org>
Mon, 23 Apr 2018 10:13:40 +0000
(12:13 +0200)
committer
Volker Lendecke
<vl@samba.org>
Tue, 24 Apr 2018 12:32:10 +0000
(14:32 +0200)
This should speed up calls like "wbinfo -p"
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
nsswitch/wb_common.c
patch
|
blob
|
history
diff --git
a/nsswitch/wb_common.c
b/nsswitch/wb_common.c
index da81734ae3c9efbf36d2779c0ca4ef3cd011c049..6768fde535b052210d897e8b74a46fb6e2a0ba86 100644
(file)
--- a/
nsswitch/wb_common.c
+++ b/
nsswitch/wb_common.c
@@
-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;
}