[SCM] Samba Shared Repository - branch master updated

Stefan Metzmacher metze at samba.org
Fri Dec 15 10:45:01 UTC 2023


The branch, master has been updated
       via  d23d6145bf0 VERSION: move COPYRIGHT_STARTUP_MESSAGE as SAMBA_COPYRIGHT_STRING into version.h
      from  83e36d97c95 netcmd: add shell command

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


- Log -----------------------------------------------------------------
commit d23d6145bf08c4765479951237e697c4b2b11aa2
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Dec 14 11:35:19 2023 +0100

    VERSION: move COPYRIGHT_STARTUP_MESSAGE as SAMBA_COPYRIGHT_STRING into version.h
    
    We also prodive a samba_copyright_string() helper similar to
    samba_version_string().
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=15377
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Björn Jacke <bjacke at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    
    Autobuild-User(master): Stefan Metzmacher <metze at samba.org>
    Autobuild-Date(master): Fri Dec 15 10:44:42 UTC 2023 on atb-devel-224

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

Summary of changes:
 VERSION                               |  2 ++
 buildtools/wafsamba/samba_patterns.py |  2 +-
 buildtools/wafsamba/samba_version.py  |  1 +
 lib/param/param.h                     |  1 +
 lib/util/copyright.h                  | 28 ----------------------------
 source3/include/includes.h            |  3 ---
 source3/include/proto.h               |  1 +
 source3/lib/version.c                 |  5 +++++
 source3/nmbd/nmbd.c                   |  6 +++---
 source3/rpc_server/rpc_host.c         |  8 ++++----
 source3/rpc_server/rpc_worker.c       |  8 ++++----
 source3/smbd/server.c                 |  6 +++---
 source3/winbindd/winbindd.c           |  6 +++---
 source3/wscript_build                 |  3 +--
 source4/include/includes.h            |  3 ---
 source4/samba/server.c                |  8 ++++----
 16 files changed, 33 insertions(+), 58 deletions(-)
 delete mode 100644 lib/util/copyright.h


Changeset truncated at 500 lines:

diff --git a/VERSION b/VERSION
index f0170b01ce1..620024528ad 100644
--- a/VERSION
+++ b/VERSION
@@ -13,6 +13,8 @@
 #                                                      #
 ########################################################
 
+SAMBA_COPYRIGHT_STRING="Copyright Andrew Tridgell and the Samba Team 1992-2023"
+
 ########################################################
 # This are the main SAMBA version numbers              #
 #                                                      #
diff --git a/buildtools/wafsamba/samba_patterns.py b/buildtools/wafsamba/samba_patterns.py
index a9c5fcc4b4c..41296810e13 100644
--- a/buildtools/wafsamba/samba_patterns.py
+++ b/buildtools/wafsamba/samba_patterns.py
@@ -15,7 +15,7 @@ def write_version_header(task):
     return 0
 
 
-def SAMBA_MKVERSION(bld, target, source='VERSION'):
+def SAMBA_MKVERSION(bld, target, source='VERSION buildtools/wafsamba/samba_version.py'):
     '''generate the version.h header for Samba'''
 
     # We only force waf to re-generate this file if we are installing,
diff --git a/buildtools/wafsamba/samba_version.py b/buildtools/wafsamba/samba_version.py
index 54ae62f38bd..31103e0f8c4 100644
--- a/buildtools/wafsamba/samba_version.py
+++ b/buildtools/wafsamba/samba_version.py
@@ -174,6 +174,7 @@ also accepted as dictionary entries here
 
     def __str__(self):
         string="/* Autogenerated by waf */\n" +\
+                "#define SAMBA_COPYRIGHT_STRING \"%s\"\n" % self.SAMBA_COPYRIGHT_STRING +\
                 "#define SAMBA_VERSION_MAJOR %u\n" % self.MAJOR +\
                 "#define SAMBA_VERSION_MINOR %u\n" % self.MINOR +\
                 "#define SAMBA_VERSION_RELEASE %u\n" % self.RELEASE
