Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-src
Path: blob/main/sys/contrib/openzfs/lib/libshare/smb.h
48378 views
1
// SPDX-License-Identifier: CDDL-1.0
2
/*
3
* CDDL HEADER START
4
*
5
* The contents of this file are subject to the terms of the
6
* Common Development and Distribution License (the "License").
7
* You may not use this file except in compliance with the License.
8
*
9
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10
* or https://opensource.org/licenses/CDDL-1.0.
11
* See the License for the specific language governing permissions
12
* and limitations under the License.
13
*
14
* When distributing Covered Code, include this CDDL HEADER in each
15
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16
* If applicable, add the following below this CDDL HEADER, with the
17
* fields enclosed by brackets "[]" replaced with your own identifying
18
* information: Portions Copyright [yyyy] [name of copyright owner]
19
*
20
* CDDL HEADER END
21
*/
22
23
/*
24
* Copyright (c) 2011 Turbo Fredriksson <[email protected]>.
25
*/
26
27
/*
28
* The maximum SMB share name seems to be 254 characters, though good
29
* references are hard to find.
30
*/
31
32
#define SMB_NAME_MAX 255
33
#define SMB_COMMENT_MAX 255
34
35
#define SHARE_DIR "/var/lib/samba/usershares"
36
#define NET_CMD_PATH "/usr/bin/net"
37
#define NET_CMD_ARG_HOST "127.0.0.1"
38
39
typedef struct smb_share_s {
40
char name[SMB_NAME_MAX]; /* Share name */
41
char path[PATH_MAX]; /* Share path */
42
char comment[SMB_COMMENT_MAX]; /* Share's comment */
43
boolean_t guest_ok; /* 'y' or 'n' */
44
45
struct smb_share_s *next;
46
} smb_share_t;
47
48