[SCM] Samba Shared Repository - branch master updated

Gary Lockyer gary at samba.org
Mon May 6 07:12:06 UTC 2019


The branch, master has been updated
       via  71cc89833f2 libnet: Remove unused source4/libnet/libnet_sam{dump,sync}:
       via  7671eb2ca01 libnet: Remove unused source4/libnet/libnet_samsync_ldb.c
       via  e608a84fa4b torture: Remove unused dsdb_attribute_ldb_to_drsuapi()
       via  7ba65310de2 torture: Remove unused torture_join_server_dn_str()
       via  65a24621710 torture: Remove unused torture_ldap_connection2()
       via  eb15acdd356 lib/tls: Remove unused source4/lib/tls/tls.c (tls socket wrapper)
       via  e995c9c16f6 s4-winbindd: Removed unused wb_utils.c
       via  154370a2e62 build: Remove ndr_PyLong_FromUnsignedLongLong wrapper from NT_STATUS and W_ERROR table generator
       via  4229c278533 pidl: Call PyLong_FromUnsignedLongLong directly rather than via inline helper
       via  819ee849cb1 pidl: Call PyLong_FromLongLong() directly rather than via inline helper
       via  b0714c70ea5 pidl: Always call PyLong_FromUnsignedLongLong() in ndr_PyLong_FromUnsignedLongLong()
       via  26d8d68ca3c pidl: Always call PyLong_FromLongLong() in ndr_PyLong_FromLongLong()
       via  e9874a097dd pidl: No longer use Python3 compat define: PyInt_FromLong -> PyLong_FromLong
       via  305617a14d2 talloc: Follow pattern of ldb and tdb to ensure "make test" depends on a build
       via  6cc68c1ccf7 replace: Fix "make test" to actually test libreplace
       via  16929089668 build: Remove build of replacetort
      from  bc1583d3689 selftest: correcting empty attribute usage in requests

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 71cc89833f2971d91e8eb60b672c6f172ef14f68
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon May 6 14:37:19 2019 +1200

    libnet: Remove unused source4/libnet/libnet_sam{dump,sync}:
    
    The last caller was removed in samba-tool: Remove C version of samba-tool
    (e2af38415163f248e3dbd5a2abc156761e74b87c) by Amitay Isaacs in 2011
    
    This was a tool to dump a genine NT4 DC (never Samba) into smbpasswd file.
    
    It did work against Windows AD, but DRS replication is much
    more comprehensive.
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
    
    Autobuild-User(master): Gary Lockyer <gary at samba.org>
    Autobuild-Date(master): Mon May  6 07:11:51 UTC 2019 on sn-devel-184

commit 7671eb2ca0156ba8c1eb029932607968736b315b
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon May 6 14:31:51 2019 +1200

    libnet: Remove unused source4/libnet/libnet_samsync_ldb.c
    
    The last caller was removed in samba-tool: Remove C version of samba-tool
    (e2af38415163f248e3dbd5a2abc156761e74b87c) by Amitay Isaacs in 2011
    
    This was a prototype tool to sync a genine NT4 DC (never Samba) into ldb.
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>

commit e608a84fa4be95435c81291f98ba0825528111d3
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon May 6 14:23:29 2019 +1200

    torture: Remove unused dsdb_attribute_ldb_to_drsuapi()
    
    The last caller was removed in s4-drs: GetNCChanges() to return correct (in AD-way) ATTIDs
    (6a51afcfdbcbce7813fb59c0655e4178268ca70e) by Kamen Mazdrashki in 2010
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>

commit 7ba65310de239461fef4356941afae0d08d17d5a
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon May 6 14:14:47 2019 +1200

    torture: Remove unused torture_join_server_dn_str()
    
    The last caller was removed in 2010 by
    s4:torture Rework NET-API-BECOMEDC test to use libnet_vampire callbacks.
    in ecf782da87b67b8d977aa1bbfce21f1b6ed8288a
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>

