summaryrefslogtreecommitdiffstats
path: root/pki/base/tps
diff options
context:
space:
mode:
authorvakwetu <vakwetu@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2010-11-01 19:59:49 +0000
committervakwetu <vakwetu@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2010-11-01 19:59:49 +0000
commit33152182656b065d44d96b732755e3aed47f0f1b (patch)
tree151785773242ec1c45a030db8a6198147f63a186 /pki/base/tps
parente23c1a7269e958754f1e0368e0951488828a5eb1 (diff)
downloadpki-33152182656b065d44d96b732755e3aed47f0f1b.tar.gz
pki-33152182656b065d44d96b732755e3aed47f0f1b.tar.xz
pki-33152182656b065d44d96b732755e3aed47f0f1b.zip
Bugzilla BZ 646545 - TPS Agent tab: displays approve list parameter with last character chopped.
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@1454 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
Diffstat (limited to 'pki/base/tps')
-rw-r--r--pki/base/tps/doc/CS.cfg21
-rw-r--r--pki/base/tps/src/modules/tokendb/mod_tokendb.cpp60
2 files changed, 65 insertions, 16 deletions
diff --git a/pki/base/tps/doc/CS.cfg b/pki/base/tps/doc/CS.cfg
index c952a40c4..b27fa6796 100644
--- a/pki/base/tps/doc/CS.cfg
+++ b/pki/base/tps/doc/CS.cfg
@@ -1529,23 +1529,30 @@ target._006=# target.agent_approve.list = comma separated subset of above list.
target._007=# will show up in the agent tab (under advanced configuration) and will require agent involvement
target._008=# (enable/ disable) to be edited.
target._009=#
-target._010=# Each parameter set in the lists above requires two parameters:
-target._011=# target.<type name>.list : list of choices of this parameter set type (will display in the drop down box)
-target._012=# target.<type name>.pattern : the regular expression to select parameters in CS.cfg for this parameter set.
-target._013=#
-target._014=# The exception is the parameter set Generals, which only has a pattern defined. ie. target.Generals.pattern
-target._016=#
-target._017=########################################
+target._010=# For the wording to display correctly, the values in the above list should be plurals.
+target._011=#
+target._012=# Each parameter set in the lists above requires three parameters:
+target._013=# target.<type name>.list : list of choices of this parameter set type (will display in the drop down box)
+target._014=# target.<type name>.pattern : the regular expression to select parameters in CS.cfg for this parameter set.
+target._015=# target.<type_name>.displayname: used in the UI display text. This should be the singular form of <type_name>.
+target._016=#
+target._017=# The exception is the parameter set Generals, which only has a pattern defined. ie. target.Generals.pattern
+target._018=#
+target._019=########################################
target.configure.list=Profiles,Subsystem_Connections,Profile_Mappings,Authentication_Sources
target.agent_approve.list=Profiles
target.Profiles.list=userKey,soKey,soCleanUserToken,soUserKey,cleanToken,soCleanSoToken,tokenKey
target.Profiles.pattern=op\..*\.$name\..*
+target.Profiles.displayname=Profile
target.Subsystem_Connections.list=ca1,drm1,tks1
target.Subsystem_Connections.pattern=conn\.$name\..*
+target.Subsystem_Connections.displayname=Subsystem Connection
target.Profile_Mappings.list=enroll,format,pinReset
target.Profile_Mappings.pattern=op\.$name\.mapping\..*
+target.Profile_Mappings.displayname=Profile Mapping
target.Authentication_Sources.list=0,1
target.Authentication_Sources.pattern=auth\.instance\.$name\..*
+target.Authentication_Sources.displayname=Authentication Source
target.Generals.pattern=^applet\..*\|^general\..*\|^failover.pod.enable\|^channel\..*
config.Generals.General.state=Enabled
config.Generals.General.timestamp=1280283607424406
diff --git a/pki/base/tps/src/modules/tokendb/mod_tokendb.cpp b/pki/base/tps/src/modules/tokendb/mod_tokendb.cpp
index 30d87a2ae..fd2c630c3 100644
--- a/pki/base/tps/src/modules/tokendb/mod_tokendb.cpp
+++ b/pki/base/tps/src/modules/tokendb/mod_tokendb.cpp
@@ -4876,6 +4876,7 @@ mod_tokendb_handler( request_rec *rq )
char *pvalues = NULL;
char *large_injection = NULL;
char *pstate = NULL;
+ char *disp_conf_type = NULL;
ptype = get_post_field(post, "ptype", SHORT_LEN);
pname = get_post_field(post, "pname", SHORT_LEN);
@@ -4883,12 +4884,16 @@ mod_tokendb_handler( request_rec *rq )
ptimestamp = get_post_field(post, "ptimestamp", SHORT_LEN);
pvalues = get_post_field_s(post, "pvalues");
+ PR_snprintf( ( char * ) configname, 256, "target.%s.displayname", ptype );
+ disp_conf_type = (char *) RA::GetConfigStore()->GetConfigAsString( configname );
+
large_injection = (char *) PR_Malloc(PL_strlen(pvalues) + MAX_INJECTION_SIZE);
PR_snprintf( large_injection, PL_strlen(pvalues) + MAX_INJECTION_SIZE,
- "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s", JS_START,
+ "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s", JS_START,
"var uriBase = \"", uri, "\";\n",
"var userid = \"", userid, "\";\n",
"var conf_type = \"", ptype, "\";\n",
+ "var disp_conf_type = \"", disp_conf_type, "\";\n",
"var conf_name = \"", pname, "\";\n",
"var conf_state = \"", pstate, "\";\n",
"var conf_tstamp = \"", ptimestamp, "\";\n",
@@ -5025,6 +5030,7 @@ mod_tokendb_handler( request_rec *rq )
ConfigStore *store = NULL;
char *pattern = NULL;
+ char *disp_conf_type = NULL;
int return_done =0;
ptype = get_post_field(post, "ptype", SHORT_LEN);
@@ -5054,11 +5060,15 @@ mod_tokendb_handler( request_rec *rq )
PR_snprintf( ( char * ) configname, 256, "target.%s.pattern", ptype );
pattern = (char *) RA::GetConfigStore()->GetConfigAsString( configname );
+ PR_snprintf( ( char * ) configname, 256, "target.%s.displayname", ptype );
+ disp_conf_type = (char *) RA::GetConfigStore()->GetConfigAsString( configname );
+
PR_snprintf( injection, MAX_INJECTION_SIZE,
- "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s", JS_START,
+ "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s", JS_START,
"var uriBase = \"", uri, "\";\n",
"var userid = \"", userid, "\";\n",
"var conf_type = \"", ptype, "\";\n",
+ "var disp_conf_type = \"", disp_conf_type, "\";\n",
"var conf_name = \"", pname, "\";\n",
"var conf_pattern = \"", pattern, "\";\n");
@@ -5183,6 +5193,7 @@ mod_tokendb_handler( request_rec *rq )
char *pname = NULL;
char *pstate = NULL;
char *ptimestamp = NULL;
+ char *disp_conf_type = NULL;
int return_done = 0;
char *key_values = NULL;
@@ -5220,13 +5231,17 @@ mod_tokendb_handler( request_rec *rq )
key_values = (char *) store->GetOrderedList();
escaped = escapeSpecialChars(key_values);
tokendbDebug( "got ordered list");
-
+
+ PR_snprintf( ( char * ) configname, 256, "target.%s.displayname", ptype );
+ disp_conf_type = (char *) RA::GetConfigStore()->GetConfigAsString( configname );
+
large_injection = (char *) PR_Malloc(PL_strlen(key_values) + MAX_INJECTION_SIZE);
PR_snprintf( large_injection, PL_strlen(key_values) + MAX_INJECTION_SIZE,
- "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s", JS_START,
+ "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s", JS_START,
"var uriBase = \"", uri, "\";\n",
"var userid = \"", userid, "\";\n",
"var conf_type = \"", ptype, "\";\n",
+ "var disp_conf_type = \"", disp_conf_type, "\";\n",
"var conf_name = \"", pname, "\";\n",
"var conf_state = \"", pstate, "\";\n",
"var conf_tstamp = \"", ptimestamp, "\";\n",
@@ -5278,6 +5293,7 @@ mod_tokendb_handler( request_rec *rq )
ConfigStore *store = NULL;
char *large_injection = NULL;
char *pattern = NULL;
+ char *disp_conf_type = NULL;
int return_done = 0;
ptype = get_post_field(post, "ptype", SHORT_LEN);
@@ -5308,13 +5324,17 @@ mod_tokendb_handler( request_rec *rq )
PR_snprintf( ( char * ) configname, 256, "target.%s.pattern", ptype );
pattern = (char *) RA::GetConfigStore()->GetConfigAsString( configname );
+
+ PR_snprintf( ( char * ) configname, 256, "target.%s.displayname", ptype );
+ disp_conf_type = (char *) RA::GetConfigStore()->GetConfigAsString( configname );
large_injection = (char *) PR_Malloc(PL_strlen(key_values) + MAX_INJECTION_SIZE);
PR_snprintf( large_injection, PL_strlen(key_values) + MAX_INJECTION_SIZE,
- "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s", JS_START,
+ "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s", JS_START,
"var uriBase = \"", uri, "\";\n",
"var userid = \"", userid, "\";\n",
"var conf_type = \"", ptype, "\";\n",
+ "var disp_conf_type = \"", disp_conf_type, "\";\n",
"var conf_name = \"", pname, "\";\n",
"var conf_state = \"", pstate, "\";\n",
"var conf_tstamp = \"", ptimestamp, "\";\n",
@@ -5365,6 +5385,7 @@ mod_tokendb_handler( request_rec *rq )
char *large_injection = NULL;
char *pattern = NULL;
+ char *disp_conf_type = NULL;
int return_done = 0;
ptype = get_post_field(post, "ptype", SHORT_LEN);
@@ -5381,13 +5402,18 @@ mod_tokendb_handler( request_rec *rq )
PR_snprintf( ( char * ) configname, 256, "target.%s.pattern", ptype );
pattern = (char *) RA::GetConfigStore()->GetConfigAsString( configname );
+
+ PR_snprintf( ( char * ) configname, 256, "target.%s.displayname", ptype );
+ disp_conf_type = (char *) RA::GetConfigStore()->GetConfigAsString( configname );
+
large_injection = (char *) PR_Malloc(PL_strlen(pvalues) + MAX_INJECTION_SIZE);
PR_snprintf( large_injection, PL_strlen(pvalues) + MAX_INJECTION_SIZE,
- "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s", JS_START,
+ "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s", JS_START,
"var uriBase = \"", uri, "\";\n",
"var userid = \"", userid, "\";\n",
"var conf_type = \"", ptype, "\";\n",
+ "var disp_conf_type = \"", disp_conf_type, "\";\n",
"var conf_name = \"", pname, "\";\n",
"var conf_state = \"", pstate, "\";\n",
"var conf_tstamp = \"", ptimestamp, "\";\n",
@@ -5440,6 +5466,7 @@ mod_tokendb_handler( request_rec *rq )
char *escaped_added_str = NULL;
char *escaped_changed_str = NULL;
char *escaped_pvalues = NULL;
+ char *disp_conf_type = NULL;
int return_done=0;
char flash[512]="";
@@ -5538,16 +5565,20 @@ mod_tokendb_handler( request_rec *rq )
escaped_added_str = escapeString(added_str);
escaped_changed_str = escapeString(changed_str);
+ PR_snprintf( ( char * ) configname, 256, "target.%s.displayname", ptype );
+ disp_conf_type = (char *) RA::GetConfigStore()->GetConfigAsString( configname );
+
if ((PL_strlen(escaped_added_str) + PL_strlen(escaped_changed_str) + PL_strlen(escaped_deleted_str))!=0) {
int injection_size = PL_strlen(escaped_deleted_str) + PL_strlen(escaped_pvalues) + PL_strlen(escaped_added_str) +
PL_strlen(escaped_changed_str) + MAX_INJECTION_SIZE;
char * large_injection = (char *) PR_Malloc(injection_size);
PR_snprintf( large_injection, injection_size,
- "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s", JS_START,
+ "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s", JS_START,
"var uriBase = \"", uri, "\";\n",
"var userid = \"", userid, "\";\n",
"var conf_type = \"", ptype, "\";\n",
+ "var disp_conf_type = \"", disp_conf_type, "\";\n",
"var conf_name = \"", pname, "\";\n",
"var conf_tstamp = \"", ptimestamp, "\";\n",
"var conf_state = \"", cur_state, "\";\n",
@@ -7370,6 +7401,7 @@ mod_tokendb_handler( request_rec *rq )
RA::Audit(EV_AUTHZ_SUCCESS, AUDIT_MSG_AUTHZ, userid, "agent_select_config", "Success", "Tokendb user authorization");
char *conf_type = NULL;
+ char *disp_conf_type = NULL;
conf_type = get_field(query, "type=", SHORT_LEN);
if (conf_type == NULL) {
@@ -7392,11 +7424,16 @@ mod_tokendb_handler( request_rec *rq )
PR_snprintf( ( char * ) configname, 256, "target.%s.list", conf_type );
const char *conf_list = RA::GetConfigStore()->GetConfigAsString( configname );
+
+ PR_snprintf( ( char * ) configname, 256, "target.%s.displayname", conf_type );
+ disp_conf_type = (char *) RA::GetConfigStore()->GetConfigAsString( configname );
+
PR_snprintf( injection, MAX_INJECTION_SIZE,
- "%s%s%s%s%s%s%s%s%s%s%s%s%s", JS_START,
+ "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s", JS_START,
"var uriBase = \"", uri, "\";\n",
"var userid = \"", userid, "\";\n",
"var conf_type = \"", conf_type, "\";\n",
+ "var disp_conf_type = \"", disp_conf_type, "\";\n",
"var conf_list = \"", (conf_list != NULL)? conf_list : "", "\";\n");
do_free(conf_type);
@@ -7430,11 +7467,16 @@ mod_tokendb_handler( request_rec *rq )
PR_snprintf( ( char * ) configname, 256,
"target.%s.list", conf_type );
const char *conf_list = RA::GetConfigStore()->GetConfigAsString( configname );
+
+ PR_snprintf( ( char * ) configname, 256, "target.%s.displayname", conf_type );
+ const char *disp_conf_type = (char *) RA::GetConfigStore()->GetConfigAsString( configname );
+
PR_snprintf( injection, MAX_INJECTION_SIZE,
- "%s%s%s%s%s%s%s%s%s%s%s%s%s", JS_START,
+ "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s", JS_START,
"var uriBase = \"", uri, "\";\n",
"var userid = \"", userid, "\";\n",
"var conf_type = \"", conf_type, "\";\n",
+ "var disp_conf_type = \"", disp_conf_type, "\";\n",
"var conf_list = \"", (conf_list != NULL)? conf_list : "", "\";\n");
do_free(conf_type);