smb_door_client.c revision 55bf511df53aad0fdb7eb3fa349f0308cc05234c
/*
* 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
*/
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* User-space door client for SMBd
*/
#include <fcntl.h>
#include <syslog.h>
#include <door.h>
#include <string.h>
#include <strings.h>
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
#include <smbsrv/wintypes.h>
#include <smbsrv/ntstatus.h>
#include <smbsrv/smb_common_door.h>
static int smb_door_fildes = -1;
static char *smbd_desc[] = {
"",
"SmbdJoinDomain",
"SmbdGetParam",
"SmbdSetParam",
"SmbdNetbiosReconfig",
"SmbdAdsDomainChanged",
0
};
/*
* Returns 0 on success. Otherwise, -1.
*/
static int
smbd_door_open(int opcode)
{
int rc = 0;
if (smb_door_fildes == -1 &&
rc = -1;
}
return (rc);
}
/*
* Return 0 upon success. Otherwise, -1.
*/
static int
{
int err;
int rc = -1;
switch (status) {
case SMBD_DOOR_SRV_SUCCESS:
rc = 0;
break;
case SMBD_DOOR_SRV_ERROR:
break;
default:
}
if (rc != 0) {
}
}
return (rc);
}
{
char *buf;
int status;
int opcode = SMBD_DOOR_JOIN;
return (NT_STATUS_INVALID_PARAMETER);
}
return (NT_STATUS_INTERNAL_ERROR);
}
if (!buf) {
return (NT_STATUS_NO_MEMORY);
}
if (enc_ctx == 0) {
return (NT_STATUS_INTERNAL_ERROR);
}
return (NT_STATUS_INTERNAL_ERROR);
}
smb_door_fildes = -1;
return (NT_STATUS_INTERNAL_ERROR);
}
return (NT_STATUS_INTERNAL_ERROR);
}
return (NT_STATUS_INTERNAL_ERROR);
}
return (rc);
}
int
{
char *buf;
int status;
int opcode = SMBD_DOOR_NETBIOS_RECONFIG;
return (1);
}
if (!buf) {
return (1);
}
if (enc_ctx == 0) {
return (1);
}
return (1);
}
smb_door_fildes = -1;
return (1);
}
return (1);
}
return (rc);
}
int
{
char *buf;
int status;
int opcode = SMBD_DOOR_PARAM_SET;
return (1);
}
if (!buf) {
return (1);
}
if (enc_ctx == 0) {
return (1);
}
return (1);
}
smb_door_fildes = -1;
return (1);
}
return (1);
}
return (rc);
}
int
{
char *buf;
int status;
int opcode = SMBD_DOOR_PARAM_GET;
return (1);
}
if (!buf) {
return (1);
}
if (enc_ctx == 0) {
return (1);
}
return (1);
}
smb_door_fildes = -1;
return (1);
}
return (1);
}
return (rc);
}
int
smbd_get_security_mode(int *mode)
{
char buf[64];
int rc;
buf[0] = '\0';
return (rc);
}
/*
* smb_ads_domain_change_notify
*
* When ADS domain has changed, this function is called to clear the
* ADS_HOST_INFO cache and remove the old keys from the Kerberos keytab.
*/
int
smb_ads_domain_change_notify(char *dom)
{
char *buf;
int status;
int rc;
return (1);
}
if (!buf) {
(void) close(smb_door_fildes);
smb_door_fildes = -1;
return (1);
}
if (enc_ctx == 0) {
(void) close(smb_door_fildes);
smb_door_fildes = -1;
return (1);
}
(void) close(smb_door_fildes);
smb_door_fildes = -1;
return (1);
}
(void) close(smb_door_fildes);
smb_door_fildes = -1;
return (1);
}
(void) close(smb_door_fildes);
smb_door_fildes = -1;
return (1);
}
(void) close(smb_door_fildes);
smb_door_fildes = -1;
return (1);
}
(void) close(smb_door_fildes);
smb_door_fildes = -1;
return (rc);
}