mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Implemented sharing datasets via SMB using libshare
Add the initial support for the 'smbshare' option using the existing libshare infrastructure. Because this implementation relies on usershares samba version 3.0.23 is required. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #493
This commit is contained in:
committed by
Brian Behlendorf
parent
4588bf5701
commit
645fb9cc21
@@ -712,7 +712,7 @@ zfs_parse_options(char *options, zfs_share_proto_t proto)
|
||||
/*
|
||||
* Share the given filesystem according to the options in the specified
|
||||
* protocol specific properties (sharenfs, sharesmb). We rely
|
||||
* on "libshare" to the dirty work for us.
|
||||
* on "libshare" to do the dirty work for us.
|
||||
*/
|
||||
static int
|
||||
zfs_share_proto(zfs_handle_t *zhp, zfs_share_proto_t *proto)
|
||||
@@ -889,11 +889,11 @@ zfs_unshare_proto(zfs_handle_t *zhp, const char *mountpoint,
|
||||
mntpt = zfs_strdup(zhp->zfs_hdl, entry.mnt_mountp);
|
||||
|
||||
for (curr_proto = proto; *curr_proto != PROTO_END;
|
||||
curr_proto++) {
|
||||
curr_proto++) {
|
||||
|
||||
if (is_shared(hdl, mntpt, *curr_proto) &&
|
||||
unshare_one(hdl, zhp->zfs_name,
|
||||
mntpt, *curr_proto) != 0) {
|
||||
mntpt, *curr_proto) != 0) {
|
||||
if (mntpt != NULL)
|
||||
free(mntpt);
|
||||
return (-1);
|
||||
|
||||
Reference in New Issue
Block a user