summaryrefslogtreecommitdiff
path: root/source3/nsswitch/winbindd_sid.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2002-07-31 12:05:30 +0000
committerAndrew Bartlett <abartlet@samba.org>2002-07-31 12:05:30 +0000
commit2d67a683b735d50f411a4bee9ee5ec17e9a60015 (patch)
treec63912f150f6bf879f1690a0c1f101554cee17a8 /source3/nsswitch/winbindd_sid.c
parent2307a6f50469b08054fad714ede98ca86fe30dcf (diff)
downloadsamba-2d67a683b735d50f411a4bee9ee5ec17e9a60015.tar.gz
samba-2d67a683b735d50f411a4bee9ee5ec17e9a60015.tar.bz2
samba-2d67a683b735d50f411a4bee9ee5ec17e9a60015.zip
Winbind updates!
This updates the 'winbind' authentication module and winbind's 'PAM' (actually netlogon) code to allow smbd to cache connections to the DC. This is particulary relevent when we need mutex locks already - there is no parallelism to be gained anyway. The winbind code authenticates the user, and if successful, passes back the 'info3' struct describing the user. smbd then interprets that in exactly the same way as an 'ntdomain' logon. Also, add parinoia to winbind about null termination. Andrew Bartlett (This used to be commit 167f122b670d4ef67d78e6f79a2bae3f6e8d67df)
Diffstat (limited to 'source3/nsswitch/winbindd_sid.c')
-rw-r--r--source3/nsswitch/winbindd_sid.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source3/nsswitch/winbindd_sid.c b/source3/nsswitch/winbindd_sid.c
index 372898a08a..44f857d6be 100644
--- a/source3/nsswitch/winbindd_sid.c
+++ b/source3/nsswitch/winbindd_sid.c
@@ -36,6 +36,9 @@ enum winbindd_result winbindd_lookupsid(struct winbindd_cli_state *state)
fstring name;
fstring dom_name;
+ /* Ensure null termination */
+ state->request.data.sid[sizeof(state->request.data.sid)-1]='\0';
+
DEBUG(3, ("[%5d]: lookupsid %s\n", state->pid,
state->request.data.sid));
@@ -79,6 +82,12 @@ enum winbindd_result winbindd_lookupname(struct winbindd_cli_state *state)
DOM_SID sid;
struct winbindd_domain *domain;
+ /* Ensure null termination */
+ state->request.data.sid[sizeof(state->request.data.name.dom_name)-1]='\0';
+
+ /* Ensure null termination */
+ state->request.data.sid[sizeof(state->request.data.name.name)-1]='\0';
+
DEBUG(3, ("[%5d]: lookupname %s%s%s\n", state->pid,
state->request.data.name.dom_name,
lp_winbind_separator(),
@@ -112,6 +121,9 @@ enum winbindd_result winbindd_sid_to_uid(struct winbindd_cli_state *state)
{
DOM_SID sid;
+ /* Ensure null termination */
+ state->request.data.sid[sizeof(state->request.data.sid)-1]='\0';
+
DEBUG(3, ("[%5d]: sid to uid %s\n", state->pid,
state->request.data.sid));
@@ -139,6 +151,9 @@ enum winbindd_result winbindd_sid_to_gid(struct winbindd_cli_state *state)
{
DOM_SID sid;
+ /* Ensure null termination */
+ state->request.data.sid[sizeof(state->request.data.sid)-1]='\0';
+
DEBUG(3, ("[%5d]: sid to gid %s\n", state->pid,
state->request.data.sid));