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:22:42 +0000 (19:22 +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 c92921edce6518de5cbd07ca69b66d249cd461ae..84bdd408e9e52940c8a6f5bdc243a02a218d7bfa 100644 (file)
@@ -849,8 +849,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);