Compare commits
1 Commits
pkg/eole/e
...
develop
Author | SHA1 | Date | |
---|---|---|---|
cc9a5e20ce |
8
Makefile
8
Makefile
@ -2,10 +2,10 @@
|
|||||||
# Makefile pour XXX-XXX
|
# Makefile pour XXX-XXX
|
||||||
################################
|
################################
|
||||||
|
|
||||||
SOURCE=eole-lemonldap-ng
|
SOURCE=eole-lemonldap
|
||||||
VERSION=2.8
|
VERSION=0.1
|
||||||
EOLE_VERSION=2.8
|
EOLE_VERSION=2.7
|
||||||
EOLE_RELEASE=2.8.1
|
EOLE_RELEASE=2.7.2
|
||||||
PKGAPPS=non
|
PKGAPPS=non
|
||||||
#FLASK_MODULE=<APPLICATION>
|
#FLASK_MODULE=<APPLICATION>
|
||||||
|
|
||||||
|
54
debian/control
vendored
54
debian/control
vendored
@ -1,54 +0,0 @@
|
|||||||
Source: eole-lemonldap-ng
|
|
||||||
Section: web
|
|
||||||
Priority: optional
|
|
||||||
Maintainer: Équipe EOLE <eole@ac-dijon.fr>
|
|
||||||
Build-Depends: debhelper-compat (= 12)
|
|
||||||
Standards-Version: 4.5.0
|
|
||||||
Homepage: https://dev-eole.ac-dijon.fr/projects/sso
|
|
||||||
Vcs-Git: https://dev-eole.ac-dijon.fr/git/eole-lemonldap-ng.git
|
|
||||||
Vcs-Browser: https://dev-eole.ac-dijon.fr/projects/sso/repository
|
|
||||||
|
|
||||||
Package: eole-lemonldap-ng
|
|
||||||
Architecture: all
|
|
||||||
Depends: eole-lemonldap-ng-pkg,
|
|
||||||
${misc:Depends}
|
|
||||||
Description: Dictionnaires et templates pour la configuration d'un serveur LemonLDAP::NG
|
|
||||||
Pour toute information complémentaire, veuillez vous rendre sur le
|
|
||||||
site du projet EOLE.
|
|
||||||
|
|
||||||
Package: eole-lemonldap-ng-scribe
|
|
||||||
Architecture: all
|
|
||||||
Depends: eole-scribe,
|
|
||||||
eole-lemonldap-ng,
|
|
||||||
libapache2-mod-perl2,
|
|
||||||
${misc:Depends}
|
|
||||||
Description: Dictionnaire pour calculer les valeurs automatiquement sur Scribe
|
|
||||||
.
|
|
||||||
Pour toute information complémentaire, veuillez vous rendre sur le
|
|
||||||
site du projet EOLE.
|
|
||||||
|
|
||||||
Package: eole-lemonldap-ng-pkg
|
|
||||||
Architecture: all
|
|
||||||
Section: metapackages
|
|
||||||
Depends: lemonldap-ng,
|
|
||||||
lemonldap-ng-doc,
|
|
||||||
lemonldap-ng-fastcgi-server,
|
|
||||||
lemonldap-ng-handler,
|
|
||||||
liblemonldap-ng-handler-perl,
|
|
||||||
liblemonldap-ng-manager-perl,
|
|
||||||
liblemonldap-ng-portal-perl,
|
|
||||||
libauthen-captcha-perl,
|
|
||||||
libauthen-sasl-perl,
|
|
||||||
libemail-sender-perl,
|
|
||||||
libgd-securityimage-perl,
|
|
||||||
libimage-magick-perl,
|
|
||||||
libio-string-perl,
|
|
||||||
liblasso-perl,
|
|
||||||
libnet-ldap-perl,
|
|
||||||
libunicode-string-perl,
|
|
||||||
libmime-tools-perl,
|
|
||||||
libnet-openid-server-perl,
|
|
||||||
${misc:Depends}
|
|
||||||
Description: Paquet de dépendances pour eole-lemonldap.
|
|
||||||
.
|
|
||||||
Pour toute information complémentaire, veuillez vous rendre sur la forge Cadoles.
|
|
37
debian/copyright
vendored
37
debian/copyright
vendored
@ -1,37 +0,0 @@
|
|||||||
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
|
||||||
Upstream-Name: eole-lemonldap-ng
|
|
||||||
Source: http://dev-eole.ac-dijon.fr/projects/sso
|
|
||||||
|
|
||||||
Files: *
|
|
||||||
Copyright: 2020 Équipe EOLE <eole@ac-dijon.fr>
|
|
||||||
License: CeCILL-C
|
|
||||||
|
|
||||||
License: CeCILL-C
|
|
||||||
This software is governed by the CeCILL-C license under French law and
|
|
||||||
abiding by the rules of distribution of free software. You can use,
|
|
||||||
modify and or redistribute the software under the terms of the CeCILL-C
|
|
||||||
license as circulated by CEA, CNRS and INRIA at the following URL
|
|
||||||
"http://www.cecill.info";.
|
|
||||||
.
|
|
||||||
As a counterpart to the access to the source code and rights to copy,
|
|
||||||
modify and redistribute granted by the license, users are provided only
|
|
||||||
with a limited warranty and the software's author, the holder of the
|
|
||||||
economic rights, and the successive licensors have only limited
|
|
||||||
liability.
|
|
||||||
.
|
|
||||||
In this respect, the user's attention is drawn to the risks associated
|
|
||||||
with loading, using, modifying and/or developing or reproducing the
|
|
||||||
software by the user in light of its specific status of free software,
|
|
||||||
that may mean that it is complicated to manipulate, and that also
|
|
||||||
therefore means that it is reserved for developers and experienced
|
|
||||||
professionals having in-depth computer knowledge. Users are therefore
|
|
||||||
encouraged to load and test the software's suitability as regards their
|
|
||||||
requirements in conditions enabling the security of their systems and/or
|
|
||||||
data to be ensured and, more generally, to use and operate it in the
|
|
||||||
same conditions as regards security.
|
|
||||||
.
|
|
||||||
The fact that you are presently reading this means that you have had
|
|
||||||
knowledge of the CeCILL-C license and that you accept its terms.
|
|
||||||
.
|
|
||||||
On Eole systems, the complete text of the CeCILL-C License can be found
|
|
||||||
in `/usr/share/common-licenses/CeCILL-2'.
|
|
2
debian/eole-lemonldap-ng-scribe.install
vendored
2
debian/eole-lemonldap-ng-scribe.install
vendored
@ -1,2 +0,0 @@
|
|||||||
usr/share/eole/creole/dicos/71_lemonldap_ng_scribe.xml
|
|
||||||
usr/share/eole/postservice/98-lemonldap-ng-scribe-register-hosts
|
|
7
debian/eole-lemonldap-ng.install
vendored
7
debian/eole-lemonldap-ng.install
vendored
@ -1,7 +0,0 @@
|
|||||||
usr/share/creole/
|
|
||||||
usr/share/eole/creole/dicos/70_lemonldap_ng.xml
|
|
||||||
usr/share/eole/creole/distrib/
|
|
||||||
usr/share/eole/diagnose/
|
|
||||||
usr/share/eole/postservice/99-lemonldap-ng
|
|
||||||
usr/share/eole/posttemplate/
|
|
||||||
usr/share/eole/lemonldap-ng/
|
|
3
debian/gbp.conf
vendored
3
debian/gbp.conf
vendored
@ -1,3 +0,0 @@
|
|||||||
# Set per distribution debian tag
|
|
||||||
[DEFAULT]
|
|
||||||
debian-tag = debian/eole/%(version)s
|
|
9
debian/rules
vendored
9
debian/rules
vendored
@ -1,9 +0,0 @@
|
|||||||
#!/usr/bin/make -f
|
|
||||||
# -*- makefile -*-
|
|
||||||
|
|
||||||
# Uncomment this to turn on verbose mode.
|
|
||||||
export DH_VERBOSE=1
|
|
||||||
export DH_OPTIONS=-v
|
|
||||||
|
|
||||||
%:
|
|
||||||
dh $@
|
|
1
debian/source/format
vendored
1
debian/source/format
vendored
@ -1 +0,0 @@
|
|||||||
3.0 (native)
|
|
@ -1,2 +0,0 @@
|
|||||||
creolefuncs_DATA_DIR := $(DESTDIR)/usr/share/creole/funcs
|
|
||||||
lemonldap-ng_DATA_DIR := $(eole_DIR)/lemonldap-ng
|
|
1
eole-lemonldap.mk
Normal file
1
eole-lemonldap.mk
Normal file
@ -0,0 +1 @@
|
|||||||
|
creolefuncs_DATA_DIR := $(DESTDIR)/usr/share/creole/funcs
|
@ -1,102 +0,0 @@
|
|||||||
package Lemonldap::NG::Portal::UserDB::LDAP;
|
|
||||||
|
|
||||||
use strict;
|
|
||||||
use Mouse;
|
|
||||||
use utf8;
|
|
||||||
use Lemonldap::NG::Portal::Main::Constants qw(PE_OK);
|
|
||||||
|
|
||||||
extends 'Lemonldap::NG::Portal::Lib::LDAP';
|
|
||||||
|
|
||||||
our $VERSION = '2.0.6';
|
|
||||||
|
|
||||||
has ldapGroupAttributeNameSearch => (
|
|
||||||
is => 'rw',
|
|
||||||
lazy => 1,
|
|
||||||
builder => sub {
|
|
||||||
my $attributes = [];
|
|
||||||
@$attributes =
|
|
||||||
split( /\s+/, $_[0]->{conf}->{ldapGroupAttributeNameSearch} )
|
|
||||||
if $_[0]->{conf}->{ldapGroupAttributeNameSearch};
|
|
||||||
push( @$attributes, $_[0]->{conf}->{ldapGroupAttributeNameGroup} )
|
|
||||||
if ( $_[0]->{conf}->{ldapGroupRecursive}
|
|
||||||
and $_[0]->{conf}->{ldapGroupAttributeNameGroup} ne "dn" );
|
|
||||||
return $attributes;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
# RUNNING METHODS
|
|
||||||
#
|
|
||||||
# getUser is provided by Portal::Lib::LDAP
|
|
||||||
|
|
||||||
# Load all parameters included in exportedVars parameter.
|
|
||||||
# Multi-value parameters are loaded in a single string with
|
|
||||||
# a separator (param multiValuesSeparator)
|
|
||||||
# @return Lemonldap::NG::Portal constant
|
|
||||||
sub setSessionInfo {
|
|
||||||
my ( $self, $req ) = @_;
|
|
||||||
$req->{sessionInfo}->{_dn} = $req->data->{dn};
|
|
||||||
|
|
||||||
my %vars = ( %{ $self->conf->{exportedVars} },
|
|
||||||
%{ $self->conf->{ldapExportedVars} } );
|
|
||||||
while ( my ( $k, $v ) = each %vars ) {
|
|
||||||
|
|
||||||
# getLdapValue returns an empty string for missing attribute
|
|
||||||
# but we really want to return undef so they don't get stored in session
|
|
||||||
$req->sessionInfo->{$k} =
|
|
||||||
$self->ldap->getLdapValue( $req->data->{ldapentry}, $v ) || undef;
|
|
||||||
}
|
|
||||||
|
|
||||||
PE_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Load all groups in $groups.
|
|
||||||
# @return Lemonldap::NG::Portal constant
|
|
||||||
sub setGroups {
|
|
||||||
my ( $self, $req ) = @_;
|
|
||||||
my $groups = $req->{sessionInfo}->{groups};
|
|
||||||
my $hGroups = $req->{sessionInfo}->{hGroups};
|
|
||||||
|
|
||||||
if ( $self->conf->{ldapGroupBase} ) {
|
|
||||||
|
|
||||||
# Get value for group search
|
|
||||||
my $group_value = $self->ldap->getLdapValue( $req->data->{ldapentry},
|
|
||||||
$self->conf->{ldapGroupAttributeNameUser} );
|
|
||||||
|
|
||||||
if ( $self->conf->{ldapGroupDecodeSearchedValue} ) {
|
|
||||||
utf8::decode($group_value);
|
|
||||||
}
|
|
||||||
|
|
||||||
$self->logger->debug( "Searching LDAP groups in "
|
|
||||||
. $self->conf->{ldapGroupBase}
|
|
||||||
. " for $group_value" );
|
|
||||||
|
|
||||||
# Call searchGroups
|
|
||||||
my $ldapGroups = $self->ldap->searchGroups(
|
|
||||||
$self->conf->{ldapGroupBase},
|
|
||||||
$self->conf->{ldapGroupAttributeName},
|
|
||||||
$group_value,
|
|
||||||
$self->ldapGroupAttributeNameSearch,
|
|
||||||
$req->{ldapGroupDuplicateCheck}
|
|
||||||
);
|
|
||||||
|
|
||||||
foreach ( keys %$ldapGroups ) {
|
|
||||||
my $groupName = $_;
|
|
||||||
$hGroups->{$groupName} = $ldapGroups->{$groupName};
|
|
||||||
my $groupValues = [];
|
|
||||||
foreach ( @{ $self->ldapGroupAttributeNameSearch } ) {
|
|
||||||
next if $_ =~ /^name$/;
|
|
||||||
my $firstValue = $ldapGroups->{$groupName}->{$_}->[0];
|
|
||||||
push @$groupValues, $firstValue;
|
|
||||||
}
|
|
||||||
$groups .= $self->conf->{multiValuesSeparator} if $groups;
|
|
||||||
$groups .= join( '|', @$groupValues );
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
$req->{sessionInfo}->{groups} = $groups;
|
|
||||||
$req->{sessionInfo}->{hGroups} = $hGroups;
|
|
||||||
PE_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
1;
|
|
@ -1,20 +0,0 @@
|
|||||||
--- /usr/share/perl5/Lemonldap/NG/Portal/UserDB/LDAP.pm.old 2019-12-11 12:05:54.000000000 +0100
|
|
||||||
+++ /usr/share/perl5/Lemonldap/NG/Portal/UserDB/LDAP.pm 2021-01-05 10:54:19.188732119 +0100
|
|
||||||
@@ -40,10 +40,15 @@
|
|
||||||
%{ $self->conf->{ldapExportedVars} } );
|
|
||||||
while ( my ( $k, $v ) = each %vars ) {
|
|
||||||
|
|
||||||
+ my $value = $self->ldap->getLdapValue( $req->data->{ldapentry}, $v );
|
|
||||||
+
|
|
||||||
# getLdapValue returns an empty string for missing attribute
|
|
||||||
# but we really want to return undef so they don't get stored in session
|
|
||||||
- $req->sessionInfo->{$k} =
|
|
||||||
- $self->ldap->getLdapValue( $req->data->{ldapentry}, $v ) || undef;
|
|
||||||
+ # This has to be a string comparison because "0" is a valid attribute
|
|
||||||
+ # value. See #2403
|
|
||||||
+ $value = undef if ( $value eq "" );
|
|
||||||
+
|
|
||||||
+ $req->sessionInfo->{$k} = $value;
|
|
||||||
}
|
|
||||||
|
|
||||||
PE_OK;
|
|
@ -1,12 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# vérifie si le patch est déjà appliqué
|
|
||||||
grep -q 2403 /usr/share/perl5/Lemonldap/NG/Portal/UserDB/LDAP.pm && exit 0
|
|
||||||
|
|
||||||
# copie de sauvegarde
|
|
||||||
cp -a /usr/share/perl5/Lemonldap/NG/Portal/UserDB/LDAP.pm /usr/share/eole/lemonldap-ng/
|
|
||||||
|
|
||||||
# application du patch
|
|
||||||
patch -d / -p 0 < /usr/share/eole/lemonldap-ng/LDAP.pm.patch
|
|
||||||
|
|
||||||
exit 0
|
|
Reference in New Issue
Block a user