From fd6b9c02b91ea39e8c7575e1f5f106509940ba1f Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 25 Feb 2004 21:37:22 +0000 Subject: Fixup strange rename error case (gentest). Jeremy. (This used to be commit d448fb801e175e11cfc0118325043eef836103f0) --- source3/smbd/reply.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index c729f22728..49f4e97028 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -3482,8 +3482,9 @@ NTSTATUS rename_internals(connection_struct *conn, char *name, char *newname, BO unix_convert(newname,conn,newname_last_component,&bad_path2,&sbuf2); /* Quick check for "." and ".." */ - if (newname_last_component[0] == '.') { + if (!bad_path2 && newname_last_component[0] == '.') { if (!newname_last_component[1] || (newname_last_component[1] == '.' && !newname_last_component[2])) { + DEBUG(10,("rename_internals: newname_last_component = '.' or '..'\n")); return NT_STATUS_ACCESS_DENIED; } } -- cgit