From fb5195518f4da6a67f0d3cc611a1a43c08be3b3b Mon Sep 17 00:00:00 2001 From: JeGoi <13801368+JeGoi@users.noreply.github.com> Date: Fri, 20 Dec 2024 14:41:29 -0500 Subject: [PATCH] Move bin/pyntlm_auth to bin/impacket --- .../impacket_addcomputer.py | 0 .../impacket_logger.py | 0 .../impacket_utils.py | 0 containers/pfperl-api/Dockerfile | 21 ++++++++++++------- rpm/packetfence.spec | 7 ++++--- 5 files changed, 18 insertions(+), 10 deletions(-) rename bin/{pyntlm_auth => impacket}/impacket_addcomputer.py (100%) rename bin/{pyntlm_auth => impacket}/impacket_logger.py (100%) rename bin/{pyntlm_auth => impacket}/impacket_utils.py (100%) diff --git a/bin/pyntlm_auth/impacket_addcomputer.py b/bin/impacket/impacket_addcomputer.py similarity index 100% rename from bin/pyntlm_auth/impacket_addcomputer.py rename to bin/impacket/impacket_addcomputer.py diff --git a/bin/pyntlm_auth/impacket_logger.py b/bin/impacket/impacket_logger.py similarity index 100% rename from bin/pyntlm_auth/impacket_logger.py rename to bin/impacket/impacket_logger.py diff --git a/bin/pyntlm_auth/impacket_utils.py b/bin/impacket/impacket_utils.py similarity index 100% rename from bin/pyntlm_auth/impacket_utils.py rename to bin/impacket/impacket_utils.py diff --git a/containers/pfperl-api/Dockerfile b/containers/pfperl-api/Dockerfile index 8fd064f36f04..a764c7ac4c2f 100644 --- a/containers/pfperl-api/Dockerfile +++ b/containers/pfperl-api/Dockerfile @@ -1,16 +1,23 @@ ARG KNK_REGISTRY_URL ARG IMAGE_TAG FROM ${KNK_REGISTRY_URL}/pfdebian:${IMAGE_TAG} + WORKDIR /usr/local/pf/ + COPY ./html ./html COPY ./lib ./lib COPY ./db ./db COPY ./sbin/pfperl-api ./sbin/pfperl-api -COPY bin/pfcmd.pl bin/pfcmd.pl -COPY addons/ntlm-auth-api/openssl.cnf /etc/ssl/openssl.cnf -RUN ln -s /usr/local/pf/bin/pfcmd.pl /usr/local/pf/bin/pfcmd -RUN ln -s /usr/local/pf/bin/pyntlm_auth/impacket-addcomputer.py /usr/local/pf/bin/impacket-addcomputer -RUN mkdir -p /usr/local/pf/var/run/ && chmod 0744 /usr/local/pf/var/run/ -RUN mkdir -p /usr/local/pf/var/control -RUN bash -c 'cd /usr/local/pf/db && export VERSIONSQL=$(ls pf-schema-* |sort --version-sort -r | head -1) && ln -f -s $VERSIONSQL ./pf-schema.sql' +COPY ./bin/impacket ./bin/impacket +COPY ./bin/pfcmd.pl ./bin/pfcmd.pl +COPY ./addons/ntlm-auth-api/openssl.cnf /etc/ssl/openssl.cnf + +RUN ln -s /usr/local/pf/bin/pfcmd.pl /usr/local/pf/bin/pfcmd && \ + ln -s /usr/local/pf/bin/impacket/impacket-addcomputer.py /usr/local/pf/bin/impacket-addcomputer && \ + chmod +x /usr/local/pf/bin/impacket-addcomputer && \ + mkdir -p /usr/local/pf/var/run/ && \ + chmod 0744 /usr/local/pf/var/run/ && \ + mkdir -p /usr/local/pf/var/control && \ + bash -c 'cd /usr/local/pf/db && export VERSIONSQL=$(ls pf-schema-* |sort --version-sort -r | head -1) && ln -f -s $VERSIONSQL ./pf-schema.sql' + ENTRYPOINT /usr/local/pf/sbin/pfperl-api prefork -m production -l http://127.0.0.1:22224 -l http://100.64.0.1:22224 --pid-file /usr/local/pf/var/run/pfperl-api.pid diff --git a/rpm/packetfence.spec b/rpm/packetfence.spec index 5f5d4d615614..a2bdcb86195f 100644 --- a/rpm/packetfence.spec +++ b/rpm/packetfence.spec @@ -941,6 +941,10 @@ fi %attr(0755, pf, pf) /usr/local/pf/bin/cluster/pfupdate %attr(0755, pf, pf) /usr/local/pf/bin/cluster/maintenance %attr(0755, pf, pf) /usr/local/pf/bin/cluster/node +%dir /usr/local/pf/bin/impacket +%attr(0755, pf, pf) /usr/local/pf/bin/impacket/impacket_addcomputer.py +%attr(0755, pf, pf) /usr/local/pf/bin/impacket/impacket_logger.py +%attr(0755, pf, pf) /usr/local/pf/bin/impacket/impacket_utils.py %dir /usr/local/pf/bin/pyntlm_auth %attr(0755, pf, pf) /usr/local/pf/bin/pyntlm_auth/config_generator.py %attr(0755, pf, pf) /usr/local/pf/bin/pyntlm_auth/config_loader.py @@ -959,9 +963,6 @@ fi %attr(0755, pf, pf) /usr/local/pf/bin/pyntlm_auth/t_sdnotify.py %attr(0755, pf, pf) /usr/local/pf/bin/pyntlm_auth/t_worker_register.py %attr(0755, pf, pf) /usr/local/pf/bin/pyntlm_auth/utils.py -%attr(0755, pf, pf) /usr/local/pf/bin/pyntlm_auth/impacket_addcomputer.py -%attr(0755, pf, pf) /usr/local/pf/bin/pyntlm_auth/impacket_logger.py -%attr(0755, pf, pf) /usr/local/pf/bin/pyntlm_auth/impacket_utils.py %attr(0755, pf, pf) /usr/local/pf/sbin/galera-autofix %attr(0755, pf, pf) /usr/local/pf/sbin/mysql-probe %attr(0755, pf, pf) /usr/local/pf/sbin/pfconnector