How to retrieve "server_os" , "server_type" in string format if i am using SMB2 and higher protocol ??

Nagendra008 bodepu.nagendrakumar at gmail.com
Tue Mar 21 14:01:24 UTC 2017


Hi All, 

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;  ....... } 
  
cli_start_connection_send: This where will get the min and max protocol 
  
        if (signing_state == SMB_SIGNING_IPC_DEFAULT) { 
                state->min_protocol = lp_client_ipc_min_protocol(); 
                state->max_protocol = lp_client_ipc_max_protocol(); 
        } else { 
                state->min_protocol = lp_client_min_protocol(); 
                state->max_protocol = lp_client_max_protocol(); 
        } 

Regards, 
Nag



--
View this message in context: http://samba.2283325.n4.nabble.com/How-to-retrieve-server-os-server-type-in-string-format-if-i-am-using-SMB2-and-higher-protocol-tp4716424.html
Sent from the Samba - samba-technical mailing list archive at Nabble.com.



More information about the samba-technical mailing list