]> arthur.barton.de Git - netatalk.git/commitdiff
add a volume option nostat, help with preexec and automount volume.
authordidg <didg>
Mon, 26 May 2003 17:02:47 +0000 (17:02 +0000)
committerdidg <didg>
Mon, 26 May 2003 17:02:47 +0000 (17:02 +0000)
config/AppleVolumes.default
etc/afpd/volume.c
etc/afpd/volume.h

index 6b1f9175bcd44d797fb98f439e974ed9376d8747..ef09058cfdc6f5fc12d4b4379b1b404ca656511b 100644 (file)
 # limitsize           -> limit disk size reporting to 2GB. this is
 #                        here for older macintoshes using newer
 #                        appleshare clients. yucko.
-#
-# codepage:filename   -> load filename from nls directory.
-# dbpath:path         -> store the database stuff in the following path.
-# password:password   -> set a volume password (8 characters max)
 # nofileid            -> don't advertise createfileid, resolveid, deleteid 
 #                        calls
 # root_preexec_close  -> a non-zero return code from root_preexec close the 
                          volume being mounted.
 # preexec_close       -> a non-zero return code from preexec close the 
                          volume being mounted.
+# nostat              -> don't stat volume path when enumerating volumes list
+#
+#
+# codepage:filename   -> load filename from nls directory.
+# dbpath:path         -> store the database stuff in the following path.
+# password:password   -> set a volume password (8 characters max)
 #
 # The "~" below indicates that Home directories are visible by default.
 # If you do not wish to have people accessing their Home directories,
index a3ab18fb7ca3b9d2d484f097d04f9fcd998f85f9..ec29e38f07a4355cc15b2848f9fab7f0c49932c6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: volume.c,v 1.51.2.3 2003-05-26 11:41:33 didg Exp $
+ * $Id: volume.c,v 1.51.2.4 2003-05-26 17:02:47 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -423,6 +423,8 @@ static void volset(struct vol_option *options, struct vol_option *save,
                 options[VOLOPT_FLAGS].i_value |= AFPVOL_NOFILEID;
             else if (strcasecmp(p, "utf8") == 0)
                 options[VOLOPT_FLAGS].i_value |= AFPVOL_UTF8;
+            else if (strcasecmp(p, "nostat") == 0)
+                options[VOLOPT_FLAGS].i_value |= AFPVOL_NOSTAT;
             else if (strcasecmp(p, "preexec_close") == 0)
                options[VOLOPT_PREEXEC].i_value = 1;
             else if (strcasecmp(p, "root_preexec_close") == 0)
@@ -1347,13 +1349,15 @@ int     ibuflen, *rbuflen;
 
     data = rbuf + 5;
     for ( vcnt = 0, volume = Volumes; volume; volume = volume->v_next ) {
-        if ( stat( volume->v_path, &st ) < 0 ) {
-            LOG(log_info, logtype_afpd, "afp_getsrvrparms: stat %s: %s",
-                volume->v_path, strerror(errno) );
-            continue;          /* can't access directory */
-        }
-        if (!S_ISDIR(st.st_mode)) {
-            continue;          /* not a dir */
+        if (!(volume->v_flags & AFPVOL_NOSTAT)) {
+            if ( stat( volume->v_path, &st ) < 0 ) {
+                LOG(log_info, logtype_afpd, "afp_getsrvrparms: stat %s: %s",
+                    volume->v_path, strerror(errno) );
+                continue;              /* can't access directory */
+            }
+            if (!S_ISDIR(st.st_mode)) {
+                continue;              /* not a dir */
+            }
         }
         if (volume->v_hide) {
             continue;          /* config file changed but the volume was mounted */
index f6a0a03480d255439996a09c4d9eff2f79d2d794..296c83ba91c4c0e991ec1b1217f85d15114834f3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: volume.h,v 1.19.2.2 2003-05-26 11:17:25 didg Exp $
+ * $Id: volume.h,v 1.19.2.3 2003-05-26 17:02:48 didg Exp $
  *
  * Copyright (c) 1990,1994 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -119,6 +119,7 @@ this is going away. */
 #define AFPVOL_DROPBOX   (1 << 14)  /* dropkludge dropbox support */
 #define AFPVOL_NOFILEID  (1 << 15)  /* don't advertise createid resolveid and deleteid calls */
 #define AFPVOL_UTF8      (1 << 16)  /* unix name are in UTF8 */
+#define AFPVOL_NOSTAT    (1 << 17)  /* unix name are in UTF8 */
 
 /* FPGetSrvrParms options */
 #define AFPSRVR_CONFIGINFO     (1 << 0)