commit 65a24621710a81147e482209cc955ce4641660f4
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon May 6 14:09:49 2019 +1200

    torture: Remove unused torture_ldap_connection2()
    
    The last caller was removed by 'r7626: a new ldap client library'
    in 2005 with bab977dad76e9204278c7afe0bb905cda064f488.
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>

commit eb15acdd35600878aba3319e070199200d9a1357
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon May 6 13:45:37 2019 +1200

    lib/tls: Remove unused source4/lib/tls/tls.c (tls socket wrapper)
    
    The last caller was removed in 72c79e30f07bcc98610cca878f5de50e7db239a0
    to remove the web server as all other callers use tls_tstream.
    
    Found by callcatcher.
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>

commit e995c9c16f6a9a1d7d5dab53a75cd1ff3775aeb1
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon May 6 13:36:36 2019 +1200

    s4-winbindd: Removed unused wb_utils.c
    
    Garming noticed this was untested code in the lcov report, and it turns out to be unused.
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>

commit 154370a2e6288d9cf15dd36ecf66fcd8335cfb0b
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon May 6 15:58:49 2019 +1200

    build: Remove ndr_PyLong_FromUnsignedLongLong wrapper from NT_STATUS and W_ERROR table generator
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>

commit 4229c278533ed637f048be876c1ab58b07b2a842
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon May 6 11:25:33 2019 +1200

    pidl: Call PyLong_FromUnsignedLongLong directly rather than via inline helper
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>

commit 819ee849cb198ebdedb6458f2f6dc7e958533337
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon May 6 11:24:39 2019 +1200

    pidl: Call PyLong_FromLongLong() directly rather than via inline helper
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>

commit b0714c70ea52e9a3a1f34d1c3c1642820e6acacf
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon May 6 11:22:55 2019 +1200

    pidl: Always call PyLong_FromUnsignedLongLong() in ndr_PyLong_FromUnsignedLongLong()
    
    The C type is "unsigned long long" so use that always, as the Python type is now always the same.
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>

commit 26d8d68ca3c659d4957a9bf001e8efa5dc9fefb5
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon May 6 11:22:09 2019 +1200

    pidl: Always call PyLong_FromLongLong() in ndr_PyLong_FromLongLong()
    
    The C type is "long long" so use that always, as the Python type is now always the same.
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>

commit e9874a097dd6ce104082a341f0ccdaffbf553bcb
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon May 6 11:17:32 2019 +1200

    pidl: No longer use Python3 compat define: PyInt_FromLong -> PyLong_FromLong
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>

commit 305617a14d2a77d34785168ca2c5feb6f862a818
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon May 6 11:09:16 2019 +1200

    talloc: Follow pattern of ldb and tdb to ensure "make test" depends on a build
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>

commit 6cc68c1ccf7683543e2735844210627d39556e34
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon May 6 10:23:49 2019 +1200

    replace: Fix "make test" to actually test libreplace
    
    Found by Joe Guo during preperation for automated code coverage output.
    
    In order to allow the Makefile wrapper to work we need to rename the
    test directory to tests.
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>

commit 169290896684d52b9d63cb17c0b90a3d63dd9b8d
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon May 6 15:32:12 2019 +1200

    build: Remove build of replacetort
    
    This is built close to the code it tests in lib/replace/wscript_build as
    replace_testsuite.
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>

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

