]> pere.pagekite.me Git - homepage.git/blobdiff - blog/archive/2010/08/index.html
Generated.
[homepage.git] / blog / archive / 2010 / 08 / index.html
index eff6b0bb2b0736f900294f2b2df2410fcffc583f..c10108d3fc81dfbe6ce60000d72972e6a25c43d2 100644 (file)
@@ -375,6 +375,10 @@ not allowed to create files in its freshly created directory.</p>
 <p>Anyway, here is a nice tool for your tool box, might you never need
 it. :)</p>
 
+<p>Update 2010-08-27: Michael Gebetsroither report that he found the
+script so useful that he created a GIT repository and stored it in
+<a href="http://github.com/gebi/fs-test">http://github.com/gebi/fs-test</a>.</p>
+
  </div>
  <div class="tags">
  
@@ -581,7 +585,7 @@ firmwaren. :)</p>
 
 <ul>
 <li><a href="http://en.wikipedia.org/wiki/Spykee">Wikipedia-oppføring</a></li>
-<li><a href=http://www.spykeeworld.com/spykee/US/freeSoftware.html">Nedlasting av firmware-kilden</a></li>
+<li><a href="http://www.spykeeworld.com/spykee/US/freeSoftware.html">Nedlasting av firmware-kilden</a></li>
 <li><a href="http://wiki.nuug.no/grupper/robot">prosjektwiki hos NUUG</a></li>
 </ul>
 
@@ -710,6 +714,294 @@ elektronisk stemmegiving og unngå begrepet "evalg".</p>
  
 
  
