ioctl-freelance-20040719
authorJeffrey Altman <jaltman@mit.edu>
Mon, 19 Jul 2004 23:40:12 +0000 (23:40 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Mon, 19 Jul 2004 23:40:12 +0000 (23:40 +0000)
Do not perform a Cell Search when the name matches the SMB IOCTL filename.
This is a special name and is not to be treated as a cell.  The failure
to find the name produces DNS queries as well as disk access.

src/WINNT/afsd/cm_cell.c
src/WINNT/afsd/smb_ioctl.h

index 682be66..8314eef 100644 (file)
@@ -68,6 +68,9 @@ cm_cell_t *cm_GetCell_Gen(char *namep, char *newnamep, long flags)
        int ttl;
        char fullname[200]="";
 
+       if (!strcmp(namep,SMB_IOCTL_FILENAME_NOSLASH))
+               return NULL;
+
        lock_ObtainWrite(&cm_cellLock);
        for (cp = cm_allCellsp; cp; cp=cp->nextp) {
                if (strcmp(namep, cp->namep) == 0) {
index db157b9..bce9e84 100644 (file)
@@ -12,6 +12,7 @@
 
 /* magic file name for ioctl opens */
 #define SMB_IOCTL_FILENAME     "\\_._AFS_IOCTL_._"     /* double backslashes for C compiler */
+#define SMB_IOCTL_FILENAME_NOSLASH "_._AFS_IOCTL_._"
 
 /* max parms for ioctl, in either direction */
 #define SMB_IOCTL_MAXDATA      8192