summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-05-23 15:24:01 +0200
committerStefan Metzmacher <metze@samba.org>2012-05-23 20:03:09 +0200
commita0c9a291e7cf0084a67cbb3fd017ddbff7d3b758 (patch)
treec69408829e7e1d7f89658e54b16da41a4f30ba26
parentd595d2e5af1a6b85d069ce621a85648d1213c360 (diff)
downloadsamba-a0c9a291e7cf0084a67cbb3fd017ddbff7d3b758.tar.gz
samba-a0c9a291e7cf0084a67cbb3fd017ddbff7d3b758.tar.bz2
samba-a0c9a291e7cf0084a67cbb3fd017ddbff7d3b758.zip
s3:smb2_server: make use of nt_status_np_pipe()
metze
-rw-r--r--source3/smbd/smb2_ioctl.c12
-rw-r--r--source3/smbd/smb2_read.c2
-rw-r--r--source3/smbd/smb2_write.c2
3 files changed, 13 insertions, 3 deletions
diff --git a/source3/smbd/smb2_ioctl.c b/source3/smbd/smb2_ioctl.c
index 8840167508..cd303eddde 100644
--- a/source3/smbd/smb2_ioctl.c
+++ b/source3/smbd/smb2_ioctl.c
@@ -656,18 +656,24 @@ static void smbd_smb2_ioctl_pipe_read_done(struct tevent_req *subreq)
struct smbd_smb2_ioctl_state *state = tevent_req_data(req,
struct smbd_smb2_ioctl_state);
NTSTATUS status;
+ NTSTATUS old;
ssize_t nread = -1;
bool is_data_outstanding = false;
status = np_read_recv(subreq, &nread, &is_data_outstanding);
+ TALLOC_FREE(subreq);
+
+ old = status;
+ status = nt_status_np_pipe(old);
DEBUG(10,("smbd_smb2_ioctl_pipe_read_done: np_read_recv nread = %d "
- "is_data_outstanding = %d, status = %s\n",
+ "is_data_outstanding = %d, status = %s%s%s\n",
(int)nread,
(int)is_data_outstanding,
- nt_errstr(status) ));
+ nt_errstr(old),
+ NT_STATUS_EQUAL(old, status)?"":" => ",
+ NT_STATUS_EQUAL(old, status)?"":nt_errstr(status)));
- TALLOC_FREE(subreq);
if (!NT_STATUS_IS_OK(status)) {
tevent_req_nterror(req, status);
return;
diff --git a/source3/smbd/smb2_read.c b/source3/smbd/smb2_read.c
index 53b0a9dc57..b36c3cb141 100644
--- a/source3/smbd/smb2_read.c
+++ b/source3/smbd/smb2_read.c
@@ -567,6 +567,8 @@ static void smbd_smb2_read_pipe_done(struct tevent_req *subreq)
status = np_read_recv(subreq, &nread, &is_data_outstanding);
TALLOC_FREE(subreq);
if (!NT_STATUS_IS_OK(status)) {
+ NTSTATUS old = status;
+ status = nt_status_np_pipe(old);
tevent_req_nterror(req, status);
return;
}
diff --git a/source3/smbd/smb2_write.c b/source3/smbd/smb2_write.c
index 163672cdb1..0b502a4f48 100644
--- a/source3/smbd/smb2_write.c
+++ b/source3/smbd/smb2_write.c
@@ -390,6 +390,8 @@ static void smbd_smb2_write_pipe_done(struct tevent_req *subreq)
status = np_write_recv(subreq, &nwritten);
TALLOC_FREE(subreq);
if (!NT_STATUS_IS_OK(status)) {
+ NTSTATUS old = status;
+ status = nt_status_np_pipe(old);
tevent_req_nterror(req, status);
return;
}