Fix bug #6506 - SMBD server doesn't set EAs when a file is overwritten in NT_TRANSACT...
authorJeremy Allison <jra@samba.org>
Thu, 25 Jun 2009 19:57:15 +0000 (12:57 -0700)
committerJeremy Allison <jra@samba.org>
Thu, 25 Jun 2009 19:57:15 +0000 (12:57 -0700)
Reported and verified by Long Li <longli@microsoft.com>
Jeremy.

source3/smbd/open.c

index 5b62ff022dd8e909c37ccad13f081503fb7d11e1..eb703442240a8129b80fd329da112b843b0c6098 100644 (file)
@@ -3243,7 +3243,8 @@ static NTSTATUS create_file_unixpath(connection_struct *conn,
                }
        }
 
-       if ((ea_list != NULL) && (info == FILE_WAS_CREATED)) {
+       if ((ea_list != NULL) &&
+                       ((info == FILE_WAS_CREATED) || (info == FILE_WAS_OVERWRITTEN))) {
                status = set_ea(conn, fsp, fname, ea_list);
                if (!NT_STATUS_IS_OK(status)) {
                        goto fail;