Bug 9587 - archive flag is always set on directories
Summary: archive flag is always set on directories
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.5
Classification: Unclassified
Component: File services (show other bugs)
Version: 3.5.16
Hardware: All All
: P5 normal
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-23 19:01 UTC by Grace Chen (mail address dead)
Modified: 2020-12-11 07:27 UTC (History)
1 user (show)

See Also:


Attachments
git-am fix for master and 4.0.x (6.31 KB, patch)
2013-01-24 20:42 UTC, Jeremy Allison
ddiss: review+
Details
git-am fix for 3.6.x. (1.18 KB, patch)
2013-01-24 20:45 UTC, Jeremy Allison
ddiss: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Grace Chen (mail address dead) 2013-01-23 19:01:12 UTC

    
Comment 1 Grace Chen (mail address dead) 2013-01-23 19:06:42 UTC
In both 3.5.16 and 3.6.8, during our testing, we found that the archive flag is always set on directories. We noticed this behavior, however, have not yet found bad effect on file access because of that. However would like to see if this can be fixed.

It seems that Samba defaults map archive to yes.

sfcstlx0102_01:~ # testparm -s -v | grep archive
Load smb config files from /opt/samba3518/lib/smb.conf
Unknown parameter encountered: "realm"
Ignoring unknown parameter "realm"
Processing section "[cifsshare]"
Processing section "[onefs]"
Loaded services file OK.
Server role: ROLE_STANDALONE
        map archive = Yes
sfcstlx0102_01:~ #
Comment 2 Jeremy Allison 2013-01-24 01:04:18 UTC
More complete explanation of the bug.

Creating a directory to a Samba share sets the attributes to 'D' only.

However then doing a rename of that directory sets the 'A' attribute in error (as is done on a file rename).

Fix to follow, including new test code to ensure we don't regress.

Jeremy.
Comment 3 Jeremy Allison 2013-01-24 20:42:50 UTC
Created attachment 8478 [details]
git-am fix for master and 4.0.x

Fix + regression test.

Jeremy.
Comment 4 Jeremy Allison 2013-01-24 20:45:27 UTC
Created attachment 8479 [details]
git-am fix for 3.6.x.
Comment 5 Jeremy Allison 2013-01-24 20:46:05 UTC
Comment on attachment 8479 [details]
git-am fix for 3.6.x.

Fix only for 3.6.x, regression test in 4.0.x patch only.
Comment 6 David Disseldorp 2013-01-25 12:56:21 UTC
Comment on attachment 8478 [details]
git-am fix for master and 4.0.x

In master as 3d46a077dd0999cc0c6032379147811c8bb660fb and d79485a566e3c59ce53c3ee205aa6c78f149f5d8.
Comment 7 Jeremy Allison 2013-01-25 16:44:22 UTC
Re-assigning to Karolin for inclusion in 4.0.next and 3.6.next.
Jeremy.
Comment 8 Karolin Seeger 2013-01-28 10:17:42 UTC
Pushed to v3-6-test and autobuild-v4-0-test.
Comment 9 Karolin Seeger 2013-01-28 19:10:35 UTC
Pushed to v4-0-test.
Closing out bug report.

Thanks!