diff --git a/lib/param/param.h b/lib/param/param.h
index 7ead57f6130..aed48c1660c 100644
--- a/lib/param/param.h
+++ b/lib/param/param.h
@@ -276,6 +276,7 @@ int lpcfg_rpc_port_high(struct loadparm_context *lp_ctx);
 /* The following definitions come from lib/version.c  */
 
 const char *samba_version_string(void);
+const char *samba_copyright_string(void);
 
 
 #endif /* _PARAM_H */
diff --git a/lib/util/copyright.h b/lib/util/copyright.h
deleted file mode 100644
index a29f2285d13..00000000000
--- a/lib/util/copyright.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
-   Unix SMB/CIFS implementation.
-
-   Copyright (C) Björn Jacke 2023
-
-   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/>.
-*/
-
-#ifndef __LIB_UTIL_COPYRIGHT_H__
-#define __LIB_UTIL_COPYRIGHT_H__
-
-/* logged when starting the various Samba daemons */
-#define COPYRIGHT_STARTUP_MESSAGE	"Copyright Andrew Tridgell and the Samba Team 1992-2023"
-
-#endif /* __LIB_UTIL_COPYRIGHT_H__ */
-
-
diff --git a/source3/include/includes.h b/source3/include/includes.h
index 37d712084e4..1e7b79ba0a9 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -242,9 +242,6 @@ enum timestamp_set_resolution {
 typedef char fstring[FSTRING_LEN];
 #endif
 
-/* copyright define */
-#include "../lib/util/copyright.h"
-
 /* debug.h need to be included before samba_util.h for the macro SMB_ASSERT */
 #include "../lib/util/debug.h"
 
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 13152f7a10a..3ed35054708 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -561,6 +561,7 @@ ssize_t full_path_tos(const char *dir, const char *name,
 /* The following definitions come from lib/version.c  */
 
 const char *samba_version_string(void);
+const char *samba_copyright_string(void);
 
 /* The following definitions come from lib/wins_srv.c  */
 
diff --git a/source3/lib/version.c b/source3/lib/version.c
index e81f463586e..28fcd1b704b 100644
--- a/source3/lib/version.c
+++ b/source3/lib/version.c
@@ -25,3 +25,8 @@ const char *samba_version_string(void)
 {
 	return SAMBA_VERSION_STRING;
 }
+
+const char *samba_copyright_string(void)
+{
+	return SAMBA_COPYRIGHT_STRING;
+}
diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c
index 63a81a17326..4bdf4b25560 100644
--- a/source3/nmbd/nmbd.c
+++ b/source3/nmbd/nmbd.c
@@ -898,9 +898,9 @@ static bool open_sockets(bool isdaemon, int port)
 
 	reopen_logs();
 
-	DBG_STARTUP_NOTICE("nmbd version %s started.\n"
-			COPYRIGHT_STARTUP_MESSAGE "\n",
-		samba_version_string());
+	DBG_STARTUP_NOTICE("nmbd version %s started.\n%s\n",
+			   samba_version_string(),
+			   samba_copyright_string());
 
 	if (lp_server_role() == ROLE_ACTIVE_DIRECTORY_DC
 	    && !lp_parm_bool(-1, "server role check", "inhibit", false)) {
diff --git a/source3/rpc_server/rpc_host.c b/source3/rpc_server/rpc_host.c
index c3c4cb97e21..1e891b4faaa 100644
--- a/source3/rpc_server/rpc_host.c
+++ b/source3/rpc_server/rpc_host.c
@@ -2902,10 +2902,10 @@ int main(int argc, const char *argv[])
 
 	reopen_logs();
 
-	DBG_STARTUP_NOTICE("%s version %s started.\n"
-			COPYRIGHT_STARTUP_MESSAGE "\n",
-		  progname,
-		  samba_version_string());
+	DBG_STARTUP_NOTICE("%s version %s started.\n%s\n",
+			   progname,
+			   samba_version_string(),
+			   samba_copyright_string());
 
 	(void)winbind_off();
 	ok = init_guest_session_info(frame);
diff --git a/source3/rpc_server/rpc_worker.c b/source3/rpc_server/rpc_worker.c
index 691e0ec57f0..bf9671d3c15 100644
--- a/source3/rpc_server/rpc_worker.c
+++ b/source3/rpc_server/rpc_worker.c
@@ -1152,10 +1152,10 @@ int rpc_worker_main(
 
 	reopen_logs();
 
-	DBG_STARTUP_NOTICE("%s version %s started.\n"
-			COPYRIGHT_STARTUP_MESSAGE "\n",
-		progname,
-		samba_version_string());
+	DBG_STARTUP_NOTICE("%s version %s started.\n%s\n",
+			   progname,
+			   samba_version_string(),
+			   samba_copyright_string());
 
 	msg_ctx = global_messaging_context();
 	if (msg_ctx == NULL) {
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index ddef5b6de16..42abfa948e6 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -1743,9 +1743,9 @@ extern void build_options(bool screen);
 
 	reopen_logs();
 
-	DBG_STARTUP_NOTICE("smbd version %s started.\n"
-			COPYRIGHT_STARTUP_MESSAGE "\n",
-		samba_version_string());
+	DBG_STARTUP_NOTICE("smbd version %s started.\n%s\n",
+			   samba_version_string(),
+			   samba_copyright_string());
 
 	DEBUG(2,("uid=%d gid=%d euid=%d egid=%d\n",
 		 (int)getuid(),(int)getgid(),(int)geteuid(),(int)getegid()));
diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c
index 608c77c291b..29a24a981c3 100644
--- a/source3/winbindd/winbindd.c
+++ b/source3/winbindd/winbindd.c
@@ -1447,9 +1447,9 @@ int main(int argc, const char **argv)
 
 	reopen_logs();
 
-	DBG_STARTUP_NOTICE("winbindd version %s started.\n"
-			COPYRIGHT_STARTUP_MESSAGE "\n",
-		samba_version_string());
+	DBG_STARTUP_NOTICE("winbindd version %s started.\n%s\n",
+			   samba_version_string(),
+			   samba_copyright_string());
 
 	/* After parsing the configuration file we setup the core path one more time
 	 * as the log file might have been set in the configuration and cores's
diff --git a/source3/wscript_build b/source3/wscript_build
index d965da78c4c..ff8de1eec00 100644
--- a/source3/wscript_build
+++ b/source3/wscript_build
@@ -938,8 +938,7 @@ bld.SAMBA3_SUBSYSTEM('PASSCHANGE',
                          ''')
 
 bld.SAMBA3_SUBSYSTEM('SAMBA_VERSION',
-                    source='lib/version.c',
-                    deps='samba-util')
+                    source='lib/version.c')
 
 bld.SAMBA3_SUBSYSTEM('SLCACHE',
                     source='libsmb/samlogon_cache.c',
diff --git a/source4/include/includes.h b/source4/include/includes.h
index f22483080dc..667f2b2e6a9 100644
--- a/source4/include/includes.h
+++ b/source4/include/includes.h
@@ -57,9 +57,6 @@
 #endif
 #include "../lib/util/attr.h"
 
-/* copyright define */
-#include "../lib/util/copyright.h"
-
 /* debug.h need to be included before samba_util.h for the macro SMB_ASSERT */
 #include "../lib/util/debug.h"
 #include "../lib/util/samba_util.h"
diff --git a/source4/samba/server.c b/source4/samba/server.c
index d2bd3a59708..011d9d086d8 100644
--- a/source4/samba/server.c
+++ b/source4/samba/server.c
@@ -630,10 +630,10 @@ static int binary_smbd_main(TALLOC_CTX *mem_ctx,
 	   so set our umask to 0 */
 	umask(0);
 
-	DBG_STARTUP_NOTICE("%s version %s started.\n"
-			COPYRIGHT_STARTUP_MESSAGE "\n",
-		binary_name,
-		SAMBA_VERSION_STRING);
+	DBG_STARTUP_NOTICE("%s version %s started.\n%s\n",
+			   binary_name,
+			   SAMBA_VERSION_STRING,
+			   SAMBA_COPYRIGHT_STRING);
 
 	if (sizeof(uint16_t) < 2 ||
 			sizeof(uint32_t) < 4 ||


-- 
Samba Shared Repository



More information about the samba-cvs mailing list