diff options
author | Jeremy Allison <jra@samba.org> | 1998-07-17 01:38:08 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-07-17 01:38:08 +0000 |
commit | 18067a7f0c7153d5298ab1e6530ace4f25f926e7 (patch) | |
tree | 184fa758db63fda835adf31b953b015b7fc16c41 /source3 | |
parent | b61b50ac2c42968a499d1c048fa5ee89e321f8a0 (diff) | |
download | samba-18067a7f0c7153d5298ab1e6530ace4f25f926e7.tar.gz samba-18067a7f0c7153d5298ab1e6530ace4f25f926e7.tar.bz2 samba-18067a7f0c7153d5298ab1e6530ace4f25f926e7.zip |
nttrans.c: Added FILE_EXECUTE to required permissions checked.
trans2.c: Fixed up the SMB_QUERY_FILE_ALT_NAME_INFO code, now I've
got an NT client to generate it. It uses unicode without
bothering to check the unicode bit of course, but now we
can execute 16 bit exe's on a WinNT client from a long
filename directory (hurrah).
Jeremy.
(This used to be commit 6c31be7d3ffff6a40bbbac6de53663fa707ac859)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/nttrans.c | 2 | ||||
-rw-r--r-- | source3/smbd/trans2.c | 22 |
2 files changed, 13 insertions, 11 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index 45334e88e5..8f7f40b4f9 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -325,6 +325,8 @@ static int map_share_mode( uint32 desired_access, uint32 share_access, uint32 fi if (smb_open_mode == -1) { if(desired_access & DELETE_ACCESS) smb_open_mode = 2; + else if( desired_access & FILE_EXECUTE) + smb_open_mode = 0; else { DEBUG(0,("map_share_mode: Incorrect value for desired_access = %x\n", desired_access)); diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 3ea9cb201f..a0aa65601f 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -1073,11 +1073,10 @@ static int call_trans2qfsinfo(char *inbuf, char *outbuf, int length, int bufsize } case SMB_QUERY_FS_ATTRIBUTE_INFO: data_len = 12 + 2*strlen(FSTYPE_STRING); -#if 1 /* JRATEST */ SIVAL(pdata,0,FILE_CASE_PRESERVED_NAMES); /* FS ATTRIBUTES */ -#else /* JRATEST */ +#if 0 /* Old code. JRA. */ SIVAL(pdata,0,0x4006); /* FS ATTRIBUTES == long filenames supported? */ -#endif /* JRATEST */ +#endif /* Old code. */ SIVAL(pdata,4,128); /* Max filename component length */ SIVAL(pdata,8,2*strlen(FSTYPE_STRING)); PutUniCode(pdata+12,FSTYPE_STRING); @@ -1147,8 +1146,10 @@ static int call_trans2setfsinfo(char *inbuf, char *outbuf, int length, int bufsi } /**************************************************************************** - reply to a TRANS2_QFILEINFO (query file info by fileid) + Reply to a TRANS2_QFILEPATHINFO or TRANSACT2_QFILEINFO (query file info by + file name or file id). ****************************************************************************/ + static int call_trans2qfilepathinfo(char *inbuf, char *outbuf, int length, int bufsize,int cnum, char **pparams,char **ppdata, @@ -1294,19 +1295,18 @@ static int call_trans2qfilepathinfo(char *inbuf, char *outbuf, int length, case SMB_QUERY_FILE_ALT_NAME_INFO: { pstring short_name; - pstrcpy(short_name,fname); + pstrcpy(short_name,p); /* Mangle if not already 8.3 */ if(!is_8_3(short_name, True)) { if(!name_map_mangle(short_name,True,SNUM(cnum))) *short_name = '\0'; } - strncpy(pdata + 4,short_name,12); - (pdata + 4)[12] = 0; - strupper(pdata + 4); - l = strlen(pdata + 4); - data_size = 4 + l; - SIVAL(pdata,0,l); + strupper(short_name); + l = strlen(short_name); + PutUniCode(pdata + 4, short_name); + data_size = 4 + (2*l); + SIVAL(pdata,0,2*l); } break; |