GetIoctlHandle() is used to construct the magic pioctl file
path used to initiate pioctl operations with the cache manager.
The first error introduced double directory separators. The
second error was testing an uninitialized value which could
have resulted in a missing directory separator.
Change-Id: I691fde63adf295c380312772e7d320ff99e89d70
Reviewed-on: http://gerrit.openafs.org/3929
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
count++;
i++;
}
- if (fileNamep[i] == 0)
+ if (fileNamep[i] == 0 || (fileNamep[i-1] != '\\' && fileNamep[i-1] != '/'))
tbuffer[i++] = '\\';
tbuffer[i] = 0;
- strcat(tbuffer, SMB_IOCTL_FILENAME);
+ strcat(tbuffer, SMB_IOCTL_FILENAME_NOSLASH);
} else {
char curdir[MAX_PATH]="";
count++;
i++;
}
- if (tbuffer[i] == 0)
+ if (curdir[i] == 0 || (curdir[i-1] != '\\' && curdir[i-1] != '/'))
tbuffer[i++] = '\\';
tbuffer[i] = 0;
strcat(tbuffer, SMB_IOCTL_FILENAME_NOSLASH);