Branch '389-ds-base-1.3.4' - dirsrvtests/tickets
by Noriko Hosoi
dirsrvtests/tickets/ticket48194_test.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit ca9e6f9292289a7b6b7f57602555bf9aeb9ba9de
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Tue Jul 14 11:12:56 2015 -0700
Ticket #48194 - CI test: fixing test cases for ticket 48194
Description: nsSSL3Ciphers preference not enforced server side
. Test Case 6 - wrong expectation for RC4-SHA
. Test Case 7 - removing a extra space in nsSSL3Ciphers
(cherry picked from commit f69ce333052f7f33350fd4038b8f598f650a743f)
diff --git a/dirsrvtests/tickets/ticket48194_test.py b/dirsrvtests/tickets/ticket48194_test.py
index 18739ca..17e179a 100644
--- a/dirsrvtests/tickets/ticket48194_test.py
+++ b/dirsrvtests/tickets/ticket48194_test.py
@@ -295,7 +295,7 @@ def test_ticket48194_run_4(topology):
Default ciphers are enabled.
default allowWeakCipher
"""
- _header(topology, 'Test Case 5 - Check no nsSSL3Ciphers (default setting) with default allowWeakCipher')
+ _header(topology, 'Test Case 5 - Check no nsSSL3Ciphers (-all) with default allowWeakCipher')
topology.standalone.simple_bind_s(DN_DM, PASSWORD)
topology.standalone.modify_s(ENCRYPTION_DN, [(ldap.MOD_DELETE, 'nsSSL3Ciphers', '-all')])
@@ -326,7 +326,7 @@ def test_ticket48194_run_5(topology):
os.system('touch %s' % (topology.standalone.errlog))
topology.standalone.start(timeout=120)
- connectWithOpenssl(topology, 'RC4-SHA', True)
+ connectWithOpenssl(topology, 'RC4-SHA', False)
connectWithOpenssl(topology, 'AES256-SHA256', True)
def test_ticket48194_run_6(topology):
@@ -338,7 +338,7 @@ def test_ticket48194_run_6(topology):
_header(topology, 'Test Case 7 - Check nsSSL3Ciphers: +all,-TLS_RSA_WITH_AES_256_CBC_SHA256 with default allowWeakCipher')
topology.standalone.simple_bind_s(DN_DM, PASSWORD)
- topology.standalone.modify_s(ENCRYPTION_DN, [(ldap.MOD_REPLACE, 'nsSSL3Ciphers', '+all,-TLS_RSA_WITH_AES_256_CBC_SHA256 ')])
+ topology.standalone.modify_s(ENCRYPTION_DN, [(ldap.MOD_REPLACE, 'nsSSL3Ciphers', '+all,-TLS_RSA_WITH_AES_256_CBC_SHA256')])
log.info("\n######################### Restarting the server ######################\n")
topology.standalone.stop(timeout=10)
8 years, 10 months
dirsrvtests/tickets
by Noriko Hosoi
dirsrvtests/tickets/ticket48194_test.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit f69ce333052f7f33350fd4038b8f598f650a743f
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Tue Jul 14 11:12:56 2015 -0700
Ticket #48194 - CI test: fixing test cases for ticket 48194
Description: nsSSL3Ciphers preference not enforced server side
. Test Case 6 - wrong expectation for RC4-SHA
. Test Case 7 - removing a extra space in nsSSL3Ciphers
diff --git a/dirsrvtests/tickets/ticket48194_test.py b/dirsrvtests/tickets/ticket48194_test.py
index 18739ca..17e179a 100644
--- a/dirsrvtests/tickets/ticket48194_test.py
+++ b/dirsrvtests/tickets/ticket48194_test.py
@@ -295,7 +295,7 @@ def test_ticket48194_run_4(topology):
Default ciphers are enabled.
default allowWeakCipher
"""
- _header(topology, 'Test Case 5 - Check no nsSSL3Ciphers (default setting) with default allowWeakCipher')
+ _header(topology, 'Test Case 5 - Check no nsSSL3Ciphers (-all) with default allowWeakCipher')
topology.standalone.simple_bind_s(DN_DM, PASSWORD)
topology.standalone.modify_s(ENCRYPTION_DN, [(ldap.MOD_DELETE, 'nsSSL3Ciphers', '-all')])
@@ -326,7 +326,7 @@ def test_ticket48194_run_5(topology):
os.system('touch %s' % (topology.standalone.errlog))
topology.standalone.start(timeout=120)
- connectWithOpenssl(topology, 'RC4-SHA', True)
+ connectWithOpenssl(topology, 'RC4-SHA', False)
connectWithOpenssl(topology, 'AES256-SHA256', True)
def test_ticket48194_run_6(topology):
@@ -338,7 +338,7 @@ def test_ticket48194_run_6(topology):
_header(topology, 'Test Case 7 - Check nsSSL3Ciphers: +all,-TLS_RSA_WITH_AES_256_CBC_SHA256 with default allowWeakCipher')
topology.standalone.simple_bind_s(DN_DM, PASSWORD)
- topology.standalone.modify_s(ENCRYPTION_DN, [(ldap.MOD_REPLACE, 'nsSSL3Ciphers', '+all,-TLS_RSA_WITH_AES_256_CBC_SHA256 ')])
+ topology.standalone.modify_s(ENCRYPTION_DN, [(ldap.MOD_REPLACE, 'nsSSL3Ciphers', '+all,-TLS_RSA_WITH_AES_256_CBC_SHA256')])
log.info("\n######################### Restarting the server ######################\n")
topology.standalone.stop(timeout=10)
8 years, 10 months
Branch '389-ds-base-1.3.3' - ldap/admin rpm/389-ds-base.spec.in
by Richard Allen Megginson
ldap/admin/src/logconv.pl | 20 +++++++++++++++++++-
rpm/389-ds-base.spec.in | 3 +++
2 files changed, 22 insertions(+), 1 deletion(-)
New commits:
commit 3414c4eb8416d47e18013706c0d31cb762cdd31e
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Mon Jul 13 18:27:50 2015 -0600
Ticket #48224 - logconv.pl should handle *.tar.xz, *.txz, *.xz log files
https://fedorahosted.org/389/ticket/48224
Reviewed by: ???
Branch: 389-ds-base-1.3.3
Fix Description: There is no xz support by default, the perl module
IO::Uncompress::UnXz is required for that. Also, Tar::Archive can't
handle xz files by default, so they have to be uncompressed first.
This will also need a spec file change:
Requires: perl-IO-Compress
Requires: perl-IO-Compress-Lzma
Platforms tested: Fedora 21
Flag Day: no
Doc impact: no
(cherry picked from commit d1b0acd12faa620774c66044f91e509ae175e4a1)
(cherry picked from commit 4f3b802fac46adfa8fd5cf49443b875f136fb19c)
Conflicts:
ldap/admin/src/logconv.pl
diff --git a/ldap/admin/src/logconv.pl b/ldap/admin/src/logconv.pl
index e4bbfbc..daff276 100755
--- a/ldap/admin/src/logconv.pl
+++ b/ldap/admin/src/logconv.pl
@@ -424,14 +424,26 @@ my $totalLineCount = 0;
sub isTarArchive {
local $_ = shift;
+ if (/\.txz$/ || /\.tar.xz$/) {
+ use IO::Uncompress::UnXz;
+ }
return /\.tar$/ || /\.tar\.bz2$/ || /\.tar.gz$/ || /\.tar.xz$/ || /\.tgz$/ || /\.tbz$/ || /\.txz$/;
}
sub isCompressed {
local $_ = shift;
+ if (/\.xz$/) {
+ use IO::Uncompress::UnXz;
+ }
return /\.gz$/ || /\.bz2$/ || /\.xz$/;
}
+# Tar::Archive can't grok xz, so have to uncompress first
+sub tarNeedsUncompress {
+ local $_ = shift;
+ return /\.tar.xz$/ || /\.txz$/;
+}
+
$Archive::Tar::WARN = 0; # so new will shut up when reading a regular file
for (my $count=0; $count < $file_count; $count++){
my $logname = $files[$count];
@@ -457,7 +469,13 @@ for (my $count=0; $count < $file_count; $count++){
my $comp = 0;
if (isTarArchive($logname)) {
$tar = Archive::Tar->new();
- $tariter = Archive::Tar->iter($logname);
+ if (tarNeedsUncompress($logname)) {
+ my $TARFH = new IO::Uncompress::AnyUncompress $logname or
+ do { openFailed($AnyUncompressError, $logname); next };
+ $tariter = Archive::Tar->iter($TARFH);
+ } else {
+ $tariter = Archive::Tar->iter($logname);
+ }
if (!$tariter) {
print "$logname is not a valid tar archive, or compression is unrecognized: $!\n";
next;
diff --git a/rpm/389-ds-base.spec.in b/rpm/389-ds-base.spec.in
index 17a1f86..3b7c072 100644
--- a/rpm/389-ds-base.spec.in
+++ b/rpm/389-ds-base.spec.in
@@ -110,6 +110,9 @@ Requires: perl-Socket6
Requires: perl-Socket
%endif
Requires: perl-NetAddr-IP
+# for logconv compressed file support
+Requires: perl-IO-Compress
+Requires: perl-IO-Compress-Lzma
Source0: http://port389.org/sources/%{name}-%{version}%{?prerel}.tar.bz2
# 389-ds-git.sh should be used to generate the source tarball from git
8 years, 10 months
Branch '389-ds-base-1.3.4' - ldap/admin rpm/389-ds-base.spec.in
by Richard Allen Megginson
ldap/admin/src/logconv.pl | 20 +++++++++++++++++++-
rpm/389-ds-base.spec.in | 3 +++
2 files changed, 22 insertions(+), 1 deletion(-)
New commits:
commit 4f3b802fac46adfa8fd5cf49443b875f136fb19c
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Mon Jul 13 18:27:50 2015 -0600
Ticket #48224 - logconv.pl should handle *.tar.xz, *.txz, *.xz log files
https://fedorahosted.org/389/ticket/48224
Reviewed by: ???
Branch: 389-ds-base-1.3.4
Fix Description: There is no xz support by default, the perl module
IO::Uncompress::UnXz is required for that. Also, Tar::Archive can't
handle xz files by default, so they have to be uncompressed first.
This will also need a spec file change:
Requires: perl-IO-Compress
Requires: perl-IO-Compress-Lzma
Platforms tested: Fedora 21
Flag Day: no
Doc impact: no
(cherry picked from commit d1b0acd12faa620774c66044f91e509ae175e4a1)
diff --git a/ldap/admin/src/logconv.pl b/ldap/admin/src/logconv.pl
index 7ca9084..a6bd6c2 100755
--- a/ldap/admin/src/logconv.pl
+++ b/ldap/admin/src/logconv.pl
@@ -398,14 +398,26 @@ my $totalLineCount = 0;
sub isTarArchive {
local $_ = shift;
+ if (/\.txz$/ || /\.tar.xz$/) {
+ use IO::Uncompress::UnXz;
+ }
return /\.tar$/ || /\.tar\.bz2$/ || /\.tar.gz$/ || /\.tar.xz$/ || /\.tgz$/ || /\.tbz$/ || /\.txz$/;
}
sub isCompressed {
local $_ = shift;
+ if (/\.xz$/) {
+ use IO::Uncompress::UnXz;
+ }
return /\.gz$/ || /\.bz2$/ || /\.xz$/;
}
+# Tar::Archive can't grok xz, so have to uncompress first
+sub tarNeedsUncompress {
+ local $_ = shift;
+ return /\.tar.xz$/ || /\.txz$/;
+}
+
sub convertTimeToSeconds {
my $log_line = shift;
@@ -503,7 +515,13 @@ for (my $count=0; $count < $file_count; $count++){
my $comp = 0;
if (isTarArchive($logname)) {
$tar = Archive::Tar->new();
- $tariter = Archive::Tar->iter($logname);
+ if (tarNeedsUncompress($logname)) {
+ my $TARFH = new IO::Uncompress::AnyUncompress $logname or
+ do { openFailed($AnyUncompressError, $logname); next };
+ $tariter = Archive::Tar->iter($TARFH);
+ } else {
+ $tariter = Archive::Tar->iter($logname);
+ }
if (!$tariter) {
print "$logname is not a valid tar archive, or compression is unrecognized: $!\n";
next;
diff --git a/rpm/389-ds-base.spec.in b/rpm/389-ds-base.spec.in
index 64541f1..5c64bd7 100644
--- a/rpm/389-ds-base.spec.in
+++ b/rpm/389-ds-base.spec.in
@@ -121,6 +121,9 @@ Requires: perl-Socket6
Requires: perl-Socket
%endif
Requires: perl-NetAddr-IP
+# for logconv compressed file support
+Requires: perl-IO-Compress
+Requires: perl-IO-Compress-Lzma
Source0: http://port389.org/sources/%{name}-%{version}%{?prerel}.tar.bz2
# 389-ds-git.sh should be used to generate the source tarball from git
8 years, 10 months
ldap/admin rpm/389-ds-base.spec.in
by Richard Allen Megginson
ldap/admin/src/logconv.pl | 20 +++++++++++++++++++-
rpm/389-ds-base.spec.in | 3 +++
2 files changed, 22 insertions(+), 1 deletion(-)
New commits:
commit d1b0acd12faa620774c66044f91e509ae175e4a1
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Mon Jul 13 18:27:50 2015 -0600
Ticket #48224 - logconv.pl should handle *.tar.xz, *.txz, *.xz log files
https://fedorahosted.org/389/ticket/48224
Reviewed by: ???
Branch: master
Fix Description: There is no xz support by default, the perl module
IO::Uncompress::UnXz is required for that. Also, Tar::Archive can't
handle xz files by default, so they have to be uncompressed first.
This will also need a spec file change:
Requires: perl-IO-Compress
Requires: perl-IO-Compress-Lzma
Platforms tested: Fedora 21
Flag Day: no
Doc impact: no
diff --git a/ldap/admin/src/logconv.pl b/ldap/admin/src/logconv.pl
index 7ca9084..a6bd6c2 100755
--- a/ldap/admin/src/logconv.pl
+++ b/ldap/admin/src/logconv.pl
@@ -398,14 +398,26 @@ my $totalLineCount = 0;
sub isTarArchive {
local $_ = shift;
+ if (/\.txz$/ || /\.tar.xz$/) {
+ use IO::Uncompress::UnXz;
+ }
return /\.tar$/ || /\.tar\.bz2$/ || /\.tar.gz$/ || /\.tar.xz$/ || /\.tgz$/ || /\.tbz$/ || /\.txz$/;
}
sub isCompressed {
local $_ = shift;
+ if (/\.xz$/) {
+ use IO::Uncompress::UnXz;
+ }
return /\.gz$/ || /\.bz2$/ || /\.xz$/;
}
+# Tar::Archive can't grok xz, so have to uncompress first
+sub tarNeedsUncompress {
+ local $_ = shift;
+ return /\.tar.xz$/ || /\.txz$/;
+}
+
sub convertTimeToSeconds {
my $log_line = shift;
@@ -503,7 +515,13 @@ for (my $count=0; $count < $file_count; $count++){
my $comp = 0;
if (isTarArchive($logname)) {
$tar = Archive::Tar->new();
- $tariter = Archive::Tar->iter($logname);
+ if (tarNeedsUncompress($logname)) {
+ my $TARFH = new IO::Uncompress::AnyUncompress $logname or
+ do { openFailed($AnyUncompressError, $logname); next };
+ $tariter = Archive::Tar->iter($TARFH);
+ } else {
+ $tariter = Archive::Tar->iter($logname);
+ }
if (!$tariter) {
print "$logname is not a valid tar archive, or compression is unrecognized: $!\n";
next;
diff --git a/rpm/389-ds-base.spec.in b/rpm/389-ds-base.spec.in
index 64541f1..5c64bd7 100644
--- a/rpm/389-ds-base.spec.in
+++ b/rpm/389-ds-base.spec.in
@@ -121,6 +121,9 @@ Requires: perl-Socket6
Requires: perl-Socket
%endif
Requires: perl-NetAddr-IP
+# for logconv compressed file support
+Requires: perl-IO-Compress
+Requires: perl-IO-Compress-Lzma
Source0: http://port389.org/sources/%{name}-%{version}%{?prerel}.tar.bz2
# 389-ds-git.sh should be used to generate the source tarball from git
8 years, 10 months
Branch '389-ds-base-1.3.4' - ldap/admin
by Mark Reynolds
ldap/admin/src/logconv.pl | 65 ++++++++++++++++++++++++++++++++++------------
1 file changed, 49 insertions(+), 16 deletions(-)
New commits:
commit 3bf1daaadd7e7c7b0f99d1f7a93d78598730269d
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Tue Jul 14 10:09:00 2015 -0400
Ticket 47910 - logconv.pl - validate start and end time args
Description: Add validatation checks for the startTime/endTime configuration
arguments(-S, -E)
https://fedorahosted.org/389/ticket/47910
Reviewed by: rmeggins(Thanks!)
(cherry picked from commit 8495afa57ad837e3a51871a4f6da2a9978c8e711)
diff --git a/ldap/admin/src/logconv.pl b/ldap/admin/src/logconv.pl
index ce4114e..7ca9084 100755
--- a/ldap/admin/src/logconv.pl
+++ b/ldap/admin/src/logconv.pl
@@ -24,6 +24,7 @@ use DB_File;
use sigtrap qw(die normal-signals);
use Archive::Tar;
use IO::Uncompress::AnyUncompress qw($AnyUncompressError);
+use Scalar::Util qw(looks_like_number);
Getopt::Long::Configure ("bundling");
Getopt::Long::Configure ("permute");
@@ -341,18 +342,18 @@ $connmsg{"P2"} = "Poll";
$connmsg{"U1"} = "Cleanly Closed Connections";
my %monthname = (
- "Jan" => 0,
- "Feb" => 1,
- "Mar" => 2,
- "Apr" => 3,
- "May" => 4,
- "Jun" => 5,
- "Jul" => 6,
- "Aug" => 7,
- "Sep" => 8,
- "Oct" => 9,
- "Nov" => 10,
- "Dec" => 11,
+ "jan" => 0,
+ "feb" => 1,
+ "mar" => 2,
+ "apr" => 3,
+ "may" => 4,
+ "jun" => 5,
+ "jul" => 6,
+ "aug" => 7,
+ "sep" => 8,
+ "oct" => 9,
+ "nov" => 10,
+ "dec" => 11,
);
@@ -411,11 +412,27 @@ sub convertTimeToSeconds {
my $logDate;
my @dateComps;
my ($timeMonth, $timeDay, $timeYear, $dateTotal);
+ $dateTotal = 0;
if ($log_line =~ / *([0-9A-Z\/]+)/i ){
$logDate = $1;
@dateComps = split /\//, $logDate;
-
- $timeMonth = 1 + $monthname{$dateComps[1]};
+ if ($#dateComps < 2) {
+ print "The date string ($log_line) is invalid, exiting...\n";
+ exit(1);
+ }
+ if (!looks_like_number($dateComps[0]) || length $dateComps[0] != 2) {
+ print "The date string ($log_line) has invalid day ($dateComps[0]), exiting...\n";
+ exit(1);
+ }
+ if ($monthname{lc $dateComps[1]} eq "") {
+ print "The date string ($log_line) has invalid month ($dateComps[1]), exiting...\n";
+ exit(1);
+ }
+ if (!looks_like_number($dateComps[2]) || length $dateComps[2] != 4 ) {
+ print "The date string ($log_line) has invalid year ($dateComps[2]), exiting...\n";
+ exit(1);
+ }
+ $timeMonth = 1 + $monthname{lc $dateComps[1]};
$timeMonth = $timeMonth * 3600 * 24 * 30;
$timeDay= $dateComps[0] * 3600 * 24;
$timeYear = $dateComps[2] * 365 * 3600 * 24;
@@ -425,10 +442,26 @@ sub convertTimeToSeconds {
my $logTime;
my @timeComps;
my ($timeHour, $timeMinute, $timeSecond, $timeTotal);
+ $timeTotal = 0;
if ($log_line =~ / *(:[0-9:]+)/i ){
$logTime = $1;
@timeComps = split /:/, $logTime;
-
+ if ($#timeComps < 3) {
+ print "The time string ($log_line) is invalid, exiting...\n";
+ exit(1);
+ }
+ if (!looks_like_number($timeComps[1]) || length $timeComps[1] != 2){
+ print "The time string ($log_line) has invalid hour ($timeComps[1]), exiting...\n";
+ exit(1);
+ }
+ if (!looks_like_number($timeComps[2]) || length $timeComps[2] != 2){
+ print "The time string ($log_line) has invalid minute ($timeComps[2]), exiting...\n";
+ exit(1);
+ }
+ if (!looks_like_number($timeComps[3]) || length $timeComps[3] != 2){
+ print "The time string ($log_line) has invalid second ($timeComps[3]), exiting...\n";
+ exit(1);
+ }
$timeHour = $timeComps[1] * 3600;
$timeMinute = $timeComps[2] * 60;
$timeSecond = $timeComps[3];
@@ -1796,7 +1829,7 @@ sub parseLineNormal
}
my ($date, $hr, $min, $sec) = split (':', $time);
my ($day, $mon, $yr) = split ('/', $date);
- my $newmin = timegm(0, $min, $hr, $day, $monthname{$mon}, $yr) - $tzoff;
+ my $newmin = timegm(0, $min, $hr, $day, $monthname{lc $mon}, $yr) - $tzoff;
$gmtime = $newmin + $sec;
print_stats_block( $s_stats );
reset_stats_block( $s_stats, $gmtime, $time.' '.$tzone );
8 years, 10 months
ldap/admin
by Mark Reynolds
ldap/admin/src/logconv.pl | 65 ++++++++++++++++++++++++++++++++++------------
1 file changed, 49 insertions(+), 16 deletions(-)
New commits:
commit 8495afa57ad837e3a51871a4f6da2a9978c8e711
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Tue Jul 14 10:09:00 2015 -0400
Ticket 47910 - logconv.pl - validate start and end time args
Description: Add validatation checks for the startTime/endTime configuration
arguments(-S, -E)
https://fedorahosted.org/389/ticket/47910
Reviewed by: rmeggins(Thanks!)
diff --git a/ldap/admin/src/logconv.pl b/ldap/admin/src/logconv.pl
index ce4114e..7ca9084 100755
--- a/ldap/admin/src/logconv.pl
+++ b/ldap/admin/src/logconv.pl
@@ -24,6 +24,7 @@ use DB_File;
use sigtrap qw(die normal-signals);
use Archive::Tar;
use IO::Uncompress::AnyUncompress qw($AnyUncompressError);
+use Scalar::Util qw(looks_like_number);
Getopt::Long::Configure ("bundling");
Getopt::Long::Configure ("permute");
@@ -341,18 +342,18 @@ $connmsg{"P2"} = "Poll";
$connmsg{"U1"} = "Cleanly Closed Connections";
my %monthname = (
- "Jan" => 0,
- "Feb" => 1,
- "Mar" => 2,
- "Apr" => 3,
- "May" => 4,
- "Jun" => 5,
- "Jul" => 6,
- "Aug" => 7,
- "Sep" => 8,
- "Oct" => 9,
- "Nov" => 10,
- "Dec" => 11,
+ "jan" => 0,
+ "feb" => 1,
+ "mar" => 2,
+ "apr" => 3,
+ "may" => 4,
+ "jun" => 5,
+ "jul" => 6,
+ "aug" => 7,
+ "sep" => 8,
+ "oct" => 9,
+ "nov" => 10,
+ "dec" => 11,
);
@@ -411,11 +412,27 @@ sub convertTimeToSeconds {
my $logDate;
my @dateComps;
my ($timeMonth, $timeDay, $timeYear, $dateTotal);
+ $dateTotal = 0;
if ($log_line =~ / *([0-9A-Z\/]+)/i ){
$logDate = $1;
@dateComps = split /\//, $logDate;
-
- $timeMonth = 1 + $monthname{$dateComps[1]};
+ if ($#dateComps < 2) {
+ print "The date string ($log_line) is invalid, exiting...\n";
+ exit(1);
+ }
+ if (!looks_like_number($dateComps[0]) || length $dateComps[0] != 2) {
+ print "The date string ($log_line) has invalid day ($dateComps[0]), exiting...\n";
+ exit(1);
+ }
+ if ($monthname{lc $dateComps[1]} eq "") {
+ print "The date string ($log_line) has invalid month ($dateComps[1]), exiting...\n";
+ exit(1);
+ }
+ if (!looks_like_number($dateComps[2]) || length $dateComps[2] != 4 ) {
+ print "The date string ($log_line) has invalid year ($dateComps[2]), exiting...\n";
+ exit(1);
+ }
+ $timeMonth = 1 + $monthname{lc $dateComps[1]};
$timeMonth = $timeMonth * 3600 * 24 * 30;
$timeDay= $dateComps[0] * 3600 * 24;
$timeYear = $dateComps[2] * 365 * 3600 * 24;
@@ -425,10 +442,26 @@ sub convertTimeToSeconds {
my $logTime;
my @timeComps;
my ($timeHour, $timeMinute, $timeSecond, $timeTotal);
+ $timeTotal = 0;
if ($log_line =~ / *(:[0-9:]+)/i ){
$logTime = $1;
@timeComps = split /:/, $logTime;
-
+ if ($#timeComps < 3) {
+ print "The time string ($log_line) is invalid, exiting...\n";
+ exit(1);
+ }
+ if (!looks_like_number($timeComps[1]) || length $timeComps[1] != 2){
+ print "The time string ($log_line) has invalid hour ($timeComps[1]), exiting...\n";
+ exit(1);
+ }
+ if (!looks_like_number($timeComps[2]) || length $timeComps[2] != 2){
+ print "The time string ($log_line) has invalid minute ($timeComps[2]), exiting...\n";
+ exit(1);
+ }
+ if (!looks_like_number($timeComps[3]) || length $timeComps[3] != 2){
+ print "The time string ($log_line) has invalid second ($timeComps[3]), exiting...\n";
+ exit(1);
+ }
$timeHour = $timeComps[1] * 3600;
$timeMinute = $timeComps[2] * 60;
$timeSecond = $timeComps[3];
@@ -1796,7 +1829,7 @@ sub parseLineNormal
}
my ($date, $hr, $min, $sec) = split (':', $time);
my ($day, $mon, $yr) = split ('/', $date);
- my $newmin = timegm(0, $min, $hr, $day, $monthname{$mon}, $yr) - $tzoff;
+ my $newmin = timegm(0, $min, $hr, $day, $monthname{lc $mon}, $yr) - $tzoff;
$gmtime = $newmin + $sec;
print_stats_block( $s_stats );
reset_stats_block( $s_stats, $gmtime, $time.' '.$tzone );
8 years, 10 months
Branch '389-ds-base-1.3.4' - ldap/servers
by Noriko Hosoi
ldap/servers/plugins/posix-winsync/posix-group-func.c | 2 +-
ldap/servers/plugins/replication/windows_protocol_util.c | 11 +++++++----
2 files changed, 8 insertions(+), 5 deletions(-)
New commits:
commit 69fd1f188105b2c3ca1bee04b05909e53c980b34
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Mon Jul 13 17:51:01 2015 -0700
Ticket #48223 - Winsync fails when AD users have multiple spaces (two)inside the value of the rdn attribute
Description: When the dirsync search returns a remote entry, winsync
search the entry with DN to retrieve the whole attribute value pairs.
The DN used for the search was normalized which replaced multiple white-
spaces with one in the DN. This patch does not used the normalized DN,
but the same DN given by AD.
The DN normalization behaviour was introduced to fix a ticket #529 -
dn normalization must handle multiple space characters in attributes.
Added additional debugging to get the info which entry failed to sync.
https://fedorahosted.org/389/ticket/48223
Reviewed by rmeggins(a)redhat.com (Thank you, Rich!!)
(cherry picked from commit 2c484cc6e89e473bced0e9b25dd6e68d53024bb3)
diff --git a/ldap/servers/plugins/posix-winsync/posix-group-func.c b/ldap/servers/plugins/posix-winsync/posix-group-func.c
index 5f841e5..a497f3f 100644
--- a/ldap/servers/plugins/posix-winsync/posix-group-func.c
+++ b/ldap/servers/plugins/posix-winsync/posix-group-func.c
@@ -95,7 +95,7 @@ getEntry(const char *udn, char **attrs)
}
else {
slapi_log_error(SLAPI_LOG_FATAL, POSIX_WINSYNC_PLUGIN_NAME,
- "getEntry: error searching for uid: %d\n", rc);
+ "getEntry: error searching for uid %s: %d\n", udn, rc);
}
return NULL;
diff --git a/ldap/servers/plugins/replication/windows_protocol_util.c b/ldap/servers/plugins/replication/windows_protocol_util.c
index 4607251..6bf20b7 100644
--- a/ldap/servers/plugins/replication/windows_protocol_util.c
+++ b/ldap/servers/plugins/replication/windows_protocol_util.c
@@ -3226,7 +3226,7 @@ windows_get_remote_entry (Private_Repl_Protocol *prp, const Slapi_DN* remote_dn,
const char *searchbase = NULL;
Slapi_Entry *found_entry = NULL;
- searchbase = slapi_sdn_get_dn(remote_dn);
+ searchbase = slapi_sdn_get_udn(remote_dn);
cres = windows_search_entry_ext(prp->conn, (char*)searchbase, filter, &found_entry, NULL, LDAP_SCOPE_BASE);
if (cres)
{
@@ -5886,13 +5886,16 @@ retry:
remote_entry = NULL;
} else
{
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,"%s: windows_process_dirsync_entry: failed to fetch inbound entry.\n",agmt_get_long_name(prp->agmt));
+ slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ "%s: windows_process_dirsync_entry: failed to fetch inbound entry %s.\n",
+ agmt_get_long_name(prp->agmt), slapi_sdn_get_dn(slapi_entry_get_sdn_const(e)));
}
slapi_entry_free(local_entry);
if (rc) {
/* Something bad happened */
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,"%s: windows_process_dirsync_entry: failed to update inbound entry for %s.\n",agmt_get_long_name(prp->agmt),
- slapi_sdn_get_dn(slapi_entry_get_sdn_const(e)));
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "%s: windows_process_dirsync_entry: failed to update inbound entry for %s.\n",
+ agmt_get_long_name(prp->agmt), slapi_sdn_get_dn(slapi_entry_get_sdn_const(e)));
}
} else
{
8 years, 10 months
ldap/servers
by Noriko Hosoi
ldap/servers/plugins/posix-winsync/posix-group-func.c | 2 +-
ldap/servers/plugins/replication/windows_protocol_util.c | 11 +++++++----
2 files changed, 8 insertions(+), 5 deletions(-)
New commits:
commit 2c484cc6e89e473bced0e9b25dd6e68d53024bb3
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Mon Jul 13 17:51:01 2015 -0700
Ticket #48223 - Winsync fails when AD users have multiple spaces (two)inside the value of the rdn attribute
Description: When the dirsync search returns a remote entry, winsync
search the entry with DN to retrieve the whole attribute value pairs.
The DN used for the search was normalized which replaced multiple white-
spaces with one in the DN. This patch does not used the normalized DN,
but the same DN given by AD.
The DN normalization behaviour was introduced to fix a ticket #529 -
dn normalization must handle multiple space characters in attributes.
Added additional debugging to get the info which entry failed to sync.
https://fedorahosted.org/389/ticket/48223
Reviewed by rmeggins(a)redhat.com (Thank you, Rich!!)
diff --git a/ldap/servers/plugins/posix-winsync/posix-group-func.c b/ldap/servers/plugins/posix-winsync/posix-group-func.c
index 5f841e5..a497f3f 100644
--- a/ldap/servers/plugins/posix-winsync/posix-group-func.c
+++ b/ldap/servers/plugins/posix-winsync/posix-group-func.c
@@ -95,7 +95,7 @@ getEntry(const char *udn, char **attrs)
}
else {
slapi_log_error(SLAPI_LOG_FATAL, POSIX_WINSYNC_PLUGIN_NAME,
- "getEntry: error searching for uid: %d\n", rc);
+ "getEntry: error searching for uid %s: %d\n", udn, rc);
}
return NULL;
diff --git a/ldap/servers/plugins/replication/windows_protocol_util.c b/ldap/servers/plugins/replication/windows_protocol_util.c
index 4607251..6bf20b7 100644
--- a/ldap/servers/plugins/replication/windows_protocol_util.c
+++ b/ldap/servers/plugins/replication/windows_protocol_util.c
@@ -3226,7 +3226,7 @@ windows_get_remote_entry (Private_Repl_Protocol *prp, const Slapi_DN* remote_dn,
const char *searchbase = NULL;
Slapi_Entry *found_entry = NULL;
- searchbase = slapi_sdn_get_dn(remote_dn);
+ searchbase = slapi_sdn_get_udn(remote_dn);
cres = windows_search_entry_ext(prp->conn, (char*)searchbase, filter, &found_entry, NULL, LDAP_SCOPE_BASE);
if (cres)
{
@@ -5886,13 +5886,16 @@ retry:
remote_entry = NULL;
} else
{
- slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,"%s: windows_process_dirsync_entry: failed to fetch inbound entry.\n",agmt_get_long_name(prp->agmt));
+ slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name,
+ "%s: windows_process_dirsync_entry: failed to fetch inbound entry %s.\n",
+ agmt_get_long_name(prp->agmt), slapi_sdn_get_dn(slapi_entry_get_sdn_const(e)));
}
slapi_entry_free(local_entry);
if (rc) {
/* Something bad happened */
- slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,"%s: windows_process_dirsync_entry: failed to update inbound entry for %s.\n",agmt_get_long_name(prp->agmt),
- slapi_sdn_get_dn(slapi_entry_get_sdn_const(e)));
+ slapi_log_error(SLAPI_LOG_REPL, windows_repl_plugin_name,
+ "%s: windows_process_dirsync_entry: failed to update inbound entry for %s.\n",
+ agmt_get_long_name(prp->agmt), slapi_sdn_get_dn(slapi_entry_get_sdn_const(e)));
}
} else
{
8 years, 10 months
Branch '389-ds-base-1.3.4' - ldap/admin
by Mark Reynolds
ldap/admin/src/scripts/52updateAESplugin.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit d8b7a3c93692eae229c74ef67f6f608f95eb2eef
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Mon Jul 13 13:12:12 2015 -0400
Ticket 47878 - Remove warning suppression in 1.3.4
Description: Perl 5.16 does not support the warning suppression of
"smartmatch", but 5.18 does. RHEL 7 is currently only
using 5.16, so it needs to be removed from 1.3.4 for now.
https://fedorahosted.org/389/ticket/47878
Reviewed by: nhosoi(Thanks!)
diff --git a/ldap/admin/src/scripts/52updateAESplugin.pl b/ldap/admin/src/scripts/52updateAESplugin.pl
index ae258b6..4225770 100644
--- a/ldap/admin/src/scripts/52updateAESplugin.pl
+++ b/ldap/admin/src/scripts/52updateAESplugin.pl
@@ -6,7 +6,7 @@ use File::Basename;
use File::Copy;
use DSUtil qw(debug serverIsRunning);
-no warnings 'experimental::smartmatch';
+# no warnings 'experimental::smartmatch'; warning supression available in perl 5.18
#
# Check if there is a DES plugin and make sure the AES plugin contains the same attributes
8 years, 10 months