Move more stuff out of the way
authorVolker Lendecke <vl@samba.org>
Tue, 11 Dec 2007 09:49:26 +0000 (10:49 +0100)
committerVolker Lendecke <vl@samba.org>
Tue, 11 Dec 2007 15:16:54 +0000 (16:16 +0100)
(This used to be commit ae422fce01cd7520d6dd72e08719a5cd003cb640)

source3/smbd/open.c

index 47985637214fd3378385acc812130e27df8ea435..007b64abf2cb5b7982368c5d9f92b02895eb9e2d 100644 (file)
@@ -2484,13 +2484,6 @@ NTSTATUS create_file(connection_struct *conn,
                  (unsigned int)root_dir_fid,
                  ea_list, sd, fname));
 
-       SET_STAT_INVALID(sbuf);
-
-       if (create_options & FILE_OPEN_BY_FILE_ID) {
-               status = NT_STATUS_NOT_SUPPORTED;
-               goto fail;
-       }
-
        /*
         * Get the file name.
         */
@@ -2641,6 +2634,8 @@ NTSTATUS create_file(connection_struct *conn,
        {
                char *converted_fname;
 
+               SET_STAT_INVALID(sbuf);
+
                status = unix_convert(talloc_tos(), conn, fname, False,
                                      &converted_fname, NULL, &sbuf);
                if (!NT_STATUS_IS_OK(status)) {
@@ -2656,6 +2651,11 @@ NTSTATUS create_file(connection_struct *conn,
                goto fail;
        }
 
+       if (create_options & FILE_OPEN_BY_FILE_ID) {
+               status = NT_STATUS_NOT_SUPPORTED;
+               goto fail;
+       }
+
        if (req == NULL) {
                oplock_request |= INTERNAL_OPEN_ONLY;
        }