[SCM] Samba Shared Repository - branch v3-6-test updated
Jeremy Allison
jra at samba.org
Wed Dec 22 17:38:05 MST 2010
The branch, v3-6-test has been updated
via 32057f3 s3: "make etags" should not grow TAGS infinitely... (cherry picked from commit fd49ed238c5e82c8444eec35a09c32c191b76074)
via 77a6ab1 s3: Use the right uid winbindd_raw_kerberos_login() (cherry picked from commit 92e138f920126f417a20bc49aebe0c3cbab5056d)
via b8d541d wb_reqtrans is not used in libwbclient (cherry picked from commit a881d6ab867a1d28c08a993a6212bd8bbdea6038)
via 87777cf Move wbc_async.[ch] to its only user: smbtorture3 (cherry picked from commit c0a7c9f99188ebb3cd27094b9364449bcc2f80d8)
via f551cf7 libwbclient: Put the wb_reqtrans definitions into wb_reqtrans.h (cherry picked from commit 6bfd745c61458308c3a05a1678cf6507d1a8a375)
via f60e96e s3: wcache_invalidate_samlogon only needs the SID (cherry picked from commit a159958065e195413f459a82643c780d80b6c088)
via 5da3528 s3: netsamlogon_clear_cached_user only needs the SID (cherry picked from commit e113b1c64f1dfd84911050379d06d9ffc4958db3)
via ec67223 s3: Remove two pointless slprintf calls (cherry picked from commit ff5f767d0e31ea0c5311ce48d8e0387eebd84ce8)
via aec389a s3: FreeBSD has getpeereid(), use it (cherry picked from commit d39fedaa69b20e8f29fff9cd9a09c1bb1ecec7be)
via d9ce86c s3: Reply correctly to FSCTL_IS_VOLUME_DIRTY (cherry picked from commit d082701ea5131b02a49321ef29d1aa58a80ee92a)
via d9f072e s3: Fix some nonempty blank lines (cherry picked from commit 356add8a638b737cf72181beaa13342ab920ace8)
via 44a05b3 s3: Did I say this module is from hell? (cherry picked from commit cf74a4857c051b43b1f6a06b714a93a65e8a1f90)
via 1181bfa s3: re-add some debugs to check_reduced_name (cherry picked from commit 98a2fff2e5dbcc6f125136f94ff552c3fb05cc01)
from 92fd198 s3: Remove unused "retry" from cli_start_connection
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test
- Log -----------------------------------------------------------------
commit 32057f3c865c3743e36de345c6fa2398f7df88b2
Author: Volker Lendecke <vl at samba.org>
Date: Sun Dec 19 14:00:05 2010 +0100
s3: "make etags" should not grow TAGS infinitely...
(cherry picked from commit fd49ed238c5e82c8444eec35a09c32c191b76074)
commit 77a6ab1eee261f4f83f7747804ec1a80da801feb
Author: Volker Lendecke <vl at samba.org>
Date: Sat Dec 11 10:29:57 2010 +0100
s3: Use the right uid winbindd_raw_kerberos_login()
(cherry picked from commit 92e138f920126f417a20bc49aebe0c3cbab5056d)
commit b8d541d3425d0a7356319d828353be2c65f34977
Author: Volker Lendecke <vl at samba.org>
Date: Wed Dec 8 19:51:14 2010 +0100
wb_reqtrans is not used in libwbclient
(cherry picked from commit a881d6ab867a1d28c08a993a6212bd8bbdea6038)
commit 87777cff56665b3bb0f314ee76ed4fbeec1c4ee7
Author: Volker Lendecke <vl at samba.org>
Date: Wed Dec 8 20:11:46 2010 +0100
Move wbc_async.[ch] to its only user: smbtorture3
(cherry picked from commit c0a7c9f99188ebb3cd27094b9364449bcc2f80d8)
commit f551cf7908db4dfac5d0cd9a4a3f6d968b255811
Author: Volker Lendecke <vl at samba.org>
Date: Wed Dec 8 20:06:03 2010 +0100
libwbclient: Put the wb_reqtrans definitions into wb_reqtrans.h
(cherry picked from commit 6bfd745c61458308c3a05a1678cf6507d1a8a375)
commit f60e96e9b9b040286901a620aec95b40369cee5b
Author: Volker Lendecke <vl at samba.org>
Date: Sat Dec 11 14:27:54 2010 +0100
s3: wcache_invalidate_samlogon only needs the SID
(cherry picked from commit a159958065e195413f459a82643c780d80b6c088)
commit 5da3528988258afc74a7771063f520d9435df1ff
Author: Volker Lendecke <vl at samba.org>
Date: Sat Dec 11 14:19:50 2010 +0100
s3: netsamlogon_clear_cached_user only needs the SID
(cherry picked from commit e113b1c64f1dfd84911050379d06d9ffc4958db3)
commit ec67223f6e96a67179d7a254e8370814d97e426d
Author: Volker Lendecke <vl at samba.org>
Date: Sat Dec 11 14:16:51 2010 +0100
s3: Remove two pointless slprintf calls
(cherry picked from commit ff5f767d0e31ea0c5311ce48d8e0387eebd84ce8)
commit aec389a086cb2b320afe2cb5bc8e308f1297ac3f
Author: Volker Lendecke <vl at samba.org>
Date: Fri Dec 10 23:02:19 2010 +0100
s3: FreeBSD has getpeereid(), use it
(cherry picked from commit d39fedaa69b20e8f29fff9cd9a09c1bb1ecec7be)
commit d9ce86cc3a6b07a64e455b3e3f353325d7a94c7b
Author: Volker Lendecke <vl at samba.org>
Date: Fri Dec 10 08:48:19 2010 -0700
s3: Reply correctly to FSCTL_IS_VOLUME_DIRTY
(cherry picked from commit d082701ea5131b02a49321ef29d1aa58a80ee92a)
commit d9f072ea1652cf1b2a872b79b939f9ccf3436627
Author: Volker Lendecke <vl at samba.org>
Date: Fri Dec 10 19:59:06 2010 +0100
s3: Fix some nonempty blank lines
(cherry picked from commit 356add8a638b737cf72181beaa13342ab920ace8)
commit 44a05b3b85c4f7eae4311dd7b02d83a1a7fdec8b
Author: Volker Lendecke <vl at samba.org>
Date: Tue Dec 7 14:40:13 2010 +0100
s3: Did I say this module is from hell?
(cherry picked from commit cf74a4857c051b43b1f6a06b714a93a65e8a1f90)
commit 1181bfaefa52b8a8e1e7ad4367537f8a60a53f80
Author: Volker Lendecke <vl at samba.org>
Date: Tue Nov 30 18:21:46 2010 +0100
s3: re-add some debugs to check_reduced_name
(cherry picked from commit 98a2fff2e5dbcc6f125136f94ff552c3fb05cc01)
-----------------------------------------------------------------------
Summary of changes:
source3/Makefile.in | 7 +-
source3/configure.in | 12 ++++
source3/include/ntioctl.h | 1 +
source3/include/proto.h | 2 +-
source3/lib/system.c | 4 +
.../libwbclient => source3/lib}/wb_reqtrans.c | 2 +-
source3/lib/wb_reqtrans.h | 61 ++++++++++++++++++++
source3/libsmb/samlogon_cache.c | 16 ++----
source3/modules/vfs_shadow_copy2.c | 2 +-
source3/smbd/negprot.c | 44 +++++++-------
source3/smbd/nttrans.c | 9 +++
source3/smbd/vfs.c | 2 +
source3/torture/torture.c | 2 +-
.../libwbclient => source3/torture}/wbc_async.c | 2 +-
.../libwbclient => source3/torture}/wbc_async.h | 31 +----------
source3/winbindd/winbindd.c | 2 +-
source3/winbindd/winbindd_cache.c | 11 +--
source3/winbindd/winbindd_dual.c | 2 +-
source3/winbindd/winbindd_pam.c | 16 ++++--
source3/winbindd/winbindd_proto.h | 2 +-
source3/wscript_build | 6 +-
21 files changed, 147 insertions(+), 89 deletions(-)
rename {nsswitch/libwbclient => source3/lib}/wb_reqtrans.c (99%)
create mode 100644 source3/lib/wb_reqtrans.h
rename {nsswitch/libwbclient => source3/torture}/wbc_async.c (99%)
rename {nsswitch/libwbclient => source3/torture}/wbc_async.h (82%)
Changeset truncated at 500 lines:
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 874c2a8..3e49869 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -1205,8 +1205,8 @@ SMBTORTURE_OBJ1 = torture/torture.o torture/nbio.o torture/scanner.o torture/uta
SMBTORTURE_OBJ = $(SMBTORTURE_OBJ1) $(PARAM_OBJ) $(TLDAP_OBJ) \
$(LIBSMB_OBJ) $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) \
@LIBWBCLIENT_STATIC@ \
- ../nsswitch/libwbclient/wbc_async.o \
- ../nsswitch/libwbclient/wb_reqtrans.o \
+ torture/wbc_async.o \
+ lib/wb_reqtrans.o \
$(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) $(LIBCLI_ECHO_OBJ)
MASKTEST_OBJ = torture/masktest.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
@@ -1402,7 +1402,7 @@ WINBINDD_OBJ1 = \
auth/server_info_sam.o \
auth/user_info.o \
auth/pampass.o \
- ../nsswitch/libwbclient/wb_reqtrans.o
+ lib/wb_reqtrans.o
WINBINDD_OBJ = \
$(WINBINDD_OBJ1) $(PASSDB_OBJ) $(GROUPDB_OBJ) \
@@ -3313,6 +3313,7 @@ include/build_env.h: script/build_env.sh
proto::
etags::
+ rm -f TAGS
find $(srcdir)/.. -name "*.[ch]" | xargs -n 100 etags --append $(ETAGS_OPTIONS)
ctags::
diff --git a/source3/configure.in b/source3/configure.in
index c772f58..ed99b17 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -6388,6 +6388,18 @@ if test x"$samba_cv_HAVE_PEERCRED" = x"yes"; then
AC_DEFINE(HAVE_PEERCRED,1,[Whether we can use SO_PEERCRED to get socket credentials])
fi
+AC_CACHE_CHECK([for getpeereid],samba_cv_HAVE_GETPEEREID,[
+AC_TRY_LINK([#include <sys/types.h>
+#include <unistd.h>],
+[uid_t uid; gid_t gid; int ret;
+ ret = getpeereid(0, &uid, &gid);
+],
+samba_cv_HAVE_GETPEEREID=yes,samba_cv_HAVE_GETPEEREID=no)])
+if test x"$samba_cv_HAVE_GETPEEREID" = xyes; then
+ AC_DEFINE(HAVE_GETPEEREID,1,
+ [Whether we have getpeereid to get socket credentials])
+fi
+
#################################################
# Check to see if we should use the included popt
diff --git a/source3/include/ntioctl.h b/source3/include/ntioctl.h
index c565b8f..41b1dce 100644
--- a/source3/include/ntioctl.h
+++ b/source3/include/ntioctl.h
@@ -38,6 +38,7 @@
#define FSCTL_UNLOCK_VOLUME 0x0009001C
#define FSCTL_GET_COMPRESSION 0x0009003C
#define FSCTL_SET_COMPRESSION 0x0009C040
+#define FSCTL_IS_VOLUME_DIRTY 0x00090078
#define FSCTL_REQUEST_FILTER_OPLOCK 0x0009008C
#define FSCTL_FIND_FILES_BY_SID 0x0009008F
#define FSCTL_FILESYS_GET_STATISTICS 0x00090090
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 7ae71a0..f9bf72f 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -2832,7 +2832,7 @@ NTSTATUS remote_password_change(const char *remote_machine, const char *user_nam
bool netsamlogon_cache_init(void);
bool netsamlogon_cache_shutdown(void);
-void netsamlogon_clear_cached_user(struct netr_SamInfo3 *info3);
+void netsamlogon_clear_cached_user(const struct dom_sid *user_sid);
bool netsamlogon_cache_store(const char *username, struct netr_SamInfo3 *info3);
struct netr_SamInfo3 *netsamlogon_cache_get(TALLOC_CTX *mem_ctx, const struct dom_sid *user_sid);
bool netsamlogon_cache_have(const struct dom_sid *user_sid);
diff --git a/source3/lib/system.c b/source3/lib/system.c
index d5b833c..4cf6a29 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -2665,6 +2665,10 @@ int sys_getpeereid( int s, uid_t *uid)
*uid = cred.uid;
return 0;
#else
+#if defined(HAVE_GETPEEREID)
+ gid_t gid;
+ return getpeereid(s, uid, &gid);
+#endif
errno = ENOSYS;
return -1;
#endif
diff --git a/nsswitch/libwbclient/wb_reqtrans.c b/source3/lib/wb_reqtrans.c
similarity index 99%
rename from nsswitch/libwbclient/wb_reqtrans.c
rename to source3/lib/wb_reqtrans.c
index 6dc429b..78f806d 100644
--- a/nsswitch/libwbclient/wb_reqtrans.c
+++ b/source3/lib/wb_reqtrans.c
@@ -32,7 +32,7 @@
#include "lib/util/tevent_unix.h"
#include "nsswitch/winbind_struct_protocol.h"
#include "nsswitch/libwbclient/wbclient.h"
-#include "nsswitch/libwbclient/wbc_async.h"
+#include "lib/wb_reqtrans.h"
/* can't use DEBUG here... */
#define DEBUG(a,b)
diff --git a/source3/lib/wb_reqtrans.h b/source3/lib/wb_reqtrans.h
new file mode 100644
index 0000000..941edf6
--- /dev/null
+++ b/source3/lib/wb_reqtrans.h
@@ -0,0 +1,61 @@
+/*
+ Unix SMB/CIFS implementation.
+ Headers for the async winbind client library
+ Copyright (C) Volker Lendecke 2008
+
+ ** NOTE! The following LGPL license applies to the wbclient
+ ** library. This does NOT imply that all of Samba is released
+ ** under the LGPL
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 3 of the License, or (at your option) any later version.
+
+ This library 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef _WB_REQTRANS_H_
+#define _WB_REQTRANS_H_
+
+#include <talloc.h>
+#include <tevent.h>
+#include "nsswitch/winbind_struct_protocol.h"
+
+struct tevent_req *wb_req_read_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ int fd, size_t max_extra_data);
+ssize_t wb_req_read_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
+ struct winbindd_request **preq, int *err);
+
+struct tevent_req *wb_req_write_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct tevent_queue *queue, int fd,
+ struct winbindd_request *wb_req);
+ssize_t wb_req_write_recv(struct tevent_req *req, int *err);
+
+struct tevent_req *wb_resp_read_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev, int fd);
+ssize_t wb_resp_read_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
+ struct winbindd_response **presp, int *err);
+
+struct tevent_req *wb_resp_write_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct tevent_queue *queue, int fd,
+ struct winbindd_response *wb_resp);
+ssize_t wb_resp_write_recv(struct tevent_req *req, int *err);
+
+struct tevent_req *wb_simple_trans_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct tevent_queue *queue, int fd,
+ struct winbindd_request *wb_req);
+int wb_simple_trans_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
+ struct winbindd_response **presponse, int *err);
+
+#endif /*_WB_REQTRANS_H_*/
diff --git a/source3/libsmb/samlogon_cache.c b/source3/libsmb/samlogon_cache.c
index 2e7a9c6..f3ef954 100644
--- a/source3/libsmb/samlogon_cache.c
+++ b/source3/libsmb/samlogon_cache.c
@@ -99,14 +99,9 @@ bool netsamlogon_cache_shutdown(void)
Clear cache getpwnam and getgroups entries from the winbindd cache
***********************************************************************/
-void netsamlogon_clear_cached_user(struct netr_SamInfo3 *info3)
+void netsamlogon_clear_cached_user(const struct dom_sid *user_sid)
{
- struct dom_sid user_sid;
- fstring keystr, tmp;
-
- if (!info3) {
- return;
- }
+ fstring keystr;
if (!netsamlogon_cache_init()) {
DEBUG(0,("netsamlogon_clear_cached_user: cannot open "
@@ -114,10 +109,9 @@ void netsamlogon_clear_cached_user(struct netr_SamInfo3 *info3)
NETSAMLOGON_TDB));
return;
}
- sid_compose(&user_sid, info3->base.domain_sid, info3->base.rid);
/* Prepare key as DOMAIN-SID/USER-RID string */
- slprintf(keystr, sizeof(keystr), "%s", sid_to_fstring(tmp, &user_sid));
+ sid_to_fstring(keystr, user_sid);
DEBUG(10,("netsamlogon_clear_cached_user: SID [%s]\n", keystr));
@@ -132,7 +126,7 @@ void netsamlogon_clear_cached_user(struct netr_SamInfo3 *info3)
bool netsamlogon_cache_store(const char *username, struct netr_SamInfo3 *info3)
{
TDB_DATA data;
- fstring keystr, tmp;
+ fstring keystr;
bool result = false;
struct dom_sid user_sid;
time_t t = time(NULL);
@@ -154,7 +148,7 @@ bool netsamlogon_cache_store(const char *username, struct netr_SamInfo3 *info3)
sid_compose(&user_sid, info3->base.domain_sid, info3->base.rid);
/* Prepare key as DOMAIN-SID/USER-RID string */
- slprintf(keystr, sizeof(keystr), "%s", sid_to_fstring(tmp, &user_sid));
+ sid_to_fstring(keystr, &user_sid);
DEBUG(10,("netsamlogon_cache_store: SID [%s]\n", keystr));
diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c
index f47b287..0393f30 100644
--- a/source3/modules/vfs_shadow_copy2.c
+++ b/source3/modules/vfs_shadow_copy2.c
@@ -674,7 +674,7 @@ static char *shadow_copy2_realpath(vfs_handle_struct *handle,
SHADOW2_NEXT(REALPATH, (handle, fname), char *,
NULL);
}
- SHADOW2_NEXT(REALPATH, (handle, fname), char *, NULL);
+ SHADOW2_NEXT(REALPATH, (handle, name), char *, NULL);
}
static const char *shadow_copy2_connectpath(struct vfs_handle_struct *handle,
diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c
index 443fac4..9cc34d8 100644
--- a/source3/smbd/negprot.c
+++ b/source3/smbd/negprot.c
@@ -3,17 +3,17 @@
negprot reply code
Copyright (C) Andrew Tridgell 1992-1998
Copyright (C) Volker Lendecke 2007
-
+
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/>.
*/
@@ -140,7 +140,7 @@ static void reply_lanman2(struct smb_request *req, uint16 choice)
struct smbd_server_connection *sconn = req->sconn;
sconn->smb1.negprot.encrypted_passwords = lp_encrypted_passwords();
-
+
if (lp_security()>=SEC_USER) {
secword |= NEGOTIATE_SECURITY_USER_LEVEL;
}
@@ -291,7 +291,7 @@ static void reply_nt1(struct smb_request *req, uint16 choice)
/* do spnego in user level security if the client
supports it and we can do encrypted passwords */
-
+
if (sconn->smb1.negprot.encrypted_passwords &&
(lp_security() != SEC_SHARE) &&
lp_use_spnego() &&
@@ -304,28 +304,28 @@ static void reply_nt1(struct smb_request *req, uint16 choice)
SSVAL(req->outbuf, smb_flg2,
req->flags2 | FLAGS2_EXTENDED_SECURITY);
}
-
+
capabilities |= CAP_NT_SMBS|CAP_RPC_REMOTE_APIS|CAP_UNICODE;
if (lp_unix_extensions()) {
capabilities |= CAP_UNIX;
}
-
+
if (lp_large_readwrite() && (SMB_OFF_T_BITS == 64))
capabilities |= CAP_LARGE_READX|CAP_LARGE_WRITEX|CAP_W2K_SMBS;
-
+
if (SMB_OFF_T_BITS == 64)
capabilities |= CAP_LARGE_FILES;
if (lp_readraw() && lp_writeraw())
capabilities |= CAP_RAW_MODE;
-
+
if (lp_nt_status_support())
capabilities |= CAP_STATUS32;
-
+
if (lp_host_msdfs())
capabilities |= CAP_DFS;
-
+
if (lp_security() >= SEC_USER) {
secword |= NEGOTIATE_SECURITY_USER_LEVEL;
}
@@ -351,9 +351,9 @@ static void reply_nt1(struct smb_request *req, uint16 choice)
SSVAL(req->outbuf,smb_vwv0,choice);
SCVAL(req->outbuf,smb_vwv1,secword);
-
+
set_Protocol(PROTOCOL_NT1);
-
+
SSVAL(req->outbuf,smb_vwv1+1,lp_maxmux()); /* maxmpx */
SSVAL(req->outbuf,smb_vwv2+1,1); /* num vcs */
SIVAL(req->outbuf,smb_vwv3+1,
@@ -364,7 +364,7 @@ static void reply_nt1(struct smb_request *req, uint16 choice)
clock_gettime(CLOCK_REALTIME,&ts);
put_long_date_timespec(TIMESTAMP_SET_NT_OR_BETTER,(char *)req->outbuf+smb_vwv11+1,ts);
SSVALS(req->outbuf,smb_vwv15+1,set_server_zone_offset(ts.tv_sec)/60);
-
+
if (!negotiate_spnego) {
/* Create a token value and add it to the outgoing packet. */
if (sconn->smb1.negprot.encrypted_passwords) {
@@ -482,7 +482,7 @@ protocol [LANMAN2.1]
* tim at fsg.com 09/29/95
* Win2K added by matty 17/7/99
*/
-
+
#define ARCH_WFWG 0x3 /* This is a fudge because WfWg is like Win95 */
#define ARCH_WIN95 0x2
#define ARCH_WINNT 0x4
@@ -491,9 +491,9 @@ protocol [LANMAN2.1]
#define ARCH_SAMBA 0x20
#define ARCH_CIFSFS 0x40
#define ARCH_VISTA 0x8C /* Vista is like XP/2K */
-
+
#define ARCH_ALL 0x7F
-
+
/* List of supported protocols, most desired first */
static const struct {
const char *proto_name;
@@ -662,10 +662,10 @@ void reply_negprot(struct smb_request *req)
set_remote_arch(RA_UNKNOWN);
break;
}
-
+
/* possibly reload - change of architecture */
reload_services(sconn->msg_ctx, sconn->sock, True);
-
+
/* moved from the netbios session setup code since we don't have that
when the client connects to port 445. Of course there is a small
window where we are listening to messages -- jerry */
@@ -673,7 +673,7 @@ void reply_negprot(struct smb_request *req)
serverid_register(sconn_server_id(sconn),
FLAG_MSG_GENERAL|FLAG_MSG_SMBD
|FLAG_MSG_PRINT_GENERAL);
-
+
/* Check for protocols, most desirable first */
for (protocol = 0; supported_protocols[protocol].proto_name; protocol++) {
i = 0;
@@ -687,7 +687,7 @@ void reply_negprot(struct smb_request *req)
if(choice != -1)
break;
}
-
+
if(choice != -1) {
fstrcpy(remote_proto,supported_protocols[protocol].short_name);
reload_services(sconn->msg_ctx, sconn->sock, True);
@@ -698,7 +698,7 @@ void reply_negprot(struct smb_request *req)
reply_outbuf(req, 1, 0);
SSVAL(req->outbuf, smb_vwv0, choice);
}
-
+
DEBUG( 5, ( "negprot index=%d\n", choice ) );
if ((lp_server_signing() == Required) && (get_Protocol() < PROTOCOL_NT1)) {
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index cccb47a..da1231c 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -2432,6 +2432,15 @@ static void call_nt_transact_ioctl(connection_struct *conn,
}
return;
}
+ case FSCTL_IS_VOLUME_DIRTY:
+ DEBUG(10,("FSCTL_IS_VOLUME_DIRTY: called on FID[0x%04X] "
+ "(but not implemented)\n", (int)fidnum));
+ /*
+ * http://msdn.microsoft.com/en-us/library/cc232128%28PROT.10%29.aspx
+ * says we have to respond with NT_STATUS_INVALID_PARAMETER
+ */
+ reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
+ return;
default:
/* Only print this once... */
if (!logged_ioctl_message) {
diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c
index 341079e..802639f 100644
--- a/source3/smbd/vfs.c
+++ b/source3/smbd/vfs.c
@@ -997,6 +997,8 @@ NTSTATUS check_reduced_name(connection_struct *conn, const char *fname)
DEBUG(2, ("check_reduced_name: Bad access "
"attempt: %s is a symlink outside the "
"share path\n", fname));
+ DEBUGADD(2, ("conn_rootdir =%s\n", conn_rootdir));
+ DEBUGADD(2, ("resolved_name=%s\n", resolved_name));
SAFE_FREE(resolved_name);
return NT_STATUS_ACCESS_DENIED;
}
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 89429d1..2eb2566 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -19,7 +19,7 @@
*/
#include "includes.h"
-#include "nsswitch/libwbclient/wbc_async.h"
+#include "wbc_async.h"
#include "torture/proto.h"
#include "libcli/security/security.h"
#include "tldap.h"
diff --git a/nsswitch/libwbclient/wbc_async.c b/source3/torture/wbc_async.c
similarity index 99%
rename from nsswitch/libwbclient/wbc_async.c
rename to source3/torture/wbc_async.c
index d1dd76d..182474c 100644
--- a/nsswitch/libwbclient/wbc_async.c
+++ b/source3/torture/wbc_async.c
@@ -29,7 +29,7 @@
#include "lib/async_req/async_sock.h"
#include "nsswitch/winbind_struct_protocol.h"
#include "nsswitch/libwbclient/wbclient.h"
-#include "nsswitch/libwbclient/wbc_async.h"
+#include "wbc_async.h"
wbcErr map_wbc_err_from_errno(int error)
{
diff --git a/nsswitch/libwbclient/wbc_async.h b/source3/torture/wbc_async.h
similarity index 82%
rename from nsswitch/libwbclient/wbc_async.h
rename to source3/torture/wbc_async.h
index c918ccb..6a49511 100644
--- a/nsswitch/libwbclient/wbc_async.h
+++ b/source3/torture/wbc_async.h
@@ -27,6 +27,7 @@
#include <talloc.h>
#include <tevent.h>
#include "nsswitch/libwbclient/wbclient.h"
+#include "lib/wb_reqtrans.h"
struct wb_context;
struct winbindd_request;
@@ -62,36 +63,6 @@ wbcErr map_wbc_err_from_errno(int error);
bool tevent_req_is_wbcerr(struct tevent_req *req, wbcErr *pwbc_err);
wbcErr tevent_req_simple_recv_wbcerr(struct tevent_req *req);
-struct tevent_req *wb_req_read_send(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev,
- int fd, size_t max_extra_data);
-ssize_t wb_req_read_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
- struct winbindd_request **preq, int *err);
-
-struct tevent_req *wb_req_write_send(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev,
- struct tevent_queue *queue, int fd,
- struct winbindd_request *wb_req);
-ssize_t wb_req_write_recv(struct tevent_req *req, int *err);
-
-struct tevent_req *wb_resp_read_send(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev, int fd);
-ssize_t wb_resp_read_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
- struct winbindd_response **presp, int *err);
-
--
Samba Shared Repository
More information about the samba-cvs
mailing list