]> arthur.barton.de Git - netatalk.git/commitdiff
Allow users to turn off [resolve|create|delete]id advertisements.
authorjmarcus <jmarcus>
Sun, 24 Mar 2002 17:45:28 +0000 (17:45 +0000)
committerjmarcus <jmarcus>
Sun, 24 Mar 2002 17:45:28 +0000 (17:45 +0000)
Submitted by: didier <dgautheron@magic.fr>
MFH after: 1.5.3 is released

config/AppleVolumes.default
etc/afpd/volume.c
etc/afpd/volume.h

index 7274d0b0396806f10dc1024c3d1b1024f2ad8e5d..9c0a5c520797b566fbf731e2f39550ba5e4ab2d2 100644 (file)
@@ -68,6 +68,8 @@
 # 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
 #
 # The "~" below indicates that Home directories are visible by default.
 # If you do not wish to have people accessing their Home directories,
index 9ad0e065ede6d9e2333db642b85b64133dcac250..86bf286aeb089e599d8b3df79e7f9bed72eb13db 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: volume.c,v 1.25 2002-03-24 01:23:41 sibaz Exp $
+ * $Id: volume.c,v 1.26 2002-03-24 17:45:29 jmarcus Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -364,6 +364,8 @@ static void volset(struct vol_option *options, char *volname, int vlen,
                 options[VOLOPT_FLAGS].i_value |= AFPVOL_DROPBOX;
             else if (strcasecmp(p, "dropkludge") == 0)
                 options[VOLOPT_FLAGS].i_value |= AFPVOL_DROPBOX;
+            else if (strcasecmp(p, "nofileid") == 0)
+                options[VOLOPT_FLAGS].i_value |= AFPVOL_NOFILEID;
 
             p = strtok(NULL, ",");
         }
@@ -917,7 +919,9 @@ int         *buflen;
         switch ( bit ) {
         case VOLPBIT_ATTR :
 #ifdef CNID_DB
-            ashort = VOLPBIT_ATTR_FILEID;
+            if (0 == (vol->v_flags & AFPVOL_NOFILEID)) {
+                ashort = VOLPBIT_ATTR_FILEID;
+            }
 #else /* CNID_DB */
             ashort = 0;
 #endif /* CNID_DB */
index fac777c24d18463a00c81a434be9efca56cef37c..f63aa42d31bf954f36031824578ff69fc93e593f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: volume.h,v 1.10 2002-03-13 19:29:17 srittau Exp $
+ * $Id: volume.h,v 1.11 2002-03-24 17:45:29 jmarcus Exp $
  *
  * Copyright (c) 1990,1994 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -87,6 +87,7 @@ this is going away. */
 #define AFPVOL_LIMITSIZE (1 << 12)  /* limit size for older macs */
 #define AFPVOL_MAPASCII  (1 << 13)  /* map the ascii range as well */
 #define AFPVOL_DROPBOX   (1 << 14)  /* dropkludge dropbox support */
+#define AFPVOL_NOFILEID  (1 << 15)  /* don't advertise createid resolveid and deleteid calls */
 
 /* FPGetSrvrParms options */
 #define AFPSRVR_CONFIGINFO     (1 << 0)