From df4d790daf15fb0b246505010c2f24d0fc150352 Mon Sep 17 00:00:00 2001 From: hidnplayr Date: Thu, 30 Aug 2012 07:21:52 +0000 Subject: [PATCH] Enabled Anonymous access to FTP daemon, RETR command now ignores first '/'. git-svn-id: svn://kolibrios.org@2958 a494cfbc-eb01-0410-851d-a64ba20cac60 --- data/new-stack/network/users.ini | 3 ++- kernel/branches/net/applications/ftpd/commands.inc | 7 +++++-- kernel/branches/net/applications/ftpd/users.ini | 3 ++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/data/new-stack/network/users.ini b/data/new-stack/network/users.ini index 46a5aab613..85927c4354 100644 --- a/data/new-stack/network/users.ini +++ b/data/new-stack/network/users.ini @@ -8,7 +8,8 @@ [anonymous] -pass= ; leavy empty for none +; leavy pass empty to disable it +pass= home=/rd/1/ mode=3 diff --git a/kernel/branches/net/applications/ftpd/commands.inc b/kernel/branches/net/applications/ftpd/commands.inc index a0168b18ba..cddd95f525 100644 --- a/kernel/branches/net/applications/ftpd/commands.inc +++ b/kernel/branches/net/applications/ftpd/commands.inc @@ -652,8 +652,8 @@ cmdPASS: jnz .incorrect cmp dword [edi], -1 ; no key, section or file found.. fail! je .incorrect -;;; cmp byte [edi], 0 ; zero password? ok! -;;; je .ok + cmp byte [edi], 0 ; zero password? ok! + je .ok add esi, 5 sub ecx, 5 @@ -904,6 +904,9 @@ cmdRETR: dec edi lea esi, [ebp + thread_data.buffer + 5] mov ecx, 1024 + cmp byte [esi], '/' + jne .loop + inc esi .loop: lodsb cmp al, 0x20 diff --git a/kernel/branches/net/applications/ftpd/users.ini b/kernel/branches/net/applications/ftpd/users.ini index 46a5aab613..85927c4354 100644 --- a/kernel/branches/net/applications/ftpd/users.ini +++ b/kernel/branches/net/applications/ftpd/users.ini @@ -8,7 +8,8 @@ [anonymous] -pass= ; leavy empty for none +; leavy pass empty to disable it +pass= home=/rd/1/ mode=3