Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
best-practical
rt-authen-externalauth
Commits
2153c6ff
Commit
2153c6ff
authored
May 19, 2011
by
Ruslan Zakirov
Browse files
add a sketch
will use more specific script at the moment
parent
c74d697d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
0 deletions
+41
-0
sbin/rt-authen-ldap-conflicts
sbin/rt-authen-ldap-conflicts
+41
-0
No files found.
sbin/rt-authen-ldap-conflicts
0 → 100644
View file @
2153c6ff
use strict;
use warnings;
### after: use lib qw(@RT_LIB_PATH@);
use lib qw(/opt/rt3/local/lib /opt/rt3/lib);
use RT;
RT::LoadConfig();
RT::Init();
my @services = @{ $RT::ExternalInfoPriority || [] }, @{ $RT::ExternalAuthPriority || [] };
my %seen;
foreach my $service ( splice @services ) {
my $config = $RT::ExternalSettings->{ $service };
next unless $config->{'type'} eq 'ldap';
next unless @{ $config->{'attr_match_list'} } > 1;
next if $seen{ $service }++;
push @services, $service;
}
unless ( @services ) {
print "No LDAP services with more than one field in attr_match_list\n";
exit 0;
}
foreach my $service ( @service ) {
$RT::Logger->info("Checking service $service");
find_conflicts( $service, $RT::ExternalSettings->{ $service } );
}
sub find_conlicts {
my ($name, $config) = @_;
my $ldap = RT::Authen::ExternalAuth::LDAP::_GetBoundLdapObj($config);
return unless $ldap;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment