fksmbd_door.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
*/
/*
* Copyright 2013 Nexenta Systems, Inc. All rights reserved.
*/
#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"
/*
* Special version of smb_door_dispatch() for the
* "fake" smbsrv (running in user space).
*
* This is called via function pointer from
* smbsrv: smb_kdoor_upcall()
*
* The args and response go RPC encoded, just so we can
* borrow some of the common doorsvc code, even though
* there's no need for RPC encoding in this scenario.
*/
int
{
/*
* Decode
*
* da->da_arg.data_ptr = (arg data, xdr encoded)
* da->da_arg.data_size = (arg data len)
*/
return (-1);
}
return (-1);
}
return (-1);
}
/*
* ASYNC_RESPONSE is not used here.
*/
return (-1);
}
/*
* Dispatch
*
* Call the common smbd_doorsvc.c code.
*/
(void) smbd_door_dispatch_op(&dop_arg);
/*
* Encode
*
* da->da_arg.rbuf = (return data buf)
* da->da_arg.rsize = (return data size)
*
* Note that the return data buffer initially
* points to the same buffer as the args.
* If that's not large enough, umem_alloc.
*/
return (-1);
}
/* Copy caller's return data after the header. */
}
/* Let's update da->da_hdr too. */
/*
* Was door_return()
* NB: The "fake kernel" smbsrv code will umem_free rbuf.
*/
return (0);
}