Use existing ISDOT and ISDOTDOT macros.
authorJeremy Allison <jra@samba.org>
Mon, 25 Jul 2011 23:12:45 +0000 (16:12 -0700)
committerKarolin Seeger <kseeger@samba.org>
Wed, 26 Oct 2011 17:28:01 +0000 (19:28 +0200)
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Jul 28 02:09:20 CEST 2011 on sn-devel-104
(cherry picked from commit d82256ca119eb8315cc69ba725ba71c386caa901)

source3/smbd/filename.c

index 25301e60af2faa84e060cfdec42f1e8e3acf7b8b..34bb7f5508fa11231b8371b93d8e5b8bdd599110 100644 (file)
@@ -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);