+ <div class="entry">
+ <div class="title"><a href="http://people.skolelinux.org/pere/blog/Oppdatert_kart_over_overv__kningskamera_i_Norge.html">Oppdatert kart over overvåkningskamera i Norge</a></div>
+ <div class="date">2010-09-22 20:50</div>
+ <div class="body">
+<p>For ca. et og et halvt år siden
+<a href="http://people.skolelinux.org/pere/blog/Kart_over_overv__kningskamera_i_Norge.html">startet
+jeg på et kart over overvåkningskamera i Norge</a>, i regi av
+<a href="http://www.personvern.no/">personvernforeningen</a>. Det har
+blitt oppdatert regelmessing, og jeg oppdaterte det nettopp. Fra den
+spede start med 22 kamera registrert er det nå registrert 54 kamera.
+Det er bare en brøkdel av de kamera som finnes i Norge, men det går
+sakte men sikkert i riktig retning.</p>
+
+<p>Informasjonen registreres fortsatt direkte inn i
+<a href="http://www.openstreetmap.org/">OpenStreetmap</a>, og hentes
+automatisk over i
+<a href="http://people.skolelinux.no/pere/surveillance-norway/"spesialkartet</a>
+når jeg kjører et script for å filtrere ut overvåkningskamera fra
+OSM-dumpen for Norge.</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/personvern">personvern</a>.
+
+ </div>
+ </div>
+ <div class="padding"></div>
+
<div class="entry">
<div class="title"><a href="http://people.skolelinux.org/pere/blog/Anonym_ferdsel_er_en_menneskerett.html">Anonym ferdsel er en menneskerett</a></div>
<div class="date">2010-09-15 12:15</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>
-
<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>
<div id="sidebar">
<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 (5)</a></li>
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2010/09/">September (6)</a></li>
</ul></li>
<li><a href="http://people.skolelinux.org/pere/blog/tags/multimedia">multimedia (7)</a></li>
- <li><a href="http://people.skolelinux.org/pere/blog/tags/norsk">norsk (79)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/norsk">norsk (80)</a></li>
<li><a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug (104)</a></li>
<li><a href="http://people.skolelinux.org/pere/blog/tags/opphavsrett">opphavsrett (15)</a></li>
- <li><a href="http://people.skolelinux.org/pere/blog/tags/personvern">personvern (18)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/personvern">personvern (19)</a></li>
<li><a href="http://people.skolelinux.org/pere/blog/tags/reprap">reprap (10)</a></li>