1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-27 22:50:26 +03:00

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@samba.org>
Reviewed-by: Björn Jacke <bjacke@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Dec 15 10:44:42 UTC 2023 on atb-devel-224
This commit is contained in:
Stefan Metzmacher 2023-12-14 11:35:19 +01:00
parent 83e36d97c9
commit d23d6145bf
16 changed files with 33 additions and 58 deletions

View File

@ -13,6 +13,8 @@
# #
########################################################
SAMBA_COPYRIGHT_STRING="Copyright Andrew Tridgell and the Samba Team 1992-2023"
########################################################
# This are the main SAMBA version numbers #
# #

View File

@ -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,

View File

@ -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

View File

@ -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 */

View File

@ -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__ */

View File

@ -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"

View File

@ -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 */

View File

@ -25,3 +25,8 @@ const char *samba_version_string(void)
{
return SAMBA_VERSION_STRING;
}
const char *samba_copyright_string(void)
{
return SAMBA_COPYRIGHT_STRING;
}

View File

@ -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)) {

View File

@ -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);

View File

@ -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) {

View File

@ -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()));

View File

@ -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

View File

@ -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',

View File

@ -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"

View File

@ -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 ||