Path: blob/main/sys/contrib/openzfs/lib/libshare/smb.h
48378 views
// SPDX-License-Identifier: CDDL-1.01/*2* CDDL HEADER START3*4* The contents of this file are subject to the terms of the5* 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.LICENSE9* or https://opensource.org/licenses/CDDL-1.0.10* See the License for the specific language governing permissions11* and limitations under the License.12*13* When distributing Covered Code, include this CDDL HEADER in each14* file and include the License file at usr/src/OPENSOLARIS.LICENSE.15* If applicable, add the following below this CDDL HEADER, with the16* fields enclosed by brackets "[]" replaced with your own identifying17* information: Portions Copyright [yyyy] [name of copyright owner]18*19* CDDL HEADER END20*/2122/*23* Copyright (c) 2011 Turbo Fredriksson <[email protected]>.24*/2526/*27* The maximum SMB share name seems to be 254 characters, though good28* references are hard to find.29*/3031#define SMB_NAME_MAX 25532#define SMB_COMMENT_MAX 2553334#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"3738typedef struct smb_share_s {39char name[SMB_NAME_MAX]; /* Share name */40char path[PATH_MAX]; /* Share path */41char comment[SMB_COMMENT_MAX]; /* Share's comment */42boolean_t guest_ok; /* 'y' or 'n' */4344struct smb_share_s *next;45} smb_share_t;464748