]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: prevent access to root filesystem when connecting with empty service name
authorMichael Adam <obnox@samba.org>
Thu, 18 Dec 2008 17:01:55 +0000 (18:01 +0100)
committerKarolin Seeger <kseeger@samba.org>
Mon, 5 Jan 2009 10:10:15 +0000 (11:10 +0100)
This only applies to a setup with "registry shares = yes"

Michael
(cherry picked from commit 288fa94ac7cfdf7457b5098c33fc840bed3d5410)
(cherry picked from commit e85526b184e66f86b7faa9d0a37288a09c12c19e)
(cherry picked from commit 5dfa403498c4f4a0eb05a5331b81326832ddd63f)

source/smbd/service.c

index 0b851f1e481b71a3b743474ae65fedcd8c561d05..c39584ab4a6721e5ef62302ccfaf6096450851a6 100644 (file)
@@ -235,6 +235,10 @@ static int load_registry_service(const char *servicename)
                return -1;
        }
 
+       if ((servicename == NULL) || (*servicename == '\0')) {
+               return -1;
+       }
+
        if (strequal(servicename, GLOBAL_NAME)) {
                return -2;
        }