Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37750679
en ru br
Репозитории 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
www.altlinux.org/Changes

Группа :: Система/Серверы
Пакет: proftpd

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: proftpd-1.3.0-deb-auth_fix.patch
Скачать


diff -urNad proftpd-dfsg-1.3.0~/modules/mod_auth_unix.c proftpd-dfsg-1.3.0/modules/mod_auth_unix.c
--- proftpd-dfsg-1.3.0~/modules/mod_auth_unix.c	2005-07-03 20:52:02.000000000 +0200
+++ proftpd-dfsg-1.3.0/modules/mod_auth_unix.c	2007-01-18 12:23:58.000000000 +0100
@@ -669,8 +669,9 @@
 
 #ifdef COMSEC
   if (iscomsec()) {
-    if (strcmp(bigcrypt((char *) pw, (char *) cpw), cpw) != 0)
-      return ERROR(cmd);
+    if (strcmp(bigcrypt((char *) pw, (char *) cpw), cpw) != 0) {
+      return DECLINED(cmd);
+    }
 
   } else {
 #endif /* COMSEC */
@@ -719,8 +720,9 @@
   }
   PRIVS_RELINQUISH
 
-  if (res != SIASUCCESS)
-    return ERROR(cmd);
+  if (res != SIASUCCESS) {
+    return DECLINED(cmd);
+  }
 
 #else /* !PR_USE_SIA */
 
@@ -750,11 +752,12 @@
      * other than HANDLED at the moment.
      */
 
-    if (MODRET_ISHANDLED(mr) && MODRET_HASDATA(mr)) {
+    if (MODRET_ISHANDLED(mr) &&
+        MODRET_HASDATA(mr)) {
       pwent = mr->data;
 
-      if ((token = cygwin_logon_user((const struct passwd *) pwent,
-          pw)) == INVALID_HANDLE_VALUE) {
+      token = cygwin_logon_user((const struct passwd *) pwent, pw);
+      if (token == INVALID_HANDLE_VALUE) {
         pr_log_pri(PR_LOG_NOTICE, "error authenticating Cygwin user: %s",
           strerror(errno));
         return ERROR(cmd);
@@ -762,14 +765,16 @@
 
       cygwin_set_impersonation_token(token);
 
-    } else
+    } else {
       return DECLINED(cmd);
+    }
 
   } else
 # endif /* CYGWIN */
 
-  if (strcmp(crypt(pw, cpw), cpw) != 0)
-    return ERROR(cmd);
+  if (strcmp(crypt(pw, cpw), cpw) != 0) {
+    return DECLINED(cmd);
+  }
 #endif /* PR_USE_SIA */
 
 #ifdef COMSEC
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin