Репозитории ALT
S: | 1.3.8-alt0.2.ga3489a6c8 |
5.1: | 1.3.3rc1-alt3 |
4.1: | 1.3.2rel-alt0.M41.1 |
4.0: | 1.3.0rel-alt2 |
3.0: | 1.3.0rc1-alt2 |
Группа :: Система/Серверы
Пакет: proftpd
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: proftpd-1.3.0-deb-auth_loop.patch
Скачать
Скачать
diff -urNad proftpd-dfsg-1.3.0~/src/auth.c proftpd-dfsg-1.3.0/src/auth.c
--- proftpd-dfsg-1.3.0~/src/auth.c 2007-04-17 23:38:06.000000000 +0200
+++ proftpd-dfsg-1.3.0/src/auth.c 2007-04-17 23:38:50.000000000 +0200
@@ -64,27 +64,38 @@
}
static modret_t *dispatch_auth(cmd_rec *cmd, char *match) {
- authtable *authtab = NULL;
+ authtable *start_tab = NULL, *iter_tab = NULL;
modret_t *mr = NULL;
- authtab = pr_stash_get_symbol(PR_SYM_AUTH, match, NULL,
+ start_tab = pr_stash_get_symbol(PR_SYM_AUTH, match, NULL,
&cmd->stash_index);
+ iter_tab = start_tab;
+
+ while (iter_tab) {
+ pr_signals_handle();
- while (authtab) {
pr_log_debug(DEBUG6, "dispatching auth request \"%s\" to module mod_%s",
- match, authtab->m->name);
+ match, iter_tab->m->name);
- mr = call_module(authtab->m, authtab->handler, cmd);
+ mr = call_module(iter_tab->m, iter_tab->handler, cmd);
- if (authtab->auth_flags & PR_AUTH_FL_REQUIRED)
+ if (iter_tab->auth_flags & PR_AUTH_FL_REQUIRED)
break;
if (MODRET_ISHANDLED(mr) ||
MODRET_ISERROR(mr))
break;
- authtab = pr_stash_get_symbol(PR_SYM_AUTH, match, authtab,
+ iter_tab = pr_stash_get_symbol(PR_SYM_AUTH, match, iter_tab,
&cmd->stash_index);
+
+ if (iter_tab == start_tab) {
+ /* We have looped back to the start. Break out now and do not loop
+ * around again (and again, and again...)
+ */
+ mr = PR_DECLINED(cmd);
+ break;
+ }
}
return mr;