summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2011-07-25 16:12:45 -0700
committerJeremy Allison <jra@samba.org>2011-07-28 02:09:20 +0200
commitd82256ca119eb8315cc69ba725ba71c386caa901 (patch)
treebd7020b36c96b82c52221fac625252e4ca6dcb94
parent9cde691b87238c14b2f2f4660694d76e99892308 (diff)
downloadsamba-d82256ca119eb8315cc69ba725ba71c386caa901.tar.gz
samba-d82256ca119eb8315cc69ba725ba71c386caa901.tar.bz2
samba-d82256ca119eb8315cc69ba725ba71c386caa901.zip
Use existing ISDOT and ISDOTDOT macros.
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Thu Jul 28 02:09:20 CEST 2011 on sn-devel-104
-rw-r--r--source3/smbd/filename.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c
index ec8d1139fa..610a4ce42a 100644
--- a/source3/smbd/filename.c
+++ b/source3/smbd/filename.c
@@ -987,8 +987,7 @@ NTSTATUS check_name(connection_struct *conn, const char *name)
{
if (IS_VETO_PATH(conn, name)) {
/* Is it not dot or dot dot. */
- if (!((name[0] == '.') && (!name[1] ||
- (name[1] == '.' && !name[2])))) {
+ if (!(ISDOT(name) || ISDOTDOT(name))) {
DEBUG(5,("check_name: file path name %s vetoed\n",
name));
return map_nt_error_from_unix(ENOENT);