]> pere.pagekite.me Git - homepage.git/blobdiff - blog/data/2010-08-08-fs-sematics.txt
Lenke.
[homepage.git] / blog / data / 2010-08-08-fs-sematics.txt
index 0c1d4045f82b97d7b98d8112dee89f483537f5de..6b0ec56b468e7fe6f3c3453c4124a61d901bc83e 100644 (file)
@@ -3,12 +3,12 @@ Tags: english, nuug, debian edu
 Date: 2010-08-08 21:20
 
 <p>A few years ago, I was involved in a project planning to use
-Windows file servers as home directory servers for Skolelinux
-machines.  This was thought to be no problem, as the access would be
-through the SMB network file system protocol, and we knew other sites
-used SMB with unix and samba as the file server to mount home
-directories without any problems.  But, after months of struggling, we
-had to conclude that our goal was impossible.</p>
+Windows file servers as home directory servers for Debian
+Edu/Skolelinux machines.  This was thought to be no problem, as the
+access would be through the SMB network file system protocol, and we
+knew other sites used SMB with unix and samba as the file server to
+mount home directories without any problems.  But, after months of
+struggling, we had to conclude that our goal was impossible.</p>
 
 <p>The reason is simply that while SMB can be used for home
 directories when the file server is Samba running on Unix, this only
@@ -41,24 +41,24 @@ help you find your way out again.  This is the fs-test.c source:</p>
 
 #define _GNU_SOURCE /* for asprintf() */
 
-#include <errno.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <sys/file.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <unistd.h>
+#include &lt;errno.h>
+#include &lt;fcntl.h>
+#include &lt;stdio.h>
+#include &lt;string.h>
+#include &lt;stdlib.h>
+#include &lt;sys/file.h>
+#include &lt;sys/stat.h>
+#include &lt;sys/types.h>
+#include &lt;unistd.h>
 
 #ifdef TEST_SQLITE
 /*
  * Test sqlite open, as done by gcompris require the libsqlite3-dev
  * package and linking with -lsqlite3.  A more low level test is
  * below.
- * See also <URL: http://www.sqlite.org./faq.html#q5 >.
+ * See also &lt;URL: http://www.sqlite.org./faq.html#q5 >.
  */
-#include <sqlite3.h>
+#include &lt;sqlite3.h>
 #define CREATE_TABLE_USERS                                              \
   "CREATE TABLE users (user_id INT UNIQUE, login TEXT, lastname TEXT, firstname TEXT, birthdate TEXT, class_id INT ); "
 int test_sqlite_open(void) {
@@ -91,9 +91,9 @@ int test_sqlite_open(void) {
  * work with ext3, but not with cifs server on Windows 2003.  This is
  * done in the sqlite3 library.
  * See also
- * <URL:http://www.cygwin.com/ml/cygwin/2001-08/msg00854.html> and the
+ * &lt;URL:http://www.cygwin.com/ml/cygwin/2001-08/msg00854.html> and the
  * POSIX specification
- * <URL:http://www.opengroup.org/onlinepubs/009695399/functions/fcntl.html>.
+ * &lt;URL:http://www.opengroup.org/onlinepubs/009695399/functions/fcntl.html>.
  */
 int test_gcompris_locking(void) {
   struct flock fl;
@@ -155,7 +155,7 @@ int test_subdirectory_creation(void) {
   char *dirs[LEVELS];
   int level;
   printf("info: testing subdirectory creation\n");
-  for (level = 0; level < LEVELS; level++) {
+  for (level = 0; level &lt; LEVELS; level++) {
     char *newpath = NULL;
     if (-1 == mkdir(path, 0777)) {
       printf("  error: Unable to create directory '%s': %s\n",
@@ -221,3 +221,7 @@ 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>