[Fedora-directory-commits] ldapserver Makefile.am, 1.37, 1.38 Makefile.in, 1.44, 1.45
by Doctor Conrad
Author: nkinder
Update of /cvs/dirsec/ldapserver
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv32557
Modified Files:
Makefile.am Makefile.in
Log Message:
Resolves: 240240
Summary: Fixed linker problems when linking with ldap c sdk.
Index: Makefile.am
===================================================================
RCS file: /cvs/dirsec/ldapserver/Makefile.am,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- Makefile.am 8 May 2007 17:22:33 -0000 1.37
+++ Makefile.am 15 May 2007 23:36:10 -0000 1.38
@@ -264,7 +264,7 @@
ldap/admin/lib/dsalib_util.c
libds_admin_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/ldap/admin/include @ldapsdk_inc@ @nss_inc@ @nspr_inc@
-libds_admin_la_LIBADD = $(LDAPSDK_LINK) $(NSS_LINK) $(NSPR_LINK)
+libds_admin_la_LIBADD = $(LDAPSDK_LINK) $(SASL_LINK) $(NSS_LINK) $(NSPR_LINK)
#------------------------
# libns-dshttpd
@@ -417,7 +417,7 @@
$(libavl_a_SOURCES)
libslapd_la_CPPFLAGS = $(PLUGIN_CPPFLAGS) @db_inc@ @svrcore_inc@
-libslapd_la_LIBADD = $(LDAPSDK_LINK) $(SVRCORE_LINK) $(NSS_LINK) $(NSPR_LINK)
+libslapd_la_LIBADD = $(LDAPSDK_LINK) $(SASL_LINK) $(SVRCORE_LINK) $(NSS_LINK) $(NSPR_LINK)
#////////////////////////////////////////////////////////////////
Index: Makefile.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/Makefile.in,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- Makefile.in 8 May 2007 17:22:33 -0000 1.44
+++ Makefile.in 15 May 2007 23:36:10 -0000 1.45
@@ -239,7 +239,8 @@
libdna_plugin_la_OBJECTS = $(am_libdna_plugin_la_OBJECTS)
@enable_dna_TRUE@am_libdna_plugin_la_rpath = -rpath $(serverplugindir)
libds_admin_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
am_libds_admin_la_OBJECTS = \
ldap/admin/lib/libds_admin_la-dsalib_conf.lo \
ldap/admin/lib/libds_admin_la-dsalib_confs.lo \
@@ -431,7 +432,8 @@
ldap/servers/plugins/roles/libroles_plugin_la-roles_plugin.lo
libroles_plugin_la_OBJECTS = $(am_libroles_plugin_la_OBJECTS)
libslapd_la_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
am__objects_2 = ldap/libraries/libavl/libslapd_la-avl.lo
am_libslapd_la_OBJECTS = ldap/servers/slapd/libslapd_la-add.lo \
ldap/servers/slapd/libslapd_la-agtmmap.lo \
@@ -1169,7 +1171,7 @@
ldap/admin/lib/dsalib_util.c
libds_admin_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/ldap/admin/include @ldapsdk_inc@ @nss_inc@ @nspr_inc@
-libds_admin_la_LIBADD = $(LDAPSDK_LINK) $(NSS_LINK) $(NSPR_LINK)
+libds_admin_la_LIBADD = $(LDAPSDK_LINK) $(SASL_LINK) $(NSS_LINK) $(NSPR_LINK)
#------------------------
# libns-dshttpd
@@ -1322,7 +1324,7 @@
$(libavl_a_SOURCES)
libslapd_la_CPPFLAGS = $(PLUGIN_CPPFLAGS) @db_inc@ @svrcore_inc@
-libslapd_la_LIBADD = $(LDAPSDK_LINK) $(SVRCORE_LINK) $(NSS_LINK) $(NSPR_LINK)
+libslapd_la_LIBADD = $(LDAPSDK_LINK) $(SASL_LINK) $(SVRCORE_LINK) $(NSS_LINK) $(NSPR_LINK)
#////////////////////////////////////////////////////////////////
#
16 years, 10 months
[Fedora-directory-commits] adminserver/admserv/newinst/src ux-config.cc, 1.12, 1.13 ux-dialog.cc, 1.12, 1.13 ux-dialog.h, 1.6, 1.7 ux-remove.cc, 1.8, 1.9 ux-update.cc, 1.26, 1.27
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/adminserver/admserv/newinst/src
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23604/adminserver/admserv/newinst/src
Modified Files:
ux-config.cc ux-dialog.cc ux-dialog.h ux-remove.cc
ux-update.cc
Log Message:
Resolves: bug 239502
Description: adminserver: autotools, FHS, and many bug fixes
Fix Description: 1) Change the pre configuration program to use the standard adminutil pset and admldapInfo interfaces to get the default configuration information. No sense having code duplicated all over the place.
2) Change pre-config to allow passed in config, security, log, and pid directories, or get from env. vars., as the post-config (update) program does.
3) Removed the Apache stuff. This will be set during the build process.
16 years, 10 months
[Fedora-directory-commits] adminserver Makefile.am, 1.4, 1.5 aclocal.m4, 1.2, 1.3 configure, 1.3, 1.4 missing, 1.1, 1.2 install-sh, 1.1, 1.2 depcomp, 1.1, 1.2 config.guess, 1.1, 1.2 compile, 1.1, 1.2 Makefile.in, 1.4, 1.5 config.sub, 1.1, 1.2
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/adminserver
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23604/adminserver
Modified Files:
Makefile.am aclocal.m4 configure missing install-sh depcomp
config.guess compile Makefile.in config.sub
Log Message:
Resolves: bug 239502
Description: adminserver: autotools, FHS, and many bug fixes
Fix Description: 1) Change the pre configuration program to use the standard adminutil pset and admldapInfo interfaces to get the default configuration information. No sense having code duplicated all over the place.
2) Change pre-config to allow passed in config, security, log, and pid directories, or get from env. vars., as the post-config (update) program does.
3) Removed the Apache stuff. This will be set during the build process.
16 years, 10 months
[Fedora-directory-commits] adminserver/admserv/newinst/src ux-config.cc, 1.11, 1.12 ux-dialog.cc, 1.11, 1.12 ux-dialog.h, 1.5, 1.6 ux-remove.cc, 1.7, 1.8 ux-update.cc, 1.25, 1.26
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/adminserver/admserv/newinst/src
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23549/adminserver/admserv/newinst/src
Modified Files:
ux-config.cc ux-dialog.cc ux-dialog.h ux-remove.cc
ux-update.cc
Log Message:
Resolves: bug 239502
Description: adminserver: autotools, FHS, and many bug fixes
Fix Description: 1) Change the pre configuration program to use the standard adminutil pset and admldapInfo interfaces to get the default configuration information. No sense having code duplicated all over the place.
2) Change pre-config to allow passed in config, security, log, and pid directories, or get from env. vars., as the post-config (update) program does.
3) Removed the Apache stuff. This will be set during the build process.
Index: ux-config.cc
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/ux-config.cc,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- ux-config.cc 9 May 2007 00:26:33 -0000 1.11
+++ ux-config.cc 15 May 2007 22:57:53 -0000 1.12
@@ -44,10 +44,20 @@
#include "ux-config.h"
#include "ux-dialog.h"
+#include "libadminutil/admutil.h"
+#include "libadminutil/distadm.h"
+#include "libadmsslutil/admsslutil.h"
+#include "libadmsslutil/psetcssl.h"
+
#include "config.h"
extern const char *DEFAULT_SYSUSER;
+static char configdir[BIG_BUF];
+static char securitydir[BIG_BUF];
+static char logdir[BIG_BUF];
+static char piddir[BIG_BUF];
+
/*********************************************************************
**
** METHOD:
@@ -174,12 +184,6 @@
}
else
{
- if (_logFile == (char *) NULL)
- {
- NSString logdir(LOGDIR);
- _logFile = logdir + "/" + INSTALL_LOG;
- }
- _installLog = new InstallLog (_logFile);
}
}
@@ -221,6 +225,53 @@
_adminInfo = _installInfo->createSection("admin");
}
+ // if we have been given a .inf file, see if the user specified custom
+ // config and log dirs, or specified env vars, or just use the defaults
+ const char *s = _adminInfo->get("config_dir");
+ if (NULL == s) {
+ s = getenv("ADMSERV_CONF_DIR");
+ }
+ if (NULL == s) {
+ s = CONFIGDIR;
+ }
+ strcpy(configdir, s);
+
+ s = _adminInfo->get("security_dir");
+ if (NULL == s) {
+ s = getenv("ADMSERV_CONF_DIR");
+ }
+ if (NULL == s) {
+ s = SECURITYDIR;
+ }
+ strcpy(securitydir, s);
+
+ s = _adminInfo->get("log_dir");
+ if (NULL == s) {
+ s = getenv("ADMSERV_LOG_DIR");
+ }
+ if (NULL == s) {
+ s = LOGDIR;
+ }
+ strcpy(logdir, s);
+
+ s = _adminInfo->get("run_dir");
+ if (NULL == s) {
+ s = getenv("ADMSERV_PID_DIR");
+ }
+ if (NULL == s) {
+ s = PIDDIR;
+ }
+ strcpy(piddir, s);
+
+ if (installMode() != Interactive) {
+ if (_logFile == (char *) NULL)
+ {
+ NSString mylogdir(logdir);
+ _logFile = mylogdir + "/" + INSTALL_LOG;
+ }
+ _installLog = new InstallLog (_logFile);
+ }
+
initDefaultConfig();
setDefaultScript(_adminInfo);
@@ -248,68 +299,41 @@
void
AdminPreInstall::initDefaultConfig()
{
- char tmp[BIG_BUF];
- NVPair admConf;
- LdapError ldapError;
char *ldapURL = NULL;
- NSString siePwd = NULL;
- NSString siePort = NULL;
NSString hostName = InstUtil::guessHostname();
+ PsetHndl pset = NULL;
+ AdmldapInfo admConf;
/* First, determine whether Admin is already configured */
- snprintf(tmp, sizeof(tmp), "%s/local.conf", CONFIGDIR);
- tmp[sizeof(tmp)-1] = 0;
-
- admConf.setFormat(2);
- admConf.read(tmp);
-
- getDefaultLdapInfo(CONFIGDIR, &ldapURL, NULL, NULL );
-
- if (admConf.isEmpty() == False)
- {
- NSString sieDN;
-
- /* Use admin id and admin pwd to access DS */
- sieDN = _installInfo->get(MC_ADMIN_ID);
- siePwd = _installInfo->get(MC_ADMIN_PWD);
- siePort = admConf.get("nsServerPort");
-
- if (sieDN != (char *) NULL && siePwd != (char *) NULL && ldapURL != NULL)
- {
- _configured = True;
-
- Ldap ldap (ldapError, ldapURL, sieDN, siePwd, sieDN, siePwd);
-
- if (ldapError == OKAY)
- {
- NSString configDN = NSString("cn=configuration") + LDAP_PATHSEP + sieDN;
- LdapEntry *configEntry = new LdapEntry(&ldap);
-
- if (configEntry->retrieve(configDN) == OKAY)
- {
- _adminInfo->set("Port", configEntry->getAttribute("nsServerPort"));
- _adminInfo->set("SysUser", configEntry->getAttribute("nsSuiteSpotUser"));
- _adminInfo->set("ServerIpAddress", configEntry->getAttribute("nsServerAddress"));
- }
- }
+ int rv = ADMUTIL_Init();
+ if (!rv) {
+ admConf = admldapBuildInfoOnly(configdir, &rv);
+ rv = ADMSSL_InitSimple(configdir, securitydir, 0);
+ if (!rv) {
+ pset = psetCreateSSL("admin-serv", configdir,
+ (char *)_installInfo->get(MC_ADMIN_ID),
+ (char *)_installInfo->get(MC_ADMIN_PWD),
+ &rv);
}
}
- snprintf(tmp, sizeof(tmp), "%s/admpw", CONFIGDIR);
- tmp[sizeof(tmp)-1] = 0;
-
- admConf.read(tmp);
-
- if (admConf.isEmpty())
+ if (pset && admConf)
{
- _configured = False;
+ _configured = True;
}
- else
+
+ if (pset)
{
- _adminInfo->set("ServerAdminID", admConf.name(0));
+ _adminInfo->set("Port", psetGetAttrSingleValue(pset, "configuration.nsServerPort", &rv));
+ _adminInfo->set("SysUser", psetGetAttrSingleValue(pset, "configuration.nsSuiteSpotUser", &rv));
+ _adminInfo->set("ServerIpAddress", psetGetAttrSingleValue(pset, "configuration.nsServerAddress", &rv));
}
- _adminInfo->set("ServerAdminPwd", siePwd);
+ if (admConf)
+ {
+ _adminInfo->set("ServerAdminID", admldapGetLocalAdminName(admConf));
+ ldapURL = admldapGetDirectoryURL(admConf);
+ }
if (_adminInfo->get("SysUser") == NULL)
{
@@ -318,12 +342,7 @@
if (_adminInfo->get("Port") == NULL)
{
- if (siePort != (char*)NULL) {
- _adminInfo->set("Port", siePort);
- }
- else {
- _adminInfo->set("Port", (unsigned long)InstUtil::guessPort());
- }
+ _adminInfo->set("Port", (unsigned long)InstUtil::guessPort());
}
if (_adminInfo->get("ServerIpAddress") == NULL)
@@ -359,8 +378,8 @@
ldapURL = (char *) _installInfo->get(CONFIG_LDAP_URL);
}
- _installInfo->set(SS_USER_ID, InstUtil::getDefaultUser(CONFIGDIR));
- _installInfo->set(SS_GROUP, InstUtil::getDefaultGroup(CONFIGDIR));
+// _installInfo->set(SS_USER_ID, InstUtil::getDefaultUser(configdir));
+// _installInfo->set(SS_GROUP, InstUtil::getDefaultGroup(configdir));
}
}
@@ -540,14 +559,6 @@
SS7:
- if (installType() == Express)
- {
- NSString httpd = HTTPD;
- _adminInfo->set("Apache", httpd);
- goto SS8;
- }
- askApache.registerDialogNext(this);
- action = askApache.execute();
if (action == DIALOG_PREV)
{
goto SS6;
@@ -736,7 +747,7 @@
NSString errMsg;
NSString sysUser;
- snprintf(tmp, sizeof(tmp), "%s/local.conf", CONFIGDIR);
+ snprintf(tmp, sizeof(tmp), "%s/local.conf", configdir);
tmp[sizeof(tmp)-1] = 0;
if (stat(tmp, &fi) == 0)
@@ -769,12 +780,12 @@
char stopProgram[BIG_BUF];
struct stat fi;
- snprintf(pid, sizeof(pid), "%s/%s", PIDDIR, PIDFILE);
+ snprintf(pid, sizeof(pid), "%s/%s", piddir, PIDFILE);
pid[sizeof(pid)-1] = 0;
if (stat(pid, &fi) == 0)
{
- snprintf(stopProgram, sizeof(stopProgram), "%s/stop-admin", CMDBINDIR);
+ snprintf(stopProgram, sizeof(stopProgram), "%s/stop-ds-admin", CMDBINDIR);
stopProgram[sizeof(stopProgram)-1] = 0;
if (stat (stopProgram, &fi) != 0)
{
@@ -793,7 +804,7 @@
disableWinMode();
- snprintf(tmp, sizeof(tmp), "%s/ns-update -f %s", CMDBINDIR, _infoFile.data());
+ snprintf(tmp, sizeof(tmp), "%s/ds-admin-update -f %s", CMDBINDIR, _infoFile.data());
tmp[sizeof(tmp)-1] = 0;
err = system(tmp);
@@ -825,86 +836,3 @@
ldap_value_free(dn);
}
}
-
-static char *get_value(const char * file, const char * attr) {
- char cmd[1024];
- char buf[1024];
- FILE *fp;
-
- snprintf(cmd, sizeof(cmd), "%s -V", file);
- cmd[sizeof(cmd)-1] = 0;
- fp = popen(cmd, "r");
-
- if (fp != NULL) {
- char *x, *t;
- while ((fgets(buf, sizeof(buf), fp)) > 0) {
- x = (char *)strstr(buf, attr);
- if (x) {
- t = (char *)strtok(buf, "\"");
- if (t) {
- t = (char *)strtok(NULL, "\"");
- if (t) {
- pclose(fp);
- return (char *)(strdup(t));
- }
- }
- }
- }
- }
- pclose(fp);
- return NULL;
-}
-
-NSString
-AdminPreInstall::verifyApache(const char *path) const
-{
- char errMsg[SML_BUF];
- NSString apacheRoot;
- struct stat st;
- char *v;
-
- if (stat(path, &st) != 0) {
- snprintf(errMsg, sizeof(errMsg), "Unable to locate Apache binary %s\n.", path);
- errMsg[sizeof(errMsg)-1] = 0;
- return errMsg;
- }
-
- v = get_value(path, "APACHE_MPM_DIR");
- if (!v || strcmp(v, "server/mpm/worker")) {
- snprintf(errMsg, sizeof(errMsg),
- "The Admininistration Server requires an Apache web "
- "server that provides the worker (multi-threaded) model.\n%s was not "
- "built with this option. See '%s -V' for more details", path, path);
- errMsg[sizeof(errMsg)-1] = 0;
- return errMsg;
- }
-
- apacheRoot = getApacheRoot(path);
- if (!apacheRoot.data() || !apacheRoot.length()) {
- snprintf(errMsg, sizeof(errMsg), "Unable to locate Apache modules for %s\n.", path);
- errMsg[sizeof(errMsg)-1] = 0;
- return errMsg;
- }
-
- errMsg[0] = 0;
-
- return errMsg;
-}
-
-NSString
-AdminPreInstall::getApacheRoot(const char *path) const
-{
- char mypath[1024];
- char errMsg[SML_BUF];
- struct stat st;
- char *v;
-
- v = get_value(path, "HTTPD_ROOT");
- snprintf(mypath, sizeof(mypath), "%s/modules", v);
- mypath[sizeof(mypath)-1] = 0;
- if (stat(mypath, &st) != 0) {
- return NULL;
- }
-
- return v;
-}
Index: ux-dialog.cc
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/ux-dialog.cc,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- ux-dialog.cc 9 May 2007 00:26:33 -0000 1.11
+++ ux-dialog.cc 15 May 2007 22:57:53 -0000 1.12
@@ -54,8 +54,6 @@
DialogAction askLdapUserSetup(Dialog *me);
DialogAction askHostIpAddressSetup (Dialog *me);
DialogAction askHostIpAddressNext (Dialog *me);
-DialogAction askApacheSetup (Dialog *me);
-DialogAction askApacheNext (Dialog *me);
DialogAction
yesNoDefaultNo(const char *answer)
@@ -560,55 +558,3 @@
return DIALOG_NEXT;
}
-
-DialogInput askApache(
-"The Administration Server runs on the Apache web server. Please provide the\n"
-"absolute path and filename of the Apache binary. The Administration \n"
-"Server needs an Apache compiled with the worker (multi-threaded) model.\n",
-
-"Apache",
-
-HTTPD,
-askApacheSetup,
-askApacheNext
-);
-
-DialogAction
-askApacheSetup(Dialog *me)
-{
- dialogSetup(me, "Apache", ((AdminPreInstall *) me->manager()->parent())->getDefaultScript());
- return DIALOG_SAME;
-}
-
-DialogAction
-askApacheNext(Dialog *me)
-{
- const char *buf = me->input();
- const char *Apache;
- NSString errMsg;
- AdminPreInstall *installer = (AdminPreInstall *) me->manager()->parent();
-
- if (buf[0] == 0)
- {
- Apache = me->defaultAns();
- }
- else
- {
- Apache = buf;
- }
-
- errMsg = installer->verifyApache(Apache);
-
- if (errMsg != (char *) NULL)
- {
- DialogAlert alert(errMsg);
- alert.execute();
- return DIALOG_SAME;
- }
-
- me->manager()->getDefaultScript()->set("Apache", Apache);
- me->manager()->getDefaultScript()->set("ApacheRoot", installer->getApacheRoot(Apache));
-
- return DIALOG_NEXT;
-}
-
Index: ux-dialog.h
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/ux-dialog.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ux-dialog.h 9 May 2007 00:26:33 -0000 1.5
+++ ux-dialog.h 15 May 2007 22:57:53 -0000 1.6
@@ -26,5 +26,4 @@
extern DialogInput askHostIpAddress;
extern DialogInput askLdapInfo;
extern DialogInput askLdapUser;
-extern DialogInput askApache;
Index: ux-remove.cc
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/ux-remove.cc,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- ux-remove.cc 9 May 2007 00:26:33 -0000 1.7
+++ ux-remove.cc 15 May 2007 22:57:53 -0000 1.8
@@ -131,11 +131,11 @@
FILE *fhdl = NULL;
/* Stop the Admin Server */
- snprintf(pidFile, sizeof(pidFile), "%s/admin-serv/logs/pid", serverRoot.data());
+ snprintf(pidFile, sizeof(pidFile), "%s/%s", PIDDIR, PIDFILE);
pidFile[sizeof(pidFile)-1] = 0;
if (stat(pidFile, &fi) == 0)
{
- snprintf(stopProgram, sizeof(stopProgram), "%s/stop-admin", serverRoot.data());
+ snprintf(stopProgram, sizeof(stopProgram), "%s/stop-ds-admin", CMDBINDIR);
stopProgram[sizeof(stopProgram)-1] = 0;
if (stat (stopProgram, &fi) != 0)
{
@@ -145,17 +145,6 @@
system(stopProgram);
}
- /* Stop SNMP Master Agent if running */
- snprintf(pidFile, sizeof(pidFile), "%s/admin-serv/logs/pid_masteragt", serverRoot.data());
- pidFile[sizeof(pidFile)-1] = 0;
- if ((fhdl = fopen(pidFile, "r")) != NULL)
- {
- fscanf(fhdl, "%d\n", &pid);
- fclose(fhdl);
- kill(pid, SIGKILL);
- unlink(pidFile);
- }
-
char szCmdBuf[BIG_BUF];
char *szHomeDir;
Index: ux-update.cc
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/ux-update.cc,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- ux-update.cc 15 May 2007 00:30:49 -0000 1.25
+++ ux-update.cc 15 May 2007 22:57:53 -0000 1.26
@@ -397,7 +397,7 @@
s = adminInstallInfo->get("security_dir");
if (NULL == s) {
- s = getenv("ADMSERV_CONF_DIR");;
+ s = getenv("ADMSERV_CONF_DIR");
}
if (NULL == s) {
s = SECURITYDIR;
@@ -406,7 +406,7 @@
s = adminInstallInfo->get("log_dir");
if (NULL == s) {
- s = getenv("ADMSERV_LOG_DIR");;
+ s = getenv("ADMSERV_LOG_DIR");
}
if (NULL == s) {
s = LOGDIR;
16 years, 10 months
[Fedora-directory-commits] adminserver Makefile.am, 1.3, 1.4 Makefile.in, 1.3, 1.4
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/adminserver
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23549/adminserver
Modified Files:
Makefile.am Makefile.in
Log Message:
Resolves: bug 239502
Description: adminserver: autotools, FHS, and many bug fixes
Fix Description: 1) Change the pre configuration program to use the standard adminutil pset and admldapInfo interfaces to get the default configuration information. No sense having code duplicated all over the place.
2) Change pre-config to allow passed in config, security, log, and pid directories, or get from env. vars., as the post-config (update) program does.
3) Removed the Apache stuff. This will be set during the build process.
Index: Makefile.am
===================================================================
RCS file: /cvs/dirsec/adminserver/Makefile.am,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Makefile.am 15 May 2007 00:30:48 -0000 1.3
+++ Makefile.am 15 May 2007 22:57:53 -0000 1.4
@@ -105,7 +105,7 @@
-DCMDBINDIR=\"$(cmdbindir)\" -DMANUALDIR=\"$(manualdir)\" \
-DCONFIGDIR=\"$(configdir)\" -DSECURITYDIR=\"$(securitydir)\" \
-DLOGDIR=\"$(logdir)\" -DHTTPD=\"$(HTTPD)\" -DDEFAULT_HTTPDUSER=\"$(httpduser)\" \
- -DPIDFILE=\"$(PIDFILE)\" -DDATADIR=\"$(datadir)\" -DLDIFDIR=\"$(ldifdir)\" \
+ -DPIDFILE=\"$(pidfile)\" -DDATADIR=\"$(datadir)\" -DLDIFDIR=\"$(ldifdir)\" \
-DBUILD_NUM=$(BUILDNUM) -DINFDIR=\"$(infdir)\" -DCGIBINDIR=\"$(cgibindir)\"
lib_LTLIBRARIES = libds-admin-serv.la
Index: Makefile.in
===================================================================
RCS file: /cvs/dirsec/adminserver/Makefile.in,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Makefile.in 15 May 2007 00:30:48 -0000 1.3
+++ Makefile.in 15 May 2007 22:57:53 -0000 1.4
@@ -474,7 +474,7 @@
-DMANUALDIR=\"$(manualdir)\" -DCONFIGDIR=\"$(configdir)\" \
-DSECURITYDIR=\"$(securitydir)\" -DLOGDIR=\"$(logdir)\" \
-DHTTPD=\"$(HTTPD)\" -DDEFAULT_HTTPDUSER=\"$(httpduser)\" \
- -DPIDFILE=\"$(PIDFILE)\" -DDATADIR=\"$(datadir)\" \
+ -DPIDFILE=\"$(pidfile)\" -DDATADIR=\"$(datadir)\" \
-DLDIFDIR=\"$(ldifdir)\" -DBUILD_NUM=$(BUILDNUM) \
-DINFDIR=\"$(infdir)\" -DCGIBINDIR=\"$(cgibindir)\"
lib_LTLIBRARIES = libds-admin-serv.la
16 years, 10 months
[Fedora-directory-commits] adminserver/tests/viewlog testget.1, NONE, 1.1 testget.2, NONE, 1.1 testget.3, NONE, 1.1 testget.4, NONE, 1.1
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/adminserver/tests/viewlog
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25759/adminserver/tests/viewlog
Added Files:
testget.1 testget.2 testget.3 testget.4
Log Message:
Resolves: bug 239502
Description: adminserver: autotools, FHS, and many bug fixes
Fix Description: 1) viewlog had a couple of bugs. I also added some tests for viewlog
2) The start, stop, and restart scripts have been renamed
3) Move the cgid socket to /var/run/fedora-ds and rename to make it unique
4) Forgot the trailing slash on some of the paths in admserv.conf. I also needed to add the html directory, and fix the location match pattern matching for the command and task urls
--- NEW FILE testget.1 ---
file=access&num=25&str=&id=admin-serv
--- NEW FILE testget.2 ---
file=error&num=25&str=&id=admin-serv
--- NEW FILE testget.3 ---
file=access&num=25&str=&id=slapd-localhost
--- NEW FILE testget.4 ---
file=errors&num=25&str=&id=slapd-localhost
16 years, 10 months
[Fedora-directory-commits] adminserver/admserv/cgi-src40 restartsrv.c, 1.7, 1.8 stopsrv.c, 1.6, 1.7 viewlog.c, 1.7, 1.8
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/adminserver/admserv/cgi-src40
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25759/adminserver/admserv/cgi-src40
Modified Files:
restartsrv.c stopsrv.c viewlog.c
Log Message:
Resolves: bug 239502
Description: adminserver: autotools, FHS, and many bug fixes
Fix Description: 1) viewlog had a couple of bugs. I also added some tests for viewlog
2) The start, stop, and restart scripts have been renamed
3) Move the cgid socket to /var/run/fedora-ds and rename to make it unique
4) Forgot the trailing slash on some of the paths in admserv.conf. I also needed to add the html directory, and fix the location match pattern matching for the command and task urls
Index: restartsrv.c
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/cgi-src40/restartsrv.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- restartsrv.c 11 May 2007 19:44:05 -0000 1.7
+++ restartsrv.c 15 May 2007 16:45:45 -0000 1.8
@@ -179,7 +179,7 @@
NULL, NULL);
break;
case 0:
- if (util_find_file_in_paths(line, sizeof(line), "restart-admin", CMDBINDIR, "../..", "")) {
+ if (util_find_file_in_paths(line, sizeof(line), "restart-ds-admin", CMDBINDIR, "../..", "")) {
restart(line);
}
exit(0);
Index: stopsrv.c
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/cgi-src40/stopsrv.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- stopsrv.c 9 May 2007 00:26:30 -0000 1.6
+++ stopsrv.c 15 May 2007 16:45:45 -0000 1.7
@@ -140,7 +140,7 @@
#else
sleep(5);
#endif
- if (util_find_file_in_paths(line, sizeof(line), "stop-admin", CMDBINDIR, "../..", "")) {
+ if (util_find_file_in_paths(line, sizeof(line), "stop-ds-admin", CMDBINDIR, "../..", "")) {
system(line);
}
exit(0);
Index: viewlog.c
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/cgi-src40/viewlog.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- viewlog.c 11 May 2007 19:44:05 -0000 1.7
+++ viewlog.c 15 May 2007 16:45:45 -0000 1.8
@@ -247,7 +247,7 @@
return PL_strdup(logdir);
} else if (!strncmp(id, "slapd-", 6)) {
/* DIRECTORY SERVER and admin server share the same log dir parent */
- return_dir = PR_smprintf("%s%c..%s%s", logdir, FILE_PATHSEP, FILE_PATHSEP, id);
+ return_dir = PR_smprintf("%s%c..%c%s", logdir, FILE_PATHSEP, FILE_PATHSEP, id);
}
}
@@ -265,7 +265,7 @@
char *num=NULL;
char *str=NULL;
char *file;
- char *logdir;
+ char *logdir = NULL;
char *id;
char **logfiles = NULL;
char tmp[BIG_LINE];
@@ -339,8 +339,8 @@
fflush(stdout);
#endif
if (!file || !*file ||
- util_is_valid_path_string(file) ||
- util_verify_file_or_dir(logdir, PR_FILE_DIRECTORY, file, -1, PR_FILE_FILE)) {
+ !util_is_valid_path_string(file) ||
+ !util_verify_file_or_dir(logdir, PR_FILE_DIRECTORY, file, -1, PR_FILE_FILE)) {
continue;
}
16 years, 10 months
[Fedora-directory-commits] adminserver/admserv/cfgstuff admserv.conf.in, 1.3, 1.4 httpd-2.2.conf.in, 1.3, 1.4 httpd.conf.in, 1.3, 1.4 restart-ds-admin.in, 1.1, 1.2
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/adminserver/admserv/cfgstuff
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25759/adminserver/admserv/cfgstuff
Modified Files:
admserv.conf.in httpd-2.2.conf.in httpd.conf.in
restart-ds-admin.in
Log Message:
Resolves: bug 239502
Description: adminserver: autotools, FHS, and many bug fixes
Fix Description: 1) viewlog had a couple of bugs. I also added some tests for viewlog
2) The start, stop, and restart scripts have been renamed
3) Move the cgid socket to /var/run/fedora-ds and rename to make it unique
4) Forgot the trailing slash on some of the paths in admserv.conf. I also needed to add the html directory, and fix the location match pattern matching for the command and task urls
Index: admserv.conf.in
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/cfgstuff/admserv.conf.in,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- admserv.conf.in 15 May 2007 00:30:48 -0000 1.3
+++ admserv.conf.in 15 May 2007 16:45:44 -0000 1.4
@@ -25,13 +25,20 @@
ADMServerVersionString "@capbrand@-Administrator/@PACKAGE_VERSION@"
ADMConfigDir "@configdir@"
-ScriptAlias /bin/admin/admin/bin/ "@cgibindir@"
-ScriptAlias /dist/ "@cgibindir@"
-ScriptAlias /manual/help/ "@cgibindir@"
+ScriptAlias /bin/admin/admin/bin/ "@cgibindir@/"
+ScriptAlias /dist/ "@cgibindir@/"
+ScriptAlias /manual/help/ "@cgibindir@/"
# all access is explicitly denied by default in httpd.conf
# the following Directory directives turn on access for specific
# directories
+<Directory "@htmldir@/">
+ AllowOverride None
+ Options None
+ Order allow,deny
+ Allow from all
+</Directory>
+
<Directory "@manualdir@/">
AllowOverride None
Options None
@@ -39,7 +46,7 @@
Allow from all
</Directory>
-<Directory "@icondir@">
+<Directory "@icondir@/">
AllowOverride None
Options None
Order allow,deny
@@ -51,7 +58,7 @@
RewriteRule ^/$ /bin/admin/admin/bin/download [R,L,QSA]
# remap admin server icons
-Alias /admin-serv/tasks/icons/ @icondir@
+Alias /admin-serv/tasks/icons/ @icondir@/
# Handle the initial login
<Location /admin-serv/authenticate>
@@ -65,20 +72,7 @@
</Location>
# Handle Other Console tasks
-<LocationMatch /admin*/[tT]asks/[Oo]peration/*>
- AuthUserFile @configdir@/admpw
- AuthType basic
- AuthName "Admin Server"
- Require valid-user
- AdminSDK on
- ADMCgiBinDir @cgibindir@
- Options +ExecCGI
- Order allow,deny
- Allow from all
-</LocationMatch>
-
-# Handle Other Console tasks
-<LocationMatch /slapd*/[tT]asks/[Oo]peration/*>
+<LocationMatch /*/[tT]asks/[Oo]peration/*>
AuthUserFile @configdir@/admpw
AuthType basic
AuthName "Admin Server"
@@ -91,21 +85,7 @@
</LocationMatch>
# Handle Admin Express
-<LocationMatch /admin*/[tT]asks/[Cc]onfiguration/*>
- AuthUserFile @configdir@/admpw
- AuthType basic
- AuthName "Admin Server"
- Require valid-user
- AdminSDK on
- ADMCgiBinDir @cgibindir@
- NESCompatEnv on
- Options +ExecCGI
- Order allow,deny
- Allow from all
-</LocationMatch>
-
-# Handle Admin Express
-<LocationMatch /slapd*/[tT]asks/[Cc]onfiguration/*>
+<LocationMatch /*/[tT]asks/[Cc]onfiguration/*>
AuthUserFile @configdir@/admpw
AuthType basic
AuthName "Admin Server"
@@ -131,24 +111,7 @@
# 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 /slapd*/[tT]asks/[Oo]peration/(?i:stop|start|restart|startconfigds|create)$>
- AuthUserFile @configdir@/admpw
- AuthType basic
- AuthName "Admin Server"
- Require valid-user
-## turn off the password pipe when using mod_restartd
- AdminSDK off
- ADMCgiBinDir @cgibindir@
- Options +ExecCGI
- RetainPerms on
- Order allow,deny
- Allow from all
-</LocationMatch>
-
-# 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 /admin*/[tT]asks/[Oo]peration/(?i:stop|start|restart|startconfigds|create)$>
+<LocationMatch /*/[tT]asks/[Oo]peration/(?i:stop|start|restart|startconfigds|create)$>
AuthUserFile @configdir@/admpw
AuthType basic
AuthName "Admin Server"
Index: httpd-2.2.conf.in
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/cfgstuff/httpd-2.2.conf.in,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- httpd-2.2.conf.in 15 May 2007 00:30:48 -0000 1.3
+++ httpd-2.2.conf.in 15 May 2007 16:45:44 -0000 1.4
@@ -392,11 +392,11 @@
# Additional to mod_cgid.c settings, mod_cgid has Scriptsock <path>
# for setting UNIX socket for communicating with cgid.
#
-Scriptsock @logdir@/cgisock
+Scriptsock @piddir(a)/admin-serv.cgisock
</IfModule>
<IfModule mod_restartd.c>
-Scriptsock @logdir@/cgisock
+Scriptsock @piddir(a)/admin-serv.cgisock
</IfModule>
#
Index: httpd.conf.in
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/cfgstuff/httpd.conf.in,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- httpd.conf.in 15 May 2007 00:30:48 -0000 1.3
+++ httpd.conf.in 15 May 2007 16:45:44 -0000 1.4
@@ -391,11 +391,11 @@
# Additional to mod_cgid.c settings, mod_cgid has Scriptsock <path>
# for setting UNIX socket for communicating with cgid.
#
-Scriptsock @logdir@/cgisock
+Scriptsock @piddir(a)/admin-serv.cgisock
</IfModule>
<IfModule mod_restartd.c>
-Scriptsock @logdir@/cgisock
+Scriptsock @piddir(a)/admin-serv.cgisock
</IfModule>
#
Index: restart-ds-admin.in
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/cfgstuff/restart-ds-admin.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- restart-ds-admin.in 11 May 2007 17:26:11 -0000 1.1
+++ restart-ds-admin.in 15 May 2007 16:45:44 -0000 1.2
@@ -21,6 +21,6 @@
# END COPYRIGHT BLOCK
-@cmdbindir@/stop-admin
+@cmdbindir@/stop-ds-admin
sleep 3
-@cmdbindir@/start-admin
+@cmdbindir@/start-ds-admin
16 years, 10 months
[Fedora-directory-commits] adminutil/include/libadminutil admutil.h, 1.6, 1.7
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/adminutil/include/libadminutil
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26162/include/libadminutil
Modified Files:
admutil.h
Log Message:
Resolves: #186280
Summary: Close potential security vulnerabilities in CGI code (Comment #30,#31)
Description: Added the code to escape html characters
Index: admutil.h
===================================================================
RCS file: /cvs/dirsec/adminutil/include/libadminutil/admutil.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- admutil.h 4 Apr 2007 19:37:41 -0000 1.6
+++ admutil.h 15 May 2007 00:53:33 -0000 1.7
@@ -429,10 +429,14 @@
/* form_post.c */
PR_IMPLEMENT(char) **get_input_ptr(void);
-/* Unescape an encoded form variable. */
+/* Unescape an %-encoded form variable. */
/* form_post.c */
PR_IMPLEMENT(void) form_unescape(char *str);
+/* Unescape an %-encoded form variable; escape <, >, &, ", ' */
+/* form_post.c */
+PR_IMPLEMENT(char *) form_unescape_url_escape_html(char *str);
+
/* Initialize a form "post" using the GET method. Send this fn the QS
* directly.*/
/* form_post.c */
16 years, 10 months