+++ /dev/null
-diff -urN pure-ftpd-1.0.21.org/src/ftpd.c pure-ftpd-1.0.21/src/ftpd.c
---- pure-ftpd-1.0.21.org/src/ftpd.c 2006-02-16 10:28:16.000000000 +0100
-+++ pure-ftpd-1.0.21/src/ftpd.c 2006-02-21 12:58:34.192710136 +0100
-@@ -705,7 +705,7 @@
- * with a dot are only allowed to root and to users
- * chroot()ed in their home directories -Jedi. */
-
--static int checknamesanity(const char *name, int dot_ok)
-+static int checknamesanity(const char *name, int dot_ok, int is_dele)
- {
- register const char *namepnt;
-
-@@ -735,7 +735,7 @@
- return -1; /* .ftpquota => *NO* */
- }
- #endif
-- if (strstr(namepnt, PUREFTPD_TMPFILE_PREFIX) != NULL) {
-+ if ((!(is_dele && guest == 0)) && strstr(namepnt, PUREFTPD_TMPFILE_PREFIX) != NULL) {
- return -1;
- }
- while (*namepnt != 0) {
-@@ -1916,7 +1916,7 @@
- }
- }
- }
-- if (checknamesanity(where, dot_read_ok) != 0) {
-+ if (checknamesanity(where, dot_read_ok, 0) != 0) {
- addreply(550, MSG_SANITY_FILE_FAILURE, where);
- return;
- }
-@@ -2473,7 +2473,7 @@
- addreply_noformat(501, MSG_NO_FILE_NAME);
- return;
- }
-- if (checknamesanity(name, dot_write_ok) != 0) {
-+ if (checknamesanity(name, dot_write_ok, 0) != 0) {
- addreply(550, MSG_SANITY_FILE_FAILURE, name);
- return;
- }
-@@ -2531,7 +2531,7 @@
- addreply_noformat(501, MSG_NO_FILE_NAME);
- return;
- }
-- if (checknamesanity(name, dot_write_ok) != 0) {
-+ if (checknamesanity(name, dot_write_ok, 0) != 0) {
- addreply(550, MSG_SANITY_FILE_FAILURE, name);
- return;
- }
-@@ -2566,7 +2566,7 @@
- addreply_noformat(501, MSG_NO_FILE_NAME);
- return;
- }
-- if (checknamesanity(name, dot_write_ok) != 0) {
-+ if (checknamesanity(name, dot_write_ok, 1) != 0) {
- addreply(550, MSG_SANITY_FILE_FAILURE, name);
- return;
- }
-@@ -2854,7 +2854,7 @@
- goto end;
- }
- # endif
-- if (checknamesanity(name, dot_read_ok) != 0) {
-+ if (checknamesanity(name, dot_read_ok, 0) != 0) {
- addreply(550, MSG_SANITY_FILE_FAILURE, name);
- goto end;
- }
-@@ -3346,7 +3346,7 @@
- addreply_noformat(550, MSG_ANON_CANT_MKD);
- return;
- }
-- if (checknamesanity(name, dot_write_ok) != 0) {
-+ if (checknamesanity(name, dot_write_ok, 0) != 0) {
- addreply_noformat(550, MSG_SANITY_DIRECTORY_FAILURE);
- return;
- }
-@@ -3384,7 +3384,7 @@
- return;
- }
- #endif
-- if (checknamesanity(name, dot_write_ok) != 0) {
-+ if (checknamesanity(name, dot_write_ok, 0) != 0) {
- addreply_noformat(550, MSG_SANITY_DIRECTORY_FAILURE);
- return;
- }
-@@ -3686,7 +3686,7 @@
- }
- }
- cantcheckspace:
-- if (checknamesanity(name, dot_write_ok) != 0 ||
-+ if (checknamesanity(name, dot_write_ok, 0) != 0 ||
- (atomic_file = get_atomic_file(name)) == NULL) {
- addreply(553, MSG_SANITY_FILE_FAILURE, name);
- /* implicit : atomic_file = NULL */
-@@ -4093,7 +4093,7 @@
- addreply_noformat(550, MSG_RENAME_FAILURE);
- return;
- }
-- if (checknamesanity(name, dot_write_ok) != 0) {
-+ if (checknamesanity(name, dot_write_ok, 0) != 0) {
- addreply(550, MSG_SANITY_FILE_FAILURE, name);
- return;
- }
-@@ -4123,7 +4123,7 @@
- addreply_noformat(503, MSG_RENAME_NORNFR);
- goto bye;
- }
-- if (checknamesanity(name, dot_write_ok) != 0) {
-+ if (checknamesanity(name, dot_write_ok, 0) != 0) {
- addreply(550, MSG_SANITY_FILE_FAILURE, name);
- return; /* don't clear rnfrom buffer */
- }
-