diff options
author | Jeremy Allison <jra@samba.org> | 1997-10-10 01:32:26 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1997-10-10 01:32:26 +0000 |
commit | 53915bd160eda8c099482ddcef74d1d7606e752b (patch) | |
tree | 965a5b50eeb3e0f51dd619f93256c19242c93f71 /source/smbd | |
parent | 229b6c409240a8dca9172702b8fefb31aa3b13a1 (diff) | |
download | samba-53915bd160eda8c099482ddcef74d1d7606e752b.tar.gz |
nmblookup.c: Added -A ability to do status on ip address.
smb.h: Added defines we will need for NT SMB calls.
trans2.c: Fixed SMB_QUERY_FILE_ALT_NAME_INFO return - this is only
for short name returns (and only used when you negotiate NT SMB calls
to boot !).
Jeremy (jallison@whistle.com)
Diffstat (limited to 'source/smbd')
-rw-r--r-- | source/smbd/trans2.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c index 092a069a6e3..a56df9cb9cc 100644 --- a/source/smbd/trans2.c +++ b/source/smbd/trans2.c @@ -1181,12 +1181,32 @@ static int call_trans2qfilepathinfo(char *inbuf, char *outbuf, int length, data_size = 4; break; - case SMB_QUERY_FILE_NAME_INFO: + /* Get the 8.3 name - used if NT SMB was negotiated. */ case SMB_QUERY_FILE_ALT_NAME_INFO: + { + pstring short_name; + pstrcpy(short_name,fname); + /* 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); + } + break; + + case SMB_QUERY_FILE_NAME_INFO: data_size = 4 + l; SIVAL(pdata,0,l); pstrcpy(pdata+4,fname); break; + case SMB_QUERY_FILE_ALLOCATION_INFO: case SMB_QUERY_FILE_END_OF_FILEINFO: data_size = 8; |