summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1997-10-10 01:32:26 +0000
committerJeremy Allison <jra@samba.org>1997-10-10 01:32:26 +0000
commit805749baab4e79fbdb9897f22b2c801d9dd9efc2 (patch)
treeaabf74ff61c45ea907a0a4c3fb07822ba9aa8ba0 /source3/smbd
parent502a377794f157502cc1432c3d923209a6d69ff4 (diff)
downloadsamba-805749baab4e79fbdb9897f22b2c801d9dd9efc2.tar.gz
samba-805749baab4e79fbdb9897f22b2c801d9dd9efc2.tar.bz2
samba-805749baab4e79fbdb9897f22b2c801d9dd9efc2.zip
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) (This used to be commit 53915bd160eda8c099482ddcef74d1d7606e752b)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/trans2.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 092a069a6e..a56df9cb9c 100644
--- a/source3/smbd/trans2.c
+++ b/source3/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;