smb_downcalls.c revision c8ec8eea9849cac239663c46be8a7f5d2ba7ca00
/*
* 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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "@(#)smb_downcalls.c 1.3 08/08/05 SMI"
/*
* Down calls to SMB Kmod for obtaining various kernel door services.
*/
#include <syslog.h>
#include <strings.h>
#include <stdlib.h>
#include <string.h>
#include <smbsrv/smb_door_svc.h>
#include <smbsrv/smb_common_door.h>
/* indexed via opcode (smb_kdr_opcode_t) */
char *smb_dwncall_info[] = {
"SmbDwncallNumUser",
"SmbDwncallUserList",
"SmbDwncallShare",
0
};
int
{
if (!get_desc_cb)
return (-1);
return (0);
}
static int
{
int fd;
if (!get_dwncall_desc) {
return (-1);
}
return (-1);
}
return (fd);
}
{
int fd;
return (0);
if (rbufp) {
num = -1;
}
}
return (num);
}
/*
* smb_dwncall_get_users
*
* The calling function must free the output parameter 'users'.
*/
int
{
return (-1);
if (!buf) {
return (-1);
}
if (rbufp) {
if (rc)
else
}
return (rc);
}
/*
* smb_dwncall_share()
*
* This is a downcall to the kernel that is executed
* upon share enable and disable.
*/
int
{
if ((op != SMB_SHROP_ADD) &&
(op != SMB_SHROP_DELETE))
return (EINVAL);
return (EBADF);
}
if (!buf) {
return (ENOMEM);
}
if (rbufp) {
}
}
return (rc);
}