diff options
author | Jeremy Allison <jra@samba.org> | 2018-08-21 12:05:34 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2018-08-22 21:50:41 +0200 |
commit | 9c71f61ed8a31d287d343d4f2e68cb40c57a2b89 (patch) | |
tree | 32e495908274fd218e47d2dcd50b9e765b720f92 /source3 | |
parent | fb81fb2d93be7fdf5081a057e4d70d9f53a72df3 (diff) | |
download | samba-9c71f61ed8a31d287d343d4f2e68cb40c57a2b89.tar.gz |
s3: smbd: Ensure get_real_filename() copes with empty pathnames.
Needed for vfs_glusterfs, as Gluster requires "." not '\0'.
Based on a fix from Anoop C S <anoopcs@redhat.com>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13585
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Aug 22 21:50:41 CEST 2018 on sn-devel-144
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/filename.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c index 9e15af1916d..41c1710351e 100644 --- a/source3/smbd/filename.c +++ b/source3/smbd/filename.c @@ -1443,6 +1443,11 @@ int get_real_filename(connection_struct *conn, const char *path, int ret; bool mangled; + /* handle null paths */ + if ((path == NULL) || (*path == 0)) { + path = "."; + } + mangled = mangle_is_mangled(name, conn->params); if (mangled) { |