cifsd: update to git (2019-10-08) 10206/head
authorRichard Yu <yurichard3839@gmail.com>
Sat, 12 Oct 2019 02:32:04 +0000 (10:32 +0800)
committerRichard Yu <yurichard3839@gmail.com>
Sat, 12 Oct 2019 02:32:04 +0000 (10:32 +0800)
Signed-off-by: Richard Yu <yurichard3839@gmail.com>
kernel/cifsd/Makefile
kernel/cifsd/patches/001-mips-vfree_vmalloc-fix.patch [deleted file]
kernel/cifsd/patches/002-fix-xattr_list.patch [deleted file]
net/cifsd-tools/Makefile
net/cifsd-tools/files/smb.conf.help

index b0eeca772958c837acddd003f45aa3aaf402e28e..03707536c647deb1f17bc0a5d17523ea3c512273 100644 (file)
@@ -5,9 +5,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/cifsd-team/cifsd.git
-PKG_SOURCE_DATE:=2019-08-19
-PKG_SOURCE_VERSION:=b919acf32027cd5d7616726336305b47e24f02ab
-PKG_MIRROR_HASH:=fd64b2cb78b8847f11ff79cbe06c3416bb0e67ca7433215d20c810fbfff6ee8f
+PKG_SOURCE_DATE:=2019-10-08
+PKG_SOURCE_VERSION:=ef6e0d530907576bb886866bef53e2f44c054c7f
+PKG_MIRROR_HASH:=bc06d3bdc36efc85e6eb5c6ba966e9720455dcbd074541cd9cf807a4bd5246f9
 
 PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
 PKG_LICENSE:=GPL-2.0-or-later
