summaryrefslogtreecommitdiffstats
path: root/lib/ldaputil/utest
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2009-08-11 14:37:44 -0600
committerRich Megginson <rmeggins@redhat.com>2009-08-11 15:17:44 -0600
commit886d9b9f4fd9bfd72c2c9728f13b8db1ff2793b7 (patch)
tree7afa75c8dd680409fe7049827cf0a4f2905036a5 /lib/ldaputil/utest
parentabff3feacb218a7bb65a358dce2e9c90a2f185b1 (diff)
downloadds-886d9b9f4fd9bfd72c2c9728f13b8db1ff2793b7.tar.gz
ds-886d9b9f4fd9bfd72c2c9728f13b8db1ff2793b7.tar.xz
ds-886d9b9f4fd9bfd72c2c9728f13b8db1ff2793b7.zip
Change default branding to 389 - remove lite code
The vendor, brand, and capbrand are set in configure - we should use those everywhere rather than have to run some sort of script over the code to change vendor, brand, version, etc. I've added VENDOR, BRAND, CAPBRAND to the default defines passed to the compiler, and changed the code to use these defines. And instead of the unintuitively named PRODUCTTEXT macro, we should use the already defined PRODUCT_VERSION. This allowed me to get rid of some code. The version was from a generated file called dirver.h which we don't need anymore, and we don't need the perl script dirver.pl which generated it. The vendor string was coming from the dirlite header file. So I also used this as an excuse to get rid of all references to dirlite once and for all (yay!). For the places in plain text files which are not substituted, I just used the generic name Dirsrv or Directory Server instead of having an explicit brand and/or version in there. Reviewed by: nkinder (Thanks!)
Diffstat (limited to 'lib/ldaputil/utest')
-rw-r--r--lib/ldaputil/utest/auth.cpp4
-rwxr-xr-xlib/ldaputil/utest/authtest2
-rw-r--r--lib/ldaputil/utest/certmap.conf2
-rw-r--r--lib/ldaputil/utest/stubs.cpp2
-rw-r--r--lib/ldaputil/utest/test.ref14
5 files changed, 12 insertions, 12 deletions
diff --git a/lib/ldaputil/utest/auth.cpp b/lib/ldaputil/utest/auth.cpp
index a5d78906..46be3a2b 100644
--- a/lib/ldaputil/utest/auth.cpp
+++ b/lib/ldaputil/utest/auth.cpp
@@ -58,7 +58,7 @@
static const char* dllname = "plugin.so";
-char *global_issuer_dn = "o=Fedora Project, c=US";
+char *global_issuer_dn = "o=" VENDOR ", c=US";
#define NSPR_INIT(Program) (PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 8))
@@ -99,7 +99,7 @@ static int ldapu_certinfo_delete_test (const char *fname, const char *old_fname)
}
/* rv = ldapu_certinfo_delete("o=Ace Industry, c=US"); */
- rv = ldapu_certinfo_delete("o=Fedora Project, c=US");
+ rv = ldapu_certinfo_delete("o=" VENDOR ", c=US");
if (rv != LDAPU_SUCCESS) {
fprintf(stderr, "ldapu_certinfo_delete failed. Reason: %s\n",
diff --git a/lib/ldaputil/utest/authtest b/lib/ldaputil/utest/authtest
index 055a4713..38e206cf 100755
--- a/lib/ldaputil/utest/authtest
+++ b/lib/ldaputil/utest/authtest
@@ -119,7 +119,7 @@ must_succeed ./auth 9 "o=Ace Industry, c=US" "cn=Kirsten Vaughan, ou=Human Resou
#must_fail ./auth 9 "default" "cn=Kirsten Vaughan, o=Ace Industry, c=US"
# test for encode/decode bindpw
-must_succeed ./auth 10 "cn=Foo Bar, o=Fedora Project, c=US" "foobar"
+must_succeed ./auth 10 "cn=Foo Bar, o=$VENDOR, c=US" "foobar"
# test for reading dbnames from dbswitch.conf file
must_succeed ./auth 11 dblist.conf ignore
diff --git a/lib/ldaputil/utest/certmap.conf b/lib/ldaputil/utest/certmap.conf
index 248b6099..b68d9a94 100644
--- a/lib/ldaputil/utest/certmap.conf
+++ b/lib/ldaputil/utest/certmap.conf
@@ -53,7 +53,7 @@ certmap default default
#default:FilterComps cn
-certmap default1 o=Fedora Project, c=US
+certmap default1 o=VENDOR, c=US
default1:library ./plugin.so
default1:InitFn plugin_init_fn
default1:DNComps ou o c
diff --git a/lib/ldaputil/utest/stubs.cpp b/lib/ldaputil/utest/stubs.cpp
index d9bafdf8..aaa5bc69 100644
--- a/lib/ldaputil/utest/stubs.cpp
+++ b/lib/ldaputil/utest/stubs.cpp
@@ -63,7 +63,7 @@ NSAPI_PUBLIC int ldapu_get_cert_subject_dn (void *cert_in, char **subjectDN)
NSAPI_PUBLIC int ldapu_get_cert_issuer_dn (void *cert, char **issuerDN)
{
/* TEMPORARY -- not implemented yet*/
- *issuerDN = strdup("o=Fedora Project, c=US");
+ *issuerDN = strdup("o=" VENDOR ", c=US");
return *issuerDN ? LDAPU_SUCCESS : LDAPU_FAILED;
}
diff --git a/lib/ldaputil/utest/test.ref b/lib/ldaputil/utest/test.ref
index 8f621df6..dfb71acc 100644
--- a/lib/ldaputil/utest/test.ref
+++ b/lib/ldaputil/utest/test.ref
@@ -286,9 +286,9 @@ plugin_verify_fn called.
Matched entry to cert: "cn=Kirsten Vaughan, ou=Human Resources, o=Ace Industry, c=US"
Authentication succeeded.
-Start of test: ./auth 10 "cn=Foo Bar, o=Fedora Project, c=US" "foobar"
+Start of test: ./auth 10 "cn=Foo Bar, o=$VENDOR, c=US" "foobar"
Config file written: config_out.conf
-binddn from config file: "cn=Foo Bar, o=Fedora Project, c=US"
+binddn from config file: "cn=Foo Bar, o=$VENDOR, c=US"
bindpw from config file: "foobar"
Config file test succeeded
Authentication succeeded.
@@ -323,7 +323,7 @@ certmap default default
#default:FilterComps cn
-certmap default1 o=Fedora Project, c=US
+certmap default1 o=$VENDOR, c=US
default1:library ./plugin.so
default1:InitFn plugin_init_fn
default1:DNComps ou o c
@@ -349,7 +349,7 @@ default2:verifycert on
certmap default default
-certmap default1 o=Fedora Project, c=US
+certmap default1 o=$VENDOR, c=US
default1:library ./plugin.so
default1:InitFn plugin_init_fn
default1:DNComps ou o c
@@ -382,7 +382,7 @@ certmap default default
#default:FilterComps cn
-certmap default1 o=Fedora Project, c=US
+certmap default1 o=$VENDOR, c=US
default1:library ./plugin.so
default1:InitFn plugin_init_fn
default1:DNComps ou o c
@@ -435,7 +435,7 @@ certmap default default
#default:FilterComps cn
-certmap default1 o=Fedora Project, c=US
+certmap default1 o=$VENDOR, c=US
default1:library ./plugin.so
default1:InitFn plugin_init_fn
default1:DNComps ou o c
@@ -461,7 +461,7 @@ default2:verifycert on
certmap default default
-certmap default1 o=Fedora Project, c=US
+certmap default1 o=$VENDOR, c=US
default1:library ./plugin.so
default1:InitFn plugin_init_fn
default1:DNComps ou o c