+  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>.
+ </div>
+</div>
+ <div class="padding"></div>
+
+<div class="entry">
+ <div class="title">
+ <a href="http://people.skolelinux.org/pere/blog/Broken_umask_handling_with_sshfs.html">Broken umask handling with sshfs</a>
+ </div>
+ <div class="date">
+  2010-08-26 13:30
+ </div>
+
+ <div class="body">
+  
+<p>My file system sematics program
+<a href="http://people.skolelinux.org/pere/blog/Testing_if_a_file_system_can_be_used_for_home_directories___.html">presented
+a few days ago</a> is very useful to verify that a file system can
+work as a unix home directory,and today I had to extend it a bit.  I'm
+looking into alternatives for home directory access here at the
+University of Oslo, and one of the options is sshfs.  My friend
+Finn-Arne mentioned a while back that they had used sshfs with Debian
+Edu, but stopped because of problems.  I asked today what the problems
+where, and he mentioned that sshfs failed to handle umask properly.
+Trying to detect the problem I wrote this addition to my fs testing
+script:</p>
+
+<pre>
+mode_t touch_get_mode(const char *name, mode_t mode) {
+  mode_t retval = 0;
+  int fd = open(name, O_RDWR|O_CREAT|O_LARGEFILE, mode);
+  if (-1 != fd) {
+    unlink(name);
+    struct stat statbuf;
+    if (-1 != fstat(fd, &statbuf)) {
+      retval = statbuf.st_mode & 0x1ff;
+    }
+    close(fd);
+  }
+  return retval;
+}
+
+/* Try to detect problem discovered using sshfs */
+int test_umask(void) {
+  printf("info: testing umask effect on file creation\n");
+
+  mode_t orig_umask = umask(000);
+  mode_t newmode;
+  if (0666 != (newmode = touch_get_mode("foobar", 0666))) {
+    printf("  error: Wrong file mode %o when creating using mode 666 and umask 000\n",
+           newmode);
+  }
+  umask(007);
+  if (0660 != (newmode = touch_get_mode("foobar", 0666))) {
+    printf("  error: Wrong file mode %o when creating using mode 666 and umask 007\n",
+           newmode);
+  }
+
+  umask (orig_umask);
+  return 0;
+}
+
+int main(int argc, char **argv) {
+  [...]
+  test_umask();
+  return 0;
+}
+</pre>
+
+<p>Sure enough.  On NFS to a netapp, I get this result:</p>
+
+<pre>
+Testing POSIX/Unix sematics on file system
+info: testing symlink creation
+info: testing subdirectory creation
+info: testing fcntl locking
+  Read-locking 1 byte from 1073741824
+  Read-locking 510 byte from 1073741826
+  Unlocking 1 byte from 1073741824
+  Write-locking 1 byte from 1073741824
+  Write-locking 510 byte from 1073741826
+  Unlocking 2 byte from 1073741824
+info: testing umask effect on file creation
+</pre>
+
+<p>When mounting the same directory using sshfs, I get this
+result:</p>
+
+<pre>
+Testing POSIX/Unix sematics on file system
+info: testing symlink creation
+info: testing subdirectory creation
+info: testing fcntl locking
+  Read-locking 1 byte from 1073741824
+  Read-locking 510 byte from 1073741826
+  Unlocking 1 byte from 1073741824
+  Write-locking 1 byte from 1073741824
+  Write-locking 510 byte from 1073741826
+  Unlocking 2 byte from 1073741824
+info: testing umask effect on file creation
+  error: Wrong file mode 644 when creating using mode 666 and umask 000
+  error: Wrong file mode 640 when creating using mode 666 and umask 007
+</pre>
+
+<p>So, I can conclude that sshfs is better than smb to a Netapp or a
+Windows server, but not good enough to be used as a home
+directory.</p>
+
+<p>Update 2010-08-26: Reported the issue in
+<a href="http://bugs.debian.org/594498">BTS report #594498</a></p>
+
+<p>Update 2010-08-27: Michael Gebetsroither report that he found the
+script so useful that he created a GIT repository and stored it in
+<a href="http://github.com/gebi/fs-test">http://github.com/gebi/fs-test</a>.</p>
+
+ </div>
+ <div class="tags">
+
+  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>.
+ </div>
+</div>
+ <div class="padding"></div>
+
+<div class="entry">
+ <div class="title">
+ <a href="http://people.skolelinux.org/pere/blog/Skolelinux_i_Osloskolen.html">Skolelinux i Osloskolen</a>
+ </div>
+ <div class="date">
+  2010-08-26 22:25
+ </div>
+
+ <div class="body">
+  
+<p>Denne høsten skal endelig alle Osloskolene få mulighet til å bruke
+<a href="http://www.skolelinux.org/">Skolelinux</a>.  Ny IT-løsning
+har vært rullet ut i noen måneder nå, og så vidt jeg fikk vite før
+sommeren skulle alle skoler ha nytt opplegg på plass før oppstart nå i
+høst.  På alle skolene skal en kunne velge ved installasjon om en skal
+ha Windows eller Skolelinux på maskinene, og en kan i tillegg
+PXE-boote maskinene over nett som tynne klienter eller diskløse
+arbeidsstasjoner. Jeg er spent på hvor mange skoler som velger å ta i
+bruk Skolelinux, og gleder meg til å se hvordan dette utvikler seg.
+Løsningen leveres av
+<a href="http://www.logica.no/">Logica</a> med
+<a href="http://www.slxdrift.no/">Skolelinux Drift AS</a> som
+underleverandør, og jeg har vært involvert i utviklingen av løsningen
+via Skolelinux Drift AS siden prosjektet starter.  Jeg synes det er
+fantastisk at Skolelinux er kommet så langt siden vi startet i 2001 at
+alle elevene i Osloskolene nå skal få mulighet til å bruke
+løsningen.  Jeg håper de vil sette pris på alle de
+<a href="http://www.skolelinux.no/linux-signpost/">fantastiske
+brukerprogrammene</a> som er tilgjengelig i Skolelinux.</p>
+
+ </div>
+ <div class="tags">
+
+  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>.
+ </div>
+</div>
+ <div class="padding"></div>
+
+<div class="entry">
+ <div class="title">
+ <a href="http://people.skolelinux.org/pere/blog/Sikkerhetsteateret_p___flyplassene_fortsetter.html">Sikkerhetsteateret på flyplassene fortsetter</a>
+ </div>
+ <div class="date">
+  2010-08-28 10:40
+ </div>
+
+ <div class="body">
+  
+<p>Jeg skrev for et halvt år siden hvordan
+<a href="http://people.skolelinux.org/pere/blog/Sikkerhet__teater__og_hvordan_gj__re_verden_sikrere.html">samfunnet
+kaster bort ressurser på sikkerhetstiltak som ikke fungerer</a>.  Kom
+nettopp over en
+<a href="http://www.askthepilot.com/essays-and-stories/terrorism-tweezers-and-terminal-madness-an-essay-on-security/">historie
+fra en pilot fra USA</a> som kommenterer det samme.  Jeg mistenker det
+kun er uvitenhet og autoritetstro som gjør at så få protesterer.  Har
+veldig sans for piloten omtalt i <a
+href="http://www.aftenposten.no/nyheter/iriks/article2057501.ece">Aftenposten</a> 2007-10-23,
+og skulle ønske flere rettet oppmerksomhet mot problemet.  Det gir
+ikke meg trygghetsfølelse på flyplassene når jeg ser at
+flyplassadministrasjonen kaster bort folk, penger og tid på tull i
+stedet for ting som bidrar til reell økning av sikkerheten.  Det
+forteller meg jo at vurderingsevnen til de som burde bidra til økt
+sikkerhet er svært sviktende, noe som ikke taler godt for de andre
+tiltakene.</p>
+
+<p>Mon tro hva som skjer hvis det fantes en enkel brosjyre å skrive ut
+fra Internet som forklarte hva som er galt med sikkerhetsopplegget på
+flyplassene, og folk skrev ut og la en bunke på flyplassene når de
+passerte.  Kanskje det ville fått flere til å få øynene opp for
+problemet.</p>
+
+<p>Personlig synes jeg flyopplevelsen er blitt så avskyelig at jeg
+forsøker å klare meg med tog, bil og båt for å slippe ubehaget.  Det
+er dog noe vanskelig i det langstrakte Norge og for å kunne besøke de
+delene av verden jeg ønsker å nå.  Mistenker at flere har det slik, og
+at dette går ut over inntjeningen til flyselskapene.  Det er antagelig
+en god ting sett fra et miljøperspektiv, men det er en annen sak.</p>
+
+ </div>
+ <div class="tags">
+
+  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>.
+ </div>
+</div>
+ <div class="padding"></div>
+
+<div class="entry">
+ <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>
+ <div class="date">
+  2010-08-30 19:30
+ </div>
+
+ <div class="body">
+  
+<p>Just got an email from Tobias Gruetzmacher as a followup on my
+<a href="http://people.skolelinux.org/pere/blog/Broken_umask_handling_with_sshfs.html">previous
+post about sshfs</a>.  He reported another problem with sshfs.  It
+fail to handle hard links properly.  A simple way to spot this is to
+look at the . and .. entries in the directory tree.  These should have
+a link count >1, but on sshfs the count is 1.  I just tested to see
+what happen when trying to hardlink, and this fail as well:</p>
+
+<pre>
+% ln foo bar
+ln: creating hard link `bar' => `foo': Function not implemented
+%
+</pre>
+
+<p>I have not yet found time to implement a test for this in my file
+system test code, but believe having working hard links is useful to
+avoid surprised unix programs.  Not as useful as working file locking
+and symlinks, which are required to get a working desktop, but useful
+nevertheless. :)</p>
+
+<p>The latest version of the file system test code is available via
+git from
+<a href="http://github.com/gebi/fs-test">http://github.com/gebi/fs-test</a></p>
+
+ </div>
+ <div class="tags">
+
+  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>.
+ </div>
+</div>
+ <div class="padding"></div>
+
+<div class="entry">
+ <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>
+ <div class="date">
+  2010-08-31 21:00
+ </div>
+
+ <div class="body">
+  
+<p>Ble tipset i dag om at et forslag om å stoppe forsøkene med
+elektronisk stemmegiving utenfor valglokaler er
+<a href="http://www.stortinget.no/no/Saker-og-publikasjoner/Saker/Sak/?p=46616">til
+behandling</a> i Stortinget.
+<a href="http://www.stortinget.no/Global/pdf/Representantforslag/2009-2010/dok8-200910-128.pdf">Forslaget</a>
+er fremmet av Erna Solberg, Michael Tetzschner og Trond Helleland.</p>
+
+<p>Håper det får flertall.</p>
+
+ </div>
+ <div class="tags">
+
   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>.
  
  </div>
