Ticket #1106: sftp-no-trunc-files-opened-with-append.dpatch

File sftp-no-trunc-files-opened-with-append.dpatch, 3.9 KB (added by davidsarah, at 2010-07-12T03:17:09Z)

SFTP: refuse to truncate files opened with FXF_APPEND (see ticket:1037#comment:20).

Line 
1Mon Jul 12 03:58:56 GMT Daylight Time 2010  david-sarah@jacaranda.org
2  * SFTP: refuse to truncate files opened with FXF_APPEND.
3
4New patches:
5
6[SFTP: refuse to truncate files opened with FXF_APPEND.
7david-sarah@jacaranda.org**20100712025856
8 Ignore-this: 26a30806902d9c4909be4726b8bd07a7
9] hunk ./src/allmydata/frontends/sftpd.py 947
10             now = time()
11             self.metadata = update_metadata(self.metadata, _attrs_to_metadata(attrs), now)
12             if size is not None:
13-                # TODO: should we refuse to truncate a file opened with FXF_APPEND?
14-                # <http://allmydata.org/trac/tahoe-lafs/ticket/1037#comment:20>
15+                if self.flags & FXF_APPEND:
16+                    raise SFTPError(FX_PERMISSION_DENIED, "cannot truncate a file via a handle opened with FXF_APPEND")
17+
18                 self.consumer.set_current_size(size)
19             eventually_callback(d)(None)
20             return None
21
22Context:
23
24[upcase_since_on_welcome
25terrellrussell@gmail.com**20100708193903] 
26[server_version_on_welcome_page.dpatch.txt
27freestorm77@gmail.com**20100605191721
28 Ignore-this: b450c76dc875f5ac8cca229a666cbd0a
29 
30 
31 - The storage server version is 0 for all storage nodes in the Welcome Page
32 
33 
34] 
35[NEWS: add NEWS snippets about two recent patches
36zooko@zooko.com**20100708162058
37 Ignore-this: 6c9da6a0ad7351a960bdd60f81532899
38] 
39[directory_html_top_banner.dpatch
40freestorm77@gmail.com**20100622205301
41 Ignore-this: 1d770d975e0c414c996564774f049bca
42 
43 The div tag with the link "Return to Welcome page" on the directory.xhtml page is not correct
44 
45] 
46[tahoe_css_toolbar.dpatch
47freestorm77@gmail.com**20100622210046
48 Ignore-this: 5b3ebb2e0f52bbba718a932f80c246c0
49 
50 CSS modification to be correctly diplayed with Internet Explorer 8
51 
52 The links on the top of page directory.xhtml are not diplayed in the same line as display with Firefox.
53 
54] 
55[runnin_test_tahoe_css.dpatch
56freestorm77@gmail.com**20100622214714
57 Ignore-this: e0db73d68740aad09a7b9ae60a08c05c
58 
59 Runnin test for changes in tahoe.css file
60 
61] 
62[runnin_test_directory_xhtml.dpatch
63freestorm77@gmail.com**20100622201403
64 Ignore-this: f8962463fce50b9466405cb59fe11d43
65 
66 Runnin test for diretory.xhtml top banner
67 
68] 
69[stringutils.py: tolerate sys.stdout having no 'encoding' attribute.
70david-sarah@jacaranda.org**20100626040817
71 Ignore-this: f42cad81cef645ee38ac1df4660cc850
72] 
73[quickstart.html: python 2.5 -> 2.6 as recommended version
74david-sarah@jacaranda.org**20100705175858
75 Ignore-this: bc3a14645ea1d5435002966ae903199f
76] 
77[SFTP: don't call .stopProducing on the producer registered with OverwriteableFileConsumer (which breaks with warner's new downloader).
78david-sarah@jacaranda.org**20100628231926
79 Ignore-this: 131b7a5787bc85a9a356b5740d9d996f
80] 
81[docs/how_to_make_a_tahoe-lafs_release.txt: trivial correction, install.html should now be quickstart.html.
82david-sarah@jacaranda.org**20100625223929
83 Ignore-this: 99a5459cac51bd867cc11ad06927ff30
84] 
85[setup: in the Makefile, refuse to upload tarballs unless someone has passed the environment variable "BB_BRANCH" with value "trunk"
86zooko@zooko.com**20100619034928
87 Ignore-this: 276ddf9b6ad7ec79e27474862e0f7d6
88] 
89[trivial: tiny update to in-line comment
90zooko@zooko.com**20100614045715
91 Ignore-this: 10851b0ed2abfed542c97749e5d280bc
92 (I'm actually committing this patch as a test of the new eager-annotation-computation of trac-darcs.)
93] 
94[docs: about.html link to home page early on, and be decentralized storage instead of cloud storage this time around
95zooko@zooko.com**20100619065318
96 Ignore-this: dc6db03f696e5b6d2848699e754d8053
97] 
98[docs: update about.html, especially to have a non-broken link to quickstart.html, and also to comment out the broken links to "for Paranoids" and "for Corporates"
99zooko@zooko.com**20100619065124
100 Ignore-this: e292c7f51c337a84ebfeb366fbd24d6c
101] 
102[TAG allmydata-tahoe-1.7.0
103zooko@zooko.com**20100619052631
104 Ignore-this: d21e27afe6d85e2e3ba6a3292ba2be1
105] 
106Patch bundle hash:
107051762650cfbdc198039b36bb15b392ad057762f