svn commit: samba r11412 - in branches/SAMBA_4_0/source/winbind: .
abartlet at samba.org
abartlet at samba.org
Mon Oct 31 05:45:20 GMT 2005
Author: abartlet
Date: 2005-10-31 05:45:19 +0000 (Mon, 31 Oct 2005)
New Revision: 11412
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=11412
Log:
These comments may not be much, but my eyes scan code with even
minimal comments much better (much like volker scans code of less than
80 cols better ;-)
Andrew Bartlett
Modified:
branches/SAMBA_4_0/source/winbind/wb_samba3_cmd.c
Changeset:
Modified: branches/SAMBA_4_0/source/winbind/wb_samba3_cmd.c
===================================================================
--- branches/SAMBA_4_0/source/winbind/wb_samba3_cmd.c 2005-10-31 04:17:51 UTC (rev 11411)
+++ branches/SAMBA_4_0/source/winbind/wb_samba3_cmd.c 2005-10-31 05:45:19 UTC (rev 11412)
@@ -36,6 +36,10 @@
#include "lib/events/events.h"
#include "librpc/gen_ndr/ndr_netlogon.h"
+/*
+ Send off the reply to an async Samba3 query, handling filling in the PAM, NTSTATUS and string errors.
+*/
+
static void wbsrv_samba3_async_auth_epilogue(NTSTATUS status,
struct wbsrv_samba3_call *s3call)
{
@@ -60,6 +64,10 @@
}
}
+/*
+ Send of a generic reply to a Samba3 query
+*/
+
static void wbsrv_samba3_async_epilogue(NTSTATUS status,
struct wbsrv_samba3_call *s3call)
{
@@ -77,6 +85,10 @@
}
}
+/*
+ Boilerplate commands, simple queries without network traffic
+*/
+
NTSTATUS wbsrv_samba3_interface_version(struct wbsrv_samba3_call *s3call)
{
s3call->response.result = WINBINDD_OK;
@@ -124,6 +136,11 @@
return NT_STATUS_OK;
}
+/*
+ Validate that we have a working pipe to the domain controller.
+ Return any NT error found in the process
+*/
+
static void checkmachacc_recv_creds(struct composite_context *ctx);
NTSTATUS wbsrv_samba3_check_machacc(struct wbsrv_samba3_call *s3call)
@@ -153,6 +170,11 @@
wbsrv_samba3_async_auth_epilogue(status, s3call);
}
+/*
+ Find the name of a suitable domain controller, by query on the
+ netlogon pipe to the DC.
+*/
+
static void getdcname_recv_dc(struct composite_context *ctx);
NTSTATUS wbsrv_samba3_getdcname(struct wbsrv_samba3_call *s3call)
@@ -191,6 +213,10 @@
wbsrv_samba3_async_epilogue(status, s3call);
}
+/*
+ Lookup a user's domain groups
+*/
+
static void userdomgroups_recv_groups(struct composite_context *ctx);
NTSTATUS wbsrv_samba3_userdomgroups(struct wbsrv_samba3_call *s3call)
@@ -255,6 +281,9 @@
wbsrv_samba3_async_epilogue(status, s3call);
}
+/*
+ Lookup the list of SIDs for a user
+*/
static void usersids_recv_sids(struct composite_context *ctx);
NTSTATUS wbsrv_samba3_usersids(struct wbsrv_samba3_call *s3call)
@@ -328,6 +357,10 @@
wbsrv_samba3_async_epilogue(status, s3call);
}
+/*
+ Lookup a DOMAIN\\user style name, and return a SID
+*/
+
static void lookupname_recv_sid(struct composite_context *ctx);
NTSTATUS wbsrv_samba3_lookupname(struct wbsrv_samba3_call *s3call)
@@ -370,6 +403,10 @@
wbsrv_samba3_async_epilogue(status, s3call);
}
+/*
+ Lookup a SID, and return a DOMAIN\\user style name
+*/
+
static void lookupsid_recv_name(struct composite_context *ctx);
NTSTATUS wbsrv_samba3_lookupsid(struct wbsrv_samba3_call *s3call)
@@ -419,6 +456,16 @@
wbsrv_samba3_async_epilogue(status, s3call);
}
+/*
+ Challenge-response authentication. This interface is used by
+ ntlm_auth and the smbd auth subsystem to pass NTLM authentication
+ requests along a common pipe to the domain controller.
+
+ The return value (in the async reply) may include the 'info3'
+ (effectivly most things you would want to know about the user), or
+ the NT and LM session keys seperated.
+*/
+
static void pam_auth_crap_recv(struct composite_context *ctx);
NTSTATUS wbsrv_samba3_pam_auth_crap(struct wbsrv_samba3_call *s3call)
@@ -491,6 +538,9 @@
wbsrv_samba3_async_auth_epilogue(status, s3call);
}
+/* Helper function: Split a domain\\user string into it's parts,
+ * because the client supplies it as one string */
+
static BOOL samba3_parse_domuser(TALLOC_CTX *mem_ctx, const char *domuser,
char **domain, char **user)
{
@@ -509,6 +559,13 @@
return ((*domain != NULL) && (*user != NULL));
}
+/* Plaintext authentication
+
+ This interface is used by ntlm_auth in it's 'basic' authentication
+ mode, as well as by pam_winbind to authenticate users where we are
+ given a plaintext password.
+*/
+
static void pam_auth_recv(struct composite_context *ctx);
NTSTATUS wbsrv_samba3_pam_auth(struct wbsrv_samba3_call *s3call)
@@ -547,6 +604,10 @@
wbsrv_samba3_async_auth_epilogue(status, s3call);
}
+/*
+ List trusted domains
+*/
+
static void list_trustdom_recv_doms(struct composite_context *ctx);
NTSTATUS wbsrv_samba3_list_trustdom(struct wbsrv_samba3_call *s3call)
More information about the samba-cvs
mailing list