From 1b631c75a166e0258aad972d74af929b7968ea66 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 8 Apr 2024 21:09:23 +0200 Subject: Adding debian version 2.4.58-1. Signed-off-by: Daniel Baumann --- debian/perl-framework/scripts/fcgi.pl | 25 +++++++++++ debian/perl-framework/scripts/fpm.sh | 1 + debian/perl-framework/scripts/httpd-sub.ldif | 15 +++++++ debian/perl-framework/scripts/httpd.ldif | 56 +++++++++++++++++++++++++ debian/perl-framework/scripts/ldap-init.sh | 28 +++++++++++++ debian/perl-framework/scripts/memcached-init.sh | 8 ++++ debian/perl-framework/scripts/non-anon.ldif | 14 +++++++ debian/perl-framework/scripts/redis-init.sh | 8 ++++ debian/perl-framework/scripts/slapd-config.ldif | 10 +++++ debian/perl-framework/scripts/suffix.ldif | 5 +++ 10 files changed, 170 insertions(+) create mode 100755 debian/perl-framework/scripts/fcgi.pl create mode 100755 debian/perl-framework/scripts/fpm.sh create mode 100644 debian/perl-framework/scripts/httpd-sub.ldif create mode 100644 debian/perl-framework/scripts/httpd.ldif create mode 100755 debian/perl-framework/scripts/ldap-init.sh create mode 100755 debian/perl-framework/scripts/memcached-init.sh create mode 100644 debian/perl-framework/scripts/non-anon.ldif create mode 100755 debian/perl-framework/scripts/redis-init.sh create mode 100644 debian/perl-framework/scripts/slapd-config.ldif create mode 100644 debian/perl-framework/scripts/suffix.ldif (limited to 'debian/perl-framework/scripts') diff --git a/debian/perl-framework/scripts/fcgi.pl b/debian/perl-framework/scripts/fcgi.pl new file mode 100755 index 0000000..930b030 --- /dev/null +++ b/debian/perl-framework/scripts/fcgi.pl @@ -0,0 +1,25 @@ +#!/usr/bin/env perl +use FCGI; +use Socket; +use FCGI::ProcManager; +use Data::Dumper; + +$num_args = $#ARGV + 1; +if ($num_args != 1) { + print "\nUsage: fcgi.pl \n"; + exit 1; +} + +$proc_manager = FCGI::ProcManager->new( {n_processes => 1} ); +$socket = FCGI::OpenSocket( $ARGV[0], 10 ); +$request = FCGI::Request( \*STDIN, \*STDOUT, \*STDERR, \%req_params, +$socket, &FCGI::FAIL_ACCEPT_ON_INTR ); +$proc_manager->pm_manage(); +if ($request) { + while ( $request->Accept() >= 0 ) { + $proc_manager->pm_pre_dispatch(); + print("Content-type: text/plain\r\n\r\n"); + print Dumper(\%req_params); + } +} +FCGI::CloseSocket($socket); diff --git a/debian/perl-framework/scripts/fpm.sh b/debian/perl-framework/scripts/fpm.sh new file mode 100755 index 0000000..ccd83e5 --- /dev/null +++ b/debian/perl-framework/scripts/fpm.sh @@ -0,0 +1 @@ +php-fpm70 -p /usr/local2/php-fpm diff --git a/debian/perl-framework/scripts/httpd-sub.ldif b/debian/perl-framework/scripts/httpd-sub.ldif new file mode 100644 index 0000000..7908cb6 --- /dev/null +++ b/debian/perl-framework/scripts/httpd-sub.ldif @@ -0,0 +1,15 @@ +dn: cn=httpd,dc=example,dc=com +objectClass: applicationProcess +objectClass: simpleSecurityObject +cn: httpd +description: Service Account for httpd +userPassword: mod_authnz_ldap + +dn: ou=dept,dc=example,dc=com +ou: dept +objectClass: organizationalUnit + +# Group +dn: cn=Subgroup,ou=dept,dc=example,dc=com +objectClass: groupOfUniqueNames +uniqueMember: uid=beta,dc=example,dc=com diff --git a/debian/perl-framework/scripts/httpd.ldif b/debian/perl-framework/scripts/httpd.ldif new file mode 100644 index 0000000..b9211ee --- /dev/null +++ b/debian/perl-framework/scripts/httpd.ldif @@ -0,0 +1,56 @@ +dn: cn=httpd,dc=example,dc=com +objectClass: applicationProcess +objectClass: simpleSecurityObject +cn: httpd +description: Service Account for httpd +userPassword: mod_authnz_ldap + +dn: uid=alpha,dc=example,dc=com +objectClass: inetOrgPerson +cn: Alpha Person +givenName: Alpha +sn: Person +uid: alpha +roomnumber: 42 +userPassword: Alpha + +dn: uid=beta,dc=example,dc=com +objectClass: inetOrgPerson +cn: Beta Person +givenName: Beta +sn: Person +uid: beta +roomnumber: 41 +userPassword: Beta + +dn: uid=gamma,dc=example,dc=com +objectClass: inetOrgPerson +cn: Gamma Person +givenName: Gamma +sn: Person +uid: gamma +roomnumber: 101 +userPassword: Gamma + +dn: uid=delta,dc=example,dc=com +objectClass: inetOrgPerson +cn: Delta Person +givenName: Delta +sn: Person +uid: delta +roomnumber: 43 +userPassword: Delta + +# Group +dn: cn=Group One, dc=example,dc=com +objectClass: groupOfUniqueNames +uniqueMember: uid=alpha,dc=example,dc=com +uniqueMember: uid=beta,dc=example,dc=com +uniqueMember: uid=delta,dc=example,dc=com + +# Referral +dn: ou=dept,dc=example,dc=com +objectClass: referral +objectClass: extensibleObject +ou: dept +ref: ldap://localhost:8390/ou=dept,dc=example,dc=com diff --git a/debian/perl-framework/scripts/ldap-init.sh b/debian/perl-framework/scripts/ldap-init.sh new file mode 100755 index 0000000..148a9d0 --- /dev/null +++ b/debian/perl-framework/scripts/ldap-init.sh @@ -0,0 +1,28 @@ +#!/bin/bash -ex +DOCKER=${DOCKER:-`which docker 2>/dev/null || which podman 2>/dev/null`} +cid1=`${DOCKER} run -d -p 8389:389 httpd_ldap` +cid2=`${DOCKER} run -d -p 8390:389 httpd_ldap` +sleep 5 + +# For the CentOS slapd configuration, load some default schema: +if ${DOCKER} exec -i $cid1 test -f /etc/centos-release; then + ${DOCKER} exec -i $cid1 /usr/bin/ldapadd -Y EXTERNAL -H ldapi:// < scripts/slapd-config.ldif + ${DOCKER} exec -i $cid2 /usr/bin/ldapadd -Y EXTERNAL -H ldapi:// < scripts/slapd-config.ldif + + for sc in cosine inetorgperson nis; do + fn=/etc/openldap/schema/${sc}.ldif + ${DOCKER} exec -i $cid1 /usr/bin/ldapadd -Y EXTERNAL -H ldapi:// -f ${fn} + ${DOCKER} exec -i $cid2 /usr/bin/ldapadd -Y EXTERNAL -H ldapi:// -f ${fn} + done + + ldapadd -x -H ldap://localhost:8390 -D cn=admin,dc=example,dc=com -w travis < scripts/suffix.ldif + ldapadd -x -H ldap://localhost:8389 -D cn=admin,dc=example,dc=com -w travis < scripts/suffix.ldif +fi + +# Disable anonymous bind; must be done as an authenticated local user +# hence via ldapadd -Y EXTERNAL within the container. +${DOCKER} exec -i $cid1 /usr/bin/ldapadd -Y EXTERNAL -H ldapi:// < scripts/non-anon.ldif +${DOCKER} exec -i $cid2 /usr/bin/ldapadd -Y EXTERNAL -H ldapi:// < scripts/non-anon.ldif + +ldapadd -x -H ldap://localhost:8389 -D cn=admin,dc=example,dc=com -w travis < scripts/httpd.ldif +ldapadd -x -H ldap://localhost:8390 -D cn=admin,dc=example,dc=com -w travis < scripts/httpd-sub.ldif diff --git a/debian/perl-framework/scripts/memcached-init.sh b/debian/perl-framework/scripts/memcached-init.sh new file mode 100755 index 0000000..f90f055 --- /dev/null +++ b/debian/perl-framework/scripts/memcached-init.sh @@ -0,0 +1,8 @@ +#!/bin/bash -ex +DOCKER=${DOCKER:-`which docker 2>/dev/null || which podman 2>/dev/null`} +${DOCKER} build -t httpd_memcached - </dev/null || which podman 2>/dev/null`} +${DOCKER} build -t httpd_redis - <