The branch, v3-6-test has been updated
       via  6b19ab3 s3-build: only link in epmapper client code where needed.
       via  19982c8 s3-waf: only link in epmapper client code where needed.
       via  3dbbea4 s3-build: only link in netlogon client code where needed.
       via  7e2f869 s3-waf: only link in netlogon client code where needed.
       via  ec057e2 s3: separate out cli schannel functions that depend on 
cli_netlogon.
       via  bf5fb3b s3-build: only link in samr client code where needed.
       via  2b5baf8 s3-waf: only link in samr client code where needed.
       via  01b1845 s3-build: only link in lsa client code where needed.
       via  a987307 s3-waf: only link in lsa client code where needed.
       via  6413d17 s3-build: only link in srvsvc client code where needed.
       via  217d9be s3-waf: only link in srvsvc client code where needed.
       via  5cba245 s3-build: only link in wkssvc client code where needed.
       via  6243313 s3-waf: only link in wkssvc client code where needed.
       via  8c7d73d s3-build: only link in svcctl client code where needed.
       via  0b74d6e s3-waf: only link in svcctl client code where needed.
       via  099c370 s3-build: only link in dssetup client code where needed.
       via  26bf8f7 s3-waf: only link in dssetup client code where needed.
       via  1e522b4 s3-build: only link in initshutdown client code where 
needed.
       via  1b7075e s3-waf: only link in initshutdown client code where needed.
       via  65f0487 s3-build: only link in echo client code where needed.
       via  3d01c07 s3-waf: only link in eventlog echo code where needed.
       via  0715202 s3-build: only link in dfs client code where needed.
       via  e7ceb32 s3-waf: only link in dfs client code where needed.
       via  7b090ae s3-build: only link in drsuapi client code where needed.
       via  2adfcf6 s3-waf: only link in drsuapi client code where needed.
       via  4bb778e s3-build: only link in ntsvcs client code where needed.
       via  6cc701d s3-waf: only link in ntsvcs client code where needed.
       via  2028d98 s3-build: only link in winreg client code where needed.
       via  690a481 s3-waf: only link in winreg client code where needed.
       via  1805984 s3-build: only link in eventlog client code where needed.
       via  792b4bf s3-build: only link in spoolss client code where needed.
       via  1c0f729 s3-waf: only link in spoolss client code where needed.
      from  fd07404 s3-waf: Try to fix the idl build. (cherry picked from 
commit 1b022d1d3d613d2299350f9c8cea8cec4510d0b2)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -----------------------------------------------------------------
commit 6b19ab3612a9ce204fb2afe25916b55e91f1ab82
Author: Günther Deschner <g...@samba.org>
Date:   Wed Aug 25 23:53:24 2010 +0200

    s3-build: only link in epmapper client code where needed.
    
    Guenther
    (cherry picked from commit 88720f80c5682ae8043f2c0558cc43354ad472b7)

commit 19982c882884b06df5c79de01330eb5b3c61096c
Author: Günther Deschner <g...@samba.org>
Date:   Tue Aug 17 00:59:23 2010 +0200

    s3-waf: only link in epmapper client code where needed.
    
    Guenther
    (cherry picked from commit 4d78984570223a803353490b1fa39793ba9b98b3)

commit 3dbbea4a53a076814195dada974a3486e8d15ccd
Author: Günther Deschner <g...@samba.org>
Date:   Wed Aug 25 23:15:52 2010 +0200

    s3-build: only link in netlogon client code where needed.
    
    Guenther
    (cherry picked from commit ff5ab04882b1ae5940b0e9f41174d6e4e4b8f863)

commit 7e2f869ca8296a937243ded7233efd6933cceaa5
Author: Günther Deschner <g...@samba.org>
Date:   Wed Aug 25 23:14:33 2010 +0200

    s3-waf: only link in netlogon client code where needed.
    
    Guenther
    (cherry picked from commit 13cff589178fdb03dfa35113930e85c50e368494)

commit ec057e2e1d0d451193a7722c54f30738161c18a3
Author: Günther Deschner <g...@samba.org>
Date:   Tue Aug 17 00:46:25 2010 +0200

    s3: separate out cli schannel functions that depend on cli_netlogon.
    
    Guenther
    (cherry picked from commit 0ed16e94c374efb06650f741827bcbed85f1af59)

commit bf5fb3babe693cdbdc2a0efd42378244502bf147
Author: Günther Deschner <g...@samba.org>
Date:   Fri Aug 13 12:32:53 2010 +0200

    s3-build: only link in samr client code where needed.
    
    Guenther
    (cherry picked from commit 064826c4d17f71e30386ff775935f86dd426f124)

commit 2b5baf8500acb2e8f193a9e7981651d1dd93fcdd
Author: Günther Deschner <g...@samba.org>
Date:   Fri Aug 13 12:27:20 2010 +0200

    s3-waf: only link in samr client code where needed.
    
    Guenther
    (cherry picked from commit 6810ead40dc216c17c6ba1a9731d2598bf342c6d)

commit 01b18459b4c50411bbb16f4e89500c1480f8dec7
Author: Günther Deschner <g...@samba.org>
Date:   Thu Aug 12 19:13:16 2010 +0200

    s3-build: only link in lsa client code where needed.
    
    Guenther
    (cherry picked from commit 1895d669c260dfd0632d8ff88759bfd407286fa1)