Summary of changes:
 lib/replace/{test => tests}/getifaddrs.c      |    0
 lib/replace/{test => tests}/incoherent_mmap.c |    0
 lib/replace/{test => tests}/main.c            |    0
 lib/replace/{test => tests}/os2_delete.c      |    0
 lib/replace/{test => tests}/shared_mmap.c     |    0
 lib/replace/{test => tests}/shared_mremap.c   |    0
 lib/replace/{test => tests}/snprintf.c        |    0
 lib/replace/{test => tests}/strptime.c        |    0
 lib/replace/{test => tests}/testsuite.c       |    0
 lib/replace/wscript                           |   43 +-
 lib/talloc/wscript                            |    8 +-
 pidl/lib/Parse/Pidl/Samba4/Python.pm          |   26 +-
 source3/script/tests/test_local_s3.sh         |    2 +-
 source3/wscript_build                         |    5 -
 source4/dsdb/schema/schema_syntax.c           |   21 -
 source4/lib/samba3/samba3.h                   |    1 -
 source4/lib/samba3/smbpasswd.c                |   27 -
 source4/lib/tls/tls.c                         |  609 ------------
 source4/lib/tls/wscript_build                 |    2 -
 source4/libnet/libnet_samdump.c               |  208 ----
 source4/libnet/libnet_samsync.c               |  281 ------
 source4/libnet/libnet_samsync.h               |   51 -
 source4/libnet/libnet_samsync_ldb.c           | 1289 -------------------------
 source4/libnet/wscript_build                  |    2 +-
 source4/librpc/rpc/dcerpc.h                   |    9 -
 source4/librpc/rpc/dcerpc_schannel.c          |   18 -
 source4/librpc/rpc/dcerpc_secondary.c         |   17 -
 source4/scripting/bin/gen_ntstatus.py         |   10 +-
 source4/scripting/bin/gen_werror.py           |   10 +-
 source4/torture/ldap/common.c                 |   17 -
 source4/torture/rpc/testjoin.c                |    9 -
 source4/torture/wscript_build                 |    1 -
 source4/winbind/wb_utils.c                    |   51 -
 source4/winbind/wscript_build                 |    7 -
 34 files changed, 45 insertions(+), 2679 deletions(-)
 rename lib/replace/{test => tests}/getifaddrs.c (100%)
 rename lib/replace/{test => tests}/incoherent_mmap.c (100%)
 rename lib/replace/{test => tests}/main.c (100%)
 rename lib/replace/{test => tests}/os2_delete.c (100%)
 rename lib/replace/{test => tests}/shared_mmap.c (100%)
 rename lib/replace/{test => tests}/shared_mremap.c (100%)
 rename lib/replace/{test => tests}/snprintf.c (100%)
 rename lib/replace/{test => tests}/strptime.c (100%)
 rename lib/replace/{test => tests}/testsuite.c (100%)
 delete mode 100644 source4/lib/tls/tls.c
 delete mode 100644 source4/libnet/libnet_samdump.c
 delete mode 100644 source4/libnet/libnet_samsync.c
 delete mode 100644 source4/libnet/libnet_samsync_ldb.c
 delete mode 100644 source4/winbind/wb_utils.c


Changeset truncated at 500 lines:

