[Fedora-directory-commits] adminserver/admserv/cfgstuff admserv.conf, 1.9, 1.10
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/adminserver/admserv/cfgstuff
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv17632/adminserver/admserv/cfgstuff
Modified Files:
admserv.conf
Log Message:
Add the create CGI to the list of CGIs which mod_restartd is allowed to execute.
Index: admserv.conf
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/cfgstuff/admserv.conf,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- admserv.conf 3 Nov 2005 23:20:49 -0000 1.9
+++ admserv.conf 17 Nov 2005 17:41:55 -0000 1.10
@@ -99,8 +99,10 @@
Require valid-user
</LocationMatch>
-# Handle Stop, Start, Restart - invoke mod_restartd
-<LocationMatch /*/[tT]asks/[Oo]peration/(?i:stop|start|restart|startconfigds)$>
+# Handle Stop, Start, Restart, Instance Creation - invoke mod_restartd
+# need to add instance creation because you may want to create an instance
+# of DS on a low port, and instance creation starts the instance as well
+<LocationMatch /*/[tT]asks/[Oo]peration/(?i:stop|start|restart|startconfigds|create)$>
AuthUserFile /home/rich/72srv/admin-serv/config/admpw
AuthType basic
AuthName "Admin Server"
18 years, 6 months
[Fedora-directory-commits] ldapserver/ldap/servers/slapd main.c, 1.7, 1.8
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv17610/ldapserver/ldap/servers/slapd
Modified Files:
main.c
Log Message:
The DS console Configuration Encryption tab was giving an error. The error was due to the security CGI not being able to read the ds key/cert db files. They were owned by root instead of the server uid because they were being created by NSS_Initialize which was being called before the server did the setuid.
The fix is to move the NSS/SSL initialization code to just after the setuid call.
Index: main.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/main.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- main.c 19 Apr 2005 22:07:36 -0000 1.7
+++ main.c 17 Nov 2005 17:41:11 -0000 1.8
@@ -818,35 +818,6 @@
set_entry_points();
/*
- * Initialise NSS once for the whole slapd process, whether SSL
- * is enabled or not. We use NSS for random number generation and
- * other things even if we are not going to accept SSL connections.
- * We also need NSS for attribute encryption/decryption on import and export.
- */
- init_ssl = ( (slapd_exemode == SLAPD_EXEMODE_SLAPD) || importexport_encrypt)
- && config_get_security()
- && (0 != s_port) && (s_port <= LDAP_PORT_MAX);
- /* As of DS 6.1, always do a full initialization so that other
- * modules can assume NSS is available
- */
- if ( slapd_nss_init((slapd_exemode == SLAPD_EXEMODE_SLAPD),
- (slapd_exemode != SLAPD_EXEMODE_REFERRAL) /* have config? */ )) {
- LDAPDebug(LDAP_DEBUG_ANY,
- "ERROR: NSS Initialization Failed.\n", 0, 0, 0);
- exit (1);
- }
-
- if (slapd_exemode == SLAPD_EXEMODE_SLAPD) {
- client_auth_init();
- }
-
- if ( init_ssl && ( 0 != slapd_ssl_init())) {
- LDAPDebug(LDAP_DEBUG_ANY,
- "ERROR: SSL Initialization Failed.\n", 0, 0, 0 );
- exit( 1 );
- }
-
- /*
* if we were called upon to do special database stuff, do it and be
* done.
*/
@@ -1006,6 +977,34 @@
}
#endif
+ /*
+ * Initialise NSS once for the whole slapd process, whether SSL
+ * is enabled or not. We use NSS for random number generation and
+ * other things even if we are not going to accept SSL connections.
+ * We also need NSS for attribute encryption/decryption on import and export.
+ */
+ init_ssl = ( (slapd_exemode == SLAPD_EXEMODE_SLAPD) || importexport_encrypt)
+ && config_get_security()
+ && (0 != s_port) && (s_port <= LDAP_PORT_MAX);
+ /* As of DS 6.1, always do a full initialization so that other
+ * modules can assume NSS is available
+ */
+ if ( slapd_nss_init((slapd_exemode == SLAPD_EXEMODE_SLAPD),
+ (slapd_exemode != SLAPD_EXEMODE_REFERRAL) /* have config? */ )) {
+ LDAPDebug(LDAP_DEBUG_ANY,
+ "ERROR: NSS Initialization Failed.\n", 0, 0, 0);
+ exit (1);
+ }
+
+ if (slapd_exemode == SLAPD_EXEMODE_SLAPD) {
+ client_auth_init();
+ }
+
+ if ( init_ssl && ( 0 != slapd_ssl_init())) {
+ LDAPDebug(LDAP_DEBUG_ANY,
+ "ERROR: SSL Initialization Failed.\n", 0, 0, 0 );
+ exit( 1 );
+ }
/* -sduloutre: compute_init() and entry_computed_attr_init() moved up */
18 years, 6 months
[Fedora-directory-commits] ldapserver/ldap/cm/newinst setup, 1.13, 1.14
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/cm/newinst
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv17579/ldapserver/ldap/cm/newinst
Modified Files:
setup
Log Message:
Fix two problems
1) setup was not using the correct value for the config admin ID during reconfig. The fix is to get the correct uid from the admpw file.
2) It is often difficult to figure out the correct id/url for the admin server when running it for the first time. The fix is for setup to print out the correct command to use so the user can copy/paste it into the terminal. The commands are also saved to setup.log in case they close the terminal window.
Index: setup
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/cm/newinst/setup,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- setup 31 Oct 2005 15:55:35 -0000 1.13
+++ setup 17 Nov 2005 17:38:25 -0000 1.14
@@ -137,6 +137,19 @@
echo $rval
}
+getValFromAdmpw() {
+ cfile=$1
+ rval=`head -1 $sroot/admin-serv/config/$cfile | cut -f1 -d\:`
+ echo $rval
+}
+
+getValFromInf() {
+ cattr=$1
+ cfile=$2
+ rval=`grep -i ^$cattr $cfile | head -1 | sed -e 's/^.*=[ ]*//'`
+ echo $rval
+}
+
logfile=`doMktmp log`
myargs=
silent=
@@ -361,7 +374,7 @@
ldaphost=`getValFromAdminConf "ldapHost:" "adm.conf"`
ldapport=`getValFromAdminConf "ldapPort:" "adm.conf"`
adminport=`getValFromAdminConf "\<port:" "adm.conf"`
- siepid=`getValFromAdminConf "siepid:" "adm.conf"`
+ adminid=`getValFromAdmpw "admpw"`
sysuser=`getValFromAdminConf "nsSuiteSpotUser:" "local.conf"`
suitespotuser=`ls -l $sroot/$dsinst/config/dse.ldif | awk '{print $3}'`
suitespotgroup=`ls -l $sroot/$dsinst/config/dse.ldif | awk '{print $4}'`
@@ -374,11 +387,11 @@
echo "Administrator password is required. Here is your current information:"
echo ""
echo "Configuration Directory: ldap://$ldaphost:$ldapport/o=NetscapeRoot"
- echo "Configuration Administrator ID: $siepid"
+ echo "Configuration Administrator ID: $adminid"
echo ""
echo "At the prompt, please enter the password for the Configuration Administrator."
echo ""
- echo "administrator ID: $siepid"
+ echo "administrator ID: $adminid"
siepasswd=""
while [ "$siepasswd" = "" ]; do
printf "Password: "
@@ -392,12 +405,12 @@
echo "SuitespotGroup= $suitespotgroup" >> $inffile
echo "ServerRoot= $sroot" >> $inffile
echo "ConfigDirectoryLdapURL= ldap://$ldaphost:$ldapport/o=NetscapeRoot" >> $inffile
- echo "ConfigDirectoryAdminID= $siepid" >> $inffile
+ echo "ConfigDirectoryAdminID= $adminid" >> $inffile
echo "AdminDomain= $admindomain" >> $inffile
echo "ConfigDirectoryAdminPwd= $siepasswd" >> $inffile
echo "" >> $inffile
echo "[admin]" >> $inffile
- echo "ServerAdminID= $siepid" >> $inffile
+ echo "ServerAdminID= $adminid" >> $inffile
echo "ServerAdminPwd= $siepasswd" >> $inffile
echo "SysUser= $sysuser" >> $inffile
echo "Port= $adminport" >> $inffile
@@ -499,6 +512,16 @@
SSLOn
+# get user, host, port for startconsole
+adminport=`getValFromInf Port $inffile`
+adminhost=`getValFromInf FullMachineName $inffile`
+adminuser=`getValFromInf ConfigDirectoryAdminID $inffile`
+
+echo ""
+echo "You can now use the console. Here is the command to use to start the console:" | tee -a $logfile
+echo "cd $sroot" | tee -a $logfile
+echo "./startconsole -u $adminuser -a http://$adminhost:$adminport/" | tee -a $logfile
+echo""
echo "INFO Finished with setup, logfile is setup/setup.log" | tee -a $logfile
if [ -f setup/setup.log ] ; then
cat $logfile >> setup/setup.log
@@ -518,4 +541,5 @@
fi
rm -f $inffile
fi
+
exit 0
18 years, 6 months
[Fedora-directory-commits] ldapserver/ldap/cm/newinst ns-update, 1.8, 1.9
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/cm/newinst
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv17550/ldapserver/ldap/cm/newinst
Modified Files:
ns-update
Log Message:
Fix the problem with the Admin Server console - error opening the encryption tab. The solution is to chown the alias directory to the admin server uid so that the security CGI can create the key/cert dbs in that directory.
Index: ns-update
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/cm/newinst/ns-update,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- ns-update 21 Oct 2005 19:21:18 -0000 1.8
+++ ns-update 17 Nov 2005 17:34:35 -0000 1.9
@@ -165,6 +165,33 @@
cd `dirname $0`
+# we need to make sure the alias directory is owned by the server user/group
+# in order for the server to be able to create the initial key/cert db files
+
+# get the inf file name
+seenfarg=
+inffile=
+for arg in "$@" ; do
+ if [ $seenfarg ] ; then
+ inffile=$arg
+ break
+ fi
+ if [ "$arg" = "-f" ] ; then
+ seenfarg=1
+ fi
+done
+
+if [ ! -f "$inffile" ] ; then
+ echo "WARNING: Could not read the setup info file $inffile"
+else
+# grab the ssuser and ssgrp
+ ssuser=`grep SuiteSpotUserID $inffile | sed -e 's/SuiteSpotUserID[ ]*=[ ]*//'`
+ ssgrp=`grep SuiteSpotGroup $inffile | sed -e 's/SuiteSpotGroup[ ]*=[ ]*//'`
+# echo "user = $ssuser group = $ssgrp"
+# chown the alias directory
+ chown $ssuser:$ssgrp $sroot/alias
+fi
+
rc=0
./ds_create $* $extraflags
rc=$?
18 years, 6 months
[Fedora-directory-commits] adminutil/tests Makefile, NONE, 1.1 readme.txt, NONE, 1.1 retrieveSIE.c, NONE, 1.1
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/adminutil/tests
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv856/tests
Added Files:
Makefile readme.txt retrieveSIE.c
Log Message:
--- NEW FILE Makefile ---
#
# BEGIN COPYRIGHT BLOCK
# Copyright (C) 2005 Red Hat, Inc.
# All rights reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation version
# 2.1 of the License.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# END COPYRIGHT BLOCK
#
BUILD_ROOT=..
include ../nsconfig.mk
OBJDEST:=$(OBJDIR)/tests
OBJS:=$(OBJDEST)/retrieveSIE
all: $(OBJDEST) $(OBJS)
$(OBJDEST)/retrieveSIE: retrieveSIE.c
$(CC) $(CFLAGS) $(MCC_INCLUDE) $< -o $@ $(NSPRLINK) $(LDAP_NOSSL_LINK) $(ICULINK) -L$(OBJDIR)/lib -ladminutil10
$(OBJDEST):
-mkdir $(OBJDEST)
run: $(OBJDEST) $(OBJS)
LD_LIBRARY_PATH=$(NSPR_LIBPATH):$(LDAPSDK_LIBPATH):$(ICU_LIBPATH):$(OBJDIR)/lib $(OBJDEST)/retrieveSIE $(SERVER_ROOT)
--- NEW FILE readme.txt ---
#
# BEGIN COPYRIGHT BLOCK
# Copyright (C) 2005 Red Hat, Inc.
# All rights reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation version
# 2.1 of the License.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# END COPYRIGHT BLOCK
#
Test Case 1: test an api retrieveSIEs
How to run:
gmake [ INTERNAL_BUILD=1 ] run [ SERVER_ROOT=<your_directory_server_root> ]
default SERVER_ROOT: /opt/redhat-ds
Sample output:
$ gmake run SERVER_ROOT=/export/servers/ds72
Server Root: /export/servers/ds72
cn=slapd-laputa, cn=Fedora Directory Server, cn=Server Group, cn=laputa.sfbay.redhat.com, ou=sfbay.redhat.com, o=NetscapeRoot
SUCCESS: SIE is retrieved
--- NEW FILE retrieveSIE.c ---
/*
* BEGIN COPYRIGHT BLOCK
* Copyright (C) 2005 Red Hat, Inc.
* All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation version
* 2.1 of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* END COPYRIGHT BLOCK
*/
/*
* retireveSIE.c: test program to test an API getServerDNList
* Usage: retireveSIE [ <server_root> ]
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "libadminutil/admutil.h"
#include "libadminutil/srvutil.h"
main(int ac, char **av)
{
AdmldapInfo ldapInfo = NULL;
AttrNameList nameList = NULL;
char *svrroot = "/opt/redhat-ds";
char *admroot = NULL;
int len = 0;
int rval = 0;
char **p;
int siecnt = 0;
if (ac > 1) {
svrroot = strdup(*(av+1));
}
if (NULL == svrroot || 0 == strlen(svrroot)) {
fprintf(stderr, "ERROR: server root was not specified.\n");
exit(1);
} else {
fprintf(stdout, "%s: Server Root: %s\n", *av, svrroot);
}
len = strlen(svrroot) + 32;
admroot = (char *)malloc(len);
if (NULL == admroot) {
fprintf(stderr, "ERROR: failed to allocate %d bytes\n", len);
exit(1);
}
sprintf(admroot, "%s/admin-serv/config", svrroot);
/*
* get the LDAP information from admin server config info
*/
ldapInfo = admldapBuildInfo(admroot, &rval);
if (NULL == ldapInfo) {
fprintf(stderr, "ERROR: empty ldapInfo\n");
rval = 1;
goto done;
}
/*
* get servers' DNs belonging to the Admin Server
*/
nameList = getServerDNList(ldapInfo);
if (NULL == nameList) {
fprintf(stderr, "ERROR: empty nameList\n");
rval = 1;
goto done;
}
for (p = nameList; p && *p; p++) {
fprintf(stdout, "%s\n", *p);
if (0 == strncasecmp(*p, "cn=", 3)) {
siecnt++;
}
}
if (siecnt > 0) {
fprintf(stdout, "SUCCESS: SIE%s retrieved\n", siecnt>1?"S are":" is");
} else {
fprintf(stdout, "FAILURE: SIE is not retrieved\n");
}
done:
free(admroot);
exit(rval);
}
18 years, 6 months
[Fedora-directory-commits] adminutil/lib/libadmsslutil dllVersionInfo.rc, 1.1.1.1, 1.2 srvutilssl.c, 1.1.1.1, 1.2
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/adminutil/lib/libadmsslutil
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv856/lib/libadmsslutil
Modified Files:
dllVersionInfo.rc srvutilssl.c
Log Message:
Index: dllVersionInfo.rc
===================================================================
RCS file: /cvs/dirsec/adminutil/lib/libadmsslutil/dllVersionInfo.rc,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- dllVersionInfo.rc 20 Jul 2005 22:51:33 -0000 1.1.1.1
+++ dllVersionInfo.rc 16 Nov 2005 18:50:15 -0000 1.2
@@ -50,7 +50,7 @@
VALUE "InternalName", INTERNAL_NAME "\0"
VALUE "LegalCopyright", VI_COPYRIGHT "\0"
VALUE "OriginalFilename", INTERNAL_NAME ".dll\0"
- VALUE "ProductName", "Fedora Administration Server\0"
+ VALUE "ProductName", "Administration Server\0"
VALUE "ProductVersion", ADMSDK_VERSION "\0"
END
END
Index: srvutilssl.c
===================================================================
RCS file: /cvs/dirsec/adminutil/lib/libadmsslutil/srvutilssl.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- srvutilssl.c 20 Jul 2005 22:51:33 -0000 1.1.1.1
+++ srvutilssl.c 16 Nov 2005 18:50:15 -0000 1.2
@@ -26,23 +26,37 @@
PR_IMPLEMENT(AttrNameList)
getServerDNListSSL(AdmldapInfo info)
{
- char *domainDN, *isie, *sie;
+ char *domainDN = NULL, *isie = NULL, *sie = NULL;
+ char *ptr = NULL, *adminName = NULL;
PsetHndl domainPset;
int errorCode;
AttrNameList nl;
-
isie = admldapGetISIEDN(info);
- domainDN=strchr(isie, ',');
- if (!domainDN) return NULL;
+ /*
+ * ISIE sample:
+ * isie: cn=<NAME> Administration Server, cn=Server Group, cn=myhost.example.com, ou=example.com, o=NetscapeRoot
+ */
+
+ ptr=strchr(isie, ',');
+ if (!ptr) goto err;
+
+ *ptr = '\0'; /* to cut out "<NAME> Administration Server" later */
sie = admldapGetSIEDN(info);
- domainDN++;
+ ptr++;
- while (*domainDN == ' ' && *domainDN != '\0') domainDN++;
+ while (*ptr == ' ' && *ptr != '\0') ptr++;
- if (*domainDN == '\0') return NULL;
+ if (*ptr == '\0') goto err;
+
+ domainDN = PL_strdup(ptr);
+ if (!domainDN) goto err;
+
+ adminName = strchr(isie, '=');
+ if (!adminName) goto err;
+ adminName++;
/* Use domainDN to create a pset */
domainPset = psetRealCreateSSL(admldapGetHost(info),
@@ -54,12 +68,19 @@
NULL,
&errorCode);
- if (!domainPset) return NULL;
+ if (!domainPset) goto err;
- nl = retrieveSIEs(domainPset, domainDN);
+ nl = retrieveSIEs(domainPset, domainDN, adminName);
- psetDelete(domainPset);
+ psetDelete(domainPset); /* free sie, domainDN, internally */
+ if (isie) PR_Free(isie);
return nl;
+
+err:
+ if (isie) PR_Free(isie);
+ if (sie) PR_Free(sie);
+ if (domainDN) PR_Free(domainDN);
+ return NULL;
}
PR_IMPLEMENT(AttributeList)
18 years, 6 months
[Fedora-directory-commits] adminutil/lib/libadminutil dllVersionInfo.rc, 1.1.1.1, 1.2 srvutil.c, 1.1.1.1, 1.2
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/adminutil/lib/libadminutil
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv856/lib/libadminutil
Modified Files:
dllVersionInfo.rc srvutil.c
Log Message:
Index: dllVersionInfo.rc
===================================================================
RCS file: /cvs/dirsec/adminutil/lib/libadminutil/dllVersionInfo.rc,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- dllVersionInfo.rc 20 Jul 2005 22:51:32 -0000 1.1.1.1
+++ dllVersionInfo.rc 16 Nov 2005 18:50:15 -0000 1.2
@@ -50,7 +50,7 @@
VALUE "InternalName", INTERNAL_NAME "\0"
VALUE "LegalCopyright", VI_COPYRIGHT "\0"
VALUE "OriginalFilename", INTERNAL_NAME ".dll\0"
- VALUE "ProductName", "Fedora Administration Server\0"
+ VALUE "ProductName", "Administration Server\0"
VALUE "ProductVersion", ADMSDK_VERSION "\0"
END
END
Index: srvutil.c
===================================================================
RCS file: /cvs/dirsec/adminutil/lib/libadminutil/srvutil.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- srvutil.c 20 Jul 2005 22:51:32 -0000 1.1.1.1
+++ srvutil.c 16 Nov 2005 18:50:15 -0000 1.2
@@ -30,23 +30,37 @@
PR_IMPLEMENT(AttrNameList)
getServerDNList(AdmldapInfo info)
{
- char *domainDN, *isie, *sie;
+ char *domainDN = NULL, *isie = NULL, *sie = NULL;
+ char *ptr = NULL, *adminName = NULL;
PsetHndl domainPset;
int errorCode;
ListNodePtr dnList=NULL, node=NULL;
AttrNameList nl;
isie = admldapGetISIEDN(info);
- domainDN=strchr(isie, ',');
- if (!domainDN) return NULL;
+ /*
+ * ISIE sample:
+ * isie: cn=<NAME> Administration Server, cn=Server Group, cn=myhost.example.com, ou=example.com, o=NetscapeRoot
+ */
+ ptr = strchr(isie, ',');
+ if (!ptr) goto err;
+
+ *ptr = '\0'; /* to cut out "<NAME> Administration Server" later */
sie = admldapGetSIEDN(info);
- domainDN++;
+ ptr++;
- while (*domainDN == ' ' && *domainDN != '\0') domainDN++;
+ while (*ptr == ' ' && *ptr != '\0') ptr++;
- if (*domainDN == '\0') return NULL;
+ if (*ptr == '\0') goto err;
+
+ domainDN = PL_strdup(ptr);
+ if (!domainDN) goto err;
+
+ adminName = strchr(isie, '=');
+ if (!adminName) goto err;
+ adminName++;
/* Use domainDN to create a pset */
domainPset = psetRealCreate(admldapGetHost(info),
@@ -57,16 +71,23 @@
NULL,
&errorCode);
- if (!domainPset) return NULL;
+ if (!domainPset) goto err;
- nl = retrieveSIEs(domainPset, domainDN);
+ nl = retrieveSIEs(domainPset, domainDN, adminName);
- psetDelete(domainPset);
+ psetDelete(domainPset); /* free sie, domainDN, internally */
+ if (isie) PR_Free(isie);
return nl;
+
+err:
+ if (isie) PR_Free(isie);
+ if (sie) PR_Free(sie);
+ if (domainDN) PR_Free(domainDN);
+ return NULL;
}
PR_IMPLEMENT(AttrNameList)
-retrieveSIEs(PsetHndl domainPset, char* domainDN)
+retrieveSIEs(PsetHndl domainPset, char* domainDN, char *adminName)
{
char *sieDN = NULL, *name, *sieName, *attrName;
int errorCode, i, isieLen;
@@ -78,7 +99,7 @@
nl = childrenList;
while (name = *nl++) {
- if (strcasecmp(name, "Fedora Administration Server")) {
+ if (strcasecmp(name, adminName)) {
sieList = psetGetChildren(domainPset, name, &errorCode);
nl1 = sieList;
isieLen = PL_strlen(name);
18 years, 6 months
[Fedora-directory-commits] adminutil/include/libadminutil srvutil.h, 1.1.1.1, 1.2
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/adminutil/include/libadminutil
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv856/include/libadminutil
Modified Files:
srvutil.h
Log Message:
Index: srvutil.h
===================================================================
RCS file: /cvs/dirsec/adminutil/include/libadminutil/srvutil.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- srvutil.h 20 Jul 2005 22:51:31 -0000 1.1.1.1
+++ srvutil.h 16 Nov 2005 18:50:09 -0000 1.2
@@ -28,7 +28,7 @@
#endif
PR_IMPLEMENT(AttrNameList)
-retrieveSIEs(PsetHndl domainPset, char* domainDN);
+retrieveSIEs(PsetHndl domainPset, char* domainDN, char *adminName);
PR_IMPLEMENT(AttrNameList)
getServerDNList(AdmldapInfo info);
18 years, 6 months
[Fedora-directory-commits] adminutil/include version.h,1.2,1.3
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/adminutil/include
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv856/include
Modified Files:
version.h
Log Message:
Index: version.h
===================================================================
RCS file: /cvs/dirsec/adminutil/include/version.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- version.h 26 Oct 2005 16:31:25 -0000 1.2
+++ version.h 16 Nov 2005 18:50:04 -0000 1.3
@@ -25,7 +25,7 @@
#include <winver.h>
-#define ADMSDK_NAME "Admin Server SDK Library"
+#define ADMSDK_NAME "Administration Server Utility"
#ifdef _DEBUG
#define ADMSDK_PRODUCT ADMSDK_NAME " (debug)"
#define ADMSDK_FLAGS VS_FF_DEBUG
@@ -39,5 +39,5 @@
#define ADMSDK_VERSION "1.0"
#define ADMSDK_SO_VERSION "10"
-#define VI_COMPANYNAME "Fedora Project"
+#define VI_COMPANYNAME "Red Hat, Inc."
#define VI_COPYRIGHT "Copyright (C) 2005 Red Hat, Inc."
18 years, 6 months
[Fedora-directory-commits] adminutil Makefile, 1.1.1.1, 1.2 adminutil.spec.tmpl, 1.1.1.1, 1.2 nsdefs.mk, 1.3, 1.4 pkgadminutil.mk, 1.3, 1.4 fedora-adminutil.spec.tmpl, 1.1.1.1, NONE
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/adminutil
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv856
Modified Files:
Makefile adminutil.spec.tmpl nsdefs.mk pkgadminutil.mk
Removed Files:
fedora-adminutil.spec.tmpl
Log Message:
Index: Makefile
===================================================================
RCS file: /cvs/dirsec/adminutil/Makefile,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- Makefile 20 Jul 2005 22:51:30 -0000 1.1.1.1
+++ Makefile 16 Nov 2005 18:49:58 -0000 1.2
@@ -49,19 +49,14 @@
$(RELTOOLS):
cd $(ABS_ROOT_PARENT) ; cvs co RelToolsLite
-brandAdminUtil: $(RELTOOLS)
- @echo ==== Branding AdminUtil ==========
- $(PERL5) $(RELTOOLSPATH)/brandver.pl -i branding/rh/brandver.dat -s redhat-adminutil.spec
- @echo ==== Finished Branding AdminUtil ==========
-
-debrandAdminUtil: $(RELTOOLS)
- @echo ==== Deranding AdminUtil ==========
- $(PERL5) $(RELTOOLSPATH)/brandver.pl -i branding/fedora/brandver.dat -s fedora-adminutil.spec
- @echo ==== Finished Deranding AdminUtil ==========
+versionAdminUtil: $(RELTOOLS)
+ @echo ==== Versioning AdminUtil ==========
+ $(PERL5) $(RELTOOLSPATH)/brandver.pl -i branding/fedora/brandver.dat
+ @echo ==== Finished Versioning AdminUtil ==========
normalizeAdminUtil: $(RELTOOLS)
@echo ==== Normalizing Admin Util ==========
- $(PERL5) $(RELTOOLSPATH)/brandver.pl -i branding/fedora/normalize.dat -s fedora-adminutil.spec
+ $(PERL5) $(RELTOOLSPATH)/brandver.pl -i branding/fedora/normalize.dat
@echo ==== Finished Normalizing Admin Util ==========
endif
@@ -97,13 +92,11 @@
@echo ==== Finished Admin Util Package ==========
@echo
-redhat-adminutil.spec: adminutil.spec.tmpl branding/rh/brandver.dat $(RELTOOLSPATH)/brandver.pl
- sed -e s/@PLATFORM@/$(NSOS_ARCH)$(NSOS_RELEASE)/g adminutil.spec.tmpl > $@
- $(RELTOOLSPATH)/brandver.pl -i branding/rh/spec.dat $@
- mv $@ $(OBJDIR)
-
-fedora-adminutil.spec:
- sed -e s/@PLATFORM@/$(NSOS_ARCH)$(NSOS_RELEASE)/g $@.tmpl > $@
- mv $@ $(OBJDIR)
-
-
+$(ADMINUTILSPEC):
+ sed -e 's/@PLATFORM@/$(NSOS_ARCH)$(NSOS_RELEASE)/g' \
+ -e 's/@GEN-VERSION(a)/1.0/g' \
+ -e 's/@GEN-VERSION-NODOT@/10/g' \
+ -e 's/@PRODUCT-NAME@/Admin Util/g' \
+ -e 's/@PRODUCT-SHORT-NAME@/adminutil/g' \
+ -e 's+@COMPANY-URL@+http://directory.fedora.redhat.com/+g' \
+ adminutil.spec.tmpl > $@
Index: adminutil.spec.tmpl
===================================================================
RCS file: /cvs/dirsec/adminutil/adminutil.spec.tmpl,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- adminutil.spec.tmpl 20 Jul 2005 22:51:30 -0000 1.1.1.1
+++ adminutil.spec.tmpl 16 Nov 2005 18:49:58 -0000 1.2
@@ -6,12 +6,12 @@
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation version
# 2.1 of the License.
-#
+#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
-#
+#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -24,8 +24,8 @@
# don't bother stripping - we already do this for optimized, and we definitely
# want the symbols in the debug builds
%define __os_install_post %{nil}
-Summary: @COMPANY-PRODUCT-NAME@
-Name: @LCASE-COMPANY-NAME-NOSP@-adminutil-devel
+Summary: @PRODUCT-NAME@
+Name: @PRODUCT-SHORT-NAME@
Version: @GEN-VERSION@
Release: 1.@PLATFORM@
License: LGPL
@@ -38,29 +38,78 @@
# dependencies that we don't care about, and refuses to install
Autoreq: 0
# Without Requires: something, rpmbuild will abort!
+# Note: depending upon nspr, nss, ldapsdk, and icu
Requires: perl
-Prefix: /opt/%{name}
+Prefix: /
-%description
-@COMPANY-PRODUCT-NAME@ is a library to configure your servers using the Configuration Directory Server.
+%description
+@PRODUCT-NAME@ is a library to configure your servers using the Configuration Directory Server.
+
+%prep
+mkdir -p $RPM_BUILD_ROOT/%{prefix}/usr/lib/adminutil-properties
+mkdir -p $RPM_BUILD_ROOT/%{prefix}/usr/lib/
+mkdir -p $RPM_BUILD_ROOT/%{prefix}/usr/include/adminutil-1.0/libadminutil
+mkdir -p $RPM_BUILD_ROOT/%{prefix}/usr/include/adminutil-1.0/libadmsslutil
-# no %prep
# no %build
%install
-mkdir -p $RPM_BUILD_ROOT/%{prefix}
-cp -r $RPM_BUILD_ROOT/lib $RPM_BUILD_ROOT/include $RPM_BUILD_ROOT/%{prefix}
+cp -r $RPM_BUILD_ROOT/lib $RPM_BUILD_ROOT/include $RPM_BUILD_ROOT/%{prefix}/usr
%clean
-rm -rf $RPM_BUILD_ROOT/opt
+rm -rf $RPM_BUILD_ROOT/$RPM_INSTALL_PREFIX/%{prefix}/usr/lib/libadminutil10.so
+rm -rf $RPM_BUILD_ROOT/$RPM_INSTALL_PREFIX/%{prefix}/usr/lib/libadmsslutil10.so
+rm -rf $RPM_BUILD_ROOT/$RPM_INSTALL_PREFIX/%{prefix}/usr/lib/adminutil-properties
+rm -rf $RPM_BUILD_ROOT/$RPM_INSTALL_PREFIX/%{prefix}/usr/lib/libadminutil10.a
+rm -rf $RPM_BUILD_ROOT/$RPM_INSTALL_PREFIX/%{prefix}/usr/lib/libadmsslutil10.a
+rm -rf $RPM_BUILD_ROOT/$RPM_INSTALL_PREFIX/%{prefix}/usr/include/adminutil-1.0
%files
%defattr(-,root,root,-)
-%{prefix}
+%{prefix}/usr/lib/libadminutil10.so
+%{prefix}/usr/lib/libadmsslutil10.so
+%{prefix}/usr/lib/adminutil-properties/libadminutil_root.res
+
+%pre
%post
echo "Install finished."
+%postun
+rm -rf $RPM_INSTALL_PREFIX/%{prefix}/usr/lib/adminutil-properties
+
# no %preun
+%package devel
+Summary: @PRODUCT-NAME@ Development Kit
+Group: System Environment/Libraries
+
+%description devel
+@PRODUCT-NAME@ Header files and static libraries for development
+
+%files devel
+%defattr(-,root,root,-)
+%{prefix}/usr/lib/libadminutil10.a
+%{prefix}/usr/lib/libadmsslutil10.a
+%{prefix}/usr/include/adminutil-1.0/libadminutil/admutil.h
+%{prefix}/usr/include/adminutil-1.0/libadminutil/distadm.h
+%{prefix}/usr/include/adminutil-1.0/libadminutil/prodinfo.h
+%{prefix}/usr/include/adminutil-1.0/libadminutil/psetc.h
+%{prefix}/usr/include/adminutil-1.0/libadminutil/resource.h
+%{prefix}/usr/include/adminutil-1.0/libadminutil/srvutil.h
+%{prefix}/usr/include/adminutil-1.0/libadmsslutil/admsslutil.h
+%{prefix}/usr/include/adminutil-1.0/libadmsslutil/certmgt.h
+%{prefix}/usr/include/adminutil-1.0/libadmsslutil/psetcssl.h
+%{prefix}/usr/include/adminutil-1.0/libadmsslutil/SECerrs.h
+%{prefix}/usr/include/adminutil-1.0/libadmsslutil/srvutilssl.h
+%{prefix}/usr/include/adminutil-1.0/libadmsslutil/SSLerrs.h
+
+%pre devel
+mkdir -p $RPM_INSTALL_PREFIX/%{prefix}/usr/lib
+mkdir -p $RPM_INSTALL_PREFIX/%{prefix}/usr/include/adminutil-1.0/libadminutil
+mkdir -p $RPM_INSTALL_PREFIX/%{prefix}/usr/include/adminutil-1.0/libadmsslutil
+
+%postun devel
+rm -rf $RPM_INSTALL_PREFIX/%{prefix}/usr/include/adminutil-1.0
+
%changelog
Index: nsdefs.mk
===================================================================
RCS file: /cvs/dirsec/adminutil/nsdefs.mk,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- nsdefs.mk 26 Oct 2005 16:35:28 -0000 1.3
+++ nsdefs.mk 16 Nov 2005 18:49:58 -0000 1.4
@@ -240,6 +240,8 @@
DIRVERDIR=$(COMMON_OBJDIR)/include
DIRVER_H=$(DIRVERDIR)/dirver.h
+ADMINUTILSPEC=$(OBJDIR)/adminutil.spec
+
#
# -- Default Section --------------------------------------------------------
#
Index: pkgadminutil.mk
===================================================================
RCS file: /cvs/dirsec/adminutil/pkgadminutil.mk,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- pkgadminutil.mk 26 Oct 2005 16:35:28 -0000 1.3
+++ pkgadminutil.mk 16 Nov 2005 18:49:58 -0000 1.4
@@ -47,12 +47,13 @@
endif
ABS_INSTDIR := $(shell if test \! -f $(INSTDIR); then mkdir $(INSTDIR); fi; cd $(INSTDIR); pwd)
ABS_PKGINSTDIR := $(shell if test \! -f $(PKGINSTDIR); then mkdir $(PKGINSTDIR); fi; cd $(PKGINSTDIR); pwd)
+INCL_ADMINUTIL := adminutil-1.0
+PROP_ADMINUTIL := adminutil-properties
# set the values of the macros used by rpmbuild
# name and version of RPM - must correspond to the spec file - these get branded
-RPM_BASE_NAME=fedora
RPM_VERSION=1.0
-RPM_FILE_BASE=$(RPM_BASE_NAME)-adminutil-devel-$(RPM_VERSION)
+RPM_FILE_BASE=adminutil-$(RPM_VERSION)
RPM_ARCH = $(shell uname -i)
# root dir for RPM built and temp files
ABS_TOPDIR = $(ABS_INSTDIR)
@@ -78,17 +79,17 @@
rm -rf $(PKGDIR)
-$(MKDIR) $(PKGDIR)
-$(MKDIR) $(PKGDIR)/include
- -$(MKDIR) $(PKGDIR)/include/libadminutil
- -$(MKDIR) $(PKGDIR)/include/libadmsslutil
+ -$(MKDIR) $(PKGDIR)/include/$(INCL_ADMINUTIL)/libadminutil
+ -$(MKDIR) $(PKGDIR)/include/$(INCL_ADMINUTIL)/libadmsslutil
-$(MKDIR) $(PKGDIR)/lib
- -$(MKDIR) $(PKGDIR)/lib/property
+ -$(MKDIR) $(PKGDIR)/lib/$(PROP_ADMINUTIL)
- cp -p $(ABS_ROOT)/include/libadminutil/*.h $(PKGDIR)/include/libadminutil
- cp -p $(ABS_ROOT)/include/libadmsslutil/*.h $(PKGDIR)/include/libadmsslutil
+ cp -p $(ABS_ROOT)/include/libadminutil/*.h $(PKGDIR)/include/$(INCL_ADMINUTIL)/libadminutil
+ cp -p $(ABS_ROOT)/include/libadmsslutil/*.h $(PKGDIR)/include/$(INCL_ADMINUTIL)/libadmsslutil
# Don't package sslpset.h
- rm -f $(PKGDIR)/include/libadmsslutil/sslpset.h
+ rm -f $(PKGDIR)/include/$(INCL_ADMINUTIL)/libadmsslutil/sslpset.h
cp -p $(ADMSERV_OBJDIR)/lib/*.* $(PKGDIR)/lib
- cp -p $(ADMSERV_OBJDIR)/lib/libadminutil/lib*.res $(PKGDIR)/lib/property
+ cp -p $(ADMSERV_OBJDIR)/lib/libadminutil/lib*.res $(PKGDIR)/lib/$(PROP_ADMINUTIL)
pkgSBC:
-$(RM) -rf $(ABS_PKGINSTDIR)
@@ -106,7 +107,7 @@
pkgRPM:
ifdef BUILD_RPM
# make a spec file (it's moved to OBJDIR)
- $(MAKE) -C $(ABS_ROOT) $(RPM_BASE_NAME)-adminutil.spec
- rpmbuild $(RPM_TOPDIR) $(RPM_SOURCEDIR) $(RPM_BUILDDIR) $(RPM_RPMDIR) $(RPM_SRPMDIR) --define "flavor $(RPM_FLAVOR)" --clean --nodeps -ba $(OBJDIR)/$(RPM_BASE_NAME)-adminutil.spec
+ $(MAKE) -C $(ABS_ROOT) $(ADMINUTILSPEC)
+ rpmbuild $(RPM_TOPDIR) $(RPM_SOURCEDIR) $(RPM_BUILDDIR) $(RPM_RPMDIR) $(RPM_SRPMDIR) --define "flavor $(RPM_FLAVOR)" --clean --nodeps -ba $(ADMINUTILSPEC)
cd $(ABS_INSTDIR); rm -f $(RPM_FILE_BASE).tar.gz
endif # BUILD_RPM
--- fedora-adminutil.spec.tmpl DELETED ---
18 years, 6 months