commit a987307739d67a31c26f1cd09f365b5b34e00b0d
Author: Günther Deschner <g...@samba.org>
Date:   Thu Aug 12 19:06:57 2010 +0200

    s3-waf: only link in lsa client code where needed.
    
    Guenther
    (cherry picked from commit c107c662030d8874d4e359a1ec5075b4bfa6c39a)

commit 6413d1764998f1e946ebc19dd7acac6a89bea679
Author: Günther Deschner <g...@samba.org>
Date:   Thu Aug 12 18:58:49 2010 +0200

    s3-build: only link in srvsvc client code where needed.
    
    Guenther
    (cherry picked from commit 562c5999ec636227a3b66bba314481f8367df90a)

commit 217d9bea25f58241a1869f3b9394d12aea6113ba
Author: Günther Deschner <g...@samba.org>
Date:   Thu Aug 12 18:52:23 2010 +0200

    s3-waf: only link in srvsvc client code where needed.
    
    Guenther
    (cherry picked from commit 0d0deba7bc8a8b1d7cdfa54f25111d9002ca50ee)

commit 5cba245b518beac8ceebfb89e93befc0152a8e4c
Author: Günther Deschner <g...@samba.org>
Date:   Thu Aug 12 18:47:51 2010 +0200

    s3-build: only link in wkssvc client code where needed.
    
    Guenther
    (cherry picked from commit 0ae0ca062bb040cc317cc767f37bfa693fb498a1)

commit 62433132ec6972c124382b5f7ba3e77a5c32ff91
Author: Günther Deschner <g...@samba.org>
Date:   Thu Aug 12 18:47:38 2010 +0200

    s3-waf: only link in wkssvc client code where needed.
    
    Guenther
    (cherry picked from commit cfca94656a182522e1c36feda3455a05277cf486)

commit 8c7d73d0d86bf8f5b99592267a871cd2d3cd75b8
Author: Günther Deschner <g...@samba.org>
Date:   Thu Aug 12 18:42:06 2010 +0200

    s3-build: only link in svcctl client code where needed.
    
    Guenther
    (cherry picked from commit 2190386518d9f10f754f91785b1f78b584f3cf4b)

commit 0b74d6e5b6ece83ca240b58f46d4aef6edb2a7f8
Author: Günther Deschner <g...@samba.org>
Date:   Thu Aug 12 18:41:45 2010 +0200

    s3-waf: only link in svcctl client code where needed.
    
    Guenther
    (cherry picked from commit 03269d678351ea14cfede4d30291ca1bde294ff8)

commit 099c370373558fbca70f0404d252bbc7fd375d29
Author: Günther Deschner <g...@samba.org>
Date:   Thu Aug 12 18:36:16 2010 +0200

    s3-build: only link in dssetup client code where needed.
    
    Guenther
    (cherry picked from commit 9a195fd2330c13b3e9cb4029d41f640e85738d14)

commit 26bf8f71dfc754a1eceee00d7ba0b06ad794af04
Author: Günther Deschner <g...@samba.org>
Date:   Thu Aug 12 18:36:06 2010 +0200

    s3-waf: only link in dssetup client code where needed.
    
    Guenther
    (cherry picked from commit 2d72cab5d088fb87e23eebe45cea6735a2770712)

commit 1e522b4b9902ac9e628e0f0cd251c0e69144a97f
Author: Günther Deschner <g...@samba.org>
Date:   Thu Aug 12 18:30:57 2010 +0200

    s3-build: only link in initshutdown client code where needed.
    
    Guenther
    (cherry picked from commit 5c8b54820bf8b57977c38536a5a3e6c76c21dfe2)

commit 1b7075e277706cbf2328c1bbddff63efb05d8d45
Author: Günther Deschner <g...@samba.org>
Date:   Thu Aug 12 18:30:46 2010 +0200

    s3-waf: only link in initshutdown client code where needed.
    
    Guenther
    (cherry picked from commit e25e9bec2489fe9ac13b59747ec1786969166889)

commit 65f048789e9a406a718e3cfb0e1ac69d9d0c782d
Author: Günther Deschner <g...@samba.org>
Date:   Thu Aug 12 18:22:31 2010 +0200

    s3-build: only link in echo client code where needed.
    
    Guenther
    (cherry picked from commit f97ff9d440316416eb91e30a48bffdf2aa207610)

commit 3d01c07d168d9e914381b6e72529a088f6061d5c
Author: Günther Deschner <g...@samba.org>
Date:   Thu Aug 12 18:22:19 2010 +0200

    s3-waf: only link in eventlog echo code where needed.
    
    Guenther
    (cherry picked from commit 3b24db6bf8fd0e9e8ff21cf4578256f8462d26ef)

commit 0715202a22adb91e57b9ee287e2ad8b84b4b8ecf
Author: Günther Deschner <g...@samba.org>
Date:   Thu Aug 12 17:50:37 2010 +0200

    s3-build: only link in dfs client code where needed.
    
    Guenther
    (cherry picked from commit 0f10349f14e2439dedc2448d3649a5fea53c9dd4)

commit e7ceb32ca18d66a71fbedfbeae7fcf691373692b
Author: Günther Deschner <g...@samba.org>
Date:   Thu Aug 12 17:47:48 2010 +0200

    s3-waf: only link in dfs client code where needed.
    
    Guenther
    (cherry picked from commit 09b973f6bb9801c75cf623019b4b6b830ec8fae0)