diff --git a/kernel/cifsd/patches/001-mips-vfree_vmalloc-fix.patch b/kernel/cifsd/patches/001-mips-vfree_vmalloc-fix.patch
deleted file mode 100644 (file)
index 6d00df0..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
---- a/vfs_cache.c
-+++ b/vfs_cache.c
-@@ -232,7 +232,7 @@ int __init cifsd_inode_hash_init(void)
-       size = bucketsize << inode_hash_shift;
-       /* init master fp hash table */
--      inode_hashtable = __vmalloc(size, GFP_ATOMIC, PAGE_KERNEL);
-+      inode_hashtable = vmalloc(size);
-       if (!inode_hashtable)
-               return -ENOMEM;
---- b/vfs.c
-+++ b/vfs.c
-@@ -17,6 +17,8 @@
- #include <linux/fsnotify.h>
- #include <linux/dcache.h>
- #include <linux/fiemap.h>
-+#include <linux/slab.h>
-+#include <linux/vmalloc.h>
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
- #include <linux/sched/xacct.h>
---- b/vfs_cache.c
-+++ b/vfs_cache.c
-@@ -5,6 +5,8 @@
-  */
- #include <linux/fs.h>
-+#include <linux/slab.h>
-+#include <linux/vmalloc.h>
- /* @FIXME */
- #include "glob.h"
diff --git a/kernel/cifsd/patches/002-fix-xattr_list.patch b/kernel/cifsd/patches/002-fix-xattr_list.patch
deleted file mode 100644 (file)
index af3680d..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-===
-
-SMB1/SMB2 don't know exactly how vfs layer allocates xattr list,
-via kmalloc() or vmalloc(). Introduce cifsd_vfs_xattr_free() and
-keep both xattr allocation and de-allocation in one place.
-
-Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
----
- smb1pdu.c | 4 ++--
- smb2pdu.c | 6 ++----
- vfs.c     | 6 ++++++
- vfs.h     | 1 +
- 4 files changed, 11 insertions(+), 6 deletions(-)
-
-diff --git a/smb1pdu.c b/smb1pdu.c
-index 35599ef..8cb92cf 100644
---- a/smb1pdu.c
-+++ b/smb1pdu.c
-@@ -8,6 +8,7 @@
- #include <linux/posix_acl_xattr.h>
- #include <linux/namei.h>
- #include <linux/statfs.h>
-+#include <linux/vmalloc.h>
-
- #include "glob.h"
- #include "smb1pdu.h"
-@@ -3844,8 +3845,7 @@ done:
-       rsp->ByteCount = cpu_to_le16(rsp_data_cnt + 5);
-       inc_rfc1001_len(&rsp->hdr, (10 * 2 + rsp->ByteCount));
- out:
--      if (xattr_list)
--              vfree(xattr_list);
-+      cifsd_vfs_xattr_free(xattr_list);
-       return rc;
- }
-
-diff --git a/smb2pdu.c b/smb2pdu.c
-index 754258f..2727622 100644
---- a/smb2pdu.c
-+++ b/smb2pdu.c
-@@ -3867,8 +3867,7 @@ done:
-       rsp->OutputBufferLength = cpu_to_le32(rsp_data_cnt);
-       inc_rfc1001_len(rsp_org, rsp_data_cnt);
- out:
--      if (xattr_list)
--              vfree(xattr_list);
-+      cifsd_vfs_xattr_free(xattr_list);
-       return rc;
- }
-
-@@ -4151,8 +4150,7 @@ static void get_file_stream_info(struct cifsd_work *work,
-       /* last entry offset should be 0 */
-       file_info->NextEntryOffset = 0;
- out:
--      if (xattr_list)
--              vfree(xattr_list);
-+      cifsd_vfs_xattr_free(xattr_list);
-
-       rsp->OutputBufferLength = cpu_to_le32(nbytes);
-       inc_rfc1001_len(rsp_org, nbytes);
-diff --git a/vfs.c b/vfs.c
-index 556b1a5..6da6f8e 100644
---- a/vfs.c
-+++ b/vfs.c
-@@ -1550,6 +1550,12 @@ int cifsd_vfs_remove_xattr(struct dentry *dentry, char *attr_name)
-       return vfs_removexattr(dentry, attr_name);
- }
-
-+void cifsd_vfs_xattr_free(char *xattr)
-+{
-+      if (xattr)
-+              vfree(xattr);
-+}
-+
- int cifsd_vfs_unlink(struct dentry *dir, struct dentry *dentry)
- {
-       int err = 0;
-diff --git a/vfs.h b/vfs.h
-index ee54daf..16b4f9e 100644
---- a/vfs.h
-+++ b/vfs.h
-@@ -186,6 +186,7 @@ int cifsd_vfs_xattr_stream_name(char *stream_name,
-
- int cifsd_vfs_truncate_xattr(struct dentry *dentry, int wo_streams);
- int cifsd_vfs_remove_xattr(struct dentry *dentry, char *attr_name);
-+void cifsd_vfs_xattr_free(char *xattr);
-
- int cifsd_vfs_kern_path(char *name, unsigned int flags, struct path *path,
-               bool caseless);
index 591b1ee7f62777173a4b07e71b41f78bfe60e2f0..c13af0c8c3c455ff18345367e2eb61882751d155 100644 (file)
@@ -5,9 +5,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/cifsd-team/cifsd-tools.git
-PKG_SOURCE_DATE:=2019-08-19
-PKG_SOURCE_VERSION:=bbeab27f0a1695f711fb84d9cd29a83f818ef90e
-PKG_MIRROR_HASH:=f8bef545400aa8c0db6ba0fffdf0c0a2f201603503728f140df133aff3a39cbb
+PKG_SOURCE_DATE:=2019-10-08
+PKG_SOURCE_VERSION:=4bc2d762eb32577b30a14b6991cd10026d99eb05
+PKG_MIRROR_HASH:=87edfb18bcf7c3c8558dc649b91a470aba0cee781e448b2f56ef7d774b6b40d3
 
 PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
 PKG_LICENSE:=GPL-2.0-or-later
@@ -31,7 +31,7 @@ define Package/cifsd-tools
 endef
 
 define Package/cifsd-tools/description
-  Userspace tools (cifsd, cifsadmin) for the CIFS/SMB kernel fileserver.
+  Userspace tools (cifsd, cifsuseradd, cifsshareadd) for the CIFS/SMB kernel fileserver.
   The config file location is /etc/cifs/smb.conf
 endef
 
@@ -39,7 +39,7 @@ define Package/cifsd-tools/install
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcifsdtools.so* $(1)/usr/lib/
        $(INSTALL_DIR) $(1)/usr/sbin
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{cifsadmin,cifsd} $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{cifsuseradd,cifsshareadd,cifsd} $(1)/usr/sbin/
        $(INSTALL_DIR) $(1)/etc/config $(1)/etc/cifs $(1)/etc/init.d
        $(INSTALL_CONF) ./files/cifsd.config $(1)/etc/config/cifsd
        $(INSTALL_DATA) ./files/smb.conf.template $(1)/etc/cifs/
index a4c29d268ff1a0b31393e9b021f9f3367554c069..23d0c8d378a405fec8d2ef10eaf116a359db365d 100644 (file)
 ;              the number of minutes of inactivity before a connection is
 ;              considered dead, and it is disconnected. The deadtime only
 ;              takes effect if the number of open files is zero.
+;      - root directory
+;              Sets up a root (base) directory for all shares. In some
+;              sense it's equal to chroot(). When this option set all shares'
+;               paths become relative to root directory, IOW the file name
+;               lookup resolves '/root directory/share path/file path' path.
 ;
 ; Supported [share] level parameters list:
 ;      - comment