[SCM] Samba Shared Repository - branch master updated
Jeremy Allison
jra at samba.org
Wed Oct 13 02:34:02 UTC 2021
The branch, master has been updated
via fc2347be4ed Fix detection of rpc/xdr.h on macOS
via 99ee7f3d89c vfs_preopen.c: Fix -Wformat error on macOS
via 1d893f72320 source3/smbd/statcache.c: Fix -Wformat build error on macOS
via 6dadf251fc0 sec_ctx.c: Fix -Wunused-function warning on macOS
via e4eb1f15101 source3/printing/queue_process.c: fix build on macOS
via d3675e66fe8 audit_logging.c: fix compilation on macOS
via 2564e96e831 charset_macosxfs.c: fix compilation on macOS
from 1719ef7893a ctdb-tests: Drop unused function ctdb_get_all_public_addresses()
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit fc2347be4ed9a9083a56468ca5e43070059038c5
Author: Alex Richardson <Alexander.Richardson at cl.cam.ac.uk>
Date: Wed Sep 8 14:42:57 2021 +0100
Fix detection of rpc/xdr.h on macOS
We need to include rpc/types.h first to include this header.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14862
Signed-off-by: Alex Richardson <Alexander.Richardson at cl.cam.ac.uk>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Wed Oct 13 02:33:05 UTC 2021 on sn-devel-184
commit 99ee7f3d89cce9b07b8ed3f55f7e8e67baed6ee1
Author: Alex Richardson <Alexander.Richardson at cl.cam.ac.uk>
Date: Wed Sep 8 14:42:25 2021 +0100
vfs_preopen.c: Fix -Wformat error on macOS
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14862
Signed-off-by: Alex Richardson <Alexander.Richardson at cl.cam.ac.uk>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 1d893f723207040c285ed061db3a690099f8c929
Author: Alex Richardson <Alexander.Richardson at cl.cam.ac.uk>
Date: Wed Sep 8 13:29:54 2021 +0100
source3/smbd/statcache.c: Fix -Wformat build error on macOS
The format string uses PRIx64, so we should be using uint64_t and not
uintmax_t.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14862
Signed-off-by: Alex Richardson <Alexander.Richardson at cl.cam.ac.uk>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 6dadf251fc02c2b3237c48d316f5cb8791ab4f76
Author: Alex Richardson <Alexander.Richardson at cl.cam.ac.uk>
Date: Wed Sep 8 13:27:41 2021 +0100
sec_ctx.c: Fix -Wunused-function warning on macOS
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14862
Signed-off-by: Alex Richardson <Alexander.Richardson at cl.cam.ac.uk>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit e4eb1f151011d2bd6a2d39b156663ddd9126d345
Author: Alex Richardson <Alexander.Richardson at cl.cam.ac.uk>
Date: Wed Sep 8 13:25:04 2021 +0100
source3/printing/queue_process.c: fix build on macOS
On macOS environ is defined to (*_NSGetEnviron()) in lib/replace/replace.h
and otherwise the `extern char **environ` can be found there.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14862
Signed-off-by: Alex Richardson <Alexander.Richardson at cl.cam.ac.uk>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit d3675e66fe8eec15076c6b88e47b627ee80c6f9e
Author: Alex Richardson <Alexander.Richardson at cl.cam.ac.uk>
Date: Wed Sep 8 12:57:03 2021 +0100
audit_logging.c: fix compilation on macOS
On macOS tv_usec is an int so failus the build with -Werror,-Wformat.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14862
Signed-off-by: Alex Richardson <Alexander.Richardson at cl.cam.ac.uk>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 2564e96e8319b4cb4c987dd2a03cf8a293db985a
Author: Alex Richardson <Alexander.Richardson at cl.cam.ac.uk>
Date: Wed Sep 8 12:52:57 2021 +0100
charset_macosxfs.c: fix compilation on macOS
The DEBUG macro was missing and the CFStringGetBytes() was triggering a
-Werror,-Wpointer-sign build failure.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14862
Signed-off-by: Alex Richardson <Alexander.Richardson at cl.cam.ac.uk>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
-----------------------------------------------------------------------
Summary of changes:
lib/audit_logging/audit_logging.c | 2 +-
lib/util/charset/charset_macosxfs.c | 3 ++-
source3/modules/vfs_preopen.c | 2 +-
source3/printing/queue_process.c | 2 --
source3/smbd/sec_ctx.c | 20 +++++++++-----------
source3/smbd/statcache.c | 2 +-
source3/wscript | 2 +-
7 files changed, 15 insertions(+), 18 deletions(-)
Changeset truncated at 500 lines:
diff --git a/lib/audit_logging/audit_logging.c b/lib/audit_logging/audit_logging.c
index 9fe2d3ba45d..87378e1bb95 100644
--- a/lib/audit_logging/audit_logging.c
+++ b/lib/audit_logging/audit_logging.c
@@ -70,7 +70,7 @@ char* audit_get_timestamp(TALLOC_CTX *frame)
strftime(buffer, sizeof(buffer)-1, "%a, %d %b %Y %H:%M:%S", tm_info);
strftime(tz, sizeof(tz)-1, "%Z", tm_info);
- ts = talloc_asprintf(frame, "%s.%06ld %s", buffer, tv.tv_usec, tz);
+ ts = talloc_asprintf(frame, "%s.%06ld %s", buffer, (long)tv.tv_usec, tz);
if (ts == NULL) {
DBG_ERR("Out of memory formatting time stamp\n");
}
diff --git a/lib/util/charset/charset_macosxfs.c b/lib/util/charset/charset_macosxfs.c
index 55a6df85fb7..75dbb4bad87 100644
--- a/lib/util/charset/charset_macosxfs.c
+++ b/lib/util/charset/charset_macosxfs.c
@@ -32,6 +32,7 @@
#include "replace.h"
#include "charset.h"
#include "charset_proto.h"
+#include "lib/util/debug.h"
#undef realloc
#ifdef DARWINOS
@@ -378,7 +379,7 @@ size_t macosxfs_encoding_push(
charsconverted = CFStringGetBytes(
cfstring, CFRangeMake(0,cfsize),
script_code, 0, false,
- *outbuf, *outbytesleft, &outsize);
+ *(UInt8 **)outbuf, *outbytesleft, &outsize);
if (0 == charsconverted) {
debug_out("String conversion: "
diff --git a/source3/modules/vfs_preopen.c b/source3/modules/vfs_preopen.c
index ab0080c69f3..8d85dda92ec 100644
--- a/source3/modules/vfs_preopen.c
+++ b/source3/modules/vfs_preopen.c
@@ -642,7 +642,7 @@ static int preopen_openat(struct vfs_handle_struct *handle,
new_end = new_start + new_digits;
DBG_PREFIX(state->founddigits_dbglvl, (
- "Pattern(idx=%zd) found num_digits[%d] start_offset[%zd] parsed_num[%lu] fullpath[%s]\n",
+ "Pattern(idx=%zd) found num_digits[%d] start_offset[%zd] parsed_num[%"PRIu64"] fullpath[%s]\n",
match_idx, new_digits, new_start, num, new_template));
if (state->last_match_idx != match_idx) {
diff --git a/source3/printing/queue_process.c b/source3/printing/queue_process.c
index 9e1d21469ff..64414bb7d65 100644
--- a/source3/printing/queue_process.c
+++ b/source3/printing/queue_process.c
@@ -343,8 +343,6 @@ fail:
return NULL;
}
-extern char **environ;
-
/****************************************************************************
main thread of the background lpq updater
****************************************************************************/
diff --git a/source3/smbd/sec_ctx.c b/source3/smbd/sec_ctx.c
index 4ccda709528..56fdf1fe476 100644
--- a/source3/smbd/sec_ctx.c
+++ b/source3/smbd/sec_ctx.c
@@ -92,15 +92,6 @@ static bool become_gid(gid_t gid)
return True;
}
-/****************************************************************************
- Become the specified uid and gid.
-****************************************************************************/
-
-static bool become_id(uid_t uid, gid_t gid)
-{
- return become_gid(gid) && become_uid(uid);
-}
-
/****************************************************************************
Drop back to root privileges in order to change to another user.
****************************************************************************/
@@ -237,12 +228,19 @@ bool push_sec_ctx(void)
return True;
}
+#ifndef HAVE_DARWIN_INITGROUPS
/****************************************************************************
- Change UNIX security context. Calls panic if not successful so no return value.
+ Become the specified uid and gid.
****************************************************************************/
-#ifndef HAVE_DARWIN_INITGROUPS
+static bool become_id(uid_t uid, gid_t gid)
+{
+ return become_gid(gid) && become_uid(uid);
+}
+/****************************************************************************
+ Change UNIX security context. Calls panic if not successful so no return value.
+****************************************************************************/
/* Normal credential switch path. */
static void set_unix_security_ctx(uid_t uid, gid_t gid, int ngroups, gid_t *groups)
diff --git a/source3/smbd/statcache.c b/source3/smbd/statcache.c
index 63f41db1b1b..ddbd663ad5b 100644
--- a/source3/smbd/statcache.c
+++ b/source3/smbd/statcache.c
@@ -425,7 +425,7 @@ void stat_cache_delete(const char *name)
lname = talloc_asprintf(talloc_tos(),
STAT_CACHE_TWRP_TOKEN,
- (uintmax_t)0,
+ (uint64_t)0,
upper);
TALLOC_FREE(upper);
if (lname == NULL) {
diff --git a/source3/wscript b/source3/wscript
index 5662c588776..9a74b7d7f3f 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -1852,7 +1852,7 @@ main() {
conf.env.with_spotlight = True
if not conf.CONFIG_SET('HAVE_RPC_XDR_H'):
- conf.CHECK_HEADERS('rpc/xdr.h', lib='tirpc')
+ conf.CHECK_HEADERS('rpc/types.h rpc/xdr.h', together=True, lib='tirpc')
if conf.CHECK_FUNCS_IN('nscd_flush_cache', 'nscd', headers='libnscd.h'):
conf.DEFINE('HAVE_NSCD_FLUSH_CACHE', '1')
--
Samba Shared Repository
More information about the samba-cvs
mailing list