commit 7b090aeef8bc229d821b3d3c88b72f1e22157332
Author: Günther Deschner <g...@samba.org>
Date:   Thu Aug 12 17:45:54 2010 +0200

    s3-build: only link in drsuapi client code where needed.
    
    Guenther
    (cherry picked from commit a66bb0d8ec40208020b4ce8cf80e110ec8e2a5e2)

commit 2adfcf6844082c9a6f5341b07931a7f366a9bf3f
Author: Günther Deschner <g...@samba.org>
Date:   Thu Aug 12 17:42:59 2010 +0200

    s3-waf: only link in drsuapi client code where needed.
    
    Guenther
    (cherry picked from commit bd22ef79c2a8167da0783f9759fd7df63554a146)

commit 4bb778e0c2ae13bc8024725846613248648145e9
Author: Günther Deschner <g...@samba.org>
Date:   Thu Aug 12 17:40:18 2010 +0200

    s3-build: only link in ntsvcs client code where needed.
    
    Guenther
    (cherry picked from commit 4dbb682bc5ee9b1893ad815b710aac46d5bf94db)

commit 6cc701de0499a6f6e855807e14335dfe8a07e317
Author: Günther Deschner <g...@samba.org>
Date:   Thu Aug 12 17:38:09 2010 +0200

    s3-waf: only link in ntsvcs client code where needed.
    
    Guenther
    (cherry picked from commit 1a00dd4aa7372e9ca9066b28f1ff7aaa7ce3d3a4)

commit 2028d982b3b617c901817d2a0da169c899b33672
Author: Günther Deschner <g...@samba.org>
Date:   Thu Aug 12 17:35:24 2010 +0200

    s3-build: only link in winreg client code where needed.
    
    Guenther
    (cherry picked from commit 50df1c6f8726f5f34c6031c70ae3df7026f949f4)

commit 690a4810a64e9b84d2c4fc9cd3fff07eb5b33cd5
Author: Günther Deschner <g...@samba.org>
Date:   Thu Aug 12 17:31:40 2010 +0200

    s3-waf: only link in winreg client code where needed.
    
    Guenther
    (cherry picked from commit ad855c0970c939da7bfe719a4707cf7f39eff330)

commit 1805984ccd1c6fa8bc3b08e9444c0ee5b227731f
Author: Günther Deschner <g...@samba.org>
Date:   Thu Aug 12 17:28:48 2010 +0200

    s3-build: only link in eventlog client code where needed.
    
    Guenther
    (cherry picked from commit 2af95fc88b95e0c251ef6df8084ac55ad73ade1a)

commit 792b4bfbd7786a6bed263e02433a0e6adcc81a09
Author: Günther Deschner <g...@samba.org>
Date:   Thu Aug 12 17:19:59 2010 +0200

    s3-build: only link in spoolss client code where needed.
    
    Shrinks a lot of binaries by 1 MB each.
    
    Guenther
    (cherry picked from commit dc663295d19357773a0c5d990f50be831a1e76e8)

commit 1c0f72986a2255218ab1bcb667d64f2dd9b4241d
Author: Günther Deschner <g...@samba.org>
Date:   Thu Aug 12 17:19:24 2010 +0200

    s3-waf: only link in spoolss client code where needed.
    
    Shrinks a lot of binaries by 1 MB each.
    
    Guenther
    (cherry picked from commit 72f30e82e406ae3690c0d324b844fc6b3a4c02c4)

-----------------------------------------------------------------------

Summary of changes:
 source3/Makefile.in                    |  174 +++++++++++++++++--------
 source3/rpc_client/cli_pipe.c          |  200 ----------------------------
 source3/rpc_client/cli_pipe_schannel.c |  228 ++++++++++++++++++++++++++++++++
 source3/wscript_build                  |  134 +++++++++++++------
 4 files changed, 440 insertions(+), 296 deletions(-)
 create mode 100644 source3/rpc_client/cli_pipe_schannel.c


Changeset truncated at 500 lines:

diff --git a/source3/Makefile.in b/source3/Makefile.in
index c8c73f5..c2e6f57 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -336,6 +336,59 @@ LIBNDR_PREG_OBJ = librpc/gen_ndr/ndr_preg.o \
 LIBNDR_XATTR_OBJ = librpc/gen_ndr/ndr_xattr.o \
                   ../librpc/ndr/ndr_xattr.o
 
