[SCM] Samba Shared Repository - branch master updated
Andrew Bartlett
abartlet at samba.org
Wed Jun 6 02:18:03 MDT 2012
The branch, master has been updated
via 01b726d s3-libsmb: Fix error messages to correctly mention PLAINTEXT not LM
via d2f6d0b build: Rationalise AIO support in configure, ensure on by default
via bbc1b0c lib/replace: Fix snprintf() override for systems with a broken snprintf()
from f1becfa s3: temporary hack to make the waf build work withouth autotools being required
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 01b726dbe8b3f9c65a24aac0436352650cd9d3aa
Author: Andrew Bartlett <abartlet at samba.org>
Date: Wed Jun 6 16:22:50 2012 +1000
s3-libsmb: Fix error messages to correctly mention PLAINTEXT not LM
Also make all the message say the same thing.
Andrew Bartlett
Autobuild-User: Andrew Bartlett <abartlet at samba.org>
Autobuild-Date: Wed Jun 6 10:17:55 CEST 2012 on sn-devel-104
commit d2f6d0ba1e362522438d78374715485daae10919
Author: Andrew Bartlett <abartlet at samba.org>
Date: Wed Jun 6 09:23:22 2012 +1000
build: Rationalise AIO support in configure, ensure on by default
With this change, the define to check for AIO is HAVE_AIO, consistant
with other subsystems.
It is now also on by default in the autoconf build, as it has been for waf.
Andrew Bartlett
commit bbc1b0c9853322da10483f72c020fe0dd83b28fa
Author: Andrew Bartlett <abartlet at samba.org>
Date: Tue Jun 5 23:27:58 2012 +1000
lib/replace: Fix snprintf() override for systems with a broken snprintf()
This ensures we provide the replacement functions that we need.
Andrew Bartlett
-----------------------------------------------------------------------
Summary of changes:
lib/replace/wscript | 2 +-
source3/configure.in | 38 ++++++++++++++++++--------------------
source3/include/includes.h | 4 ++--
source3/lib/system.c | 6 +++---
source3/libsmb/cliconnect.c | 12 ++++++------
source3/smbd/aio.c | 2 +-
source3/smbd/globals.c | 2 +-
source3/smbd/globals.h | 2 +-
source3/wscript | 2 --
9 files changed, 33 insertions(+), 37 deletions(-)
Changeset truncated at 500 lines:
diff --git a/lib/replace/wscript b/lib/replace/wscript
index a5a4486..efde441 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -475,7 +475,6 @@ REPLACEMENT_FUNCTIONS = {
'dprintf', 'get_current_dir_name',
'strerror_r', 'clock_gettime'],
'timegm.c': ['timegm'],
- 'snprintf.c': ['snprintf'],
}
@@ -484,6 +483,7 @@ def build(bld):
REPLACE_HOSTCC_SOURCE = ''
+ if not bld.CONFIG_SET('HAVE_C99_VSNPRINTF'): REPLACE_HOSTCC_SOURCE += ' snprintf.c'
if bld.CONFIG_SET('REPLACE_STRPTIME'): REPLACE_HOSTCC_SOURCE += ' strptime.c'
for filename, functions in REPLACEMENT_FUNCTIONS.iteritems():
for function in functions:
diff --git a/source3/configure.in b/source3/configure.in
index 7a9f03a..a11e96b 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -5339,15 +5339,21 @@ esac
#################################################
# check for AIO support
+with_aio=auto
AC_MSG_CHECKING(whether to support asynchronous io)
AC_ARG_WITH(aio-support,
-[AS_HELP_STRING([--with-aio-support], [Include asynchronous io support (default=no)])],
-[ case "$withval" in
- yes)
+[AS_HELP_STRING([--with-aio-support], [Include asynchronous io support (default=auto)])],
+[ case "$withval" in
+ yes|no)
+ with_aio=$withval
+ ;;
+ esac ])
- AC_MSG_RESULT(yes)
- case "$host_os" in
- *)
+AC_MSG_RESULT($with_aio)
+
+if test x"$with_aio" = x"no"; then
+ AC_DEFINE(HAVE_NO_AIO,1,[Whether no asynchronous io support should be built in])
+else
AIO_LIBS=$LIBS
no_rt_LIBS=$LIBS
AC_CHECK_LIB(rt,aio_read,[AIO_LIBS="$LIBS -lrt"])
@@ -5362,7 +5368,7 @@ AC_ARG_WITH(aio-support,
samba_cv_HAVE_AIO=yes,samba_cv_HAVE_AIO=no)
LIBS=$aio_LIBS])
if test x"$samba_cv_HAVE_AIO" = x"yes"; then
- AC_DEFINE(WITH_AIO, 1, [Using asynchronous io])
+ AC_DEFINE(HAVE_AIO, 1, [Using asynchronous io])
LIBS=$AIO_LIBS
AC_MSG_CHECKING(for aio_read)
AC_LINK_IFELSE([AC_LANG_SOURCE([#include <aio.h>
@@ -5405,19 +5411,11 @@ int main() { struct aiocb a; return aio_cancel(1, &a); }])],
int main() { struct aiocb a; return aio_suspend(&a, 1, NULL); }])],
[AC_DEFINE(HAVE_AIO_SUSPEND, 1, [Have aio_suspend]) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)])
+ else
+ AC_DEFINE(HAVE_NO_AIO,1,[Whether no asynchronous io support is available])
+ AC_MSG_RESULT(no)
fi
-
- ;;
- esac
- ;;
- *)
- AC_MSG_RESULT(no)
- AC_DEFINE(HAVE_NO_AIO,1,[Whether no asynchronous io support is available])
- ;;
- esac ],
- AC_DEFINE(HAVE_NO_AIO,1,[Whether no asynchronous io support should be built in])
- AC_MSG_RESULT(no)
-)
+fi
if test x"$samba_cv_HAVE_AIO" = x"yes"; then
if test x"$samba_cv_msghdr_msg_control" = x"yes" -o \
@@ -5455,7 +5453,7 @@ io_getevents(ctx, 1, 1, &ioev, &ts);],
samba_cv_HAVE_LINUX_KERNEL_AIO=yes,samba_cv_HAVE_LINUX_KERNEL_AIO=no)
LIBS=$aio_LIBS])
if test x"$samba_cv_HAVE_LINUX_KERNEL_AIO" = x"yes"; then
- AC_DEFINE(WITH_AIO, 1, [Using asynchronous io])
+ AC_DEFINE(HAVE_AIO, 1, [Using asynchronous io])
default_shared_modules="$default_shared_modules vfs_aio_linux"
fi
;;
diff --git a/source3/include/includes.h b/source3/include/includes.h
index f25d1c2..cb60dd2 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -149,7 +149,7 @@
#include <netgroup.h>
#endif
-#if defined(HAVE_AIO_H) && defined(WITH_AIO)
+#if defined(HAVE_AIO_H) && defined(HAVE_AIO)
#include <aio.h>
#endif
@@ -343,7 +343,7 @@ typedef struct stat_ex SMB_STRUCT_STAT;
*/
#ifndef SMB_STRUCT_AIOCB
-# if defined(WITH_AIO)
+# if defined(HAVE_AIO)
# define SMB_STRUCT_AIOCB struct aiocb
# else
# define SMB_STRUCT_AIOCB int /* AIO not being used but we still need the define.... */
diff --git a/source3/lib/system.c b/source3/lib/system.c
index 8c1ae94..92596a8 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -1365,7 +1365,7 @@ int sys_get_number_of_cores(void)
}
#endif
-#if defined(WITH_AIO)
+#if defined(HAVE_AIO)
/*******************************************************************
An aio_read wrapper.
@@ -1464,7 +1464,7 @@ int sys_aio_suspend(const SMB_STRUCT_AIOCB * const cblist[], int n, const struct
return -1;
#endif
}
-#else /* !WITH_AIO */
+#else /* !HAVE_AIO */
int sys_aio_read(SMB_STRUCT_AIOCB *aiocb)
{
@@ -1507,4 +1507,4 @@ int sys_aio_suspend(const SMB_STRUCT_AIOCB * const cblist[], int n, const struct
errno = ENOSYS;
return -1;
}
-#endif /* WITH_AIO */
+#endif /* HAVE_AIO */
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index df8c6fc..f46ce06 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -2062,7 +2062,7 @@ NTSTATUS cli_session_setup(struct cli_state *cli,
if ((sec_mode & NEGOTIATE_SECURITY_CHALLENGE_RESPONSE) == 0 &&
!lp_client_plaintext_auth() && (*pass)) {
- DEBUG(1, ("Server requested LM password but 'client plaintext auth = no'"
+ DEBUG(1, ("Server requested PLAINTEXT password but 'client plaintext auth = no'"
" or 'client ntlmv2 auth = yes'\n"));
return NT_STATUS_ACCESS_DENIED;
}
@@ -2101,7 +2101,7 @@ NTSTATUS cli_session_setup(struct cli_state *cli,
if ((sec_mode & NEGOTIATE_SECURITY_CHALLENGE_RESPONSE) == 0) {
if (!lp_client_plaintext_auth() && (*pass)) {
- DEBUG(1, ("Server requested LM password but 'client plaintext auth = no'"
+ DEBUG(1, ("Server requested PLAINTEXT password but 'client plaintext auth = no'"
" or 'client ntlmv2 auth = yes'\n"));
return NT_STATUS_ACCESS_DENIED;
}
@@ -2294,9 +2294,9 @@ struct tevent_req *cli_tcon_andx_create(TALLOC_CTX *mem_ctx,
uint8_t *tmp_pass;
if (!lp_client_plaintext_auth() && (*pass)) {
- DEBUG(1, ("Server requested plaintext "
+ DEBUG(1, ("Server requested PLAINTEXT "
"password but "
- "'client lanman auth = no' or 'client ntlmv2 auth = yes'\n"));
+ "'client plaintext auth = no' or 'client ntlmv2 auth = yes'\n"));
goto access_denied;
}
@@ -2872,8 +2872,8 @@ NTSTATUS cli_raw_tcon(struct cli_state *cli,
NTSTATUS status;
if (!lp_client_plaintext_auth() && (*pass)) {
- DEBUG(1, ("Server requested plaintext password but 'client "
- "plaintext auth' is disabled\n"));
+ DEBUG(1, ("Server requested PLAINTEXT password but 'client plaintext auth = no'"
+ " or 'client ntlmv2 auth = yes'\n"));
return NT_STATUS_ACCESS_DENIED;
}
diff --git a/source3/smbd/aio.c b/source3/smbd/aio.c
index aa8aee0..131094d 100644
--- a/source3/smbd/aio.c
+++ b/source3/smbd/aio.c
@@ -23,7 +23,7 @@
#include "smbd/globals.h"
#include "../lib/util/tevent_ntstatus.h"
-#if defined(WITH_AIO)
+#if defined(HAVE_AIO)
/* The signal we'll use to signify aio done. */
#ifndef RT_SIGNAL_AIO
diff --git a/source3/smbd/globals.c b/source3/smbd/globals.c
index f107c0e..7c4ffec 100644
--- a/source3/smbd/globals.c
+++ b/source3/smbd/globals.c
@@ -25,7 +25,7 @@
#include "messages.h"
#include "tdb_compat.h"
-#if defined(WITH_AIO)
+#if defined(HAVE_AIO)
struct aio_extra *aio_list_head = NULL;
struct tevent_signal *aio_signal_event = NULL;
int aio_pending_size = 0;
diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h
index ccf79fe..2c00566 100644
--- a/source3/smbd/globals.h
+++ b/source3/smbd/globals.h
@@ -20,7 +20,7 @@
#include "system/select.h"
-#if defined(WITH_AIO)
+#if defined(HAVE_AIO)
struct aio_extra;
extern struct aio_extra *aio_list_head;
extern struct tevent_signal *aio_signal_event;
diff --git a/source3/wscript b/source3/wscript
index 9d8264c..ccedb69 100755
--- a/source3/wscript
+++ b/source3/wscript
@@ -362,8 +362,6 @@ return acl_get_perm_np(permset_d, perm);
headers='sys/types.h aio.h',
lib='aio rt')
if conf.CONFIG_SET('HAVE_AIO'):
- conf.DEFINE('WITH_AIO', '1')
- if conf.CONFIG_SET('HAVE_AIO'):
conf.CHECK_CODE('struct aiocb a; return aio_read(&a);', 'HAVE_AIO_READ', msg='Checking for aio_read', headers='aio.h', lib='aio rt')
conf.CHECK_CODE('struct aiocb a; return aio_write(&a);', 'HAVE_AIO_WRITE', msg='Checking for aio_write', headers='aio.h', lib='aio rt')
conf.CHECK_CODE('struct aiocb a; return aio_fsync(1, &a);', 'HAVE_AIO_FSYNC', msg='Checking for aio_fsync', headers='aio.h', lib='aio rt')
--
Samba Shared Repository
More information about the samba-cvs
mailing list