r15304: Fix smbd build, more updates on getting --enable-dso to build again
authorJelmer Vernooij <jelmer@samba.org>
Fri, 28 Apr 2006 01:55:17 +0000 (01:55 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:05:08 +0000 (14:05 -0500)
21 files changed:
source/auth/config.mk
source/auth/credentials/config.mk
source/auth/gensec/config.mk
source/build/m4/rewrite.m4
source/build/smb_build/TODO
source/build/smb_build/header.pm
source/build/smb_build/input.pm
source/build/smb_build/main.pl
source/build/smb_build/makefile.pm
source/build/smb_build/output.pm
source/librpc/config.mk
source/smb_server/config.mk
source/smb_server/smb/negprot.c
source/smb_server/smb/receive.c
source/smb_server/smb/request.c
source/smb_server/smb2/keepalive.c
source/smb_server/smb2/negprot.c
source/smb_server/smb2/receive.c
source/smb_server/smb2/sesssetup.c
source/smb_server/smb2/tcon.c
source/smb_server/smb_server.c

index 7e2a0ea2cc71a34ca56bab09e1e9e84f35ff9431..018bc61eccbbcce843acee8f781defe866929b0c 100644 (file)
@@ -6,11 +6,8 @@ include credentials/config.mk
 
 [SUBSYSTEM::auth_sam]
 PRIVATE_PROTO_HEADER = auth_sam.h
-OBJ_FILES = \
-               sam.o \
-               auth_sam_reply.o
-PUBLIC_DEPENDENCIES = \
-               SAMDB
+OBJ_FILES = sam.o auth_sam_reply.o
+PUBLIC_DEPENDENCIES = SAMDB
 
 #######################
 # Start MODULE auth_sam
@@ -39,9 +36,7 @@ OBJ_FILES = auth_anonymous.o
 INIT_FUNCTION = auth_winbind_init
 SUBSYSTEM = auth
 OBJ_FILES = auth_winbind.o
-PUBLIC_DEPENDENCIES = \
-               LIBWINBIND-CLIENT \
-               NDR_NETLOGON LIBNDR
+PUBLIC_DEPENDENCIES = LIBWINBIND-CLIENT NDR_NETLOGON LIBNDR
 # End MODULE auth_winbind
 #######################
 
index 1f6a07ae01e45a08f25f9c9bb507da0acf61d5d2..8df9e26c7bc7b6273634199bb736f2423d1849d2 100644 (file)
@@ -8,7 +8,7 @@ OBJ_FILES = credentials.o \
                credentials_krb5.o \
                credentials_ntlm.o
 PUBLIC_DEPENDENCIES = \
-               HEIMDAL LIBCLI_AUTH SECRETS
+               LIBCLI_AUTH SECRETS LIBCRYPTO HEIMDAL_GSSAPI
 # End SUBSYSTEM CREDENTIALS
 #################################
 
index 2aad8eb4b1936628a935a9e41142ac7ba414cbd6..3906c930653113af36bfef5b93361d8a93a24354 100644 (file)
@@ -8,7 +8,7 @@ PUBLIC_HEADERS = gensec.h spnego.h
 PUBLIC_PROTO_HEADER = gensec_proto.h
 OBJ_FILES = gensec.o
 PUBLIC_DEPENDENCIES = \
-               CREDENTIALS LIBSAMBA-UTIL
+               CREDENTIALS LIBSAMBA-UTIL LIBCRYPTO
 # End SUBSYSTEM gensec
 #################################
 
index 2002bae35394473382ccfd7aabde14b47bed8392..deac542e2bdf8df49ee48939d7c00c86398148d8 100644 (file)
@@ -1,11 +1,10 @@
 dnl Checks for programs.
 dnl Unique-to-Samba variables we'll be playing with.
 
-DYNEXP=
-
 AC_SUBST(SHLIBEXT)
 AC_SUBST(LDSHFLAGS)
 AC_SUBST(SONAMEFLAG)
+AC_SUBST(DYNEXP)
 AC_SUBST(PICFLAG)
 
 AC_SYS_LARGEFILE
@@ -103,6 +102,7 @@ AC_SUBST(BLDSHARED)
 BLDSHARED="false"
 
 # these are the defaults, good for lots of systems
+DYNEXP=
 HOST_OS="$host_os"
 LDSHFLAGS="-shared"
 SONAMEFLAG=""
index c21c3b8082bad932fa3b2c9843a8344b18b47144..cc15e9099abcb5a858ce05b991a10f0cf9e17c42 100644 (file)
@@ -1,8 +1,8 @@
+- replace StrnCpy() with strlcpy()
+- Add --export-dynamic for each subsystem that has modules
 - let the build system implement some make functions($(patsubst),$(wildcard),...) and use our own implementations where `make' does not support them
 - include extra_flags.txt using Makefile construction if 
   supported by current make
-- change default subsystem/library build type to STATIC_LIBRARY
- - fix order of UNIQUE_DEPENDENCIES
 - make --enable-dso the default
  - fix module loading for selftest during non-developer builds
 - clearer distinction between dcerpc and ndr. seperate interface tables?
index b2a71969af2badd050461001ecd06cc9b2d25bd0..7a0e40fda5d994928ef331b1fd990f8a8e536aa6 100644 (file)
@@ -27,7 +27,7 @@ sub _prepare_build_h($)
        my @defines = ();
        my $output = "";
 
-       foreach my $key (values %{$depend}) {
+       foreach my $key (values %$depend) {
                my $DEFINE = ();
                next if ($key->{TYPE} ne "LIBRARY" and 
                                 $key->{TYPE} ne "MODULE" and
index 308438166156c6bb6d3ff927729db8a9e5371932..8f7e5e48388ae504a82ca8328343675beb019e54 100644 (file)
@@ -71,8 +71,6 @@ sub check_module($$$)
 
        if ($mod->{OUTPUT_TYPE} eq "SHARED_LIBRARY") {
                $mod->{INSTALLDIR} = "MODULESDIR/$mod->{SUBSYSTEM}";
-               push (@{$mod->{PRIVATE_DEPENDENCIES}}, $mod->{SUBSYSTEM}) unless 
-                       $INPUT->{$mod->{SUBSYSTEM}}->{TYPE} eq "BINARY";
        } else { 
                push (@{$INPUT->{$mod->{SUBSYSTEM}}{INIT_FUNCTIONS}}, $mod->{INIT_FUNCTION}) if defined($mod->{INIT_FUNCTION});
        }
@@ -114,7 +112,6 @@ sub check_binary($$)
        $bin->{OUTPUT_TYPE} = "BINARY";
 }
 
-
 sub import_integrated($$)
 {
        my ($lib, $depend) = @_;
@@ -200,6 +197,7 @@ sub check($$$$$)
        foreach my $k (keys %$INPUT) {
                my $part = $INPUT->{$k};
 
+               $part->{LINK_FLAGS} = [];
                $part->{FULL_OBJ_LIST} = ["\$($part->{TYPE}_$part->{NAME}_OBJ_LIST)"];
 
                check_subsystem($INPUT, $part, $subsys_ot) if ($part->{TYPE} eq "SUBSYSTEM");
@@ -209,6 +207,9 @@ sub check($$$$$)
        }
 
        foreach my $part (values %$INPUT) {
+               if (defined($part->{INIT_FUNCTIONS})) {
+                       push (@{$part->{LINK_FLAGS}}, "\$(DYNEXP)");
+               }
                import_integrated($part, $INPUT);
        }
 
index 61c9214086c44b8c39435875cc17e55a993dc91a..d89be4bebfda58443173edb5ca44830b1e55735d 100644 (file)
@@ -19,14 +19,6 @@ use strict;
 my $INPUT = {};
 my $mkfile = smb_build::config_mk::run_config_mk($INPUT, $config::config{srcdir}, $config::config{builddir}, "main.mk");
 
-my $subsystem_output_type;
-
-if (defined($ENV{"SUBSYSTEM_OUTPUT_TYPE"})) {
-       $subsystem_output_type = $ENV{SUBSYSTEM_OUTPUT_TYPE};
-} else {
-       $subsystem_output_type = "STATIC_LIBRARY";
-}
-
 my $library_output_type;
 if (defined($ENV{"LIBRARY_OUTPUT_TYPE"})) {
        $library_output_type = $ENV{LIBRARY_OUTPUT_TYPE};
@@ -46,9 +38,9 @@ if (defined($ENV{"MODULE_OUTPUT_TYPE"})) {
 }
 
 my $DEPEND = smb_build::input::check($INPUT, \%config::enabled, 
-       $subsystem_output_type, $library_output_type, $module_output_type);
+       "STATIC_LIBRARY", $library_output_type, $module_output_type);
 my $OUTPUT = output::create_output($DEPEND, \%config::config);
-$config::config{SUBSYSTEM_OUTPUT_TYPE} = $subsystem_output_type;
+$config::config{SUBSYSTEM_OUTPUT_TYPE} = "STATIC_LIBRARY";
 $config::config{LIBRARY_OUTPUT_TYPE} = $library_output_type;
 $config::config{MODULE_OUTPUT_TYPE} = $module_output_type;
 my $mkenv = new smb_build::makefile(\%config::config, $mkfile);
index 3f0f29f208c5907f34a6460811fb7f31ff9a0fd7..bf12de628f1e1a52d79cef652e951a0b1c01012f 100644 (file)
@@ -144,6 +144,7 @@ STLD_FLAGS=-rc
 SHLD=$self->{config}->{CC}
 SHLD_FLAGS=$self->{config}->{LDSHFLAGS} $self->{config}->{LDFLAGS} -L\$(builddir)/bin
 SHLIBEXT=$self->{config}->{SHLIBEXT}
+DYNEXP=$self->{config}->{DYNEXP}
 
 XSLTPROC=$self->{config}->{XSLTPROC}
 
index 0f66ef91fe2ae7b484703bcd770523a12ce0ff24..85c78cf3b46278376b16755742fd187a6552185b 100644 (file)
@@ -33,7 +33,7 @@ sub generate_shared_library($)
        my $lib_name;
 
        $lib->{DEPEND_LIST} = [];
-       $lib->{LINK_FLAGS} = ["\$($lib->{TYPE}_$lib->{NAME}\_OBJ_LIST)"];
+       push(@{$lib->{LINK_FLAGS}}, "\$($lib->{TYPE}_$lib->{NAME}\_OBJ_LIST)");
 
        $link_name = lc($lib->{NAME});
        $lib_name = $link_name;
@@ -83,7 +83,7 @@ sub generate_static_library($)
        $link_name =~ s/^LIB//;
 
        $lib->{LIBRARY_NAME} = "lib".lc($link_name).".a";
-       $lib->{LINK_FLAGS} = ["\$($lib->{TYPE}_$lib->{NAME}\_OBJ_LIST)"];
+       push(@{$lib->{LINK_FLAGS}}, "\$($lib->{TYPE}_$lib->{NAME}\_OBJ_LIST)");
 
        $lib->{TARGET} = "bin/$lib->{LIBRARY_NAME}";
        $lib->{OUTPUT} = "-l".lc($link_name);
@@ -94,7 +94,7 @@ sub generate_binary($)
        my $bin = shift;
 
        $bin->{DEPEND_LIST} = [];
-       $bin->{LINK_FLAGS} = ["\$($bin->{TYPE}_$bin->{NAME}\_OBJ_LIST)"];
+       push(@{$bin->{LINK_FLAGS}}, "\$($bin->{TYPE}_$bin->{NAME}\_OBJ_LIST)");
 
        $bin->{RELEASEDIR} = "bin/install";
        $bin->{DEBUGDIR} = "bin/";
index 750c6572a4807210d5d3209b7f91c5936a501358..51057b5a0a1abd7fd037629c6984f183b19eed18 100644 (file)
@@ -294,7 +294,7 @@ VERSION = 0.0.1
 SO_VERSION = 0
 OBJ_FILES = gen_ndr/ndr_netlogon.o
 PUBLIC_HEADERS = gen_ndr/netlogon.h
-PUBLIC_DEPENDENCIES = LIBNDR NDR_SAMR NDR_LSA
+PUBLIC_DEPENDENCIES = LIBNDR NDR_SAMR NDR_LSA NDR_SECURITY
 
 [LIBRARY::NDR_TRKWKS]
 VERSION = 0.0.1
@@ -605,11 +605,11 @@ OBJ_FILES = \
                rpc/dcerpc_sock.o \
                rpc/dcerpc_connect.o
 PUBLIC_DEPENDENCIES = \
-               SOCKET LIBSMB \
+               SOCKET LIBSMB LIBCLI_SMB2 \
                LIBNDR NDR_DCERPC \
                RPC_NDR_EPMAPPER \
                NDR_SCHANNEL RPC_NDR_NETLOGON \
-               gensec
+               gensec LIBCLI_AUTH
 # End SUBSYSTEM dcerpc
 ################################################
 
index 8e3d469e497d365228561d73c84d3b00c5c4b846..6130d7ce9f2bbb065e989e354b6cc7bf4fae15f7 100644 (file)
@@ -1,12 +1,16 @@
 # SMB server subsystem
+#
+[MODULE::SERVICE_SMB]
+INIT_FUNCTION = server_service_smb_init
+SUBSYSTEM = service
+OBJ_FILES = smb_server.o
+PRIVATE_PROTO_HEADER = service_smb_proto.h
+PRIVATE_DEPENDENCIES = SMB_SERVER
 
 #######################
 # Start SUBSYSTEM SMB
-[MODULE::SMB_SERVER]
-INIT_FUNCTION = server_service_smb_init
-SUBSYSTEM = service
+[SUBSYSTEM::SMB_SERVER]
 OBJ_FILES = \
-               smb_server.o \
                tcon.o \
                session.o \
                management.o
index 4a14ccb5d8a6afea8a359c2eff22134c0d02d5f1..5f1e75447b3562f4af1a63b8af77018de0883ae2 100644 (file)
@@ -23,6 +23,7 @@
 #include "smb_server/smb_server.h"
 #include "libcli/smb2/smb2.h"
 #include "smb_server/smb2/smb2_server.h"
+#include "smb_server/service_smb_proto.h"
 #include "smbd/service_stream.h"
 #include "lib/stream/packet.h"
 
index aff5e88285d86e449365ca642b05e6387683540f..ee728e0ec56ead2d678a36f37559787c0570fb41 100644 (file)
@@ -24,6 +24,7 @@
 #include "system/time.h"
 #include "smbd/service_stream.h"
 #include "smb_server/smb_server.h"
+#include "smb_server/service_smb_proto.h"
 #include "ntvfs/ntvfs.h"
 
 
index 3c5b8c10c7f38401900344cd43c20a08e939a8a4..21f89f40f9411d37e1a6a78b0900fc42537e7e01 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "includes.h"
 #include "smb_server/smb_server.h"
+#include "smb_server/service_smb_proto.h"
 #include "smbd/service_stream.h"
 #include "lib/stream/packet.h"
 #include "ntvfs/ntvfs.h"
index 65d21babd9badd8555147e28bf1efb906a5bc2c9..ca8983d5e2c1c84089b03aa1e4ce3502008bfde2 100644 (file)
@@ -21,6 +21,7 @@
 #include "includes.h"
 #include "libcli/smb2/smb2.h"
 #include "smb_server/smb_server.h"
+#include "smb_server/service_smb_proto.h"
 #include "smb_server/smb2/smb2_server.h"
 
 static NTSTATUS smb2srv_keepalive_backend(struct smb2srv_request *req)
index 6aab25427febe064d84a3fd3b1b9ff0efe53d303..351c9e718fd1de6bba042606cf50cfc3a01e7633 100644 (file)
@@ -24,6 +24,7 @@
 #include "libcli/smb2/smb2.h"
 #include "libcli/smb2/smb2_calls.h"
 #include "smb_server/smb_server.h"
+#include "smb_server/service_smb_proto.h"
 #include "smb_server/smb2/smb2_server.h"
 #include "smbd/service_stream.h"
 
index 46923988bb6ea5cea5636742f74b140d8b47e0af..e27e622a4a9b1c2e43db5d5b80cba79c463b719e 100644 (file)
@@ -24,6 +24,7 @@
 #include "libcli/smb2/smb2.h"
 #include "libcli/smb2/smb2_calls.h"
 #include "smb_server/smb_server.h"
+#include "smb_server/service_smb_proto.h"
 #include "smb_server/smb2/smb2_server.h"
 #include "lib/stream/packet.h"
 
index b263196165da0690c018b059e1bb692bb560ff4b..6d94d431551cb0941153c2a1f506ef7f9b7a050d 100644 (file)
@@ -24,6 +24,7 @@
 #include "libcli/smb2/smb2.h"
 #include "libcli/smb2/smb2_calls.h"
 #include "smb_server/smb_server.h"
+#include "smb_server/service_smb_proto.h"
 #include "smb_server/smb2/smb2_server.h"
 #include "smbd/service_stream.h"
 
index 836c13a019f43e8a3e99468777ff79877557c307..8d6c002d5074902f9faa8f6b3d7c848cd6b7b467 100644 (file)
@@ -22,6 +22,7 @@
 #include "libcli/smb2/smb2.h"
 #include "libcli/smb2/smb2_calls.h"
 #include "smb_server/smb_server.h"
+#include "smb_server/service_smb_proto.h"
 #include "smb_server/smb2/smb2_server.h"
 
 static NTSTATUS smb2srv_tcon_backend(struct smb2srv_request *req, struct smb2_tree_connect *io)
index 927609226b63d8a8f85fd2ea08fd3e90c1133642..ef8967f0b26e6c8a927e3a1727c890a326ee93f0 100644 (file)
@@ -24,6 +24,7 @@
 #include "smbd/service_stream.h"
 #include "smbd/service.h"
 #include "smb_server/smb_server.h"
+#include "smb_server/service_smb_proto.h"
 #include "lib/messaging/irpc.h"
 #include "lib/stream/packet.h"
 #include "libcli/smb2/smb2.h"