+LIBCLI_SPOOLSS_OBJ = librpc/gen_ndr/cli_spoolss.o \
+                    librpc/gen_ndr/ndr_spoolss_c.o \
+                    rpc_client/cli_spoolss.o \
+                    rpc_client/init_spoolss.o
+
+LIBCLI_EVENTLOG_OBJ = librpc/gen_ndr/cli_eventlog.o \
+                     librpc/gen_ndr/ndr_eventlog_c.o
+
+LIBCLI_WINREG_OBJ = librpc/gen_ndr/cli_winreg.o \
+                    librpc/gen_ndr/ndr_winreg_c.o
+
+LIBCLI_NTSVCS_OBJ = librpc/gen_ndr/cli_ntsvcs.o \
+                   librpc/gen_ndr/ndr_ntsvcs_c.o
+
+LIBCLI_DRSUAPI_OBJ = librpc/gen_ndr/cli_drsuapi.o \
+                    librpc/gen_ndr/ndr_drsuapi_c.o
+
+LIBCLI_DFS_OBJ = librpc/gen_ndr/cli_dfs.o \
+                librpc/gen_ndr/ndr_dfs_c.o
+
+LIBCLI_ECHO_OBJ = librpc/gen_ndr/cli_echo.o \
+                 librpc/gen_ndr/ndr_echo_c.o
+
+LIBCLI_INITSHUTDOWN_OBJ = librpc/gen_ndr/cli_initshutdown.o \
+                         librpc/gen_ndr/ndr_initshutdown_c.o
+
+LIBCLI_DSSETUP_OBJ = librpc/gen_ndr/cli_dssetup.o \
+                    librpc/gen_ndr/ndr_dssetup_c.o
+
+LIBCLI_SVCCTL_OBJ = librpc/gen_ndr/cli_svcctl.o \
+                   librpc/gen_ndr/ndr_svcctl_c.o
+
+LIBCLI_WKSSVC_OBJ = librpc/gen_ndr/cli_wkssvc.o \
+                   librpc/gen_ndr/ndr_wkssvc_c.o
+
+LIBCLI_SRVSVC_OBJ = librpc/gen_ndr/cli_srvsvc.o \
+                   librpc/gen_ndr/ndr_srvsvc_c.o
+
+LIBCLI_LSA_OBJ = librpc/gen_ndr/cli_lsa.o \
+                librpc/gen_ndr/ndr_lsa_c.o \
+                rpc_client/cli_lsarpc.o
+
+LIBCLI_SAMR_OBJ = librpc/gen_ndr/cli_samr.o \
+                 librpc/gen_ndr/ndr_samr_c.o \
+                 rpc_client/cli_samr.o
+
+LIBCLI_NETLOGON_OBJ = librpc/gen_ndr/cli_netlogon.o \
+                     librpc/gen_ndr/ndr_netlogon_c.o \
+                     rpc_client/cli_netlogon.o
+
+LIBCLI_EPMAPPER_OBJ = librpc/gen_ndr/cli_epmapper.o \
+                     librpc/gen_ndr/ndr_epmapper_c.o
+
 LIBNDR_GEN_OBJ = librpc/gen_ndr/ndr_wkssvc.o \
                 $(LIBNDR_GEN_OBJ0) \
                 librpc/gen_ndr/ndr_dfs.o \
@@ -542,52 +595,15 @@ LIBSMB_OBJ = libsmb/clientgen.o libsmb/cliconnect.o 
libsmb/clifile.o \
             $(CLDAP_OBJ) \
             $(DRSUAPI_OBJ)
 
-RPC_CLIENT_OBJ1 = rpc_client/cli_netlogon.o \
-                 $(SCHANNEL_OBJ)
+RPC_CLIENT_OBJ1 = $(SCHANNEL_OBJ)
 
-LIBMSRPC_OBJ = rpc_client/cli_lsarpc.o rpc_client/cli_samr.o \
+LIBMSRPC_OBJ = \
               $(RPC_CLIENT_OBJ1) \
               $(RPC_CLIENT_OBJ) \
-              rpc_client/cli_spoolss.o \
-              rpc_client/init_spoolss.o \
               rpc_client/init_samr.o \
                   ../librpc/rpc/binding.o
 
-DCERPC_CLIENT_GEN_OBJ = \
-               librpc/gen_ndr/ndr_lsa_c.o \
-               librpc/gen_ndr/ndr_dfs_c.o \
-               librpc/gen_ndr/ndr_echo_c.o \
-               librpc/gen_ndr/ndr_srvsvc_c.o \
-               librpc/gen_ndr/ndr_svcctl_c.o \
-               librpc/gen_ndr/ndr_winreg_c.o \
-               librpc/gen_ndr/ndr_initshutdown_c.o \
-               librpc/gen_ndr/ndr_eventlog_c.o \
-               librpc/gen_ndr/ndr_wkssvc_c.o \
-               librpc/gen_ndr/ndr_netlogon_c.o \
-               librpc/gen_ndr/ndr_samr_c.o \
-               librpc/gen_ndr/ndr_dssetup_c.o \
-               librpc/gen_ndr/ndr_ntsvcs_c.o \
-               librpc/gen_ndr/ndr_epmapper_c.o \
-               librpc/gen_ndr/ndr_drsuapi_c.o \
-               librpc/gen_ndr/ndr_spoolss_c.o
-
-LIBMSRPC_GEN_OBJ = librpc/gen_ndr/cli_lsa.o \
-                  librpc/gen_ndr/cli_dfs.o \
-                  librpc/gen_ndr/cli_echo.o \
-                  librpc/gen_ndr/cli_srvsvc.o \
-                  librpc/gen_ndr/cli_svcctl.o \
-                  librpc/gen_ndr/cli_winreg.o \
-                  librpc/gen_ndr/cli_initshutdown.o \
-                  librpc/gen_ndr/cli_eventlog.o \
-                  librpc/gen_ndr/cli_wkssvc.o \
-                  librpc/gen_ndr/cli_netlogon.o \
-                  librpc/gen_ndr/cli_samr.o \
-                  librpc/gen_ndr/cli_dssetup.o \
-                  librpc/gen_ndr/cli_ntsvcs.o \
-                  librpc/gen_ndr/cli_epmapper.o \
-                  librpc/gen_ndr/cli_drsuapi.o \
-                  librpc/gen_ndr/cli_spoolss.o \
-                  $(DCERPC_CLIENT_GEN_OBJ) \
+LIBMSRPC_GEN_OBJ = $(LIBCLI_EPMAPPER_OBJ) \
                   ../librpc/rpc/dcerpc_util.o \
                   ../librpc/rpc/binding_handle.o \
                   librpc/rpc/dcerpc_helpers.o \
