1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

lib/param move source4 param code to the top level

This is done so that the lpcfg_ functions are available across the whole
build, either with the struct loadparm_context loaded from an smb.conf directly
or as a wrapper around the source3 param code.

This is not the final, merged loadparm, but simply one step to make
it easier to solve other problems while we make our slow progress
on this difficult problem.

Andrew Bartlett
This commit is contained in:
Andrew Bartlett 2011-10-06 19:34:50 +11:00
parent 6bed57788c
commit b21b012756
22 changed files with 3821 additions and 3785 deletions

3775
lib/param/loadparm.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -4,3 +4,27 @@ bld.SAMBA_GENERATOR('param_local_h',
source= 'param_functions.c ../../script/mkparamdefs.pl',
target='param_local.h',
rule='${PERL} ${SRC[1].abspath(env)} ${SRC[0].abspath(env)} --file ${TGT} --generate-scope=LOCAL')
bld.SAMBA_GENERATOR('s3_param_h',
source= 'loadparm.c ../../script/mks3param.pl',
target='s3_param.h',
rule='${PERL} ${SRC[1].abspath(env)} ${SRC[0].abspath(env)} --file ${TGT}')
bld.SAMBA_GENERATOR('param_global_h',
source= 'loadparm.c ../../script/mkparamdefs.pl',
target='param_global.h',
rule='${PERL} ${SRC[1].abspath(env)} ${SRC[0].abspath(env)} --file ${TGT} --generate-scope=GLOBAL')
bld.SAMBA_LIBRARY('samba-hostconfig',
source='loadparm.c generic.c util.c',
pc_files='samba-hostconfig.pc',
vnum='0.0.1',
deps='DYNCONFIG',
public_deps='samba-util param_local_h',
public_headers='param.h',
autoproto='param_proto.h',
autoproto_extra_source='param_functions.c'
)

View File

@ -46,6 +46,10 @@ enum protocol_types {
PROTOCOL_SMB2_22
};
enum smb_signing_setting {
SMB_SIGNING_OFF, SMB_SIGNING_SUPPORTED,
SMB_SIGNING_REQUIRED, SMB_SIGNING_AUTO};
/* NT Flags2 bits - cifs6.txt section 3.1.2 */
#define FLAGS2_LONG_PATH_COMPONENTS 0x0001
#define FLAGS2_EXTENDED_ATTRIBUTES 0x0002

View File

@ -28,7 +28,7 @@
#include "lib/util/util_net.h"
#include "lib/util/charset/charset.h"
#include "libcli/auth/libcli_auth.h"
#include "source4/param/param.h"
#include "lib/param/param.h"
#include "lib/util/samba_util.h"
#include "lib/crypto/arcfour.h"

View File

@ -27,7 +27,7 @@
#include "librpc/gen_ndr/ndr_dfsblobs.h"
#include "source4/lib/events/events.h"
#include "source4/auth/session.h"
#include "source4/param/param.h"
#include "lib/param/param.h"
#include "source4/dsdb/samdb/samdb.h"
#include "dfs_server/dfs_server_ad.h"

View File