diff --git a/lib/replace/test/getifaddrs.c b/lib/replace/tests/getifaddrs.c
similarity index 100%
rename from lib/replace/test/getifaddrs.c
rename to lib/replace/tests/getifaddrs.c
diff --git a/lib/replace/test/incoherent_mmap.c b/lib/replace/tests/incoherent_mmap.c
similarity index 100%
rename from lib/replace/test/incoherent_mmap.c
rename to lib/replace/tests/incoherent_mmap.c
diff --git a/lib/replace/test/main.c b/lib/replace/tests/main.c
similarity index 100%
rename from lib/replace/test/main.c
rename to lib/replace/tests/main.c
diff --git a/lib/replace/test/os2_delete.c b/lib/replace/tests/os2_delete.c
similarity index 100%
rename from lib/replace/test/os2_delete.c
rename to lib/replace/tests/os2_delete.c
diff --git a/lib/replace/test/shared_mmap.c b/lib/replace/tests/shared_mmap.c
similarity index 100%
rename from lib/replace/test/shared_mmap.c
rename to lib/replace/tests/shared_mmap.c
diff --git a/lib/replace/test/shared_mremap.c b/lib/replace/tests/shared_mremap.c
similarity index 100%
rename from lib/replace/test/shared_mremap.c
rename to lib/replace/tests/shared_mremap.c
diff --git a/lib/replace/test/snprintf.c b/lib/replace/tests/snprintf.c
similarity index 100%
rename from lib/replace/test/snprintf.c
rename to lib/replace/tests/snprintf.c
diff --git a/lib/replace/test/strptime.c b/lib/replace/tests/strptime.c
similarity index 100%
rename from lib/replace/test/strptime.c
rename to lib/replace/tests/strptime.c
diff --git a/lib/replace/test/testsuite.c b/lib/replace/tests/testsuite.c
similarity index 100%
rename from lib/replace/test/testsuite.c
rename to lib/replace/tests/testsuite.c
diff --git a/lib/replace/wscript b/lib/replace/wscript
index 1d01e1e2b55..d442792433d 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -632,7 +632,7 @@ def configure(conf):
     conf.CHECK_FUNCS('strptime')
     conf.CHECK_DECLS('strptime', headers='time.h')
     conf.CHECK_CODE('''#define LIBREPLACE_CONFIGURE_TEST_STRPTIME
-                       #include "test/strptime.c"''',
+                       #include "tests/strptime.c"''',
                        define='HAVE_WORKING_STRPTIME',
                        execute=True,
                        addmain=False,
@@ -647,25 +647,25 @@ def configure(conf):
                            define='HAVE_GETTIMEOFDAY_TZ_VOID',
                            headers='sys/time.h')
 