@@ -694,7 +710,14 @@ RPC_PIPE_OBJ = rpc_server/srv_pipe.o 
rpc_server/srv_pipe_hnd.o \
 
 RPC_ECHO_OBJ = rpc_server/srv_echo_nt.o librpc/gen_ndr/srv_echo.o
 
-RPC_SERVER_OBJ = @RPC_STATIC@ $(RPC_PIPE_OBJ) $(NPA_TSTREAM_OBJ)
+RPC_SERVER_OBJ = @RPC_STATIC@ $(RPC_PIPE_OBJ) $(NPA_TSTREAM_OBJ) \
+                 $(LIBCLI_SPOOLSS_OBJ) \
+                $(LIBCLI_WINREG_OBJ) \
+                $(LIBCLI_SRVSVC_OBJ) \
+                $(LIBCLI_LSA_OBJ) \
+                $(LIBCLI_SAMR_OBJ) \
+                $(LIBCLI_NETLOGON_OBJ) \
+                $(RPC_CLIENT_SCHANNEL_OBJ)
 
 RPC_CLIENT_OBJ = rpc_client/cli_pipe.o \
                 librpc/rpc/dcerpc_gssapi.o \
@@ -703,6 +726,8 @@ RPC_CLIENT_OBJ = rpc_client/cli_pipe.o \
                 rpc_client/rpc_transport_np.o \
                 rpc_client/rpc_transport_sock.o
 
+RPC_CLIENT_SCHANNEL_OBJ = rpc_client/cli_pipe_schannel.o
+
 LOCKING_OBJ = locking/locking.o locking/brlock.o locking/posix.o
 
 PRIVILEGES_BASIC_OBJ = lib/privileges_basic.o
@@ -918,7 +943,8 @@ SWAT_OBJ = $(SWAT_OBJ1) $(PARAM_OBJ) $(PRINTING_OBJ) 
$(PRINTBASE_OBJ) $(LIBSMB_O
           $(LOCKING_OBJ) $(PASSDB_OBJ) $(KRBCLIENT_OBJ) \
           $(LIB_NONSMBD_OBJ) $(GROUPDB_OBJ) $(PLAINTEXT_AUTH_OBJ) \
           $(POPT_LIB_OBJ) $(SMBLDAP_OBJ) $(RPC_PARSE_OBJ) $(LIBMSRPC_GEN_OBJ) 
$(LIBMSRPC_OBJ) \
-           $(PASSCHANGE_OBJ) $(FNAME_UTIL_OBJ)
+           $(PASSCHANGE_OBJ) $(FNAME_UTIL_OBJ) \
+          $(LIBCLI_SAMR_OBJ)
 
 STATUS_OBJ = utils/status.o utils/status_profile.o \
             $(LOCKING_OBJ) $(PARAM_OBJ) \
@@ -934,7 +960,8 @@ SMBTREE_OBJ = utils/smbtree.o $(PARAM_OBJ) \
              $(RPC_CLIENT_OBJ) ../librpc/rpc/binding.o $(RPC_PARSE_OBJ) \
              $(RPC_CLIENT_OBJ1) \
             $(PASSDB_OBJ) $(SMBLDAP_OBJ) $(GROUPDB_OBJ) \
-            $(LIBMSRPC_GEN_OBJ)
+            $(LIBMSRPC_GEN_OBJ) \
+            $(LIBCLI_SRVSVC_OBJ)
 
 TESTPARM_OBJ = utils/testparm.o \
                $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) \
@@ -954,7 +981,8 @@ SMBPASSWD_OBJ = utils/smbpasswd.o $(PASSWD_UTIL_OBJ) 
$(PASSCHANGE_OBJ) \
                $(PARAM_OBJ) $(LIBSMB_OBJ) $(PASSDB_OBJ) \
                $(GROUPDB_OBJ) $(LIB_NONSMBD_OBJ) $(KRBCLIENT_OBJ) \
                $(POPT_LIB_OBJ) $(SMBLDAP_OBJ) $(RPC_PARSE_OBJ) \
-               $(LIBMSRPC_GEN_OBJ) $(LIBMSRPC_OBJ)
+               $(LIBMSRPC_GEN_OBJ) $(LIBMSRPC_OBJ) \
+               $(LIBCLI_SAMR_OBJ)
 
 PDBEDIT_OBJ = utils/pdbedit.o $(PASSWD_UTIL_OBJ) $(PARAM_OBJ) $(PASSDB_OBJ) \
                $(LIBSAMBA_OBJ) $(LIBTSOCKET_OBJ) \
@@ -980,7 +1008,20 @@ RPCCLIENT_OBJ = $(RPCCLIENT_OBJ1) \
              $(RPC_PARSE_OBJ) $(PASSDB_OBJ) $(LIBMSRPC_GEN_OBJ) 
$(LIBMSRPC_OBJ) \
              $(READLINE_OBJ) $(GROUPDB_OBJ) $(KRBCLIENT_OBJ) \
             $(LIBADS_OBJ) $(POPT_LIB_OBJ) \
