[Fedora-directory-commits] CVSROOT loginfo,1.9,1.10
by Doctor Conrad
Author: foxworth
Update of /cvs/dirsec/CVSROOT
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv10358
Modified Files:
loginfo
Log Message:
Add bonsai log filter to for ldapserver project
Index: loginfo
===================================================================
RCS file: /cvs/dirsec/CVSROOT/loginfo,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- loginfo 8 Dec 2005 20:18:40 -0000 1.9
+++ loginfo 20 Apr 2006 00:26:00 -0000 1.10
@@ -26,5 +26,6 @@
# or
#DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog
DEFAULT $CVSROOT/CVSROOT/syncmail %{sVv} cvsdirsec(a)fedora.redhat.com
+^ldapserver $CVSROOT/CVSROOT/dolog.pl -r /cvs/dirsec foxworth(a)redhat.com
ALL /cvs/extras/CVSROOT/dolog.pl -r /cvs/dirsec localdelivery(a)cvs-int.fedora.redhat.com
ALL $CVSROOT/CVSROOT/syncmail --require-keyword='*docs*' %{sVv} relnotes(a)fedoraproject.org
17 years, 7 months
[Fedora-directory-commits] CVSROOT dolog.pl,NONE,1.1
by Doctor Conrad
Author: foxworth
Update of /cvs/dirsec/CVSROOT
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv10329
Added Files:
dolog.pl
Log Message:
Add bonsai log filter to admin directory
--- NEW FILE dolog.pl ---
#! /webtools/tools/perl5/bin/perl
# -*- Mode: perl; indent-tabs-mode: nil -*-
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is the Bonsai CVS tool.
#
# The Initial Developer of the Original Code is Netscape Communications
# Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
# You need to put this in your CVSROOT directory, and check it in. (Change the
# first line above to point to a real live perl5.) Add "dolog.pl" to
# CVSROOT/checkoutlist, and check it in. Then, add a line to your
# CVSROOT/loginfo file that says something like:
#
# ALL $CVSROOT/CVSROOT/dolog.pl -r /cvsroot bonsai-checkin-daemon(a)my.bonsai.machine
#
# or if you do not want to use SMTP at all, add:
#
# ALL ( $CVSROOT/CVSROOT/dolog.pl -r /cvsroot -n | /bonsai/handleCheckinMail.pl )
#
# Replace "/cvsroot" with the name of the CVS root directory, and
# "my.bonsai.machine" with the name of the machine Bonsai runs on.
# Now, on my.bonsai.machine, add a mail alias so that mail sent to
# "bonsai-checkin-daemon" will get piped to handleCheckinMail.pl.
use bytes;
use Mail::Mailer;
$username = $ENV{"CVS_USER"} || getlogin || (getpwuid($<))[0] || "nobody";
$envcvsroot = $ENV{'CVSROOT'};
$cvsroot = $envcvsroot;
$flag_debug = 0;
$flag_tagcmd = 0;
$repository = '';
$repository_tag = '';
$mailhost = 'localhost';
$rlogcommand = '/usr/bin/rlog';
$output2mail = 1;
@mailto = ();
@changed_files = ();
@added_files = ();
@removed_files = ();
@log_lines = ();
@outlist = ();
$STATE_NONE = 0;
$STATE_CHANGED = 1;
$STATE_ADDED = 2;
$STATE_REMOVED = 3;
$STATE_LOG = 4;
&process_args;
if ($flag_debug) {
print STDERR "----------------------------------------------\n";
print STDERR "LOGINFO:\n";
print STDERR " pwd:" . `pwd` . "\n";
print STDERR " Args @ARGV\n";
print STDERR " CVSROOT: $cvsroot\n";
print STDERR " who: $username\n";
print STDERR " Repository: $repository\n";
print STDERR " mailto: @mailto\n";
print STDERR "----------------------------------------------\n";
}
if ($flag_tagcmd) {
&process_tag_command;
} else {
&get_loginfo;
&process_cvs_info;
}
if ($flag_debug) {
print STDERR "----------------------------------------------\n";
print STDERR @outlist;
print STDERR "----------------------------------------------\n";
}
if ($output2mail) {
&mail_notification;
} else {
&stdout_notification;
}
0;
sub process_args {
while (@ARGV) {
$arg = shift @ARGV;
if ($arg eq '-d') {
$flag_debug = 1;
print STDERR "Debug turned on...\n";
} elsif ($arg eq '-r') {
$cvsroot = shift @ARGV;
} elsif ($arg eq '-t') {
$flag_tagcmd = 1;
last; # Keep the rest in ARGV; they're handled later.
} elsif ($arg eq '-h') {
$mailhost = shift @ARGV;
} elsif ($arg eq '-n') {
$output2mail = 0;
} else {
push(@mailto, $arg);
}
}
if ($repository eq '') {
open(REP, "<CVS/Repository");
$repository = <REP>;
chop($repository);
close(REP);
}
$repository =~ s:^$cvsroot/::;
$repository =~ s:^$envcvsroot/::;
if (!$flag_tagcmd) {
if (open(REP, "<CVS/Tag")) {
$repository_tag = <REP>;
chop($repository_tag);
close(REP);
}
}
}
sub get_loginfo {
if ($flag_debug) {
print STDERR "----------------------------------------------\n";
}
# Iterate over the body of the message collecting information.
#
while (<STDIN>) {
chop; # Drop the newline
if ($flag_debug) {
print STDERR "$_\n";
}
if (/^In directory/) {
next;
}
if (/^Modified Files/) { $state = $STATE_CHANGED; next; }
if (/^Added Files/) { $state = $STATE_ADDED; next; }
if (/^Removed Files/) { $state = $STATE_REMOVED; next; }
if (/^Log Message/) { $state = $STATE_LOG; next; }
s/^[ \t\n]+//; # delete leading whitespace
s/[ \t\n]+$//; # delete trailing whitespace
if ($state == $STATE_CHANGED && !(/^Tag:/)) { push(@changed_files, split); }
if ($state == $STATE_ADDED && !(/^Tag:/)) { push(@added_files, split); }
if ($state == $STATE_REMOVED && !(/^Tag:/)) { push(@removed_files, split); }
if ($state == $STATE_LOG) { push(@log_lines, $_); }
}
# If any of the filenames in the arrays below contain spaces,
# things get broken later on in the code.
# fix the filename array by using the get_filename sub.
@fixed_changed_files = @{&get_filename("C", @changed_files)};
@fixed_added_files = @{&get_filename("A", @added_files)};
@fixed_removed_files = @{&get_filename("R", @removed_files)};
# now replace the old broken arrays with the new fixed arrays and
# carry on.
@changed_files = @fixed_changed_files;
@added_files = @fixed_added_files;
@removed_files = @fixed_removed_files;
if ($flag_debug) {
print STDERR "----------------------------------------------\n"
. "changed files: @changed_files\n"
. "added files: @added_files\n"
. "removed files: @removed_files\n";
print STDERR "----------------------------------------------\n";
}
}
sub get_filename {
my ($state, @files) = @_;
my @fixed_files;
my $FILE_EXIST = 0;
my $FILE_CHECKED = 0;
my $file;
my $partial_file;
my $path;
if ($flag_debug) {
print STDERR "\n-- get_filename ------------------------\n";
}
foreach my $scalar (@files) {
if ($FILE_CHECKED && ! $FILE_EXISTS) {
$file = "$partial_file $scalar";
} else{
$file = $scalar;
}
if ($state eq "R") {
$path = "$envcvsroot/$repository/Attic/$file";
} else {
$path = "$envcvsroot/$repository/$file";
}
if ($flag_debug) {
print STDERR "changed file: $file\n";
print STDERR "path: $path\n";
}
if (-r "$path,v") {
push(@fixed_files, $file);
$FILE_EXISTS = 1;
$FILE_CHECKED = 1;
if ($flag_debug){
print STDERR "file exists\n";
}
} else {
$partial_file = $file;
$FILE_EXISTS = 0;
$FILE_CHECKED = 1;
if ($flag_debug) {
print STDERR "file does not exist\n";
}
}
}
if ($flag_debug) {
print STDERR "\@fixed_files: @fixed_files\n";
print STDERR "-------------------------------------------\n\n";
}
return \@fixed_files;
}
sub process_cvs_info {
local($d,$fn,$rev,$mod_time,$sticky,$tag,$stat,@d,$l,$rcsfile);
if (!open(ENT, "<CVS/Entries.Log")) {
open(ENT, "<CVS/Entries");
}
$time = time;
while (<ENT>) {
chop;
($d,$fn,$rev,$mod_time,$sticky,$tag) = split(/\//);
$stat = 'C';
for $i (@changed_files, "BEATME.NOW", @added_files) {
if ($i eq "BEATME.NOW") { $stat = 'A'; }
if ($i eq $fn) {
$rcsfile = "$envcvsroot/$repository/$fn,v";
if (! -r $rcsfile) {
$rcsfile = "$envcvsroot/$repository/Attic/$fn,v";
}
$rlogcmd = "$rlogcommand -N -r$rev " . shell_escape($rcsfile);
open(LOG, "$rlogcmd |")
|| print STDERR "dolog.pl: Couldn't run rlog\n";
while (<LOG>) {
if (/^date:.* author: ([^;]*);.*/) {
$username = $1;
if (/lines: \+([0-9]*) -([0-9]*)/) {
$lines_added = $1;
$lines_removed = $2;
}
}
}
close(LOG);
push(@outlist,
("$stat|$time|$username|$cvsroot|$repository|$fn|$rev|$sticky|$tag|$lines_added|$lines_removed\n"));
}
}
}
close(ENT);
for $i (@removed_files) {
push(@outlist,
("R|$time|$username|$cvsroot|$repository|$i|||$repository_tag\n"));
}
# make sure dolog has something to parse when it sends its load off
if (!scalar(@log_lines)) {
push @log_lines, "EMPTY LOG MESSAGE";
}
push(@outlist, "LOGCOMMENT\n");
push(@outlist, join("\n",@log_lines));
push(@outlist, "\n:ENDLOGCOMMENT\n");
}
sub process_tag_command {
local($str,$part,$time);
$time = time;
$str = "Tag|$cvsroot|$time";
while (@ARGV) {
$part = shift @ARGV;
$str .= "|" . $part;
}
push(@outlist, ("$str\n"));
}
sub do_commitinfo {
}
sub mail_notification {
chop(my $hostname = `hostname`);
my $mailer = Mail::Mailer->new("smtp", Server => $mailhost) ||
die("Failed to send mail notification\n");
my %headers;
$headers{'From'} = "bonsai-daemon\@$hostname";
$headers{'To'} = \@mailto;
if ($flag_tagcmd) {
$headers{'Subject'} = "cvs tag in $repository";
} else {
$headers{'Subject'} = "cvs commit to $repository";
}
$mailer->open(\%headers);
print $mailer @outlist;
$mailer->close;
}
sub stdout_notification {
chop(my $hostname = `hostname`);
print "MAIL FROM: bonsai-daemon\@$hostname\n";
print "RCPT TO: root\@localhost\n";
print "DATA\n";
if ($flag_tagcmd) {
print "Subject: cvs tag in $repository\n";
} else {
print "Subject: cvs commit to $repository\n";
}
print "\n";
print @outlist, "\n";
print ".\n";
}
# Quotify a string, suitable for invoking a shell process
sub shell_escape {
my ($file) = @_;
$file =~ s/([ \"\'\?\$\&\|\!<>\(\)\[\]\;\:])/\\$1/g;
return $file;
}
17 years, 7 months
[Fedora-directory-commits] ldapserver/ldap/admin/src logconv.pl, 1.5, 1.6
by Doctor Conrad
Author: nkinder
Update of /cvs/dirsec/ldapserver/ldap/admin/src
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20255
Modified Files:
logconv.pl
Log Message:
16578 - Fixed off by one error in month in logconv.pl
Index: logconv.pl
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/logconv.pl,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- logconv.pl 19 Apr 2005 22:06:55 -0000 1.5
+++ logconv.pl 18 Apr 2006 18:57:44 -0000 1.6
@@ -275,18 +275,18 @@
$connmsg{"U1"} = "Cleanly Closed Connections";
%monthname = (
- "Jan" => 1,
- "Feb" => 2,
- "Mar" => 3,
- "Apr" => 4,
- "May" => 5,
- "Jun" => 6,
- "Jul" => 7,
- "Aug" => 8,
- "Sep" => 9,
- "Oct" => 10,
- "Nov" => 11,
- "Dec" => 12,
+ "Jan" => 0,
+ "Feb" => 1,
+ "Mar" => 2,
+ "Apr" => 3,
+ "May" => 4,
+ "Jun" => 5,
+ "Jul" => 6,
+ "Aug" => 7,
+ "Sep" => 8,
+ "Oct" => 9,
+ "Nov" => 10,
+ "Dec" => 11,
);
17 years, 8 months
[Fedora-directory-commits] ldapserver/ldap/servers/slapd/back-ldbm dblayer.c, 1.10, 1.11
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv19558
Modified Files:
dblayer.c
Log Message:
[189264] 6.11->6.21 upgrade, no db housekeeping threads
The problem was check_db_version finds the existing DBVERSION is old and set
dblayer_private->blayer_recovery_required = 1. If it's set,
DBLAYER_CLEAN_RECOVER_MODE is processed properly. Unfortunately, it was
"reinitialized" in the function read_metadata, which is called after
check_db_version.
Index: dblayer.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/dblayer.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- dblayer.c 13 Jan 2006 19:31:11 -0000 1.10
+++ dblayer.c 18 Apr 2006 18:25:02 -0000 1.11
@@ -3830,6 +3830,10 @@
int number = 0;
dblayer_private *priv = (dblayer_private *)li->li_dblayer_private;
+ /* dblayer_recovery_required is initialized in dblayer_init;
+ * and might be set 1 in check_db_version;
+ * we don't want to override it
+ * priv->dblayer_recovery_required = 0; */
priv->dblayer_previous_cachesize = 0;
priv->dblayer_previous_ncache = 0;
/* Open the guard file and read stuff, then delete it */
@@ -3838,12 +3842,10 @@
memset(&prfinfo, '\0', sizeof(PRFileInfo));
(void)PR_GetFileInfo(filename, &prfinfo);
- priv->dblayer_recovery_required = 0;
prfd = PR_Open(filename,PR_RDONLY,priv->dblayer_file_mode);
if (NULL == prfd || 0 == prfinfo.size) {
/* file empty or not present--means the database needs recovered */
int count = 0;
- priv->dblayer_recovery_required = 0;
for (dirp = priv->dblayer_data_directories; dirp && *dirp; dirp++)
{
count_dbfiles_in_dir(*dirp, &count, 1 /* recurse */);
@@ -3877,10 +3879,6 @@
}
return 0; /* no files found; no need to run recover start */
}
- /* dblayer_recovery_required is initialized in dblayer_init;
- * and might be set 1 in check_db_version;
- * we don't want to override it
- * priv->dblayer_recovery_required = 0; */
/* So, we opened the file, now let's read the cache size and version stuff
*/
buf = slapi_ch_calloc(1, prfinfo.size + 1);
17 years, 8 months
[Fedora-directory-commits] ldapserver/ldap/servers/slapd/back-ldbm dblayer.c, 1.8, 1.8.2.1
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv19493
Modified Files:
Tag: Directory71RtmBranch
dblayer.c
Log Message:
[189264] 6.11->6.21 upgrade, no db housekeeping threads
The problem was check_db_version finds the existing DBVERSION is old and set
dblayer_private->blayer_recovery_required = 1. If it's set,
DBLAYER_CLEAN_RECOVER_MODE is processed properly. Unfortunately, it was
"reinitialized" in the function read_metadata, which is called after
check_db_version.
Index: dblayer.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/dblayer.c,v
retrieving revision 1.8
retrieving revision 1.8.2.1
diff -u -r1.8 -r1.8.2.1
--- dblayer.c 25 Apr 2005 16:24:23 -0000 1.8
+++ dblayer.c 18 Apr 2006 18:20:33 -0000 1.8.2.1
@@ -3833,6 +3833,10 @@
int number = 0;
dblayer_private *priv = (dblayer_private *)li->li_dblayer_private;
+ /* dblayer_recovery_required is initialized in dblayer_init;
+ * and might be set 1 in check_db_version;
+ * we don't want to override it
+ * priv->dblayer_recovery_required = 0; */
priv->dblayer_previous_cachesize = 0;
priv->dblayer_previous_ncache = 0;
/* Open the guard file and read stuff, then delete it */
@@ -3841,12 +3845,10 @@
memset(&prfinfo, '\0', sizeof(PRFileInfo));
(void)PR_GetFileInfo(filename, &prfinfo);
- priv->dblayer_recovery_required = 0;
prfd = PR_Open(filename,PR_RDONLY,priv->dblayer_file_mode);
if (NULL == prfd || 0 == prfinfo.size) {
/* file empty or not present--means the database needs recovered */
int count = 0;
- priv->dblayer_recovery_required = 0;
for (dirp = priv->dblayer_data_directories; dirp && *dirp; dirp++)
{
count_dbfiles_in_dir(*dirp, &count, 1 /* recurse */);
@@ -3880,10 +3882,6 @@
}
return 0; /* no files found; no need to run recover start */
}
- /* dblayer_recovery_required is initialized in dblayer_init;
- * and might be set 1 in check_db_version;
- * we don't want to override it
- * priv->dblayer_recovery_required = 0; */
/* So, we opened the file, now let's read the cache size and version stuff
*/
buf = slapi_ch_calloc(1, prfinfo.size + 1);
17 years, 8 months
[Fedora-directory-commits] ldapserver/ldap/ldif template.ldif, 1.4, 1.5
by Doctor Conrad
Author: nkinder
Update of /cvs/dirsec/ldapserver/ldap/ldif
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv17003
Modified Files:
template.ldif
Log Message:
189176 - Fixed aci for directory administrators group.
Index: template.ldif
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/ldif/template.ldif,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- template.ldif 19 Apr 2005 22:07:26 -0000 1.4
+++ template.ldif 18 Apr 2006 17:39:57 -0000 1.5
@@ -44,7 +44,7 @@
cn=Configuration Administrators, ou=Groups, ou=TopologyManagement, o=NetscapeRoot");)
aci: (targetattr ="*")(version 3.0;
acl "Directory Administrators Group";allow (all) (groupdn = "ldap:///
- ou=Directory Administrators, %%%SUFFIX%%%");)
+ cn=Directory Administrators, %%%SUFFIX%%%");)
dn: cn=Directory Administrators, %%%SUFFIX%%%
objectClass: top
17 years, 8 months
[Fedora-directory-commits] ldapserver internal_buildpaths.mk, 1.10, 1.11 internal_comp_deps.mk, 1.41, 1.42
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/ldapserver
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4910
Modified Files:
internal_buildpaths.mk internal_comp_deps.mk
Log Message:
Should keep all the components packaged in the 64-bit build in dist/<platform>_64_DBG.OBJ
Index: internal_buildpaths.mk
===================================================================
RCS file: /cvs/dirsec/ldapserver/internal_buildpaths.mk,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- internal_buildpaths.mk 13 Apr 2006 05:26:51 -0000 1.10
+++ internal_buildpaths.mk 17 Apr 2006 23:12:55 -0000 1.11
@@ -77,7 +77,7 @@
#NSPR_SOURCE_ROOT = $(MOZILLA_SOURCE_ROOT)
ifndef NSPR_SOURCE_ROOT
NSPR_BUILD_DIR = $(NSCP_DISTDIR_FULL_RTL)/nspr
-NSPR_BUILD_DIR_32 = $(NSCP_DISTDIR_FULL_RTL_32)/nspr
+NSPR_BUILD_DIR_32 = $(NSCP_DISTDIR_FULL_RTL)/nspr32
# NSPR also needs a build dir with a full, absolute path for some reason
NSPR_ABS_BUILD_DIR = $(NSCP_ABS_DISTDIR_FULL_RTL)/nspr
endif # NSPR_SOURCE_ROOT
@@ -90,7 +90,7 @@
#SECURITY_SOURCE_ROOT = $(MOZILLA_SOURCE_ROOT)
ifndef SECURITY_SOURCE_ROOT
SECURITY_BUILD_DIR = $(NSCP_DISTDIR_FULL_RTL)/nss
-SECURITY_BUILD_DIR_32 = $(NSCP_DISTDIR_FULL_RTL_32)/nss
+SECURITY_BUILD_DIR_32 = $(NSCP_DISTDIR_FULL_RTL)/nss32
endif # SECURITY_SOURCE_ROOT
#SVRCORE_SOURCE_ROOT = $(MOZILLA_SOURCE_ROOT)
@@ -101,7 +101,7 @@
#LDAPSDK_SOURCE_ROOT = $(MOZILLA_SOURCE_ROOT)
ifndef LDAPSDK_SOURCE_ROOT
LDAP_ROOT = $(NSCP_DISTDIR_FULL_RTL)/ldapsdk
-LDAP_ROOT_32 = $(NSCP_DISTDIR_FULL_RTL_32)/ldapsdk
+LDAP_ROOT_32 = $(NSCP_DISTDIR_FULL_RTL)/ldapsdk32
endif # LDAPSDK_SOURCE_ROOT
#SASL_SOURCE_ROOT = $(BUILD_ROOT)/../cyrus-sasl-2.1.20
Index: internal_comp_deps.mk
===================================================================
RCS file: /cvs/dirsec/ldapserver/internal_comp_deps.mk,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- internal_comp_deps.mk 13 Apr 2006 23:12:13 -0000 1.41
+++ internal_comp_deps.mk 17 Apr 2006 23:12:55 -0000 1.42
@@ -91,6 +91,7 @@
$(SECURITY_DEP): $(NSCP_DISTDIR_FULL_RTL)
ifdef COMPONENT_DEPS
+ $(RM) -rf $(SECURITY_BINPATH)
mkdir -p $(SECURITY_BINPATH)
$(FTP_PULL) -method $(SECURITY_PULL_METHOD) \
-objdir $(SECURITY_BUILD_DIR) -componentdir $(SECURITY_IMPORT) \
@@ -186,6 +187,7 @@
$(FTP_PULL) -method $(SECURITY_PULL_METHOD) \
-objdir $(NSPR_BUILD_DIR_32) -componentdir $(NSPR_IMPORT_32) \
-files lib
+ $(RM) -rf $(SECURITY_BUILD_DIR_32)/lib
mkdir -p $(SECURITY_BUILD_DIR_32)/lib
$(FTP_PULL) -method $(SECURITY_PULL_METHOD) \
-objdir $(SECURITY_BUILD_DIR_32)/lib -componentdir $(SECURITY_IMPORT_32)/lib \
@@ -193,7 +195,9 @@
$(FTP_PULL) -method $(LDAPSDK_PULL_METHOD) \
-objdir $(LDAP_ROOT_32) -componentdir $(LDAP_RELEASE_32) \
-files lib
- mv -f $(SECURITY_BUILD_DIR_32)/lib/$(NSSCKBI_FILE) $(SECURITY_BUILD_DIR_32)/lib/$(NSSCKBI32_FILE)
+ -@if [ -f $(SECURITY_BUILD_DIR_32)/lib/$(NSSCKBI_FILE) ] ; then \
+ mv -f $(SECURITY_BUILD_DIR_32)/lib/$(NSSCKBI_FILE) $(SECURITY_BUILD_DIR_32)/lib/$(NSSCKBI32_FILE) ; \
+ fi
endif # PACKAGE_LIB32
##
endif # LDAPSDK_SOURCE_ROOT
17 years, 8 months
[Fedora-directory-commits] ldapserver/ldap/servers/snmp ldap-agent.c, 1.9, 1.10 ldap-agent.h, 1.7, 1.8 main.c, 1.7, 1.8
by Doctor Conrad
Author: nkinder
Update of /cvs/dirsec/ldapserver/ldap/servers/snmp
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv24599/ldap/servers/snmp
Modified Files:
ldap-agent.c ldap-agent.h main.c
Log Message:
188931 - Use system Net-SNMP libraries on Linux systems
Index: ldap-agent.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/snmp/ldap-agent.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- ldap-agent.c 19 Apr 2005 22:07:42 -0000 1.9
+++ ldap-agent.c 13 Apr 2006 23:12:16 -0000 1.10
@@ -115,7 +115,10 @@
netsnmp_table_registration_info *ops_table_info = NULL;
netsnmp_table_registration_info *entries_table_info = NULL;
netsnmp_table_registration_info *entity_table_info = NULL;
+ /* This is a hacky way of figuring out if we are on Net-SNMP 5.2 or later */
+#ifdef NETSNMP_CACHE_AUTO_RELOAD
netsnmp_cache *stats_table_cache = NULL;
+#endif
if (ops_handler || entries_handler || entity_handler) {
snmp_log(LOG_ERR, "initialize_stats_table called more than once.\n");
@@ -188,12 +191,19 @@
entity_cb.container, 1);
/* Setup cache for auto reloading of stats */
+#ifdef NETSNMP_CACHE_AUTO_RELOAD
+ /* This is new api as of Net-SNMP 5.2 */
stats_table_cache = netsnmp_cache_create(CACHE_REFRESH_INTERVAL, load_stats_table,
NULL, dsOpsTable_oid, dsOpsTable_oid_len);
stats_table_cache->flags |= NETSNMP_CACHE_DONT_FREE_EXPIRED;
stats_table_cache->flags |= NETSNMP_CACHE_DONT_AUTO_RELEASE;
stats_table_cache->flags |= NETSNMP_CACHE_AUTO_RELOAD;
netsnmp_inject_handler(ops_handler, netsnmp_cache_handler_get(stats_table_cache));
+#else
+ /* Do things the old way. This is only needed for Net-SNMP 5.1 and earlier. */
+ netsnmp_inject_handler(ops_handler, netsnmp_get_cache_handler(CACHE_REFRESH_INTERVAL, load_stats_table,
+ free_stats_table, dsOpsTable_oid, dsOpsTable_oid_len));
+#endif
}
/************************************************************
@@ -264,7 +274,7 @@
int stats_hdl = -1;
int err;
- snmp_log(LOG_DEBUG, "Reloading stats.\n");
+ snmp_log(LOG_INFO, "Reloading stats.\n");
/* Initialize data for each server in conf file */
for (serv_p = server_head; serv_p != NULL; serv_p = serv_p->next) {
@@ -274,7 +284,7 @@
previous_state = serv_p->server_state;
previous_start = ctx->hdr_tbl.startTime;
- snmp_log(LOG_DEBUG, "Opening stats file (%s) for server: %d\n",
+ snmp_log(LOG_INFO, "Opening stats file (%s) for server: %d\n",
serv_p->stats_file, serv_p->port);
/* Open the stats file */
@@ -342,6 +352,20 @@
}
/************************************************************
+ * free_stats_table
+ *
+ * This function doesn't need to free anything since the
+ * load_stats_table function doesn't allocate any memory
+ * itself. The cache handler requires us to have a callback
+ * function for freeing the cache, so here it is.
+ */
+void
+free_stats_table(netsnmp_cache *cache, void *foo)
+{
+ return;
+}
+
+/************************************************************
* dsOpsTable_get_value
*
* This routine is called for get requests to copy the data
Index: ldap-agent.h
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/snmp/ldap-agent.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- ldap-agent.h 19 Apr 2005 22:07:42 -0000 1.7
+++ ldap-agent.h 13 Apr 2006 23:12:16 -0000 1.8
@@ -90,6 +90,7 @@
void init_ldap_agent(void);
void initialize_stats_table(void);
int load_stats_table(netsnmp_cache *, void *);
+ void free_stats_table(netsnmp_cache *, void *);
stats_table_context *stats_table_create_row(unsigned long);
stats_table_context *stats_table_find_row(unsigned long);
int dsOpsTable_get_value(netsnmp_request_info *,
Index: main.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/snmp/main.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- main.c 19 Apr 2005 22:07:42 -0000 1.7
+++ main.c 13 Apr 2006 23:12:16 -0000 1.8
@@ -53,9 +53,9 @@
RETSIGTYPE
stop_server(int signum) {
if (signum == SIGUSR1) {
- snmp_log(LOG_INFO, "Detected attempt to start ldap-agent again.\n");
+ snmp_log(LOG_WARNING, "Detected attempt to start ldap-agent again.\n");
} else {
- snmp_log(LOG_INFO, "Received stop signal. Stopping ldap-agent...\n");
+ snmp_log(LOG_WARNING, "Received stop signal. Stopping ldap-agent...\n");
keep_running = 0;
}
}
@@ -64,7 +64,7 @@
main (int argc, char *argv[]) {
char *config_file = NULL;
netsnmp_log_handler *log_hdl = NULL;
- int c, log_level = LOG_INFO;
+ int c, log_level = LOG_WARNING;
struct stat logdir_s;
pid_t child_pid;
FILE *pid_fp;
@@ -149,13 +149,13 @@
exit(1);
}
- netsnmp_enable_filelog(log_hdl, 1);
+ snmp_enable_filelog((char*)log_hdl->token, 1);
} else {
printf("Error starting logging.");
exit(1);
}
- snmp_log(LOG_INFO, "Starting ldap-agent...\n");
+ snmp_log(LOG_WARNING, "Starting ldap-agent...\n");
/* setup agentx master */
netsnmp_ds_set_boolean(NETSNMP_DS_APPLICATION_ID,
@@ -204,7 +204,7 @@
}
/* we're up and running! */
- snmp_log(LOG_INFO, "Started ldap-agent as pid %d\n", child_pid);
+ snmp_log(LOG_WARNING, "Started ldap-agent as pid %d\n", child_pid);
/* loop here until asked to stop */
while(keep_running) {
@@ -213,7 +213,7 @@
/* say goodbye */
snmp_shutdown("ldap-agent");
- snmp_log(LOG_INFO, "ldap-agent stopped.\n");
+ snmp_log(LOG_WARNING, "ldap-agent stopped.\n");
/* remove pidfile */
remove(pidfile);
17 years, 8 months
[Fedora-directory-commits] ldapserver components.mk, 1.48, 1.49 internal_comp_deps.mk, 1.40, 1.41
by Doctor Conrad
Author: nkinder
Update of /cvs/dirsec/ldapserver
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv24599
Modified Files:
components.mk internal_comp_deps.mk
Log Message:
188931 - Use system Net-SNMP libraries on Linux systems
Index: components.mk
===================================================================
RCS file: /cvs/dirsec/ldapserver/components.mk,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- components.mk 13 Apr 2006 05:26:51 -0000 1.48
+++ components.mk 13 Apr 2006 23:12:13 -0000 1.49
@@ -406,27 +406,39 @@
###########################################################
### Net-SNMP package ######################################
-ifdef NETSNMP_SOURCE_ROOT
- NETSNMP_LIBPATH = $(NETSNMP_SOURCE_ROOT)/built/lib
- NETSNMP_INCDIR = $(NETSNMP_SOURCE_ROOT)/built/include
- NETSNMP_BINDIR = $(NETSNMP_SOURCE_ROOT)/built/bin
-else
- NETSNMP_LIBPATH = $(NETSNMP_BUILD_DIR)/lib
- NETSNMP_INCDIR = $(NETSNMP_BUILD_DIR)/include
- NETSNMP_BINDIR = $(NETSNMP_BUILD_DIR)/bin
-endif
+ifeq ($(ARCH), Linux)
+ ifeq ($(USE_64), 1)
+ NETSNMP_LIBPATH = /usr/lib64
+ else
+ NETSNMP_LIBPATH = /usr/lib
+ endif
+ NETSNMP_INCDIR = /usr/include/net-snmp
+ NETSNMP_BINDIR = /usr/bin
+else
+ ifdef NETSNMP_SOURCE_ROOT
+ NETSNMP_LIBPATH = $(NETSNMP_SOURCE_ROOT)/built/lib
+ NETSNMP_INCDIR = $(NETSNMP_SOURCE_ROOT)/built/include
+ NETSNMP_BINDIR = $(NETSNMP_SOURCE_ROOT)/built/bin
+ else
+ NETSNMP_LIBPATH = $(NETSNMP_BUILD_DIR)/lib
+ NETSNMP_INCDIR = $(NETSNMP_BUILD_DIR)/include
+ NETSNMP_BINDIR = $(NETSNMP_BUILD_DIR)/bin
+ endif
+endif # Linux
NETSNMP_INCLUDE = -I$(NETSNMP_INCDIR)
NETSNMP_LIBNAMES = netsnmp netsnmpagent netsnmpmibs netsnmphelpers
NETSNMP_LINK = -L$(NETSNMP_LIBPATH) $(addprefix -l, $(NETSNMP_LIBNAMES))
ifneq ($(ARCH), WINNT)
- ifeq ($(ARCH), HPUX)
- NETSNMP_SOLIBS = $(addsuffix .$(DLL_SUFFIX).7, $(addprefix $(LIB_PREFIX), $(NETSNMP_LIBNAMES)))
- else
- NETSNMP_SOLIBS = $(addsuffix .$(DLL_SUFFIX).5, $(addprefix $(LIB_PREFIX), $(NETSNMP_LIBNAMES)))
- endif
- LIBS_TO_PKG += $(addprefix $(NETSNMP_LIBPATH)/,$(NETSNMP_SOLIBS))
-endif
+ ifneq ($(ARCH), Linux)
+ ifeq ($(ARCH), HPUX)
+ NETSNMP_SOLIBS = $(addsuffix .$(DLL_SUFFIX).7, $(addprefix $(LIB_PREFIX), $(NETSNMP_LIBNAMES)))
+ else
+ NETSNMP_SOLIBS = $(addsuffix .$(DLL_SUFFIX).5, $(addprefix $(LIB_PREFIX), $(NETSNMP_LIBNAMES)))
+ endif
+ LIBS_TO_PKG += $(addprefix $(NETSNMP_LIBPATH)/,$(NETSNMP_SOLIBS))
+ endif # Linux
+endif # WINNT
###########################################################
### ICU package ##########################################
Index: internal_comp_deps.mk
===================================================================
RCS file: /cvs/dirsec/ldapserver/internal_comp_deps.mk,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- internal_comp_deps.mk 13 Apr 2006 05:26:51 -0000 1.40
+++ internal_comp_deps.mk 13 Apr 2006 23:12:13 -0000 1.41
@@ -311,6 +311,7 @@
# Net-SNMP
ifndef NETSNMP_SOURCE_ROOT
+ifneq ($(ARCH), Linux)
#NETSNMP_RELEASE = $(COMPONENTS_DIR_DEV)/net-snmp/$(NETSNMP_VER)/$(NSOBJDIR_NAME)
NETSNMP_RELEASE = $(COMPONENTS_DIR)/net-snmp/$(NETSNMP_VER)/$(NSOBJDIR_NAME)
NETSNMP_DEP = $(NETSNMP_INCDIR)/net-snmp/net-snmp-includes.h
@@ -329,6 +330,7 @@
-@if [ ! -f $@ ] ; \
then echo "Error: could not get component NETSNMP file $@" ; \
fi
+endif # Linux
endif # NETSNMP_SOURCE_ROOT
###########################################################
17 years, 8 months
[Fedora-directory-commits] ldapserver/ldap/cm Makefile,1.55,1.56
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/cm
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv17688/ldap/cm
Modified Files:
Makefile
Log Message:
[186642] Directory Server Makefile updates for Internal build
Package 32-bit LDAPSDK, NSPR, and NSS libraries in shared32/lib for perldap (Solaris and PA-RISC only).
Index: Makefile
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/cm/Makefile,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56
--- Makefile 7 Apr 2006 01:33:36 -0000 1.55
+++ Makefile 13 Apr 2006 05:26:51 -0000 1.56
@@ -333,6 +333,14 @@
fi ; \
done
endif
+ifeq ($(PACKAGE_LIB32), 1)
+# these are files to copy to the shared32/lib directory - nspr, nss, ldapsdk lib
+ for file in $(LIBS_TO_PKG_SHARED_32); \
+ do if [ -f $$file ] ; \
+ then $(INSTALL) -m 755 $$file $(RELDIR)/shared32/lib ; \
+ fi ; \
+ done
+endif
endif
# PACKAGE_SRC_DEST is defined in components.mk - these are component files and directories to install
@@ -641,6 +649,7 @@
endif
ifeq ($(USE_PERLDAP), 1)
+ -@rm -rf $(INSTDIR)/perldap
mkdir $(INSTDIR)/perldap
cp -R $(PERLDAP_BUILT_DIR)/* $(INSTDIR)/perldap
$(PERL) genPerlDAPInf.pl $(INSTDIR)/perldap/perldap.inf 1.5 "Fedora Project"
17 years, 8 months