[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Thu Sep 24 21:42:03 UTC 2020


The branch, master has been updated
       via  d53c91db3c7 s3:util:net_conf - allow empty path for [homes]
      from  1bccc67ce7c provision: BIND 9.17.x is not supported

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit d53c91db3c7daac7ae7a1622bd00ddef43f6e8ec
Author: Andrew <awalker at ixsystems.com>
Date:   Fri Sep 4 13:24:41 2020 -0400

    s3:util:net_conf - allow empty path for [homes]
    
    Validation for "net conf addshare" is overly strict. Empty string for
    path for homes share is valid.
    
    Signed-off-by: Andrew <awalker at ixsystems.com>
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Böhme <slow at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Thu Sep 24 21:41:12 UTC 2020 on sn-devel-184

-----------------------------------------------------------------------

Summary of changes:
 source3/utils/net_conf.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/utils/net_conf.c b/source3/utils/net_conf.c
index 267c4c802df..c16f240634c 100644
--- a/source3/utils/net_conf.c
+++ b/source3/utils/net_conf.c
@@ -648,10 +648,18 @@ static int net_conf_addshare(struct net_context *c,
 	/* validate path */
 
 	if (path[0] != '/') {
-		d_fprintf(stderr,
-			  _("Error: path '%s' is not an absolute path.\n"),
-			  path);
-		goto done;
+		bool ok = false;
+
+		if (strequal(sharename, HOMES_NAME) && path[0] == '\0') {
+			/* The homes share can be an empty path. */
+			ok = true;
+		}
+		if (!ok) {
+			d_fprintf(stderr,
+				  _("Error: path '%s' is not an absolute path.\n"),
+				 path);
+			goto done;
+		}
 	}
 
 	/*


-- 
Samba Shared Repository



More information about the samba-cvs mailing list