smbd.h revision 3db3f65c6274eb042354801a308c8e9bc4994553
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * CDDL HEADER START
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The contents of this file are subject to the terms of the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Common Development and Distribution License (the "License").
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * You may not use this file except in compliance with the License.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * or http://www.opensolaris.org/os/licensing.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * See the License for the specific language governing permissions
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * and limitations under the License.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * When distributing Covered Code, include this CDDL HEADER in each
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * If applicable, add the following below this CDDL HEADER, with the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * fields enclosed by brackets "[]" replaced with your own identifying
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * information: Portions Copyright [yyyy] [name of copyright owner]
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * CDDL HEADER END
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
7b59d02d2a384be9a08087b14defadd214b3c1ddjb * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Use is subject to license terms.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#ifndef _SMBD_H
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define _SMBD_H
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#pragma ident "%Z%%M% %I% %E% SMI"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#ifdef __cplusplus
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwextern "C" {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#endif
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#include <sys/types.h>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#include <smbsrv/smb_token.h>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#include <smbsrv/libsmb.h>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#include <smbsrv/libmlsvc.h>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
3db3f65c6274eb042354801a308c8e9bc4994553amwextern int smbd_opipe_dsrv_start(void);
3db3f65c6274eb042354801a308c8e9bc4994553amwextern void smbd_opipe_dsrv_stop(void);
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
3ad684d66b78e06edd37e2c4fd3b3949f095194bjbextern int smb_share_dsrv_start(void);
3ad684d66b78e06edd37e2c4fd3b3949f095194bjbextern void smb_share_dsrv_stop(void);
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwextern int smb_netlogon_init(void);
faa1795a28a5c712eed6d0a3f84d98c368a316c6jbextern void smb_set_netlogon_cred(void);
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwextern smb_token_t *smbd_user_auth_logon(netr_client_t *);
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwextern void smbd_user_nonauth_logon(uint32_t);
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwextern void smbd_user_auth_logoff(uint32_t);
faa1795a28a5c712eed6d0a3f84d98c368a316c6jbextern uint32_t smbd_join(smb_joininfo_t *);
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
3ad684d66b78e06edd37e2c4fd3b3949f095194bjb
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwtypedef struct smbd {
6537f381d2d9e7b4e2f7b29c3e7a3f13be036f2eas const char *s_version; /* smbd version string */
6537f381d2d9e7b4e2f7b29c3e7a3f13be036f2eas const char *s_pname; /* basename to use for messages */
6537f381d2d9e7b4e2f7b29c3e7a3f13be036f2eas pid_t s_pid; /* process-ID of current daemon */
6537f381d2d9e7b4e2f7b29c3e7a3f13be036f2eas uid_t s_uid; /* UID of current daemon */
6537f381d2d9e7b4e2f7b29c3e7a3f13be036f2eas gid_t s_gid; /* GID of current daemon */
6537f381d2d9e7b4e2f7b29c3e7a3f13be036f2eas int s_fg; /* Run in foreground */
6537f381d2d9e7b4e2f7b29c3e7a3f13be036f2eas int s_drv_fd; /* Handle for SMB kernel driver */
6537f381d2d9e7b4e2f7b29c3e7a3f13be036f2eas int s_shutdown_flag; /* Fields for shutdown control */
6537f381d2d9e7b4e2f7b29c3e7a3f13be036f2eas int s_sigval;
6537f381d2d9e7b4e2f7b29c3e7a3f13be036f2eas boolean_t s_kbound; /* B_TRUE if bound to kernel */
6537f381d2d9e7b4e2f7b29c3e7a3f13be036f2eas int s_door_lmshr;
6537f381d2d9e7b4e2f7b29c3e7a3f13be036f2eas int s_door_srv;
3db3f65c6274eb042354801a308c8e9bc4994553amw int s_door_opipe;
6537f381d2d9e7b4e2f7b29c3e7a3f13be036f2eas int s_secmode; /* Current security mode */
6537f381d2d9e7b4e2f7b29c3e7a3f13be036f2eas smb_kmod_cfg_t s_kcfg; /* Current Kernel configuration */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw} smbd_t;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#ifdef __cplusplus
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw}
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#endif
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#endif /* _SMBD_H */