/* now tokenize */
/* parse out hostname */
- p = strchr(temp,'\\');
+ p = strchr_m(temp,'\\');
if(p == NULL)
return False;
*p = '\0';
/* parse out servicename */
temp = p+1;
- p = strchr(temp,'\\');
+ p = strchr_m(temp,'\\');
if(p == NULL) {
pstrcpy(pdp->servicename,temp);
pdp->reqpath[0] = '\0';
/* rest is reqpath */
pstrcpy(pdp->reqpath, p+1);
p = pdp->reqpath;
- while (*p) {
- if (*p == '\\') *p = '/';
- p++;
+ while ((p = strchr_m(p, '\\'))!=NULL) {
+ *p++ = '/';
}
DEBUG(10,("rest of the path: %s\n",pdp->reqpath));
for(i=0;i<count;i++) {
/* replace / in the alternate path by a \ */
- char* p = strchr(alt_path[i],'/');
+ char* p = strchr_m(alt_path[i],'/');
if(p)
*p = '\\';
/* redirect if any component in the path is a link */
pstrcpy(reqpath, dp->reqpath);
- p = strrchr(reqpath, '/');
+ p = strrchr_m(reqpath, '/');
while (p) {
*p = '\0';
pstrcpy(localpath, reqpath);
pstrcpy(buf, dfspath);
trim_char(buf, '\0', '\\');
for (; consumed_level; consumed_level--) {
- q = strrchr(buf, '\\');
+ q = strrchr_m(buf, '\\');
if (q)
*q = 0;
}
return True;
}
- p = strrchr(reqpath, '/');
+ p = strrchr_m(reqpath, '/');
consumed_level++;
}
offset = 8;
/* add the referral elements */
for(i=0;i<junction->referral_count;i++) {
- struct referral* ref = &(junction->referral_list[i]);
+ struct referral* ref = &junction->referral_list[i];
int unilen;
SSVAL(pdata,offset,2); /* version 2 */
pstring pathname;
int reply_size = 0;
int max_referral_level;
- NTSTATUS status = NT_STATUS_OK;
DEBUG(10,("call_trans2getdfsreferral\n"));
if(!lp_host_msdfs())
return ERROR_DOS(ERRDOS,ERRbadfunc);
- srvstr_get_path(inbuf, pathname, ¶ms[2], sizeof(pathname), -1, STR_TERMINATE, &status);
- if (!NT_STATUS_IS_OK(status)) {
- return ERROR_NT(status);
- }
-
+ srvstr_pull(inbuf, pathname, ¶ms[2], sizeof(pathname), -1, STR_TERMINATE);
if((reply_size = setup_dfs_referral(conn, pathname,max_referral_level,ppdata)) < 0)
return UNIXERROR(ERRDOS,ERRbadfile);