Bug 40569 - Не выводит список namingContexts у ldap
Summary: Не выводит список namingContexts у ldap
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: alterator-auth (show other bugs)
Version: unstable
Hardware: x86_64 Linux
: P5 normal
Assignee: Anton V. Boyarshinov
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-23 19:04 MSK by Lenar Shakirov
Modified: 2021-07-27 14:49 MSK (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lenar Shakirov 2021-07-23 19:04:05 MSK
Ошибка затесалась тут http://git.altlinux.org/gears/a/alterator-auth.git?p=alterator-auth.git;a=commitdiff;h=71a2f4f00326fc5bb5cfcf41bceba6f1f84481cc


@@ -138,42 +146,42 @@ on_message()
            type)
                write_type_item domain_name hostname
                write_type_item domain hostname
-               ;;
+                   ;;
            list)
-               [ "$in__objects" = "avail_domain" ] && list_domain
-               [ "$in__objects" = "local_bases" ] && local_bases
-               ;;
+                   [ "$in__objects" = "avail_domain" ] && list_domain || return
+               [ "$in__objects" = "local_bases" ] && local_bases
+               ;;


Функция "local_bases" никогда не выполнится, ибо выше есть "|| return"

Видимо return должен был ловить ошибки внутри list_domain.

По своему разумению исправил так, но по ощущениям "return" не нужен:

http://git.altlinux.org/people/snejok/packages/?p=alterator-auth.git;a=blobdiff;f=alterator-auth/backend3/auth;h=2c49b7092f1cb2c8a3915354141e91a42611e0be;hp=2b000af2e6293807cc12a3332f5437d91b0b9e04;hb=d9244d826dd9a7c0f6ca6324fd3f5b2a4cb6f6d0;hpb=83e15627152c5583426ea1ed9a697d75f4953117


@@ -197,7 +197,7 @@ on_message()
                write_type_item domain hostname
                    ;;
            list)
-                   [ "$in__objects" = "avail_domain" ] && list_domain || return
+               if [ "$in__objects" = "avail_domain" ];then list_domain || return ;fi
                [ "$in__objects" = "local_bases" ] && local_bases
                ;;
            read)
Comment 1 Repository Robot 2021-07-27 14:49:40 MSK
alterator-auth-0.43.9-alt5 -> sisyphus:

 Tue Jul 27 2021 Lenar Shakirov <snejok@altlinux> 0.43.9-alt5
 - backend: fix list ldap local_bases (namingContexts) (ALT #40569)
 - sbin/system-auth: fix sssd package check, old LDAP auth scheme
   work again (ALT #40570)