diff options
author | Jack Magne <jmagne@dhcp-32-224.sjc.redhat.com> | 2012-08-30 17:23:11 -0700 |
---|---|---|
committer | Jack Magne <jmagne@dhcp-32-224.sjc.redhat.com> | 2012-08-30 17:25:40 -0700 |
commit | e9ab0ec12bc7e22857850a6a183df825154971d4 (patch) | |
tree | 63fe414bdc307b4591b16e68f593afa04fe11b5a /base/tps/src/tus/tus_db.c | |
parent | 99c05ac83888005a1aa3a1c31fe77d8ee5e36c42 (diff) | |
download | pki-e9ab0ec12bc7e22857850a6a183df825154971d4.tar.gz pki-e9ab0ec12bc7e22857850a6a183df825154971d4.tar.xz pki-e9ab0ec12bc7e22857850a6a183df825154971d4.zip |
Bug 844800 - TPS should provide the ability to not allow tokens marked as 'Terminated' to be formatted and reused.
Diffstat (limited to 'base/tps/src/tus/tus_db.c')
-rw-r--r-- | base/tps/src/tus/tus_db.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/base/tps/src/tus/tus_db.c b/base/tps/src/tus/tus_db.c index c865bc371..9ae451415 100644 --- a/base/tps/src/tus/tus_db.c +++ b/base/tps/src/tus/tus_db.c @@ -4209,7 +4209,7 @@ TPS_PUBLIC int is_tus_db_entry_disabled(char *cn) LDAPMessage *result = NULL; LDAPMessage *e = NULL; struct berval **v = NULL; - int disabled = 0; + int disabled = 1; int rc = -1; if (cn != NULL && PL_strlen(cn) > 0) { @@ -4218,8 +4218,9 @@ TPS_PUBLIC int is_tus_db_entry_disabled(char *cn) if (e != NULL) { if ((v = ldap_get_values_len(ld, e, TOKEN_STATUS)) != NULL) { if ((valid_berval(v)) && (PL_strlen(v[0]->bv_val) > 0)) { - if (!PL_strcasecmp(v[0]->bv_val, STATE_DISABLED)) { - disabled = 1; + if (!PL_strcasecmp(v[0]->bv_val, STATE_ACTIVE) || + !PL_strcasecmp(v[0], STATE_UNINITIALIZED)) { + disabled = 0; } } if( v != NULL ) { |