diff options
author | Tim Potter <tpot@samba.org> | 2001-09-12 12:20:14 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2001-09-12 12:20:14 +0000 |
commit | 45762a62ce0cecd063f8c97d1ca0789339f300d6 (patch) | |
tree | 24c004b7c5e806fa556105df0a2f7cb2238580cd /source3/msdfs/msdfs.c | |
parent | ad719ccbd6e48142c87d25d3922f25dbe0dc8e1b (diff) | |
download | samba-45762a62ce0cecd063f8c97d1ca0789339f300d6.tar.gz samba-45762a62ce0cecd063f8c97d1ca0789339f300d6.tar.xz samba-45762a62ce0cecd063f8c97d1ca0789339f300d6.zip |
Converted msdfs referral server code to use rpcstr_push() functions. Still
doesn't work though. )-:
(This used to be commit ec7296d6e9b5b61bac778c2093ee0cd0e23a2344)
Diffstat (limited to 'source3/msdfs/msdfs.c')
-rw-r--r-- | source3/msdfs/msdfs.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/source3/msdfs/msdfs.c b/source3/msdfs/msdfs.c index b2098005c0f..8417474ed2d 100644 --- a/source3/msdfs/msdfs.c +++ b/source3/msdfs/msdfs.c @@ -368,9 +368,9 @@ static int setup_ver2_dfs_referral(char* pathname, char** ppdata, DEBUG(10,("setting up version2 referral\nRequested path:\n")); -#if 0 - requestedpathlen = (dos_struni2(uni_requestedpath,pathname,512)+1)*2; -#endif + requestedpathlen = rpcstr_push(uni_requestedpath, pathname, -1, + STR_TERMINATE); + dump_data(10,uni_requestedpath,requestedpathlen); DEBUG(10,("ref count = %u\n",junction->referral_count)); @@ -434,9 +434,8 @@ static int setup_ver2_dfs_referral(char* pathname, char** ppdata, SSVAL(pdata,offset+16,uni_reqpathoffset1-offset); SSVAL(pdata,offset+18,uni_reqpathoffset2-offset); /* copy referred path into current offset */ -#if 0 - unilen = (dos_struni2(pdata+uni_curroffset,ref->alternate_path,512) +1)*2; -#endif + unilen = rpcstr_push(pdata+uni_curroffset, ref->alternate_path, + -1, STR_UNICODE); SSVAL(pdata,offset+20,uni_curroffset-offset); uni_curroffset += unilen; @@ -464,9 +463,8 @@ static int setup_ver3_dfs_referral(char* pathname, char** ppdata, DEBUG(10,("setting up version3 referral\n")); -#if 0 - reqpathlen = (dos_struni2(uni_reqpath,pathname,512)+1)*2; -#endif + reqpathlen = rpcstr_push(uni_reqpath, pathname, -1, STR_TERMINATE); + dump_data(10,uni_reqpath,reqpathlen); uni_reqpathoffset1 = REFERRAL_HEADER_SIZE + VERSION3_REFERRAL_SIZE * junction->referral_count; @@ -515,9 +513,9 @@ static int setup_ver3_dfs_referral(char* pathname, char** ppdata, SSVAL(pdata,offset+12,uni_reqpathoffset1-offset); SSVAL(pdata,offset+14,uni_reqpathoffset2-offset); /* copy referred path into current offset */ -#if 0 - unilen = (dos_struni2(pdata+uni_curroffset,ref->alternate_path,512) +1)*2; -#endif + + unilen = rpcstr_push(pdata+uni_curroffset, ref->alternate_path, + -1, STR_UNICODE); SSVAL(pdata,offset+16,uni_curroffset-offset); /* copy 0x10 bytes of 00's in the ServiceSite GUID */ memset(pdata+offset+18,'\0',16); |