How to retrieve "server_os" , "server_type" in string format if i am using SMB2 and higher protocol ??
Stefan Metzmacher
metze at samba.org
Tue Mar 21 14:23:48 UTC 2017
Hi Nag,
> The fields *[ server_type, server_os ] *are getting filled when connection
> establishment with ms-servers. But there was a check saying that don't send
> details if the max_protocol was greater than "NT1" which means SMB1. *So is
> there a way to get these fields in string format* or an API call by using
> max_protocol = SMB2.
>
> - I checked few API's but there are giving the server_type as uint.
> - I want the data from ms_server as *server_type = "Windows Server 2012". *
>
> Any help will be so helpful.
>
>
> struct cli_state {
> /* The following strings are the
> * ones returned by the server if
> * the protocol > NT1.
> */
> char *server_type;
> char *server_os;
> char *server_domain; ....... }
>
That information is not available with SMB2.
The server domain might be retrieved using wkssvc_NetWkstaGetInfo(),
but that's currently not used.
I already thought about filling the server_os or server_type with
the protocol string, e.g. "SMB3_11 Server".
There's also a bug in 4.6 and master where we fail to fill in this
fields even with NT1 and older protocols (I'll post patches for this soon).
metze
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170321/5bc722bd/signature.sig>
More information about the samba-technical
mailing list