The Samba-Bugzilla – Attachment 1125 Details for
Bug 2551
Win98 fails to run FOXPRO DOS apps on 3.0.12 and upper.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch.
look (text/plain), 2.78 KB, created by
Jeremy Allison
on 2005-03-28 17:32:14 UTC
(
hide
)
Description:
Proposed patch.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2005-03-28 17:32:14 UTC
Size:
2.78 KB
patch
obsolete
>Index: smbd/reply.c >=================================================================== >--- smbd/reply.c (revision 6105) >+++ smbd/reply.c (working copy) >@@ -931,6 +931,8 @@ > BOOL can_open = True; > BOOL bad_path = False; > NTSTATUS nt_status; >+ BOOL allow_long_path_components = (SVAL(inbuf,smb_flg2) & FLAGS2_LONG_PATH_COMPONENTS) ? True : False; >+ > START_PROFILE(SMBsearch); > > *mask = *directory = *fname = 0; >@@ -1030,7 +1032,8 @@ > if (ok) { > if ((dirtype&0x1F) == aVOLID) { > memcpy(p,status,21); >- make_dir_struct(p,"???????????",volume_label(SNUM(conn)),0,aVOLID,0); >+ make_dir_struct(p,"???????????",volume_label(SNUM(conn)), >+ 0,aVOLID,0,!allow_long_path_components); > dptr_fill(p+12,dptr_num); > if (dptr_zero(p+12) && (status_len==0)) > numentries = 1; >@@ -1050,7 +1053,8 @@ > finished = !get_dir_entry(conn,mask,dirtype,fname,&size,&mode,&date,check_descend); > if (!finished) { > memcpy(p,status,21); >- make_dir_struct(p,mask,fname,size,mode,date); >+ make_dir_struct(p,mask,fname,size, mode,date, >+ !allow_long_path_components); > dptr_fill(p+12,dptr_num); > numentries++; > p += DIR_STRUCT_SIZE; >@@ -1088,8 +1092,11 @@ > SCVAL(smb_buf(outbuf),0,5); > SSVAL(smb_buf(outbuf),1,numentries*DIR_STRUCT_SIZE); > >- if (Protocol >= PROTOCOL_NT1) >- SSVAL(outbuf,smb_flg2,SVAL(outbuf, smb_flg2) | FLAGS2_IS_LONG_NAME); >+ /* The replies here are never long name. */ >+ SSVAL(outbuf,smb_flg2,SVAL(outbuf, smb_flg2) & (~FLAGS2_IS_LONG_NAME)); >+ if (!allow_long_path_components) { >+ SSVAL(outbuf,smb_flg2,SVAL(outbuf, smb_flg2) & (~FLAGS2_LONG_PATH_COMPONENTS)); >+ } > > /* This SMB *always* returns ASCII names. Remove the unicode bit in flags2. */ > SSVAL(outbuf,smb_flg2, (SVAL(outbuf, smb_flg2) & (~FLAGS2_UNICODE_STRINGS))); >Index: lib/util.c >=================================================================== >--- lib/util.c (revision 6105) >+++ lib/util.c (working copy) >@@ -603,7 +603,7 @@ > Make a dir struct. > ****************************************************************************/ > >-void make_dir_struct(char *buf, const char *mask, const char *fname,SMB_OFF_T size,int mode,time_t date) >+void make_dir_struct(char *buf, const char *mask, const char *fname,SMB_OFF_T size,int mode,time_t date, BOOL uc) > { > char *p; > pstring mask2; >@@ -627,9 +627,9 @@ > put_dos_date(buf,22,date); > SSVAL(buf,26,size & 0xFFFF); > SSVAL(buf,28,(size >> 16)&0xFFFF); >- /* We only uppercase if the protocol is downrev. >+ /* We only uppercase if FLAGS2_LONG_PATH_COMPONENTS is zero in the input buf. > Strange, but verified on W2K3. Needed for OS/2. JRA. */ >- push_ascii(buf+30,fname,12,Protocol < PROTOCOL_NT1 ? STR_UPPER : 0); >+ push_ascii(buf+30,fname,12, uc ? STR_UPPER : 0); > DEBUG(8,("put name [%s] from [%s] into dir struct\n",buf+30, fname)); > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 2551
:
1123
|
1124
| 1125