s3:smbd/filename remove smelly code
authorChristian Ambach <ambi@samba.org>
Tue, 5 Apr 2016 00:58:48 +0000 (02:58 +0200)
committerKarolin Seeger <kseeger@samba.org>
Mon, 9 May 2016 08:42:23 +0000 (10:42 +0200)
not sure how this chunk ended up there, but I agree with
the statement in the comment that behavior should not depend
on developer mode

make test does not seem to depend on it anymore.

This piece had some bad influence on the tests I wrote
for case insensitivite behavior of SMB2/3, so let us
remove this technical debt.

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
The last 3 patches address
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11438

source3/smbd/filename.c

index 555658de0149a9d19f9b77022d447ad8f97cd48d..04323acc328dba4b669fcbbf3c6ee773dffe639c 100644 (file)
@@ -917,34 +917,6 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx,
                        TALLOC_FREE(found_name);
                } /* end else */
 
-#ifdef DEVELOPER
-               /*
-                * This sucks!
-                * We should never provide different behaviors
-                * depending on DEVELOPER!!!
-                */
-               if (VALID_STAT(smb_fname->st)) {
-                       bool delete_pending;
-                       uint32_t name_hash;
-
-                       status = file_name_hash(conn,
-                                       smb_fname_str_dbg(smb_fname),
-                                       &name_hash);
-                       if (!NT_STATUS_IS_OK(status)) {
-                               goto fail;
-                       }
-
-                       get_file_infos(vfs_file_id_from_sbuf(conn,
-                                                            &smb_fname->st),
-                                      name_hash,
-                                      &delete_pending, NULL);
-                       if (delete_pending) {
-                               status = NT_STATUS_DELETE_PENDING;
-                               goto fail;
-                       }
-               }
-#endif
-
                /*
                 * Add to the dirpath that we have resolved so far.
                 */