]> pere.pagekite.me Git - homepage.git/blob - blog/index.html
Inn med lenker.
[homepage.git] / blog / index.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html>
4 <head>
5 <title>Petter Reinholdtsen</title>
6 <link rel="stylesheet" type="text/css" media="screen" href="http://people.skolelinux.org/pere/blog/style.css">
7 <link rel="alternate" title="RSS Feed" href="http://people.skolelinux.org/pere/blog/index.rss" type="application/rss+xml">
8
9 </head>
10 <body>
11
12 <div class="title">
13 <h1>
14 <a href="http://people.skolelinux.org/pere/blog/">Petter Reinholdtsen</a>
15
16 </h1>
17
18 </div>
19
20
21
22 <div class="entry">
23 <div class="title"><a href="http://people.skolelinux.org/pere/blog/Anonym_ferdsel_er_en_menneskerett.html">Anonym ferdsel er en menneskerett</a></div>
24 <div class="date">2010-09-15 12:15</div>
25 <div class="body">
26 <p>Debatten rundt sporveiselskapet i Oslos (Ruter AS) ønske om
27 <a href="http://www.aftenposten.no/nyheter/iriks/article3808135.ece">å
28 radiomerke med RFID</a> alle sine kunder og
29 <a href="http://www.aftenposten.no/nyheter/article3809746.ece">registerere
30 hvor hver og en av oss beveger oss</a> pågår, og en ting som har
31 kommet lite frem i debatten er at det faktisk er en menneskerett å
32 kunne ferdes anonymt internt i ens eget land.</p>
33
34 <p>Fant en grei kilde for dette i et
35 <a href="http://www.datatilsynet.no/upload/Microsoft%20Word%20-%2009-01399-2%20H+%C2%A9ringsnotat%20-%20Samferdselsdepartementet%20-%20Utkas%C3%94%C3%87%C2%AA.pdf">skriv
36 fra Datatilsynet</a> til Samferdselsdepartementet om tema:</p>
37
38 <blockquote><p>Retten til å ferdes anonymt kan utledes av
39 menneskerettskonvensjonen artikkel 8 og av EUs personverndirektiv.
40 Her heter det at enkeltpersoners grunnleggende rettigheter og frihet
41 må respekteres, særlig retten til privatlivets fred. I både
42 personverndirektivet og i den norske personopplysningsloven er
43 selvråderetten til hver enkelt et av grunnprinsippene, hovedsaklig
44 uttrykt ved at en må gi et frivillig, informert og uttrykkelig
45 samtykke til behandling av personopplysninger.</p></blockquote>
46
47 <p>For meg er det viktig at jeg kan ferdes anonymt, og det er litt av
48 bakgrunnen til at jeg handler med kontanter, ikke har mobiltelefon og
49 forventer å kunne reise med bil og kollektivtrafikk uten at det blir
50 registrert hvor jeg har vært. Ruter angriper min rett til å ferdes
51 uten radiopeiler med sin innføring av RFID-kort, og dokumenterer sitt
52 ønske om å registrere hvor kundene befant seg ved å ønske å gebyrlegge
53 oss som ikke registrerer oss hver gang vi beveger oss med
54 kollektivtrafikken i Oslo. Jeg synes det er hårreisende.</p>
55 </div>
56 <div class="tags">
57
58
59
60 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/norsk">norsk</a>, <a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug</a>, <a href="http://people.skolelinux.org/pere/blog/tags/personvern">personvern</a>, <a href="http://people.skolelinux.org/pere/blog/tags/sikkerhet">sikkerhet</a>.
61
62 </div>
63 </div>
64 <div class="padding"></div>
65
66 <div class="entry">
67 <div class="title"><a href="http://people.skolelinux.org/pere/blog/Terms_of_use_for_video_produced_by_a_Canon_IXUS_130_digital_camera.html">Terms of use for video produced by a Canon IXUS 130 digital camera</a></div>
68 <div class="date">2010-09-09 23:55</div>
69 <div class="body">
70 <p>A few days ago I had the mixed pleasure of bying a new digital
71 camera, a Canon IXUS 130. It was instructive and very disturbing to
72 be able to verify that also this camera producer have the nerve to
73 specify how I can or can not use the videos produced with the camera.
74 Even thought I was aware of the issue, the options with new cameras
75 are limited and I ended up bying the camera anyway. What is the
76 problem, you might ask? It is software patents, MPEG-4, H.264 and the
77 MPEG-LA that is the problem, and our right to record our experiences
78 without asking for permissions that is at risk.
79
80 <p>On page 27 of the Danish instruction manual, this section is
81 written:</p>
82
83 <blockquote>
84 <p>This product is licensed under AT&T patents for the MPEG-4 standard
85 and may be used for encoding MPEG-4 compliant video and/or decoding
86 MPEG-4 compliant video that was encoded only (1) for a personal and
87 non-commercial purpose or (2) by a video provider licensed under the
88 AT&T patents to provide MPEG-4 compliant video.</p>
89
90 <p>No license is granted or implied for any other use for MPEG-4
91 standard.</p>
92 </blockquote>
93
94 <p>In short, the camera producer have chosen to use technology
95 (MPEG-4/H.264) that is only provided if I used it for personal and
96 non-commercial purposes, or ask for permission from the organisations
97 holding the knowledge monopoly (patent) for technology used.</p>
98
99 <p>This issue has been brewing for a while, and I recommend you to
100 read
101 "<a href="http://www.osnews.com/story/23236/Why_Our_Civilization_s_Video_Art_and_Culture_is_Threatened_by_the_MPEG-LA">Why
102 Our Civilization's Video Art and Culture is Threatened by the
103 MPEG-LA</a>" by Eugenia Loli-Queru and
104 "<a href="http://webmink.com/2010/09/03/h-264-and-foss/">H.264 Is Not
105 The Sort Of Free That Matters</a>" by Simon Phipps to learn more about
106 the issue. The solution is to support the
107 <a href="http://www.digistan.org/open-standard:definition">free and
108 open standards</a> for video, like <a href="http://www.theora.org/">Ogg
109 Theora</a>, and avoid MPEG-4 and H.264 if you can.</p>
110 </div>
111 <div class="tags">
112
113
114
115 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/fildeling">fildeling</a>, <a href="http://people.skolelinux.org/pere/blog/tags/multimedia">multimedia</a>, <a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug</a>, <a href="http://people.skolelinux.org/pere/blog/tags/opphavsrett">opphavsrett</a>, <a href="http://people.skolelinux.org/pere/blog/tags/personvern">personvern</a>, <a href="http://people.skolelinux.org/pere/blog/tags/standard">standard</a>, <a href="http://people.skolelinux.org/pere/blog/tags/video">video</a>, <a href="http://people.skolelinux.org/pere/blog/tags/web">web</a>.
116
117 </div>
118 </div>
119 <div class="padding"></div>
120
121 <div class="entry">
122 <div class="title"><a href="http://people.skolelinux.org/pere/blog/Navteq_bruker_3_12_m__neder__OpenStreetmap_org_trenger_noen_dager.html">Navteq bruker 3-12 måneder, OpenStreetmap.org trenger noen dager</a></div>
123 <div class="date">2010-09-07 21:40</div>
124 <div class="body">
125 <p>Jeg ble riktig fascinert av
126 <a href="http://www.aftenposten.no/nyheter/iriks/article3800967.ece">en
127 artikkel i Aftenposten</a> om hvor hardt Navteq jobber for å oppdatere
128 kartene som brukes i navigasjons-GPSer, der det blant annet heter at
129 "på grunn av teknikken tar det alt fra tre til tolv måneder før
130 kartene er oppdatert". Når en kjenner hva slags oppdateringshastighet
131 som er tilgjengelig på
132 <a href="http://www.openstreetmap.org/">OpenStreetmap</a> som
133 oppdateres på dugnad, blir det litt trist å se hva noe av det beste en
134 kan kjøpe for penger får til.</p>
135
136 <p>Fra en endrer kartdataene i databasen til OpenStreetmap tar det
137 ca. 15 minutter før endringen er synlig på kartet som alle kan se på
138 web. Dernest overføres det daglig til en kartdump som lastes ned av
139 personen som lager Garmin-kart for Norge ca. en gang i uken. Med
140 OpenStreetmap.org og <a href="http://www.frikart.no/">Frikart.no</a>
141 kan en altså ha korreksjonene på plass i sin Garmin-GPS i løpet av en
142 uke. Det er også av tekniske årsaker at det tar så langt tid.
143 Jobbene som tegner kartene, henter ut kartdumpene og konverterer til
144 Garmin-format tar minutter og timer å gjennomføre, slik at de ikke
145 gjøres kontinuerlig men kun regelmessing.</p>
146 </div>
147 <div class="tags">
148
149
150
151 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/kart">kart</a>, <a href="http://people.skolelinux.org/pere/blog/tags/norsk">norsk</a>, <a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug</a>.
152
153 </div>
154 </div>
155 <div class="padding"></div>
156
157 <div class="entry">
158 <div class="title"><a href="http://people.skolelinux.org/pere/blog/Some_notes_on_Flash_in_Debian_and_Debian_Edu.html">Some notes on Flash in Debian and Debian Edu</a></div>
159 <div class="date">2010-09-04 10:10</div>
160 <div class="body">
161 <p>In the <a href="http://popcon.debian.org/unknown/by_vote">Debian
162 popularity-contest numbers</a>, the adobe-flashplugin package the
163 second most popular used package that is missing in Debian. The sixth
164 most popular is flashplayer-mozilla. This is a clear indication that
165 working flash is important for Debian users. Around 10 percent of the
166 users submitting data to popcon.debian.org have this package
167 installed.</p>
168
169 <p>In the report written by Lars Risan in August 2008
170<a href="http://wiki.skolelinux.no/Dokumentasjon/Rapporter?action=AttachFile&do=view&target=Skolelinux_i_bruk_rapport_1.0.pdf">Skolelinux
171 i bruk – Rapport for Hurum kommune, Universitetet i Agder og
172 stiftelsen SLX Debian Labs</a>»), one of the most important problems
173 schools experienced with <a href="http://www.skolelinux.org/">Debian
174 Edu/Skolelinux</a> was the lack of working Flash. A lot of educational
175 web sites require Flash to work, and lacking working Flash support in
176 the web browser and the problems with installing it was perceived as a
177 good reason to stay with Windows.</p>
178
179 <p>I once saw a funny and sad comment in a web forum, where Linux was
180 said to be the retarded cousin that did not really understand
181 everything you told him but could work fairly well. This was a
182 comment regarding the problems Linux have with proprietary formats and
183 non-standard web pages, and is sad because it exposes a fairly common
184 understanding of whose fault it is if web pages that only work in for
185 example Internet Explorer 6 fail to work on Firefox, and funny because
186 it explain very well how annoying it is for users when Linux
187 distributions do not work with the documents they receive or the web
188 pages they want to visit.</p>
189
190 <p>This is part of the reason why I believe it is important for Debian
191 and Debian Edu to have a well working Flash implementation in the
192 distribution, to get at least popular sites as Youtube and Google
193 Video to working out of the box. For Squeeze, Debian have the chance
194 to include the latest version of Gnash that will make this happen, as
195 the new release 0.8.8 was published a few weeks ago and is resting in
196 unstable. The new version work with more sites that version 0.8.7.
197 The Gnash maintainers have asked for a freeze exception, but the
198 release team have not had time to reply to it yet. I hope they agree
199 with me that Flash is important for the Debian desktop users, and thus
200 accept the new package into Squeeze.</p>
201 </div>
202 <div class="tags">
203
204
205
206 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/multimedia">multimedia</a>, <a href="http://people.skolelinux.org/pere/blog/tags/video">video</a>, <a href="http://people.skolelinux.org/pere/blog/tags/web">web</a>.
207
208 </div>
209 </div>
210 <div class="padding"></div>
211
212 <div class="entry">
213 <div class="title"><a href="http://people.skolelinux.org/pere/blog/My_first_perl_GUI_application___controlling_a_Spykee_robot.html">My first perl GUI application - controlling a Spykee robot</a></div>
214 <div class="date">2010-09-01 21:00</div>
215 <div class="body">
216 <p>This evening I made my first Perl GUI application. The last few
217 days I have worked on a Perl module for controlling my recently
218 aquired Spykee robots, and the module is now getting complete enought
219 that it is possible to use it to control the robot driving at least.
220 It was now time to figure out how to use it to create some GUI to
221 allow me to drive the robot around. I picked PerlQt as I have had
222 positive experiences with the Qt API before, and spent a few minutes
223 browsing the web for examples. Using Qt Designer seemed like a short
224 cut, so I ended up writing the perl GUI using Qt Designer and
225 compiling it into a perl program using the puic program from
226 libqt-perl. Nothing fancy yet, but it got buttons to connect and
227 drive around.</p>
228
229 <p>The perl module I have written provide a object oriented API for
230 controlling the robot. Here is an small example on how to use it:</p>
231
232 <p><pre>
233 use Spykee;
234 Spykee::discover(sub {$robot{$_[0]} = $_[1]});
235 my $host = (keys %robot)[0];
236 my $spykee = Spykee->new();
237 $spykee->contact($host, "admin", "admin");
238 $spykee->left();
239 sleep 2;
240 $spykee->right();
241 sleep 2;
242 $spykee->forward();
243 sleep 2;
244 $spykee->back();
245 sleep 2;
246 $spykee->stop();
247 </pre></p>
248
249 <p>Thanks to the release of the source of the robot firmware, I could
250 peek into the implementation at the other end to figure out how to
251 implement the protocol used by the robot. I've implemented several of
252 the commands the robot understand, but is still missing the camera
253 support to make it possible to control the robot from remote. First I
254 want to implement support for uploading new firmware and configuring
255 the wireless network, to make it possible to bootstrap a Spykee robot
256 without the producers Windows and MacOSX software (I only have Linux,
257 so I had to ask a friend to come over to get the robot testing
258 going. :).</p>
259
260 <p>Will release the source to the public soon, but need to figure out
261 where to make it available first. I will add a link to
262 <a href="http://wiki.nuug.no/grupper/robot/">the NUUG wiki</a> for
263 those that want to check back later to find it.</p>
264 </div>
265 <div class="tags">
266
267
268
269 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug</a>, <a href="http://people.skolelinux.org/pere/blog/tags/robot">robot</a>.
270
271 </div>
272 </div>
273 <div class="padding"></div>
274
275 <div class="entry">
276 <div class="title"><a href="http://people.skolelinux.org/pere/blog/Forslag_i_stortinget_om____stoppe_elektronisk_stemmegiving_i_Norge.html">Forslag i stortinget om å stoppe elektronisk stemmegiving i Norge</a></div>
277 <div class="date">2010-08-31 21:00</div>
278 <div class="body">
279 <p>Ble tipset i dag om at et forslag om å stoppe forsøkene med
280 elektronisk stemmegiving utenfor valglokaler er
281 <a href="http://www.stortinget.no/no/Saker-og-publikasjoner/Saker/Sak/?p=46616">til
282 behandling</a> i Stortinget.
283 <a href="http://www.stortinget.no/Global/pdf/Representantforslag/2009-2010/dok8-200910-128.pdf">Forslaget</a>
284 er fremmet av Erna Solberg, Michael Tetzschner og Trond Helleland.</p>
285
286 <p>Håper det får flertall.</p>
287 </div>
288 <div class="tags">
289
290
291
292 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/norsk">norsk</a>, <a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug</a>, <a href="http://people.skolelinux.org/pere/blog/tags/sikkerhet">sikkerhet</a>.
293
294 </div>
295 </div>
296 <div class="padding"></div>
297
298 <div class="entry">
299 <div class="title"><a href="http://people.skolelinux.org/pere/blog/Broken_hard_link_handling_with_sshfs.html">Broken hard link handling with sshfs</a></div>
300 <div class="date">2010-08-30 19:30</div>
301 <div class="body">
302 <p>Just got an email from Tobias Gruetzmacher as a followup on my
303 <a href="http://people.skolelinux.org/pere/blog/Broken_umask_handling_with_sshfs.html">previous
304 post about sshfs</a>. He reported another problem with sshfs. It
305 fail to handle hard links properly. A simple way to spot this is to
306 look at the . and .. entries in the directory tree. These should have
307 a link count >1, but on sshfs the count is 1. I just tested to see
308 what happen when trying to hardlink, and this fail as well:</p>
309
310 <pre>
311 % ln foo bar
312 ln: creating hard link `bar' => `foo': Function not implemented
313 %
314 </pre>
315
316 <p>I have not yet found time to implement a test for this in my file
317 system test code, but believe having working hard links is useful to
318 avoid surprised unix programs. Not as useful as working file locking
319 and symlinks, which are required to get a working desktop, but useful
320 nevertheless. :)</p>
321
322 <p>The latest version of the file system test code is available via
323 git from
324 <a href="http://github.com/gebi/fs-test">http://github.com/gebi/fs-test</a></p>
325 </div>
326 <div class="tags">
327
328
329
330 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug</a>.
331
332 </div>
333 </div>
334 <div class="padding"></div>
335
336 <div class="entry">
337 <div class="title"><a href="http://people.skolelinux.org/pere/blog/Sikkerhetsteateret_p___flyplassene_fortsetter.html">Sikkerhetsteateret på flyplassene fortsetter</a></div>
338 <div class="date">2010-08-28 10:40</div>
339 <div class="body">
340 <p>Jeg skrev for et halvt år siden hvordan
341 <a href="http://people.skolelinux.org/pere/blog/Sikkerhet__teater__og_hvordan_gj__re_verden_sikrere.html">samfunnet
342 kaster bort ressurser på sikkerhetstiltak som ikke fungerer</a>. Kom
343 nettopp over en
344 <a href="http://www.askthepilot.com/essays-and-stories/terrorism-tweezers-and-terminal-madness-an-essay-on-security/">historie
345 fra en pilot fra USA</a> som kommenterer det samme. Jeg mistenker det
346 kun er uvitenhet og autoritetstro som gjør at så få protesterer. Har
347 veldig sans for piloten omtalt i <a
348 href="http://www.aftenposten.no/nyheter/iriks/article2057501.ece">Aftenposten</a> 2007-10-23,
349 og skulle ønske flere rettet oppmerksomhet mot problemet. Det gir
350 ikke meg trygghetsfølelse på flyplassene når jeg ser at
351 flyplassadministrasjonen kaster bort folk, penger og tid på tull i
352 stedet for ting som bidrar til reell økning av sikkerheten. Det
353 forteller meg jo at vurderingsevnen til de som burde bidra til økt
354 sikkerhet er svært sviktende, noe som ikke taler godt for de andre
355 tiltakene.</p>
356
357 <p>Mon tro hva som skjer hvis det fantes en enkel brosjyre å skrive ut
358 fra Internet som forklarte hva som er galt med sikkerhetsopplegget på
359 flyplassene, og folk skrev ut og la en bunke på flyplassene når de
360 passerte. Kanskje det ville fått flere til å få øynene opp for
361 problemet.</p>
362
363 <p>Personlig synes jeg flyopplevelsen er blitt så avskyelig at jeg
364 forsøker å klare meg med tog, bil og båt for å slippe ubehaget. Det
365 er dog noe vanskelig i det langstrakte Norge og for å kunne besøke de
366 delene av verden jeg ønsker å nå. Mistenker at flere har det slik, og
367 at dette går ut over inntjeningen til flyselskapene. Det er antagelig
368 en god ting sett fra et miljøperspektiv, men det er en annen sak.</p>
369 </div>
370 <div class="tags">
371
372
373
374 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/norsk">norsk</a>, <a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug</a>, <a href="http://people.skolelinux.org/pere/blog/tags/personvern">personvern</a>, <a href="http://people.skolelinux.org/pere/blog/tags/sikkerhet">sikkerhet</a>.
375
376 </div>
377 </div>
378 <div class="padding"></div>
379
380 <div class="entry">
381 <div class="title"><a href="http://people.skolelinux.org/pere/blog/Skolelinux_i_Osloskolen.html">Skolelinux i Osloskolen</a></div>
382 <div class="date">2010-08-26 22:25</div>
383 <div class="body">
384 <p>Denne høsten skal endelig alle Osloskolene få mulighet til å bruke
385 <a href="http://www.skolelinux.org/">Skolelinux</a>. Ny IT-løsning
386 har vært rullet ut i noen måneder nå, og så vidt jeg fikk vite før
387 sommeren skulle alle skoler ha nytt opplegg på plass før oppstart nå i
388 høst. På alle skolene skal en kunne velge ved installasjon om en skal
389 ha Windows eller Skolelinux på maskinene, og en kan i tillegg
390 PXE-boote maskinene over nett som tynne klienter eller diskløse
391 arbeidsstasjoner. Jeg er spent på hvor mange skoler som velger å ta i
392 bruk Skolelinux, og gleder meg til å se hvordan dette utvikler seg.
393 Løsningen leveres av
394 <a href="http://www.logica.no/">Logica</a> med
395 <a href="http://www.slxdrift.no/">Skolelinux Drift AS</a> som
396 underleverandør, og jeg har vært involvert i utviklingen av løsningen
397 via Skolelinux Drift AS siden prosjektet starter. Jeg synes det er
398 fantastisk at Skolelinux er kommet så langt siden vi startet i 2001 at
399 alle elevene i Osloskolene nå skal få mulighet til å bruke
400 løsningen. Jeg håper de vil sette pris på alle de
401 <a href="http://www.skolelinux.no/linux-signpost/">fantastiske
402 brukerprogrammene</a> som er tilgjengelig i Skolelinux.</p>
403 </div>
404 <div class="tags">
405
406
407
408 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/norsk">norsk</a>.
409
410 </div>
411 </div>
412 <div class="padding"></div>
413
414 <div class="entry">
415 <div class="title"><a href="http://people.skolelinux.org/pere/blog/Broken_umask_handling_with_sshfs.html">Broken umask handling with sshfs</a></div>
416 <div class="date">2010-08-26 13:30</div>
417 <div class="body">
418 <p>My file system sematics program
419 <a href="http://people.skolelinux.org/pere/blog/Testing_if_a_file_system_can_be_used_for_home_directories___.html">presented
420 a few days ago</a> is very useful to verify that a file system can
421 work as a unix home directory,and today I had to extend it a bit. I'm
422 looking into alternatives for home directory access here at the
423 University of Oslo, and one of the options is sshfs. My friend
424 Finn-Arne mentioned a while back that they had used sshfs with Debian
425 Edu, but stopped because of problems. I asked today what the problems
426 where, and he mentioned that sshfs failed to handle umask properly.
427 Trying to detect the problem I wrote this addition to my fs testing
428 script:</p>
429
430 <pre>
431 mode_t touch_get_mode(const char *name, mode_t mode) {
432 mode_t retval = 0;
433 int fd = open(name, O_RDWR|O_CREAT|O_LARGEFILE, mode);
434 if (-1 != fd) {
435 unlink(name);
436 struct stat statbuf;
437 if (-1 != fstat(fd, &statbuf)) {
438 retval = statbuf.st_mode & 0x1ff;
439 }
440 close(fd);
441 }
442 return retval;
443 }
444
445 /* Try to detect problem discovered using sshfs */
446 int test_umask(void) {
447 printf("info: testing umask effect on file creation\n");
448
449 mode_t orig_umask = umask(000);
450 mode_t newmode;
451 if (0666 != (newmode = touch_get_mode("foobar", 0666))) {
452 printf(" error: Wrong file mode %o when creating using mode 666 and umask 000\n",
453 newmode);
454 }
455 umask(007);
456 if (0660 != (newmode = touch_get_mode("foobar", 0666))) {
457 printf(" error: Wrong file mode %o when creating using mode 666 and umask 007\n",
458 newmode);
459 }
460
461 umask (orig_umask);
462 return 0;
463 }
464
465 int main(int argc, char **argv) {
466 [...]
467 test_umask();
468 return 0;
469 }
470 </pre>
471
472 <p>Sure enough. On NFS to a netapp, I get this result:</p>
473
474 <pre>
475 Testing POSIX/Unix sematics on file system
476 info: testing symlink creation
477 info: testing subdirectory creation
478 info: testing fcntl locking
479 Read-locking 1 byte from 1073741824
480 Read-locking 510 byte from 1073741826
481 Unlocking 1 byte from 1073741824
482 Write-locking 1 byte from 1073741824
483 Write-locking 510 byte from 1073741826
484 Unlocking 2 byte from 1073741824
485 info: testing umask effect on file creation
486 </pre>
487
488 <p>When mounting the same directory using sshfs, I get this
489 result:</p>
490
491 <pre>
492 Testing POSIX/Unix sematics on file system
493 info: testing symlink creation
494 info: testing subdirectory creation
495 info: testing fcntl locking
496 Read-locking 1 byte from 1073741824
497 Read-locking 510 byte from 1073741826
498 Unlocking 1 byte from 1073741824
499 Write-locking 1 byte from 1073741824
500 Write-locking 510 byte from 1073741826
501 Unlocking 2 byte from 1073741824
502 info: testing umask effect on file creation
503 error: Wrong file mode 644 when creating using mode 666 and umask 000
504 error: Wrong file mode 640 when creating using mode 666 and umask 007
505 </pre>
506
507 <p>So, I can conclude that sshfs is better than smb to a Netapp or a
508 Windows server, but not good enough to be used as a home
509 directory.</p>
510
511 <p>Update 2010-08-26: Reported the issue in
512 <a href="http://bugs.debian.org/594498">BTS report #594498</a></p>
513
514 <p>Update 2010-08-27: Michael Gebetsroither report that he found the
515 script so useful that he created a GIT repository and stored it in
516 <a href="http://github.com/gebi/fs-test">http://github.com/gebi/fs-test</a>.</p>
517 </div>
518 <div class="tags">
519
520
521
522 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug</a>.
523
524 </div>
525 </div>
526 <div class="padding"></div>
527
528 <p style="text-align: right;"><a href="index.rss"><img src="http://people.skolelinux.org/pere/blog/xml.gif" alt="RSS feed" width="36" height="14"></a></p>
529
530 <div id="sidebar">
531
532
533
534
535
536 <h2>Archive</h2>
537 <ul>
538
539 <li>2010
540 <ul>
541
542 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/01/">January (2)</a></li>
543
544 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/02/">February (1)</a></li>
545
546 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/03/">March (3)</a></li>
547
548 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/04/">April (3)</a></li>
549
550 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/05/">May (9)</a></li>
551
552 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/06/">June (14)</a></li>
553
554 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/07/">July (12)</a></li>
555
556 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/08/">August (13)</a></li>
557
558 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/09/">September (5)</a></li>
559
560 </ul></li>
561
562 <li>2009
563 <ul>
564
565 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/01/">January (8)</a></li>
566
567 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/02/">February (8)</a></li>
568
569 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/03/">March (12)</a></li>
570
571 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/04/">April (10)</a></li>
572
573 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/05/">May (9)</a></li>
574
575 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/06/">June (3)</a></li>
576
577 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/07/">July (4)</a></li>
578
579 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/08/">August (3)</a></li>
580
581 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/09/">September (1)</a></li>
582
583 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/10/">October (2)</a></li>
584
585 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/11/">November (3)</a></li>
586
587 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/12/">December (3)</a></li>
588
589 </ul></li>
590
591 <li>2008
592 <ul>
593
594 <li><a href="http://people.skolelinux.org/pere/blog/archive/2008/11/">November (5)</a></li>
595
596 <li><a href="http://people.skolelinux.org/pere/blog/archive/2008/12/">December (7)</a></li>
597
598 </ul></li>
599
600 </ul>
601
602
603
604 <h2>Tags</h2>
605 <ul>
606
607 <li><a href="http://people.skolelinux.org/pere/blog/tags/3d-printer">3d-printer (11)</a></li>
608
609 <li><a href="http://people.skolelinux.org/pere/blog/tags/amiga">amiga (1)</a></li>
610
611 <li><a href="http://people.skolelinux.org/pere/blog/tags/aros">aros (1)</a></li>
612
613 <li><a href="http://people.skolelinux.org/pere/blog/tags/bootsystem">bootsystem (10)</a></li>
614
615 <li><a href="http://people.skolelinux.org/pere/blog/tags/debian">debian (36)</a></li>
616
617 <li><a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu (44)</a></li>
618
619 <li><a href="http://people.skolelinux.org/pere/blog/tags/english">english (61)</a></li>
620
621 <li><a href="http://people.skolelinux.org/pere/blog/tags/fiksgatami">fiksgatami (1)</a></li>
622
623 <li><a href="http://people.skolelinux.org/pere/blog/tags/fildeling">fildeling (9)</a></li>
624
625 <li><a href="http://people.skolelinux.org/pere/blog/tags/kart">kart (4)</a></li>
626
627 <li><a href="http://people.skolelinux.org/pere/blog/tags/ldap">ldap (8)</a></li>
628
629 <li><a href="http://people.skolelinux.org/pere/blog/tags/lenker">lenker (2)</a></li>
630
631 <li><a href="http://people.skolelinux.org/pere/blog/tags/ltsp">ltsp (1)</a></li>
632
633 <li><a href="http://people.skolelinux.org/pere/blog/tags/multimedia">multimedia (7)</a></li>
634
635 <li><a href="http://people.skolelinux.org/pere/blog/tags/norsk">norsk (79)</a></li>
636
637 <li><a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug (104)</a></li>
638
639 <li><a href="http://people.skolelinux.org/pere/blog/tags/opphavsrett">opphavsrett (15)</a></li>
640
641 <li><a href="http://people.skolelinux.org/pere/blog/tags/personvern">personvern (18)</a></li>
642
643 <li><a href="http://people.skolelinux.org/pere/blog/tags/reprap">reprap (10)</a></li>
644
645 <li><a href="http://people.skolelinux.org/pere/blog/tags/robot">robot (3)</a></li>
646
647 <li><a href="http://people.skolelinux.org/pere/blog/tags/rss">rss (1)</a></li>
648
649 <li><a href="http://people.skolelinux.org/pere/blog/tags/sikkerhet">sikkerhet (15)</a></li>
650
651 <li><a href="http://people.skolelinux.org/pere/blog/tags/sitesummary">sitesummary (3)</a></li>
652
653 <li><a href="http://people.skolelinux.org/pere/blog/tags/standard">standard (14)</a></li>
654
655 <li><a href="http://people.skolelinux.org/pere/blog/tags/stavekontroll">stavekontroll (1)</a></li>
656
657 <li><a href="http://people.skolelinux.org/pere/blog/tags/video">video (12)</a></li>
658
659 <li><a href="http://people.skolelinux.org/pere/blog/tags/vitenskap">vitenskap (1)</a></li>
660
661 <li><a href="http://people.skolelinux.org/pere/blog/tags/web">web (9)</a></li>
662
663 </ul>
664
665 </div>
666
667 <p style="text-align: right">
668 Created by <a href="http://steve.org.uk/Software/chronicle">Chronicle v3.7</a>
669 </p>
670 </body>
671 </html>