summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-03-29 00:36:30 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:56:22 -0500
commitfa787af52093e14de4a472d2ccb50b9ec66b10d1 (patch)
treee555fc9d2fc057bb5f0b8da66bb6aec48bed0e50 /source3/lib
parent717845f1093df1205a8d4b0f40480002acb6cafc (diff)
downloadsamba-fa787af52093e14de4a472d2ccb50b9ec66b10d1.tar.gz
samba-fa787af52093e14de4a472d2ccb50b9ec66b10d1.tar.bz2
samba-fa787af52093e14de4a472d2ccb50b9ec66b10d1.zip
r6106: Fix bug #2551. It turns out that the incoming flags2 flag FLAGS2_LONG_PATH_COMPONENTS
determines if a reply is uppercased on a SMBsearch request, not the protocol level. This could clear up quite a few hacks going forward I think. Jeremy. (This used to be commit 8c64cd368fdd2c5a4b361904855c135ade3f449e)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/util.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index d945bca5a7..b76d561ccd 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -603,7 +603,7 @@ void unix_clean_name(char *s)
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 @@ void make_dir_struct(char *buf, const char *mask, const char *fname,SMB_OFF_T si
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));
}