summaryrefslogtreecommitdiff
path: root/source3/smbd/reply.c
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-07-30 14:07:29 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:29:03 -0500
commit4694e757ba084e68e6f5bc3bf2d3714474c215cd (patch)
treeb45b8372c5767f95a16f1a64599ffa413e1fc820 /source3/smbd/reply.c
parent68513d521d930188bb381b1737d3a7130ef2088f (diff)
downloadsamba-4694e757ba084e68e6f5bc3bf2d3714474c215cd.tar.gz
samba-4694e757ba084e68e6f5bc3bf2d3714474c215cd.tar.bz2
samba-4694e757ba084e68e6f5bc3bf2d3714474c215cd.zip
r24085: Convert reply_rmdir to the new API
(This used to be commit 7689048d71cc4adbdaee5521cc57890518e7090a)
Diffstat (limited to 'source3/smbd/reply.c')
-rw-r--r--source3/smbd/reply.c39
1 files changed, 24 insertions, 15 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index b1e2f00067..64e63abdf1 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -4205,56 +4205,65 @@ NTSTATUS rmdir_internals(connection_struct *conn, const char *directory)
Reply to a rmdir.
****************************************************************************/
-int reply_rmdir(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
+void reply_rmdir(connection_struct *conn, struct smb_request *req)
{
pstring directory;
- int outsize = 0;
SMB_STRUCT_STAT sbuf;
NTSTATUS status;
START_PROFILE(SMBrmdir);
- srvstr_get_path(inbuf, SVAL(inbuf,smb_flg2), directory,
- smb_buf(inbuf) + 1, sizeof(directory), 0,
+ srvstr_get_path((char *)req->inbuf, req->flags2, directory,
+ smb_buf(req->inbuf) + 1, sizeof(directory), 0,
STR_TERMINATE, &status);
if (!NT_STATUS_IS_OK(status)) {
+ reply_nterror(req, status);
END_PROFILE(SMBrmdir);
- return ERROR_NT(status);
+ return;
}
- status = resolve_dfspath(conn, SVAL(inbuf,smb_flg2) & FLAGS2_DFS_PATHNAMES, directory);
+ status = resolve_dfspath(conn,
+ req->flags2 & FLAGS2_DFS_PATHNAMES,
+ directory);
if (!NT_STATUS_IS_OK(status)) {
- END_PROFILE(SMBrmdir);
if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
- return ERROR_BOTH(NT_STATUS_PATH_NOT_COVERED, ERRSRV, ERRbadpath);
+ reply_botherror(req, NT_STATUS_PATH_NOT_COVERED,
+ ERRSRV, ERRbadpath);
+ END_PROFILE(SMBrmdir);
+ return;
}
- return ERROR_NT(status);
+ reply_nterror(req, status);
+ END_PROFILE(SMBrmdir);
+ return;
}
status = unix_convert(conn, directory, False, NULL, &sbuf);
if (!NT_STATUS_IS_OK(status)) {
+ reply_nterror(req, status);
END_PROFILE(SMBrmdir);
- return ERROR_NT(status);
+ return;
}
status = check_name(conn, directory);
if (!NT_STATUS_IS_OK(status)) {
+ reply_nterror(req, status);
END_PROFILE(SMBrmdir);
- return ERROR_NT(status);
+ return;
}
- dptr_closepath(directory,SVAL(inbuf,smb_pid));
+ dptr_closepath(directory, req->smbpid);
status = rmdir_internals(conn, directory);
if (!NT_STATUS_IS_OK(status)) {
+ reply_nterror(req, status);
END_PROFILE(SMBrmdir);
- return ERROR_NT(status);
+ return;
}
- outsize = set_message(inbuf,outbuf,0,0,False);
+ reply_outbuf(req, 0, 0);
DEBUG( 3, ( "rmdir %s\n", directory ) );
END_PROFILE(SMBrmdir);
- return(outsize);
+ return;
}
/*******************************************************************