2 Unix SMB/CIFS implementation.
4 Modular services configuration
6 Copyright (C) Simo Sorce 2006
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>.
27 struct share_context {
28 const struct share_ops *ops;
34 struct share_context *ctx;
38 enum share_info_type {
45 enum share_info_type type;
52 NTSTATUS (*init)(TALLOC_CTX *, const struct share_ops*, struct share_context **);
53 const char *(*string_option)(struct share_config *, const char *, const char *);
54 int (*int_option)(struct share_config *, const char *, int);
55 bool (*bool_option)(struct share_config *, const char *, bool);
56 const char **(*string_list_option)(TALLOC_CTX *, struct share_config *, const char *);
57 NTSTATUS (*list_all)(TALLOC_CTX *, struct share_context *, int *, const char ***);
58 NTSTATUS (*get_config)(TALLOC_CTX *, struct share_context *, const char *, struct share_config **);
59 NTSTATUS (*create)(struct share_context *, const char *, struct share_info *, int);
60 NTSTATUS (*set)(struct share_context *, const char *, struct share_info *, int);
61 NTSTATUS (*remove)(struct share_context *, const char *);
64 #include "param/share_proto.h"
66 /* list of shares options */
68 #define SHARE_NAME "name"
69 #define SHARE_PATH "path"
70 #define SHARE_COMMENT "comment"
71 #define SHARE_PASSWORD "password"
72 #define SHARE_HOSTS_ALLOW "hosts-allow"
73 #define SHARE_HOSTS_DENY "hosts-deny"
74 #define SHARE_NTVFS_HANDLER "ntvfs-handler"
75 #define SHARE_TYPE "type"
76 #define SHARE_VOLUME "volume"
77 #define SHARE_CSC_POLICY "csc-policy"
78 #define SHARE_AVAILABLE "available"
79 #define SHARE_BROWSEABLE "browseable"
80 #define SHARE_MAX_CONNECTIONS "max-connections"
82 /* I'd like to see the following options go away
83 * and always use EAs and SECDESCs */
84 #define SHARE_READONLY "readonly"
85 #define SHARE_MAP_SYSTEM "map-system"
86 #define SHARE_MAP_HIDDEN "map-hidden"
87 #define SHARE_MAP_ARCHIVE "map-archive"
89 #define SHARE_STRICT_LOCKING "strict-locking"
90 #define SHARE_STRICT_SYNC "strict-sync"
91 #define SHARE_MSDFS_ROOT "msdfs-root"
92 #define SHARE_CI_FILESYSTEM "ci-filesystem"
94 #define SHARE_DIR_MASK "directory mask"
95 #define SHARE_CREATE_MASK "create mask"
96 #define SHARE_FORCE_CREATE_MODE "force create mode"
97 #define SHARE_FORCE_DIR_MODE "force directory mode"
101 #define SHARE_HOST_ALLOW_DEFAULT NULL
102 #define SHARE_HOST_DENY_DEFAULT NULL
103 #define SHARE_VOLUME_DEFAULT NULL
104 #define SHARE_TYPE_DEFAULT "DISK"
105 #define SHARE_CSC_POLICY_DEFAULT 0
106 #define SHARE_AVAILABLE_DEFAULT True
107 #define SHARE_BROWSEABLE_DEFAULT True
108 #define SHARE_MAX_CONNECTIONS_DEFAULT 0
110 #define SHARE_DIR_MASK_DEFAULT 0755
111 #define SHARE_CREATE_MASK_DEFAULT 0744
112 #define SHARE_FORCE_CREATE_MODE_DEFAULT 0000
113 #define SHARE_FORCE_DIR_MODE_DEFAULT 0000
117 /* I'd like to see the following options go away
118 * and always use EAs and SECDESCs */
119 #define SHARE_READONLY_DEFAULT True
120 #define SHARE_MAP_SYSTEM_DEFAULT False
121 #define SHARE_MAP_HIDDEN_DEFAULT False
122 #define SHARE_MAP_ARCHIVE_DEFAULT True
124 #define SHARE_STRICT_LOCKING_DEFAULT True
125 #define SHARE_STRICT_SYNC_DEFAULT False
126 #define SHARE_MSDFS_ROOT_DEFAULT False
127 #define SHARE_CI_FILESYSTEM_DEFAULT False
129 #endif /* _SHARE_H */