@@ -725,6 +1017,13 @@ elektronisk stemmegiving og unngå begrepet "evalg".</p>
 <h2>Archive</h2>
 <ul>
 
+<li>2011
+<ul>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2011/01/">January (3)</a></li>
+
+</ul></li>
+
 <li>2010
 <ul>
 
@@ -742,7 +1041,15 @@ elektronisk stemmegiving og unngå begrepet "evalg".</p>
 
 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/07/">July (12)</a></li>
 
-<li><a href="http://people.skolelinux.org/pere/blog/archive/2010/08/">August (8)</a></li>
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2010/08/">August (13)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2010/09/">September (7)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2010/10/">October (9)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2010/11/">November (13)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2010/12/">December (12)</a></li>
 
 </ul></li>
 
@@ -791,61 +1098,65 @@ elektronisk stemmegiving og unngå begrepet "evalg".</p>
 <h2>Tags</h2>
 <ul>
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/3d-printer">3d-printer (11)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/3d-printer">3d-printer (13)</a></li>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/amiga">amiga (1)</a></li>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/aros">aros (1)</a></li>
 
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/bitcoin">bitcoin (2)</a></li>
+
  <li><a href="http://people.skolelinux.org/pere/blog/tags/bootsystem">bootsystem (10)</a></li>
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/debian">debian (35)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/debian">debian (46)</a></li>
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu (40)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu (54)</a></li>
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/english">english (56)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/english">english (82)</a></li>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/fiksgatami">fiksgatami (1)</a></li>
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/fildeling">fildeling (8)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/fildeling">fildeling (11)</a></li>
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/kart">kart (3)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/kart">kart (5)</a></li>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/ldap">ldap (8)</a></li>
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/lenker">lenker (2)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/lenker">lenker (4)</a></li>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/ltsp">ltsp (1)</a></li>
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/multimedia">multimedia (5)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/multimedia">multimedia (11)</a></li>
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/norsk">norsk (74)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/norsk">norsk (97)</a></li>
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug (96)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug (114)</a></li>
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/opphavsrett">opphavsrett (14)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/opphavsrett">opphavsrett (18)</a></li>
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/personvern">personvern (15)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/personvern">personvern (32)</a></li>
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/reprap">reprap (10)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/reprap">reprap (11)</a></li>
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/robot">robot (2)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/robot">robot (4)</a></li>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/rss">rss (1)</a></li>
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/sikkerhet">sikkerhet (12)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/sikkerhet">sikkerhet (22)</a></li>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/sitesummary">sitesummary (3)</a></li>
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/standard">standard (13)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/standard">standard (21)</a></li>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/stavekontroll">stavekontroll (1)</a></li>
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/video">video (10)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/surveillance">surveillance (5)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/video">video (17)</a></li>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/vitenskap">vitenskap (1)</a></li>
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/web">web (7)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/web">web (14)</a></li>
 
 </ul>