s3: Remove a few unnecessary checks from the streams xattr module
authorTim Prouty <tprouty@samba.org>
Mon, 5 Jan 2009 01:36:36 +0000 (17:36 -0800)
committerTim Prouty <tprouty@samba.org>
Mon, 5 Jan 2009 03:31:30 +0000 (19:31 -0800)
Handling of error codes when renaming a file to a stream and a stream
to a file is now done in rename_internals_fsp.

The NTRENAME stream path only passes in the stream name, so the new
base can now be different from the old base.

source3/modules/vfs_streams_xattr.c

index ecfc31970dae7a960437779833047b49995f0cd4..7124c575203a184fb5936d88274dc2657904b86a 100644 (file)
@@ -511,11 +511,6 @@ static int streams_xattr_rename(vfs_handle_struct *handle,
                return SMB_VFS_NEXT_RENAME(handle, oldname, newname);
        }
 
-       if (!(o_is_stream && n_is_stream)) {
-               errno = ENOSYS;
-               goto fail;
-       }
-
        frame = talloc_stackframe();
        if (!frame) {
                goto fail;
@@ -544,12 +539,6 @@ static int streams_xattr_rename(vfs_handle_struct *handle,
                goto fail;
        }
 
-       /* the new base should be empty */
-       if (StrCaseCmp(obase, nbase) != 0) {
-               errno = ENOSYS;
-               goto fail;
-       }
-
        if (StrCaseCmp(ostream, nstream) == 0) {
                goto done;
        }