2003-08-13 01:53:07 +00:00
/*
Unix SMB / CIFS implementation .
Parameter loading functions
Copyright ( C ) Karl Auer 1993 - 1998
Largely re - written by Andrew Tridgell , September 1994
Copyright ( C ) Simo Sorce 2001
Copyright ( C ) Alexander Bokovoy 2002
Copyright ( C ) Stefan ( metze ) Metzmacher 2002
2004-07-28 13:08:08 +00:00
Copyright ( C ) Jim McDonough ( jmcd @ us . ibm . com ) 2003.
2003-08-13 01:53:07 +00:00
Copyright ( C ) James Myers 2003 < myersjj @ samba . org >
2007-09-08 00:07:50 +00:00
Copyright ( C ) Jelmer Vernooij < jelmer @ samba . org > 2007
2008-02-10 13:01:20 +01:00
2003-08-13 01:53:07 +00:00
This program is free software ; you can redistribute it and / or modify
it under the terms of the GNU General Public License as published by
2007-07-10 02:07:03 +00:00
the Free Software Foundation ; either version 3 of the License , or
2003-08-13 01:53:07 +00:00
( at your option ) any later version .
2008-02-10 13:01:20 +01:00
2003-08-13 01:53:07 +00:00
This program is distributed in the hope that it will be useful ,
but WITHOUT ANY WARRANTY ; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
GNU General Public License for more details .
2008-02-10 13:01:20 +01:00
2003-08-13 01:53:07 +00:00
You should have received a copy of the GNU General Public License
2007-07-10 02:07:03 +00:00
along with this program . If not , see < http : //www.gnu.org/licenses/>.
2003-08-13 01:53:07 +00:00
*/
2011-10-06 19:34:50 +11:00
# include "includes.h"
# include "lib/param/param.h"
# include "libcli/raw/libcliraw.h"
# include "rpc_server/common/common.h"
2008-01-03 17:22:12 -06:00
2010-07-16 14:32:10 +10:00
void lpcfg_smbcli_options ( struct loadparm_context * lp_ctx ,
2008-01-03 17:22:12 -06:00
struct smbcli_options * options )
{
2010-07-16 14:32:10 +10:00
options - > max_xmit = lpcfg_max_xmit ( lp_ctx ) ;
options - > max_mux = lpcfg_maxmux ( lp_ctx ) ;
options - > use_spnego = lpcfg_nt_status_support ( lp_ctx ) & & lpcfg_use_spnego ( lp_ctx ) ;
options - > signing = lpcfg_client_signing ( lp_ctx ) ;
2008-01-03 17:22:12 -06:00
options - > request_timeout = SMB_REQUEST_TIMEOUT ;
2010-07-16 14:32:10 +10:00
options - > ntstatus_support = lpcfg_nt_status_support ( lp_ctx ) ;
options - > max_protocol = lpcfg_cli_maxprotocol ( lp_ctx ) ;
options - > unicode = lpcfg_unicode ( lp_ctx ) ;
2008-03-06 15:11:16 +01:00
options - > use_oplocks = true ;
options - > use_level2_oplocks = true ;
2008-01-03 17:22:12 -06:00
}
2008-09-30 01:29:53 +02:00
2010-07-16 14:32:10 +10:00
void lpcfg_smbcli_session_options ( struct loadparm_context * lp_ctx ,
2008-09-30 01:29:53 +02:00
struct smbcli_session_options * options )
{
2010-07-16 14:32:10 +10:00
options - > lanman_auth = lpcfg_client_lanman_auth ( lp_ctx ) ;
options - > ntlmv2_auth = lpcfg_client_ntlmv2_auth ( lp_ctx ) ;
options - > plaintext_auth = lpcfg_client_plaintext_auth ( lp_ctx ) ;
2008-09-30 01:29:53 +02:00
}
2008-10-23 21:49:40 +02:00
2010-07-16 14:32:10 +10:00
_PUBLIC_ struct dcerpc_server_info * lpcfg_dcerpc_server_info ( TALLOC_CTX * mem_ctx , struct loadparm_context * lp_ctx )
2008-11-01 15:09:26 +01:00
{
struct dcerpc_server_info * ret = talloc_zero ( mem_ctx , struct dcerpc_server_info ) ;
2010-07-16 14:32:10 +10:00
ret - > domain_name = talloc_reference ( mem_ctx , lpcfg_workgroup ( lp_ctx ) ) ;
ret - > version_major = lpcfg_parm_int ( lp_ctx , NULL , " server_info " , " version_major " , 5 ) ;
ret - > version_minor = lpcfg_parm_int ( lp_ctx , NULL , " server_info " , " version_minor " , 2 ) ;
ret - > version_build = lpcfg_parm_int ( lp_ctx , NULL , " server_info " , " version_build " , 3790 ) ;
2008-11-01 15:09:26 +01:00
return ret ;
}
2008-11-02 02:05:48 +01:00