Proper fix for #6898 - Samba duplicates file content on appending. Pointed out by...
[ira/wip.git] / source3 / smbd / filename.c
index 719ab6a3955abeba4e1fd7a1127501db92bb6c8e..16e36312bbf78fa472f36ab6e9f6a05f55310086 100644 (file)
@@ -238,7 +238,8 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx,
                }
        }
 
-       posix_pathnames = lp_posix_pathnames();
+       posix_pathnames = (lp_posix_pathnames() ||
+                               (ucf_flags & UCF_POSIX_PATHNAMES));
 
        /*
         * Strip off the stream, and add it back when we're done with the
@@ -780,8 +781,7 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx,
 
 NTSTATUS check_name(connection_struct *conn, const char *name)
 {
-       if (is_in_path(name, conn->veto_list, get_Protocol(),
-                      conn->case_sensitive)) {
+       if (IS_VETO_PATH(conn, name))  {
                /* Is it not dot or dot dot. */
                if (!((name[0] == '.') && (!name[1] ||
                                        (name[1] == '.' && !name[2])))) {