@ -18,7 +18,7 @@
*/
#include "includes.h"
#include "../source4/param/s3_param.h"
#include "lib/param/s3_param.h"
static struct loadparm_service *lp_service_for_s4_ctx(const char *servicename)
{

View File

@ -32,7 +32,7 @@
#include "source4/lib/events/events.h"
#include "source4/auth/session.h"
#include "source4/auth/system_session_proto.h"
#include "source4/param/param.h"
#include "lib/param/param.h"
#include "source4/dsdb/common/util.h"
struct pdb_samba4_state {

View File

@ -20,7 +20,7 @@ bld.SAMBA_MODULE('auth4_server',
source='auth_server.c',
subsystem='auth4',
init_function='auth4_server_init',
deps='samba-util LIBCLI_SMB CREDENTIALS_NTLM'
deps='samba-util LIBCLI_SMB CREDENTIALS_NTLM param_options'
)

View File

@ -103,7 +103,7 @@ struct smbcli_options {
uint32_t max_xmit;
uint16_t max_mux;
int request_timeout;
enum smb_signing_state signing;
enum smb_signing_setting signing;
};
/* this is the context for the client transport layer */

View File

@ -26,10 +26,6 @@ enum smb_signing_engine_state {
SMB_SIGNING_ENGINE_ON
};
enum smb_signing_state {
SMB_SIGNING_OFF, SMB_SIGNING_SUPPORTED,
SMB_SIGNING_REQUIRED, SMB_SIGNING_AUTO};
struct smb_signing_context {
enum smb_signing_engine_state signing_state;
DATA_BLOB mac_key;

View File

@ -33,7 +33,7 @@ bld.SAMBA_SUBSYSTEM('LIBCLI_SMB_COMPOSITE',
bld.SAMBA_PYTHON('pysmb',
source='pysmb.c',
deps='LIBCLI_SMB_COMPOSITE LIBCLI_SMB2 tevent-util pyparam_util',
public_deps='cli_composite samba-credentials gensec LIBCLI_RESOLVE tevent',
public_deps='cli_composite samba-credentials gensec LIBCLI_RESOLVE tevent param_options',
realname='samba/smb.so'
)

View File

@ -138,7 +138,7 @@ bld.SAMBA_LIBRARY('dcerpc',
rpc/dcerpc_util.c rpc/dcerpc_smb.c rpc/dcerpc_smb2.c rpc/dcerpc_sock.c
rpc/dcerpc_connect.c rpc/dcerpc_secondary.c''',
pc_files='dcerpc.pc',
deps='samba_socket LIBCLI_RESOLVE LIBCLI_SMB LIBCLI_SMB2 ndr NDR_DCERPC RPC_NDR_EPMAPPER NDR_SCHANNEL RPC_NDR_NETLOGON RPC_NDR_MGMT gensec LIBCLI_AUTH smbclient-raw LP_RESOLVE tevent-util dcerpc-binding',
deps='samba_socket LIBCLI_RESOLVE LIBCLI_SMB LIBCLI_SMB2 ndr NDR_DCERPC RPC_NDR_EPMAPPER NDR_SCHANNEL RPC_NDR_NETLOGON RPC_NDR_MGMT gensec LIBCLI_AUTH smbclient-raw LP_RESOLVE tevent-util dcerpc-binding param_options',
autoproto='rpc/dcerpc_proto.h',
public_deps='samba-credentials tevent talloc',
public_headers='''rpc/dcerpc.h ../../librpc/gen_ndr/mgmt.h

View File

@ -9,7 +9,7 @@ bld.SAMBA_MODULE('ntvfs_cifs',
source='cifs/vfs_cifs.c',
subsystem='ntvfs',
init_function='ntvfs_cifs_init',
deps='LIBCLI_SMB smbclient-raw'
deps='LIBCLI_SMB smbclient-raw param_options'
)
@ -17,7 +17,7 @@ bld.SAMBA_MODULE('ntvfs_smb2',
source='smb2/vfs_smb2.c',
subsystem='ntvfs',
init_function='ntvfs_smb2_init',
deps='LIBCLI_SMB smbclient-raw'
deps='LIBCLI_SMB smbclient-raw param_options'
)

File diff suppressed because it is too large Load Diff

View File

@ -1,27 +1,5 @@
#!/usr/bin/env python
bld.SAMBA_GENERATOR('s3_param_h',
source= 'loadparm.c ../script/mks3param.pl',
target='s3_param.h',
rule='${PERL} ${SRC[1].abspath(env)} ${SRC[0].abspath(env)} --file ${TGT}')
bld.SAMBA_GENERATOR('param_global_h',
source= 'loadparm.c ../../script/mkparamdefs.pl',
target='param_global.h',
rule='${PERL} ${SRC[1].abspath(env)} ${SRC[0].abspath(env)} --file ${TGT} --generate-scope=GLOBAL')
bld.SAMBA_LIBRARY('samba-hostconfig',
source='loadparm.c generic.c util.c',
pc_files='samba-hostconfig.pc',
vnum='0.0.1',
deps='DYNCONFIG',
public_deps='samba-util param_local_h',
public_headers='param.h',
autoproto='param_proto.h',
autoproto_extra_source='../../lib/param/param_functions.c'
)
bld.SAMBA_SUBSYSTEM('PROVISION',
source='provision.c pyparam.c',
deps='LIBPYTHON pyparam_util ldb pytalloc-util pyldb-util',
@ -64,6 +42,10 @@ bld.SAMBA_PYTHON('pyparam',
realname='samba/param.so'
)
bld.SAMBA_SUBSYSTEM('param_options',
source='loadparm.c',
deps='samba-hostconfig')
bld.SAMBA_SUBSYSTEM('pyparam_util',
source='pyparam_util.c',

View File

@ -23,7 +23,7 @@
#include "lib/cmdline/popt_common.h"
#include "source3/lib/netapi/netapi.h"
#include "source3/lib/netapi/netapi_private.h"
#include "source4/param/param.h"
#include "lib/param/param.h"
#include "torture/libnetapi/proto.h"
bool torture_libnetapi_init_context(struct torture_context *tctx,

View File

@ -2,11 +2,11 @@
bld.SAMBA_BINARY('client/smbclient',
source='client/client.c',
deps='samba-hostconfig SMBREADLINE samba-util LIBCLI_SMB RPC_NDR_SRVSVC LIBCLI_LSA popt POPT_SAMBA POPT_CREDENTIALS smbclient-raw'
deps='samba-hostconfig SMBREADLINE samba-util LIBCLI_SMB RPC_NDR_SRVSVC LIBCLI_LSA popt POPT_SAMBA POPT_CREDENTIALS smbclient-raw param_options'
)
bld.SAMBA_BINARY('client/cifsdd',
source='client/cifsdd.c client/cifsddio.c',
deps='samba-hostconfig LIBCLI_SMB popt POPT_SAMBA POPT_CREDENTIALS'
deps='samba-hostconfig LIBCLI_SMB popt POPT_SAMBA POPT_CREDENTIALS param_options'
)