Skip to content
Tcl Source Code Artifact [da1e885bec]
Login

Artifact [da1e885bec]

Artifact da1e885becd3701d6411139a89c11ec96d121aa042798c8fb7e9b021191358fd:

Ticket change [da1e885bec] - New ticket [da235271f1e5c582|da235271f1] <i>[info hostname] on Windows is limited to max NetBIOS name length</i>. by anonymous on 2020-02-21 01:41:14.
D 2020-02-21T01:41:14.162
J assignee nobody
J closer nobody
J cmimetype text/plain
J comment I\shave\sa\sWindows\shost\snamed\s"emake-ericm-11-2-x-202002210019-win2k12".\r\nUsing\s[info\shostname]\son\sthis\ssystem\sgives\sme\sa\sresult\sof\s"emake-ericm-11-".\r\nThis\sappears\sto\sbe\sbecause\sin\sInitializeHostName()\s(in\swin/tclWinSock.c),\sTcl\s\r\nuses\sGetComputerNameW()\sto\sget\sthe\shostname:\r\n\r\nhttps://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-getcomputernamew\r\n\r\nGetComputerNameW()\sis\sdefined\sto\sreturn\sthe\sNetBIOS\sname\sof\sthe\shost,\swhich\sis\r\nlimited\sto\sMAX_COMPUTERNAME_LENGTH,\swhich\sis\sonly\s15\scharacters,\sat\sleast\son\s\r\nsome\sversions\sof\sWindows.\r\n\r\nThe\sdocumentation\sfor\s[info\shostname]\sstates:\r\n\r\n\s\s\s\sReturns\sthe\sname\sof\sthe\scomputer\son\swhich\sthis\sinvocation\sis\sbeing\sexecuted.\s\s\r\n\s\s\s\sNote\sthat\sthis\sname\sis\snot\sguaranteed\sto\sbe\sthe\sfully\squalified\sdomain\sname\s\r\n\s\s\s\sof\sthe\shost.\s\sWhere\s\smachines\s\shave\s\sseveral\s\sdifferent\snames\s(as\sis\scommon\s\r\n\s\s\s\son\ssystems\swith\sboth\sTCP/IP\s(DNS)\sand\sNetBIOS-based\snetworking\sinstalled,)\s\r\n\s\s\s\sit\sis\sthe\sname\sthat\sis\ssuitable\sfor\sTCP/IP\snetworking\sthat\sis\sreturned.\r\n\r\nThis\sseems\sto\sbe\sin\scontradiction\sto\sthe\simplementation,\swhich\sreturns\sthe\s\r\nNetBIOS\sname,\snot\sthe\sDNS\sname.\sTcl\sshould\sinstead\suse\sGetComputerNameExW,\r\nwhich\sretrieves\sthe\sDNS\sname\sof\sthe\shost,\sor\sat\sleast\sshould\stry\sthat\sfirst\r\nand\sonly\sfall\sback\sto\sGetComputerNameW\sif\sGetComputerNameExW\shas\sfailed.\r\n\r\nhttps://docs.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-getcomputernameexw
J foundin 8.6.9
J is_private 0
J login anonymous
J priority 5\sMedium
J private_contact 71ade17b2c497b778fd6637b5d0e4fcf3581ad51
J resolution None
J severity Minor
J status Open
J submitter anonymous
J subsystem 17.\sCommands\sI-L
J title [info\shostname]\son\sWindows\sis\slimited\sto\smax\sNetBIOS\sname\slength
J type Bug
K da235271f1e5c582eb54a93a893a85c2cbe2b76c
U anonymous
Z e5338e18b2cdd14f4c8add3d51e5df54