-            $(SMBLDAP_OBJ) $(DCUTIL_OBJ)
+            $(SMBLDAP_OBJ) $(DCUTIL_OBJ) \
+            $(LIBCLI_SPOOLSS_OBJ) \
+            $(LIBCLI_EVENTLOG_OBJ) \
+            $(LIBCLI_NTSVCS_OBJ) \
+            $(LIBCLI_DRSUAPI_OBJ) \
+            $(LIBCLI_DFS_OBJ) \
+            $(LIBCLI_ECHO_OBJ) \
+            $(LIBCLI_DSSETUP_OBJ) \
+            $(LIBCLI_WKSSVC_OBJ) \
+            $(LIBCLI_SRVSVC_OBJ) \
+            $(LIBCLI_LSA_OBJ) \
+            $(LIBCLI_SAMR_OBJ) \
+            $(LIBCLI_NETLOGON_OBJ) \
+            $(RPC_CLIENT_SCHANNEL_OBJ)
 
 PAM_WINBIND_OBJ = ../nsswitch/pam_winbind.o $(WBCOMMON_OBJ) \
                  $(LIBREPLACE_OBJ) @BUILD_INIPARSER@
@@ -1007,7 +1048,9 @@ LIBSMBCLIENT_OBJ1 = $(LIBSMBCLIENT_OBJ0) \
                    $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
                    $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
                    $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) $(RPC_PARSE_OBJ) \
-                   $(PASSDB_OBJ) $(SMBLDAP_OBJ) $(GROUPDB_OBJ)
+                   $(PASSDB_OBJ) $(SMBLDAP_OBJ) $(GROUPDB_OBJ) \
+                   $(LIBCLI_SRVSVC_OBJ) \
+                   $(LIBCLI_LSA_OBJ)
 
 LIBSMBCLIENT_OBJ = $(LIBSMBCLIENT_OBJ1)
 
@@ -1031,7 +1074,8 @@ CLIENT_OBJ = $(CLIENT_OBJ1) $(PARAM_OBJ) $(LIBSMB_OBJ) \
             $(LIB_NONSMBD_OBJ) $(KRBCLIENT_OBJ) $(LIBMSRPC_GEN_OBJ) \
              $(READLINE_OBJ) $(POPT_LIB_OBJ) \
              $(PASSDB_OBJ) $(SMBLDAP_OBJ) $(GROUPDB_OBJ) \
-            $(DISPLAY_SEC_OBJ)
+            $(DISPLAY_SEC_OBJ) \
+            $(LIBCLI_SRVSVC_OBJ)
 
 LIBSMBCONF_OBJ = ../lib/smbconf/smbconf.o \
                 ../lib/smbconf/smbconf_util.o \
@@ -1079,8 +1123,19 @@ NET_OBJ1 = utils/net.o utils/net_ads.o utils/net_help.o \
           utils/net_eventlog.o \
           utils/net_printing.o \
           $(LIBNDR_NTPRINTING_OBJ) \
-          $(LIBNDR_PREG_OBJ)
-
+          $(LIBNDR_PREG_OBJ) \
+          $(LIBCLI_SPOOLSS_OBJ) \
+          $(LIBCLI_WINREG_OBJ) \
+          $(LIBCLI_DRSUAPI_OBJ) \
+          $(LIBCLI_INITSHUTDOWN_OBJ) \
+          $(LIBCLI_DSSETUP_OBJ) \
+          $(LIBCLI_SVCCTL_OBJ) \
+          $(LIBCLI_WKSSVC_OBJ) \
+          $(LIBCLI_SRVSVC_OBJ) \
+          $(LIBCLI_LSA_OBJ) \
+          $(LIBCLI_SAMR_OBJ) \
+          $(LIBCLI_NETLOGON_OBJ) \
+          $(RPC_CLIENT_SCHANNEL_OBJ)
 
 # these are not processed by make proto
 NET_OBJ2 = utils/net_registry_util.o utils/net_help_common.o
@@ -1152,13 +1207,15 @@ LOCKTEST2_OBJ = torture/locktest2.o $(PARAM_OBJ) 
$(LOCKING_OBJ) $(LIBSMB_OBJ) \
 SMBCACLS_OBJ = utils/smbcacls.o $(PARAM_OBJ) $(LIBSMB_OBJ) \
                $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) $(RPC_PARSE_OBJ) \
                $(PASSDB_OBJ) $(GROUPDB_OBJ) $(LIBMSRPC_OBJ) 
$(LIBMSRPC_GEN_OBJ) \
-               $(POPT_LIB_OBJ) $(SMBLDAP_OBJ)
+               $(POPT_LIB_OBJ) $(SMBLDAP_OBJ) \
+               $(LIBCLI_LSA_OBJ)
 
 SMBCQUOTAS_OBJ = utils/smbcquotas.o $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
                $(PARAM_OBJ) \
                $(LIB_NONSMBD_OBJ) $(RPC_PARSE_OBJ) \
                $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) $(POPT_LIB_OBJ) \
-               $(PASSDB_OBJ) $(SMBLDAP_OBJ) $(GROUPDB_OBJ)
+               $(PASSDB_OBJ) $(SMBLDAP_OBJ) $(GROUPDB_OBJ) \
+               $(LIBCLI_LSA_OBJ)
 
 EVTLOGADM_OBJ0 = utils/eventlogadm.o
 
