Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/admin/src
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26722/ldapserver/ldap/admin/src
Modified Files:
create_instance.c
Log Message:
Resolves: bug 227771
Bug Description: FHS: use sysconfdir (/etc) as config file location
Reviewed by: nhosoi (Thanks!)
Fix Description: After much deliberation, we have decided that it is ok that our dynamic
config files are under /etc/fedora-ds/slapd-instance.
So the config_dir will be /etc/fedora-ds/slapd-instance and the security and schema files
will go there as well. Since the FHS is ambiguous about this issue, and it will be very
confusing if the configuration files are not under /etc, and there are some agents
(webmin, cfengine) that do "dynamically" modify config files under /etc, this
outweighs any considerations about having the server using it's config file like an
"ascii database".
In addition, the presence of repl-monitor-cgi causes rpm to complain, and since we only
support CGIs in the Admin Server, this file has been removed from the core fedora-ds
package.
Platforms tested: RHEL4, FC6
Flag Day: no
Doc impact: no
Index: create_instance.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/create_instance.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- create_instance.c 7 Feb 2007 23:57:39 -0000 1.42
+++ create_instance.c 8 Feb 2007 18:40:12 -0000 1.43
@@ -1737,8 +1737,10 @@
gen_script_auto(mysroot, mycs_path, "verify-db.pl", cf)
/* tentatively moved to mycs_path */
+#ifdef MOVE_TO_ADMIN_SERVER
#define CREATE_REPL_MONITOR_CGI() \
gen_script_auto(mysroot, mycs_path, "repl-monitor-cgi.pl", cf)
+#endif
#define CREATE_ACCOUNT_INACT(_commandName) \
gen_script_auto(mysroot, cs_path, _commandName, cf)
@@ -1897,8 +1899,10 @@
t = CREATE_VERIFYDB();
if(t) return t;
+#ifdef MOVE_TO_ADMIN_SERVER
t = CREATE_REPL_MONITOR_CGI();
if(t) return t;
+#endif
t = CREATE_ACCOUNT_INACT("ns-inactivate.pl");
if(t) return t;
@@ -2410,8 +2414,10 @@
t = CREATE_VERIFYDB();
if(t) return t;
+#ifdef MOVE_TO_ADMIN_SERVER
t = CREATE_REPL_MONITOR_CGI();
if(t) return t;
+#endif
t = gen_script(cs_path, "suffix2instance.bat",
"@if not \"%%echo%%\" == \"on\" echo off\n\n"
@@ -4479,8 +4485,8 @@
temp = ds_a_get_cgi_var("config_dir", NULL, NULL);
if (NULL == temp) {
- cf->config_dir = PR_smprintf("%s%clib%c%s%c%s-%s",
- cf->localstatedir, FILE_PATHSEP, FILE_PATHSEP,
+ cf->config_dir = PR_smprintf("%s%c%s%c%s-%s",
+ cf->sysconfdir, FILE_PATHSEP,
cf->brand_ds, FILE_PATHSEP,
PRODUCT_NAME, cf->servid);
} else {
@@ -4492,8 +4498,8 @@
cf->schema_dir = ds_a_get_cgi_var("schema_dir", NULL, NULL);
temp = ds_a_get_cgi_var("schema_dir", NULL, NULL);
if (NULL == temp) {
- cf->schema_dir = PR_smprintf("%s%clib%c%s%c%s-%s%cschema",
- cf->localstatedir, FILE_PATHSEP, FILE_PATHSEP,
+ cf->schema_dir = PR_smprintf("%s%c%s%c%s-%s%cschema",
+ cf->sysconfdir, FILE_PATHSEP,
cf->brand_ds, FILE_PATHSEP,
PRODUCT_NAME, cf->servid, FILE_PATHSEP);
} else {