]> arthur.barton.de Git - netatalk.git/commitdiff
bugfix cname() don't invalidate directory if it's the root parent (did == 1).
authordidg <didg>
Mon, 14 Oct 2002 06:30:49 +0000 (06:30 +0000)
committerdidg <didg>
Mon, 14 Oct 2002 06:30:49 +0000 (06:30 +0000)
Some client makes bogus request eg:
FPGetfileDirParam(did = 1, name = Disk 1). I believe with did == 1 only the
volume name is valid.

etc/afpd/directory.c

index ac8ddcb8d4cd3d9bcf39c3b7e6207f816ddd625a..91e9b558cd1a4f3be3e869f124dc1503d4571b9f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: directory.c,v 1.47 2002-10-13 16:12:31 didg Exp $
+ * $Id: directory.c,v 1.48 2002-10-14 06:30:49 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -943,7 +943,8 @@ char        **cpath;
                        /* dir is not valid anymore 
                           we delete dir from the cache and abort.
                        */
-                       dir_invalidate(vol, dir);
+                       if ( dir->d_did != DIRDID_ROOT_PARENT) 
+                           dir_invalidate(vol, dir);
                         return NULL;
                     }
                     cdir = extenddir( vol, dir, &ret );