@@ -1323,7 +1380,11 @@ WINBINDD_OBJ = \
                $(RPC_NCACN_NP_INTERNAL) $(RPC_SAMR_OBJ) $(RPC_LSA_OBJ) \
                $(AFS_OBJ) $(AFS_SETTOKEN_OBJ) \
                $(LIBADS_SERVER_OBJ) \
-               $(TDB_VALIDATE_OBJ)
+               $(TDB_VALIDATE_OBJ) \
+               $(LIBCLI_DSSETUP_OBJ) \
+               $(LIBCLI_LSA_OBJ) \
+               $(LIBCLI_SAMR_OBJ) \
+               $(LIBCLI_NETLOGON_OBJ)
 
 WBINFO_OBJ = ../nsswitch/wbinfo.o $(LIBSAMBA_OBJ) $(PARAM_OBJ) 
$(LIB_NONSMBD_OBJ) \
                $(POPT_LIB_OBJ) $(AFS_SETTOKEN_OBJ) \
@@ -2240,7 +2301,14 @@ LIBNETAPI_OBJ  = $(LIBNETAPI_OBJ0) $(LIBNET_OBJ) \
                 $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) $(RPC_PARSE_OBJ) \
                 $(PASSDB_OBJ) $(SMBLDAP_OBJ) $(GROUPDB_OBJ) \
                 $(DCUTIL_OBJ) $(LIBADS_OBJ) $(PRIVILEGES_BASIC_OBJ) \
-                auth/token_util.o
+                auth/token_util.o \
+                $(LIBCLI_INITSHUTDOWN_OBJ) \
+                $(LIBCLI_WKSSVC_OBJ) \
+                $(LIBCLI_SRVSVC_OBJ) \
+                $(LIBCLI_LSA_OBJ) \
+                $(LIBCLI_SAMR_OBJ) \
+                $(LIBCLI_NETLOGON_OBJ) \
+                $(RPC_CLIENT_SCHANNEL_OBJ)
 
 libnetapi_shared_targ...@libnetapi_shared_target@
 libnetapi_sov...@libnetapi_sover@
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index 016ff83..311796b 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -21,13 +21,11 @@
 #include "librpc/gen_ndr/cli_epmapper.h"
 #include "../librpc/gen_ndr/ndr_schannel.h"
 #include "../librpc/gen_ndr/ndr_dssetup.h"
-#include "../librpc/gen_ndr/ndr_netlogon.h"
 #include "../libcli/auth/schannel.h"
 #include "../libcli/auth/spnego.h"
 #include "smb_krb5.h"
 #include "../libcli/auth/ntlmssp.h"
 #include "ntlmssp_wrap.h"
-#include "rpc_client/cli_netlogon.h"
 #include "librpc/gen_ndr/ndr_dcerpc.h"
 #include "librpc/rpc/dcerpc.h"
 #include "librpc/rpc/dcerpc_gssapi.h"
