[SCM] Samba Shared Repository - branch master updated
Stefan Metzmacher
metze at samba.org
Sat Jan 19 04:15:02 MST 2013
The branch, master has been updated
via 853360b Fix warnings with mismatched sizes in arguments to DEBUG statements.
via 80a6fe8 Remove some unused variables.
via dda4814 heimdal_build: Try again to sort out the strerror_r mess
via d90b709 printing: Free talloc_stackframe() on all exit paths
from 63a7d38 nsswitch: Fix two bitfield constants being the same.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 853360b8e558f39218fc150ead367255f3a010b2
Author: Jeremy Allison <jra at samba.org>
Date: Fri Jan 18 13:57:16 2013 -0800
Fix warnings with mismatched sizes in arguments to DEBUG statements.
This can cause compile errors on 32-bit systems.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
Autobuild-User(master): Stefan Metzmacher <metze at samba.org>
Autobuild-Date(master): Sat Jan 19 12:14:13 CET 2013 on sn-devel-104
commit 80a6fe84271d15cc22caa3d08768ab5559ef9ed7
Author: Jeremy Allison <jra at samba.org>
Date: Wed Jan 16 16:12:29 2013 -0800
Remove some unused variables.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
commit dda48146a2781fe685eeb9dc5194d142ee5ca0ef
Author: Andrew Bartlett <abartlet at samba.org>
Date: Mon Nov 19 23:25:45 2012 +1100
heimdal_build: Try again to sort out the strerror_r mess
Reviewed-by: Stefan Metzmacher <metze at samba.org>
commit d90b709ebb22fb40cbd46bdddd28d9ec1be7b0ce
Author: Andrew Bartlett <abartlet at samba.org>
Date: Fri Jan 18 13:39:13 2013 +1100
printing: Free talloc_stackframe() on all exit paths
Reviewed-by: Stefan Metzmacher <metze at samba.org>
-----------------------------------------------------------------------
Summary of changes:
lib/replace/replace.c | 2 +-
lib/replace/replace.h | 3 ++-
lib/tdb/tools/tdbdump.c | 3 ---
source3/printing/nt_printing.c | 2 ++
source3/smbd/smb2_ioctl_network_fs.c | 16 ++++++++--------
source4/heimdal_build/roken.h | 8 --------
source4/heimdal_build/wscript_build | 1 +
source4/heimdal_build/wscript_configure | 7 +++++++
8 files changed, 21 insertions(+), 21 deletions(-)
Changeset truncated at 500 lines:
diff --git a/lib/replace/replace.c b/lib/replace/replace.c
index 8f1315a..37edb31 100644
--- a/lib/replace/replace.c
+++ b/lib/replace/replace.c
@@ -785,7 +785,7 @@ char *rep_get_current_dir_name(void)
}
#endif
-#if !defined(HAVE_STRERROR_R) && !defined(strerror_r)
+#ifndef HAVE_STRERROR_R
int rep_strerror_r(int errnum, char *buf, size_t buflen)
{
char *s = strerror(errnum);
diff --git a/lib/replace/replace.h b/lib/replace/replace.h
index 62172a9..9774da4 100644
--- a/lib/replace/replace.h
+++ b/lib/replace/replace.h
@@ -570,7 +570,8 @@ ssize_t rep_pwrite(int __fd, const void *__buf, size_t __nbytes, off_t __offset)
char *rep_get_current_dir_name(void);
#endif
-#if !defined(HAVE_STRERROR_R) && !defined(strerror_r)
+#ifndef HAVE_STRERROR_R
+#define strerror_r rep_strerror_r
int rep_strerror_r(int errnum, char *buf, size_t buflen);
#endif
diff --git a/lib/tdb/tools/tdbdump.c b/lib/tdb/tools/tdbdump.c
index bcd395f..47a84d2 100644
--- a/lib/tdb/tools/tdbdump.c
+++ b/lib/tdb/tools/tdbdump.c
@@ -55,9 +55,6 @@ static void log_stderr(struct tdb_context *tdb, enum tdb_debug_level level,
const char *fmt, ...)
{
va_list ap;
- char *ptr = NULL;
- int debuglevel = 0;
- int ret;
const char *name = tdb_name(tdb);
const char *prefix = "";
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 7bf2c55..1539b89 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -85,11 +85,13 @@ static bool print_driver_directories_init(void)
if (service < 0) {
/* We don't have a print$ share */
DEBUG(5, ("No print$ share has been configured.\n"));
+ talloc_free(mem_ctx);
return true;
}
driver_path = lp_pathname(mem_ctx, service);
if (driver_path == NULL) {
+ talloc_free(mem_ctx);
return false;
}
diff --git a/source3/smbd/smb2_ioctl_network_fs.c b/source3/smbd/smb2_ioctl_network_fs.c
index a8d64e3..1e1e3e5 100644
--- a/source3/smbd/smb2_ioctl_network_fs.c
+++ b/source3/smbd/smb2_ioctl_network_fs.c
@@ -160,7 +160,7 @@ static struct tevent_req *fsctl_srv_copychunk_send(TALLOC_CTX *mem_ctx,
if (in_max_output < sizeof(struct srv_copychunk_rsp)) {
DEBUG(3, ("max output %d not large enough to hold copy chunk "
"response %lu\n", (int)in_max_output,
- sizeof(struct srv_copychunk_rsp)));
+ (unsigned long)sizeof(struct srv_copychunk_rsp)));
state->status = NT_STATUS_INVALID_PARAMETER;
tevent_req_nterror(req, state->status);
return tevent_req_post(req, ev);
@@ -253,14 +253,14 @@ static void fsctl_srv_copychunk_vfs_done(struct tevent_req *subreq)
&chunk_nwritten);
TALLOC_FREE(subreq);
if (NT_STATUS_IS_OK(status)) {
- DEBUG(10, ("good copy chunk recv %d of %d\n",
- state->recv_count,
- state->dispatch_count));
+ DEBUG(10, ("good copy chunk recv %u of %u\n",
+ (unsigned int)state->recv_count,
+ (unsigned int)state->dispatch_count));
state->total_written += chunk_nwritten;
} else {
- DEBUG(0, ("bad status in copy chunk recv %d of %d: %s\n",
- state->recv_count,
- state->dispatch_count,
+ DEBUG(0, ("bad status in copy chunk recv %u of %u: %s\n",
+ (unsigned int)state->recv_count,
+ (unsigned int)state->dispatch_count,
nt_errstr(status)));
state->bad_recv_count++;
/* may overwrite previous failed status */
@@ -427,7 +427,7 @@ static NTSTATUS fsctl_srv_req_resume_key(TALLOC_CTX *mem_ctx,
if (in_max_output < output.length) {
DEBUG(1, ("max output %u too small for resume key rsp %ld\n",
- in_max_output, (long int)output.length));
+ (unsigned int)in_max_output, (long int)output.length));
return NT_STATUS_INVALID_PARAMETER;
}
*out_output = output;
diff --git a/source4/heimdal_build/roken.h b/source4/heimdal_build/roken.h
index b762545..9752c04 100644
--- a/source4/heimdal_build/roken.h
+++ b/source4/heimdal_build/roken.h
@@ -123,14 +123,6 @@
#define HAVE_SETEUID
#endif
-/* force the use of the libreplace strerror_r */
-#ifndef HAVE_STRERROR_R
-#define HAVE_STRERROR_R
-#endif
-#ifndef STRERROR_R_PROTO_COMPATIBLE
-#define STRERROR_R_PROTO_COMPATIBLE
-#endif
-
#ifndef HAVE_DIRFD
#ifdef HAVE_DIR_DD_FD
#define dirfd(x) ((x)->dd_fd)
diff --git a/source4/heimdal_build/wscript_build b/source4/heimdal_build/wscript_build
index f4837ac..f447115 100644
--- a/source4/heimdal_build/wscript_build
+++ b/source4/heimdal_build/wscript_build
@@ -408,6 +408,7 @@ if not bld.CONFIG_SET('USING_SYSTEM_ROKEN'):
lib/roken/resolve.c
lib/roken/socket.c
lib/roken/roken_gethostby.c
+ lib/roken/strerror_r.c
'''
HEIMDAL_LIBRARY('roken',
diff --git a/source4/heimdal_build/wscript_configure b/source4/heimdal_build/wscript_configure
index 168be6d..2bb465a 100755
--- a/source4/heimdal_build/wscript_configure
+++ b/source4/heimdal_build/wscript_configure
@@ -28,6 +28,13 @@ conf.CHECK_FUNCS('''atexit cgetent getprogname setprogname gethostname
strptime strsep strsep_copy strtok_r strupr swab umask uname unsetenv
closefrom err warn errx warnx flock writev''')
+if conf.CHECK_FUNCS('strerror_r'):
+ # Check if strerror_r is BSD compatible (default GNU implementation is not what Heimdal expects)
+ conf.CHECK_CODE('int strerror_r(int errnum, char *buf, size_t buflen);',
+ 'STRERROR_R_PROTO_COMPATIBLE',
+ headers='string.h', addmain=False, link=False,
+ msg="Checking for XSI (rather than GNU) prototype for strerror_r")
+
conf.CHECK_FUNCS_IN('hstrerror', 'resolv socket nsl', checklibc=True)
conf.CHECK_FUNCS_IN('''getnameinfo sendmsg socket getipnodebyname gethostent gethostent_r
sethostent endhostent getipnodebyaddr freehostent gethostbyname
--
Samba Shared Repository
More information about the samba-cvs
mailing list