diff options
-rw-r--r-- | source3/smbd/reply.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index d48c081e21..f633be3740 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -3770,7 +3770,6 @@ int reply_rmdir(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, { pstring directory; int outsize = 0; - BOOL ok = False; SMB_STRUCT_STAT sbuf; NTSTATUS status; START_PROFILE(SMBrmdir); @@ -3789,12 +3788,13 @@ int reply_rmdir(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, return ERROR_NT(status); } - if (check_name(directory,conn)) { - dptr_closepath(directory,SVAL(inbuf,smb_pid)); - ok = rmdir_internals(conn, directory); + if (!check_name(directory,conn)) { + END_PROFILE(SMBrmdir); + return UNIXERROR(ERRDOS, ERRbadpath); } - - if (!ok) { + + dptr_closepath(directory,SVAL(inbuf,smb_pid)); + if (!rmdir_internals(conn, directory)) { END_PROFILE(SMBrmdir); return UNIXERROR(ERRDOS, ERRbadpath); } |