]> git.proxmox.com Git - mirror_zfs.git/blame - lib/libshare/smb.h
Fix coverity defects: CID 147452, 147447, 147446
[mirror_zfs.git] / lib / libshare / smb.h
CommitLineData
645fb9cc
TF
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22/*
23 * Copyright (c) 2011 Turbo Fredriksson <turbo@bayour.com>.
24 */
25
26/*
27 * The maximum SMB share name seems to be 254 characters, though good
28 * references are hard to find.
29 */
30
d1d7e268
MK
31#define SMB_NAME_MAX 255
32#define SMB_COMMENT_MAX 255
645fb9cc 33
d1d7e268
MK
34#define SHARE_DIR "/var/lib/samba/usershares"
35#define NET_CMD_PATH "/usr/bin/net"
36#define NET_CMD_ARG_HOST "127.0.0.1"
645fb9cc
TF
37
38typedef struct smb_share_s {
39 char name[SMB_NAME_MAX]; /* Share name */
40 char path[PATH_MAX]; /* Share path */
41 char comment[SMB_COMMENT_MAX]; /* Share's comment */
42 boolean_t guest_ok; /* 'y' or 'n' */
43
44 struct smb_share_s *next;
45} smb_share_t;
46
47smb_share_t *smb_shares;
48
49void libshare_smb_init(void);