diff options
author | Michael Adam <obnox@samba.org> | 2008-12-18 18:01:55 +0100 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2009-01-05 11:07:59 +0100 |
commit | 5318e73e93295cbdd2e50c4291b58a317cb09ea6 (patch) | |
tree | ae3ffa410809274436c32ac9a08a050992d322a0 /source3/smbd | |
parent | beb8b8fc2d02295e81def260d2449fb393bab259 (diff) | |
download | samba-5318e73e93295cbdd2e50c4291b58a317cb09ea6.tar.gz samba-5318e73e93295cbdd2e50c4291b58a317cb09ea6.tar.bz2 samba-5318e73e93295cbdd2e50c4291b58a317cb09ea6.zip |
smbd: prevent access to root filesystem when connecting with empty service name
This only applies to a setup with "registry shares = yes"
Michael
(cherry picked from commit 288fa94ac7cfdf7457b5098c33fc840bed3d5410)
(cherry picked from commit e85526b184e66f86b7faa9d0a37288a09c12c19e)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/service.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/smbd/service.c b/source3/smbd/service.c index 0dea615fb5..e90098fed0 100644 --- a/source3/smbd/service.c +++ b/source3/smbd/service.c @@ -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; } |