/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
/*
* NetLogon RPC (NETR) interface definition. This module provides
* the server side NETR RPC interface and the interface registration
* function.
*/
#include <strings.h>
#include <smbsrv/libntsvcs.h>
#include <smbsrv/netrauth.h>
static int netr_s_ServerReqChallenge(void *, ndr_xa_t *);
static int netr_s_ServerAuthenticate2(void *, ndr_xa_t *);
static int netr_s_ServerPasswordSet(void *, ndr_xa_t *);
static int netr_s_SamLogon(void *, ndr_xa_t *);
static int netr_s_SamLogoff(void *, ndr_xa_t *);
{0}
};
"NETR", /* name */
"NetLogon", /* desc */
"\\netlogon", /* endpoint */
PIPE_LSASS, /* sec_addr_port */
"12345678-1234-abcd-ef00-01234567cffb", 1, /* abstract */
0, /* no bind_instance_size */
0, /* no bind_req() */
0, /* no unbind_and_close() */
0, /* use generic_call_stub() */
netr_stub_table /* stub_table */
};
/*
* netr_initialize
*
* This function registers the NETR RPC interface with the RPC runtime
* library. It must be called in order to use either the client side
* or the server side functions.
*/
void
netr_initialize(void)
{
(void) ndr_svc_register(&netr_service);
}
/*
* netr_s_ServerReqChallenge
*/
/*ARGSUSED*/
static int
{
return (NDR_DRC_OK);
}
/*
* netr_s_ServerAuthenticate2
*/
/*ARGSUSED*/
static int
{
return (NDR_DRC_OK);
}
/*
* netr_s_ServerPasswordSet
*/
/*ARGSUSED*/
static int
{
return (NDR_DRC_OK);
}
/*
* netr_s_SamLogon
*/
/*ARGSUSED*/
static int
{
return (NDR_DRC_OK);
}
/*
* netr_s_SamLogoff
*/
/*ARGSUSED*/
static int
{
return (NDR_DRC_OK);
}
/*
* Declare extern references.
*/
/*
* Patch the netr_SamLogon union.
* This function is called from mlsvc_netr_ndr.c
*/
void
{
unsigned short size1 = 0;
unsigned short size2 = 0;
unsigned short size3 = 0;
switch (level) {
case 3:
/*
* The netr_validation_u union contains a pointer, which
* is a DWORD in NDR. So we need to set size1 to ensure
* that we can correctly decode the remaining parameters.
*/
break;
default:
/*
* If the request is badly formed or the level is invalid,
* the server returns NT_STATUS_INVALID_INFO_CLASS. Size1
* must be zero to correctly decode the status.
*/
size1 = 0;
break;
};
}