@@ -2958,87 +2956,6 @@ NTSTATUS cli_rpc_pipe_open_ntlmssp(struct cli_state *cli,
 }
 
 /****************************************************************************
-  Get a the schannel session key out of an already opened netlogon pipe.
- ****************************************************************************/
-static NTSTATUS get_schannel_session_key_common(struct rpc_pipe_client 
*netlogon_pipe,
-                                               struct cli_state *cli,
-                                               const char *domain,
-                                               uint32 *pneg_flags)
-{
-       enum netr_SchannelType sec_chan_type = 0;
-       unsigned char machine_pwd[16];
-       const char *machine_account;
-       NTSTATUS status;
-
-       /* Get the machine account credentials from secrets.tdb. */
-       if (!get_trust_pw_hash(domain, machine_pwd, &machine_account,
-                              &sec_chan_type))
-       {
-               DEBUG(0, ("get_schannel_session_key: could not fetch "
-                       "trust account password for domain '%s'\n",
-                       domain));
-               return NT_STATUS_CANT_ACCESS_DOMAIN_INFO;
-       }
-
-       status = rpccli_netlogon_setup_creds(netlogon_pipe,
-                                       cli->desthost, /* server name */
-                                       domain,        /* domain */
-                                       global_myname(), /* client name */
-                                       machine_account, /* machine account 
name */
-                                       machine_pwd,
-                                       sec_chan_type,
-                                       pneg_flags);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               DEBUG(3, ("get_schannel_session_key_common: "
-                         "rpccli_netlogon_setup_creds failed with result %s "
-                         "to server %s, domain %s, machine account %s.\n",
-                         nt_errstr(status), cli->desthost, domain,
-                         machine_account ));
-               return status;
-       }
-
-       if (((*pneg_flags) & NETLOGON_NEG_SCHANNEL) == 0) {
-               DEBUG(3, ("get_schannel_session_key: Server %s did not offer 
schannel\n",
-                       cli->desthost));
-               return NT_STATUS_INVALID_NETWORK_RESPONSE;
-       }
-
-       return NT_STATUS_OK;;
-}
-
-/****************************************************************************
- Open a netlogon pipe and get the schannel session key.
- Now exposed to external callers.
- ****************************************************************************/
-
-
-NTSTATUS get_schannel_session_key(struct cli_state *cli,
-                                 const char *domain,
-                                 uint32 *pneg_flags,
-                                 struct rpc_pipe_client **presult)
-{
-       struct rpc_pipe_client *netlogon_pipe = NULL;
-       NTSTATUS status;
-
-       status = cli_rpc_pipe_open_noauth(cli, &ndr_table_netlogon.syntax_id,
-                                         &netlogon_pipe);
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       status = get_schannel_session_key_common(netlogon_pipe, cli, domain,
-                                                pneg_flags);
-       if (!NT_STATUS_IS_OK(status)) {
-               TALLOC_FREE(netlogon_pipe);
-               return status;
-       }
-
-       *presult = netlogon_pipe;
-       return NT_STATUS_OK;
-}
-
-/****************************************************************************
  External interface.
  Open a named pipe to an SMB server and bind using schannel (bind type 68)
  using session_key. sign and seal.
@@ -3101,123 +3018,6 @@ NTSTATUS cli_rpc_pipe_open_schannel_with_key(struct 
cli_state *cli,
 }
 
 /****************************************************************************
- Open a named pipe to an SMB server and bind using schannel (bind type 68).
- Fetch the session key ourselves using a temporary netlogon pipe. This
- version uses an ntlmssp auth bound netlogon pipe to get the key.
- ****************************************************************************/
-
-static NTSTATUS get_schannel_session_key_auth_ntlmssp(struct cli_state *cli,
-                                                     const char *domain,
-                                                     const char *username,
-                                                     const char *password,
-                                                     uint32 *pneg_flags,
-                                                     struct rpc_pipe_client 
**presult)
-{
-       struct rpc_pipe_client *netlogon_pipe = NULL;
-       NTSTATUS status;
-
-       status = cli_rpc_pipe_open_spnego_ntlmssp(
-               cli, &ndr_table_netlogon.syntax_id, NCACN_NP,
-               DCERPC_AUTH_LEVEL_PRIVACY,
-               domain, username, password, &netlogon_pipe);
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       status = get_schannel_session_key_common(netlogon_pipe, cli, domain,
-                                                pneg_flags);
-       if (!NT_STATUS_IS_OK(status)) {
-               TALLOC_FREE(netlogon_pipe);
-               return status;
-       }
-
-       *presult = netlogon_pipe;
-       return NT_STATUS_OK;
-}
-
-/****************************************************************************
- Open a named pipe to an SMB server and bind using schannel (bind type 68).
- Fetch the session key ourselves using a temporary netlogon pipe. This version
- uses an ntlmssp bind to get the session key.
- ****************************************************************************/
-
-NTSTATUS cli_rpc_pipe_open_ntlmssp_auth_schannel(struct cli_state *cli,
-                                                const struct ndr_syntax_id 
*interface,
-                                                enum dcerpc_transport_t 
transport,
-                                                enum dcerpc_AuthLevel 
auth_level,
-                                                const char *domain,
-                                                const char *username,
-                                                const char *password,
-                                                struct rpc_pipe_client 
**presult)
-{
-       uint32_t neg_flags = NETLOGON_NEG_AUTH2_ADS_FLAGS;
-       struct rpc_pipe_client *netlogon_pipe = NULL;
-       struct rpc_pipe_client *result = NULL;
-       NTSTATUS status;
-
-       status = get_schannel_session_key_auth_ntlmssp(
-               cli, domain, username, password, &neg_flags, &netlogon_pipe);
-       if (!NT_STATUS_IS_OK(status)) {
-               DEBUG(0,("cli_rpc_pipe_open_ntlmssp_auth_schannel: failed to 
get schannel session "
-                       "key from server %s for domain %s.\n",
-                       cli->desthost, domain ));
-               return status;
-       }
-
-       status = cli_rpc_pipe_open_schannel_with_key(
-               cli, interface, transport, auth_level, domain, 
&netlogon_pipe->dc,
-               &result);
-
-       /* Now we've bound using the session key we can close the netlog pipe. 
*/
-       TALLOC_FREE(netlogon_pipe);
-
-       if (NT_STATUS_IS_OK(status)) {
-               *presult = result;
-       }
-       return status;
-}
-
-/****************************************************************************
- Open a named pipe to an SMB server and bind using schannel (bind type 68).
- Fetch the session key ourselves using a temporary netlogon pipe.
- ****************************************************************************/
-
-NTSTATUS cli_rpc_pipe_open_schannel(struct cli_state *cli,
-                                   const struct ndr_syntax_id *interface,
-                                   enum dcerpc_transport_t transport,
-                                   enum dcerpc_AuthLevel auth_level,
-                                   const char *domain,
-                                   struct rpc_pipe_client **presult)
-{
-       uint32_t neg_flags = NETLOGON_NEG_AUTH2_ADS_FLAGS;
-       struct rpc_pipe_client *netlogon_pipe = NULL;
-       struct rpc_pipe_client *result = NULL;
-       NTSTATUS status;
-
-       status = get_schannel_session_key(cli, domain, &neg_flags,
-                                         &netlogon_pipe);
-       if (!NT_STATUS_IS_OK(status)) {
-               DEBUG(0,("cli_rpc_pipe_open_schannel: failed to get schannel 
session "
-                       "key from server %s for domain %s.\n",
-                       cli->desthost, domain ));
-               return status;
-       }
-
-       status = cli_rpc_pipe_open_schannel_with_key(


-- 
Samba Shared Repository

Reply via email to