-    conf.CHECK_CODE('#include "test/snprintf.c"',
+    conf.CHECK_CODE('#include "tests/snprintf.c"',
                     define="HAVE_C99_VSNPRINTF",
                     execute=True,
                     addmain=False,
                     msg="Checking for C99 vsnprintf")
 
-    conf.CHECK_CODE('#include "test/shared_mmap.c"',
+    conf.CHECK_CODE('#include "tests/shared_mmap.c"',
                     addmain=False, add_headers=False, execute=True,
                     define='HAVE_SHARED_MMAP',
                     msg="Checking for HAVE_SHARED_MMAP")
 
-    conf.CHECK_CODE('#include "test/shared_mremap.c"',
+    conf.CHECK_CODE('#include "tests/shared_mremap.c"',
                     addmain=False, add_headers=False, execute=True,
                     define='HAVE_MREMAP',
                     msg="Checking for HAVE_MREMAP")
 
     # OpenBSD (and I've heard HPUX) doesn't sync between mmap and write.
     # FIXME: Anything other than a 0 or 1 exit code should abort configure!
-    conf.CHECK_CODE('#include "test/incoherent_mmap.c"',
+    conf.CHECK_CODE('#include "tests/incoherent_mmap.c"',
                     addmain=False, add_headers=False, execute=True,
                     define='HAVE_INCOHERENT_MMAP',
                     msg="Checking for HAVE_INCOHERENT_MMAP")
@@ -763,7 +763,7 @@ def configure(conf):
                            #include "snprintf.c"
                            #include "getifaddrs.c"
                            #define getifaddrs_test main
-                           #include "test/getifaddrs.c"
+                           #include "tests/getifaddrs.c"
                            ''' % method,
                            method,
                            lib='nsl socket' + bsd_for_strlcpy,
@@ -861,16 +861,15 @@ def build(bld):
     if bld.CONFIG_SET('HAVE_WNO_FORMAT_TRUNCATION'):
         replace_test_cflags += " -Wno-format-truncation"
     bld.SAMBA_SUBSYSTEM('replace-test',
-                        source='''test/testsuite.c test/strptime.c
-                        test/os2_delete.c test/getifaddrs.c''',
+                        source='''tests/testsuite.c tests/strptime.c
+                        tests/os2_delete.c tests/getifaddrs.c''',
                         deps='replace',
                         cflags=replace_test_cflags)
 
-    if bld.env.standalone_replace:
-        bld.SAMBA_BINARY('replace_testsuite',
-                         source='test/main.c',
-                         deps='replace replace-test',
-                         install=False)
+    bld.SAMBA_BINARY('replace_testsuite',
+                     source='tests/main.c',
+                     deps='replace replace-test',
+                     install=False)
 
     # build replacements for stdint.h and stdbool.h if needed
     bld.SAMBA_GENERATOR('replace_stdint_h',
@@ -886,6 +885,24 @@ def build(bld):
 
     bld.SAMBA_SUBSYSTEM('samba_intl', source='', use_global_deps=False,deps=bld.env.intl_libs)
 
+def testonly(ctx):
+    '''run talloc testsuite'''
+    import samba_utils
+
+    samba_utils.ADD_LD_LIBRARY_PATH('bin/shared')
+    samba_utils.ADD_LD_LIBRARY_PATH('bin/shared/private')
+
+    cmd = os.path.join(Context.g_module.out, 'replace_testsuite')
+    ret = samba_utils.RUN_COMMAND(cmd)
+    print("testsuite returned %d" % ret)
+    sys.exit(ret)
+
+# WAF doesn't build the unit tests for this, maybe because they don't link with talloc?
+# This forces it
+def test(ctx):
+    Options.commands.append('build')
+    Options.commands.append('testonly')
+
 def dist():
     '''makes a tarball for distribution'''
     samba_dist.dist()
diff --git a/lib/talloc/wscript b/lib/talloc/wscript
index e4020692d60..eda62d19086 100644
--- a/lib/talloc/wscript
+++ b/lib/talloc/wscript
@@ -154,7 +154,7 @@ def build(bld):
                          install=False)
 
 
-def test(ctx):
+def testonly(ctx):
     '''run talloc testsuite'''
     import samba_utils
 
@@ -176,6 +176,12 @@ def test(ctx):
     print("python testsuite returned %d" % pyret)
     sys.exit(ret or magic_ret or pyret)
 
+# WAF doesn't build the unit tests for this, maybe because they don't link with talloc?
+# This forces it
+def test(ctx):
+    Options.commands.append('build')
+    Options.commands.append('testonly')
+
 def dist():
     '''makes a tarball for distribution'''
     samba_dist.dist()
diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm
index 6a2d12c9c45..474960d61d1 100644
--- a/pidl/lib/Parse/Pidl/Samba4/Python.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm
@@ -2025,11 +2025,11 @@ sub ConvertScalarToPython($$$$)
 	$ctypename = expandAlias($ctypename);
 
 	if ($ctypename =~ /^(int64|dlong)$/) {
-		return "ndr_PyLong_FromLongLong($cvar)";
+		return "PyLong_FromLongLong($cvar)";
 	}
 
 	if ($ctypename =~ /^(uint64|hyper|NTTIME_hyper|NTTIME|NTTIME_1sec|udlong|udlongr|uid_t|gid_t)$/) {
-		return "ndr_PyLong_FromUnsignedLongLong($cvar)";
+		return "PyLong_FromUnsignedLongLong($cvar)";
 	}
 
 	if ($ctypename =~ /^(char|int|int8|int16|int32|time_t)$/) {
@@ -2041,7 +2041,7 @@ sub ConvertScalarToPython($$$$)
 	# possibly 64 bit unsigned long.  (enums are signed in C,
 	# unsigned in NDR)
 	if ($ctypename =~ /^(uint32|uint3264)$/) {
-		return "ndr_PyLong_FromUnsignedLongLong((uint32_t)$cvar)";
+		return "PyLong_FromUnsignedLongLong((uint32_t)$cvar)";
 	}
 
 	if ($ctypename =~ /^(uint|uint8|uint16|uint1632)$/) {
@@ -2316,24 +2316,6 @@ static inline long long ndr_sizeof2intmax(size_t var_size)
 	return 0;
 }
 
-static inline PyObject *ndr_PyLong_FromLongLong(long long v)
-{
-	if (v > LONG_MAX || v < LONG_MIN) {
-		return PyLong_FromLongLong(v);
-	} else {
-		return PyInt_FromLong(v);
-	}
-}
-
-static inline PyObject *ndr_PyLong_FromUnsignedLongLong(unsigned long long v)
-{
-	if (v > LONG_MAX) {
-		return PyLong_FromUnsignedLongLong(v);
-	} else {
-		return PyInt_FromLong(v);
-	}
-}
-
 ");
 
 	foreach my $x (@$ndr) {
@@ -2422,7 +2404,7 @@ static inline PyObject *ndr_PyLong_FromUnsignedLongLong(unsigned long long v)
 		my $py_obj;
 		my ($ctype, $cvar) = @{$h->{'val'}};
 		if ($cvar =~ /^[0-9]+$/ or $cvar =~ /^0x[0-9a-fA-F]+$/) {
-			$py_obj = "ndr_PyLong_FromUnsignedLongLong($cvar)";
+			$py_obj = "PyLong_FromUnsignedLongLong($cvar)";
 		} elsif ($cvar =~ /^".*"$/) {
 			$py_obj = "PyStr_FromString($cvar)";
 		} else {
diff --git a/source3/script/tests/test_local_s3.sh b/source3/script/tests/test_local_s3.sh
index d5a3d474edb..d92e328d030 100755
--- a/source3/script/tests/test_local_s3.sh
+++ b/source3/script/tests/test_local_s3.sh
@@ -22,7 +22,7 @@ else
 	echo "Skipping talloctort"
 fi
 
-testit "replacetort" $VALGRIND $BINDIR/replacetort || \
+testit "replace_testsuite" $VALGRIND $BINDIR/replace_testsuite || \
     failed=`expr $failed + 1`
 
 if test -x bin/tdbtorture ; then
diff --git a/source3/wscript_build b/source3/wscript_build
index 1dc8768ded4..fd4101a315f 100644
--- a/source3/wscript_build
+++ b/source3/wscript_build
@@ -1215,11 +1215,6 @@ bld.SAMBA3_BINARY('smbconftort',
                       ''',
                  install=False)
 
-bld.SAMBA3_BINARY('replacetort',
-                 source='../lib/replace/test/main.c',
-                 deps='replace replace-test',
-                 install=False)
-
 bld.SAMBA3_BINARY('msgtest',
                  source='torture/msgtest.c',
                  deps='''
diff --git a/source4/dsdb/schema/schema_syntax.c b/source4/dsdb/schema/schema_syntax.c
index a67ecde222e..5edfea43a28 100644
--- a/source4/dsdb/schema/schema_syntax.c
+++ b/source4/dsdb/schema/schema_syntax.c
@@ -2797,24 +2797,3 @@ WERROR dsdb_attribute_drsuapi_to_ldb(struct ldb_context *ldb,
 
 	return sa->syntax->drsuapi_to_ldb(&syntax_ctx, sa, in, mem_ctx, out);
 }
-
-WERROR dsdb_attribute_ldb_to_drsuapi(struct ldb_context *ldb,
-				     const struct dsdb_schema *schema,
-				     const struct ldb_message_element *in,
-				     TALLOC_CTX *mem_ctx,
-				     struct drsuapi_DsReplicaAttribute *out)
-{
-	const struct dsdb_attribute *sa;
-	struct dsdb_syntax_ctx syntax_ctx;
-
-	sa = dsdb_attribute_by_lDAPDisplayName(schema, in->name);
-	if (!sa) {
-		return WERR_DS_ATT_NOT_DEF_IN_SCHEMA;
-	}
-
-	/* use default syntax conversion context */
-	dsdb_syntax_ctx_init(&syntax_ctx, ldb, schema);
-
-	return sa->syntax->ldb_to_drsuapi(&syntax_ctx, sa, in, mem_ctx, out);
-}
-
diff --git a/source4/lib/samba3/samba3.h b/source4/lib/samba3/samba3.h
index 68e201113d1..f1c5d44a72c 100644
--- a/source4/lib/samba3/samba3.h
+++ b/source4/lib/samba3/samba3.h
@@ -25,6 +25,5 @@
 
 struct samr_Password *smbpasswd_gethexpwd(TALLOC_CTX *mem_ctx, const char *p);
 char *smbpasswd_sethexpwd(TALLOC_CTX *mem_ctx, struct samr_Password *pwd, uint16_t acb_info);
-char *smbpasswd_encode_acb_info(TALLOC_CTX *mem_ctx, uint16_t acb_info);
 
 #endif /* _SAMBA3_H */
diff --git a/source4/lib/samba3/smbpasswd.c b/source4/lib/samba3/smbpasswd.c
index bab03a92f55..ae361b72f5e 100644
--- a/source4/lib/samba3/smbpasswd.c
+++ b/source4/lib/samba3/smbpasswd.c
@@ -109,30 +109,3 @@ char *smbpasswd_sethexpwd(TALLOC_CTX *mem_ctx, struct samr_Password *pwd, uint16
 	}
 	return p;
 }
-
-/*! Encode account control bits (ACBs) into a string. */
-
-char *smbpasswd_encode_acb_info(TALLOC_CTX *mem_ctx, uint16_t acb_info)
-{
-	char *acct_str = talloc_array(mem_ctx, char, 35);
-	size_t i = 0;
-
-	acct_str[i++] = '[';
-
-	if (acb_info & ACB_PWNOTREQ ) acct_str[i++] = 'N';
-	if (acb_info & ACB_DISABLED ) acct_str[i++] = 'D';
-	if (acb_info & ACB_HOMDIRREQ) acct_str[i++] = 'H';
-	if (acb_info & ACB_TEMPDUP  ) acct_str[i++] = 'T'; 
-	if (acb_info & ACB_NORMAL   ) acct_str[i++] = 'U';
-	if (acb_info & ACB_MNS      ) acct_str[i++] = 'M';
-	if (acb_info & ACB_WSTRUST  ) acct_str[i++] = 'W';
-	if (acb_info & ACB_SVRTRUST ) acct_str[i++] = 'S';
-	if (acb_info & ACB_AUTOLOCK ) acct_str[i++] = 'L';
-	if (acb_info & ACB_PWNOEXP  ) acct_str[i++] = 'X';
-	if (acb_info & ACB_DOMTRUST ) acct_str[i++] = 'I';
-
-	acct_str[i++] = ']';
-	acct_str[i++] = '\0';
-
-	return acct_str;
-}     
diff --git a/source4/lib/tls/tls.c b/source4/lib/tls/tls.c
deleted file mode 100644
index efff0e6ba82..00000000000
--- a/source4/lib/tls/tls.c
+++ /dev/null
@@ -1,609 +0,0 @@
-/*
-   Unix SMB/CIFS implementation.
-
-   transport layer security handling code
-
-   Copyright (C) Andrew Tridgell 2004-2005
-   Copyright (C) Stefan Metzmacher 2004
-   Copyright (C) Andrew Bartlett 2006
-
-   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
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   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.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "includes.h"
-#include "system/filesys.h"
-#include "lib/events/events.h"
-#include "lib/socket/socket.h"
-#include "lib/tls/tls.h"
-#include "param/param.h"
-
-#include <gnutls/gnutls.h>
-
-#define DH_BITS 2048
-
-/* hold persistent tls data */
-struct tls_params {
-	gnutls_certificate_credentials_t x509_cred;
-	gnutls_dh_params_t dh_params;
-	bool tls_enabled;
-	const char *tls_priority;
-};
-
-/* hold per connection tls data */
-struct tls_context {
-	struct socket_context *socket;
-	struct tevent_fd *fde;
-	bool tls_enabled;
-	gnutls_session_t session;
-	bool done_handshake;
-	bool have_first_byte;
-	uint8_t first_byte;
-	bool tls_detect;
-	const char *plain_chars;
-	bool output_pending;
-	gnutls_certificate_credentials_t xcred;
-	bool interrupted;
-};
-
-bool tls_enabled(struct socket_context *sock)
-{
-	struct tls_context *tls;
-	if (!sock) {
-		return false;
-	}
-	if (strcmp(sock->backend_name, "tls") != 0) {
-		return false;
-	}
-	tls = talloc_get_type(sock->private_data, struct tls_context);
-	if (!tls) {
-		return false;
-	}
-	return tls->tls_enabled;
-}
-
-
-static const struct socket_ops tls_socket_ops;
-
-static NTSTATUS tls_socket_init(struct socket_context *sock)
-{
-	switch (sock->type) {
-	case SOCKET_TYPE_STREAM:
-		break;
-	default:
-		return NT_STATUS_INVALID_PARAMETER;
-	}
-
-	sock->backend_name = "tls";
-
-	return NT_STATUS_OK;
-}
-
-#define TLSCHECK(call) do { \
-	ret = call; \
-	if (ret < 0) { \
-		DEBUG(0,("TLS %s - %s\n", #call, gnutls_strerror(ret))); \
-		goto failed; \
-	} \
-} while (0)
-
-
-/*
-  callback for reading from a socket
-*/
-static ssize_t tls_pull(gnutls_transport_ptr_t ptr, void *buf, size_t size)
-{
-	struct tls_context *tls = talloc_get_type(ptr, struct tls_context);
-	NTSTATUS status;
-	size_t nread;
-
-	if (tls->have_first_byte) {
-		*(uint8_t *)buf = tls->first_byte;
-		tls->have_first_byte = false;
-		return 1;
-	}
-
-	status = socket_recv(tls->socket, buf, size, &nread);
-	if (NT_STATUS_EQUAL(status, NT_STATUS_END_OF_FILE)) {
-		return 0;
-	}
-	if (NT_STATUS_IS_ERR(status)) {
-		TEVENT_FD_NOT_READABLE(tls->fde);
-		TEVENT_FD_NOT_WRITEABLE(tls->fde);
-		errno = EBADF;
-		return -1;
-	}
-	if (!NT_STATUS_IS_OK(status)) {
-		TEVENT_FD_READABLE(tls->fde);
-		errno = EAGAIN;
-		return -1;
-	}
-	if (tls->output_pending) {
-		TEVENT_FD_WRITEABLE(tls->fde);
-	}
-	if (size != nread) {
-		TEVENT_FD_READABLE(tls->fde);
-	}
-	return nread;
-}
-
-/*
-  callback for writing to a socket
-*/
-static ssize_t tls_push(gnutls_transport_ptr_t ptr, const void *buf, size_t size)
-{
-	struct tls_context *tls = talloc_get_type(ptr, struct tls_context);
-	NTSTATUS status;
-	size_t nwritten, total_nwritten = 0;
-	DATA_BLOB b;
-
-	if (!tls->tls_enabled) {
-		return size;
-	}
-
-	b.data = discard_const(buf);
-	b.length = size;
-
-	/* Cope with socket_wrapper 1500 byte chunking for PCAP */
-	do {
-		status = socket_send(tls->socket, &b, &nwritten);
-
-		if (NT_STATUS_EQUAL(status, STATUS_MORE_ENTRIES)) {
-			errno = EAGAIN;
-			return -1;
-		}
-		if (!NT_STATUS_IS_OK(status)) {
-			TEVENT_FD_WRITEABLE(tls->fde);
-			return -1;


-- 
Samba Shared Repository



More information about the samba-cvs mailing list