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 https://opensource.org/licenses/CDDL-1.0.
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) 2020 by Delphix. All rights reserved.
24 */
25
26 #include <stdio.h>
27 #include <libshare.h>
28 #include "libshare_impl.h"
29
30 /*
31 * Enables SMB sharing for the specified share.
32 */
33 static int
34 smb_enable_share(sa_share_impl_t impl_share)
35 {
36 (void) impl_share;
37 fputs("No SMB support in FreeBSD yet.\n", stderr);
38 return (SA_NOT_SUPPORTED);
39 }
40 /*
41 * Disables SMB sharing for the specified share.
42 */
43 static int
44 smb_disable_share(sa_share_impl_t impl_share)
45 {
46 (void) impl_share;
47 fputs("No SMB support in FreeBSD yet.\n", stderr);
48 return (SA_NOT_SUPPORTED);
49 }
50
51 /*
52 * Checks whether the specified SMB share options are syntactically correct.
53 */
54 static int
55 smb_validate_shareopts(const char *shareopts)
56 {
57 (void) shareopts;
58 fputs("No SMB support in FreeBSD yet.\n", stderr);
59 return (SA_NOT_SUPPORTED);
60 }
61
62 /*
63 * Checks whether a share is currently active.
64 */
65 static boolean_t
66 smb_is_share_active(sa_share_impl_t impl_share)
67 {
68 (void) impl_share;
69 return (B_FALSE);
70 }
71
72 static int
73 smb_update_shares(void)
74 {
75 /* Not implemented */
76 return (0);
77 }
78
79 const sa_fstype_t libshare_smb_type = {
80 .enable_share = smb_enable_share,
81 .disable_share = smb_disable_share,
82 .is_shared = smb_is_share_active,
83
84 .validate_shareopts = smb_validate_shareopts,
85 .commit_shares = smb_update_shares,
86 };
Cache object: 90eb0ce357be069ddd5abd44aa68adf4
|