fksmbd_opipe.c revision b819cea2f73f98c5662230cc9affc8cc84f77fcf
/*
* 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
*/
/*
*/
#include <assert.h>
#include <alloca.h>
#include <door.h>
#include <errno.h>
#include <syslog.h>
#include <unistd.h>
#include <stdio.h>
#include <synch.h>
#include <string.h>
#include <stdlib.h>
#include <fcntl.h>
#include <pthread.h>
#include <strings.h>
#include <umem.h>
#include <smbsrv/smb_door.h>
#include <smbsrv/smb_token.h>
#include <smbsrv/libmlsvc.h>
#include <smbsrv/libsmbns.h>
#include "smbd.h"
/*
* Process smbd opipe requests.
*
* This is a special version of smb_opipe_dispatch()
* for the "fake" smbsrv (running in user space).
* This is called via function pointer from
* smbsrv: smb_opipe_door_call()
*
* Very similar to smbd_opipe_dispatch()
*/
int
{
if (!smbd_online())
return (-1);
return (-1);
return (-1);
return (-1);
case SMB_OPIPE_OPEN:
hdr.dh_datalen = 0;
break;
case SMB_OPIPE_CLOSE:
hdr.dh_datalen = 0;
break;
case SMB_OPIPE_READ:
break;
case SMB_OPIPE_WRITE:
hdr.dh_datalen = 0;
break;
case SMB_OPIPE_EXEC:
hdr.dh_datalen = 0;
break;
default:
return (-1);
}
return (0);
}
/*
* Normal (from a real kernel) up calls get a thread here.
* In the "fake" kernel (all user space) we don't need that.
* NB: arg will be freed by ndr_pipe_transact()
*/
static int
{
return (ENOMEM);
(void) ndr_pipe_transact(arg);
return (0);
}