[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Tue Sep 7 19:25:01 UTC 2021


The branch, master has been updated
       via  2b86cff4a4d lib/replace: drop runtime copy_file_range() check
       via  3347bfce9ee samba_dnsupdate: Fix deprecation warnings
       via  6ebed6b505a samba-tool: Fix a typo
       via  ba237d9403c auth: Fix a typo
       via  f585f01148a auth: Simplify is_our_machine_account()
       via  44566f59d8f rpc_server3: Include the right "dcerpc.h" from a SAMBA_SUBSYSTEM
      from  28686f87139 s4/samba: POPT_COMMON_DAEMON

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


- Log -----------------------------------------------------------------
commit 2b86cff4a4df81e37ca9a4d95b8b928b0a912633
Author: Ralph Boehme <slow at samba.org>
Date:   Sun Sep 5 15:09:12 2021 +0200

    lib/replace: drop runtime copy_file_range() check
    
    This reverts commit 4354823c5146753ef8a3791bc8562379096659b8
    "libreplace: properly execute SYS_copy_file_range check".
    
    We now use a runtime check in the user of copy_file_range().
    
    Signed-off-by: Ralph Boehme <slow at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Tue Sep  7 19:24:57 UTC 2021 on sn-devel-184

commit 3347bfce9ee8b20c09dec2c0c5eb69b0c4bdb743
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Sep 7 15:04:16 2021 +0200

    samba_dnsupdate: Fix deprecation warnings
    
    We should not call samba-tool with -k anymore
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 6ebed6b505aebb58726322b7c4e7f736e02773ce
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Sep 7 14:25:34 2021 +0200

    samba-tool: Fix a typo
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit ba237d9403cf45bf71e5d943b92c15e9c494fb0f
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Sep 5 09:13:25 2021 +0200

    auth: Fix a typo
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit f585f01148ab2d8f84c96b12e018742f5f17bcb0
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Sep 5 08:59:13 2021 +0200

    auth: Simplify is_our_machine_account()
    
    Use strnequal instead of duplicating a string
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 44566f59d8f8fa2ba5dd1239d4a3265bcdc44297
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Jan 28 10:56:51 2021 +0100

    rpc_server3: Include the right "dcerpc.h" from a SAMBA_SUBSYSTEM
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

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

Summary of changes:
 lib/replace/wscript                   | 26 ++------------------------
 python/samba/netcmd/dns.py            |  2 +-
 source3/auth/auth_unix.c              |  2 +-
 source3/auth/server_info_sam.c        |  9 +--------
 source3/rpc_server/rpc_pipes.h        |  2 +-
 source4/scripting/bin/samba_dnsupdate |  4 ++--
 6 files changed, 8 insertions(+), 37 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/replace/wscript b/lib/replace/wscript
index a734d478582..8c69a0c2c39 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -456,32 +456,10 @@ def configure(conf):
     conf.CHECK_FUNCS('getprogname')
     if not conf.CHECK_FUNCS('copy_file_range'):
         conf.CHECK_CODE('''
-                        int src_fd = -1, dst_fd = -1, ret;
-                        ssize_t written;
-                        char src[]="/tmp/test.XXXXXX";
-                        char dst[]="/tmp/test.XXXXXX";
-                        src_fd = mkstemp(src);
-                        if (src_fd == -1) {ret = 1; goto cleanup;}
-                        dst_fd = mkstemp(dst);
-                        if (dst_fd == -1) {ret = 2; goto cleanup;}
-                        written = pwrite(src_fd, "x", 1, 0);
-                        if (written != 1) {ret = 3; goto cleanup;}
-                        written = syscall(SYS_copy_file_range,src_fd,0,dst_fd,0,1,0);
-                        if (written != 1) {
-                            printf("SYS_copy_file_range failed: %s", strerror(errno));
-                            ret = 4; goto cleanup;
-                        }
-                        ret = 0;
-                    cleanup:
-                        if (src_fd != -1) close(src_fd);
-                        if (dst_fd != -1) close(dst_fd);
-                        unlink(src);
-                        unlink(dst);
-                        return ret;
+syscall(SYS_copy_file_range,0,NULL,0,NULL,0,0);
                         ''',
                         'HAVE_SYSCALL_COPY_FILE_RANGE',
-                        headers='errno.h string.h stdio.h sys/syscall.h unistd.h sys/types.h sys/stat.h fcntl.h',
-                        execute=True,
+                        headers='sys/syscall.h unistd.h',
                         msg='Checking whether we have copy_file_range system call')
 
     conf.SET_TARGET_TYPE('attr', 'EMPTY')
diff --git a/python/samba/netcmd/dns.py b/python/samba/netcmd/dns.py
index e77a4de8162..c0f27808c46 100644
--- a/python/samba/netcmd/dns.py
+++ b/python/samba/netcmd/dns.py
@@ -1090,7 +1090,7 @@ class cmd_add_record(Command):
             if e.args[0] == werror.WERR_DNS_ERROR_NAME_DOES_NOT_EXIST:
                 raise CommandError('Zone does not exist; record could not be added. zone[%s] name[%s]' % (zone, name))
             if e.args[0] == werror.WERR_DNS_ERROR_RECORD_ALREADY_EXISTS:
-                raise CommandError('Record already exist; record could not be added. zone[%s] name[%s]' % (zone, name))
+                raise CommandError('Record already exists; record could not be added. zone[%s] name[%s]' % (zone, name))
             raise e
 
         self.outf.write('Record added successfully\n')
diff --git a/source3/auth/auth_unix.c b/source3/auth/auth_unix.c
index 56fd205a9b8..eaf344d61e0 100644
--- a/source3/auth/auth_unix.c
+++ b/source3/auth/auth_unix.c
@@ -27,7 +27,7 @@
 
 /** Check a plaintext username/password
  *
- * Cannot deal with an encrupted password in any manner whatsoever,
+ * Cannot deal with an encrypted password in any manner whatsoever,
  * unless the account has a null password.
  **/
 
diff --git a/source3/auth/server_info_sam.c b/source3/auth/server_info_sam.c
index 79a7af7281e..b9c8b0a0959 100644
--- a/source3/auth/server_info_sam.c
+++ b/source3/auth/server_info_sam.c
@@ -38,19 +38,12 @@
 static bool is_our_machine_account(const char *username)
 {
 	bool ret;
-	char *truncname = NULL;
 	size_t ulen = strlen(username);
 
 	if (ulen == 0 || username[ulen-1] != '$') {
 		return false;
 	}
-	truncname = SMB_STRDUP(username);
-	if (!truncname) {
-		return false;
-	}
-	truncname[ulen-1] = '\0';
-	ret = strequal(truncname, lp_netbios_name());
-	SAFE_FREE(truncname);
+	ret = strnequal(username, lp_netbios_name(), ulen-1);
 	return ret;
 }
 
diff --git a/source3/rpc_server/rpc_pipes.h b/source3/rpc_server/rpc_pipes.h
index ba346648a43..50fb46a1df1 100644
--- a/source3/rpc_server/rpc_pipes.h
+++ b/source3/rpc_server/rpc_pipes.h
@@ -24,7 +24,7 @@
 #ifndef _RPC_PIPES_H_
 #define _RPC_PIPES_H_
 
-#include "librpc/rpc/dcerpc.h"
+#include "source3/librpc/rpc/dcerpc.h"
 
 struct dcesrv_ep_entry_list;
 struct tsocket_address;
diff --git a/source4/scripting/bin/samba_dnsupdate b/source4/scripting/bin/samba_dnsupdate
index 518bb898d33..de39ac39cad 100755
--- a/source4/scripting/bin/samba_dnsupdate
+++ b/source4/scripting/bin/samba_dnsupdate
@@ -589,8 +589,8 @@ def call_samba_tool(d, op="add", zone=None):
     try:
         cmd = cmd_dns()
         if opts.verbose:
-            print("Calling samba-tool dns %s -k no -P %s" % (op, args))
-        ret = cmd._run("dns", op, "-k", "no", "-P", *args)
+            print(f'Calling samba-tool dns {op} --use-kerberos off -P {args}')
+        ret = cmd._run("dns", op, "--use-kerberos", "off", "-P", *args)
         if ret == -1:
             if opts.fail_immediately:
                 sys.exit(1)


-- 
Samba Shared Repository



More information about the samba-cvs mailing list