From fa787af52093e14de4a472d2ccb50b9ec66b10d1 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 29 Mar 2005 00:36:30 +0000 Subject: 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) --- source3/lib/util.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source3/lib') 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)); } -- cgit