diff options
author | awnuk <awnuk@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2011-09-21 00:32:17 +0000 |
---|---|---|
committer | awnuk <awnuk@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2011-09-21 00:32:17 +0000 |
commit | 65fe5e7f5e9f565156063f44909edf0119f1f008 (patch) | |
tree | ac3f75f3ebaeec0476e0f34169e27d2ff10cda90 /pki/base/tps/src/tus/tus_db.c | |
parent | b706cce5d6b09e01a9c9df7aae0c8122c0e48bac (diff) | |
download | pki-65fe5e7f5e9f565156063f44909edf0119f1f008.tar.gz pki-65fe5e7f5e9f565156063f44909edf0119f1f008.tar.xz pki-65fe5e7f5e9f565156063f44909edf0119f1f008.zip |
Fixed bugzilla bug #737184.
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@2216 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
Diffstat (limited to 'pki/base/tps/src/tus/tus_db.c')
-rw-r--r-- | pki/base/tps/src/tus/tus_db.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/pki/base/tps/src/tus/tus_db.c b/pki/base/tps/src/tus/tus_db.c index 286a7edf5..30c59327e 100644 --- a/pki/base/tps/src/tus/tus_db.c +++ b/pki/base/tps/src/tus/tus_db.c @@ -1324,7 +1324,7 @@ TPS_PUBLIC int update_user_db_entry(const char *agentid, char *uid, char *lastNa a03.mod_op = LDAP_MOD_REPLACE; a03.mod_type = USER_GIVENNAME; - a03.mod_values = givenName_values; + a03.mod_values = ((firstName != NULL && PL_strlen(firstName) > 0)? givenName_values: NULL); mods[0] = &a01; mods[1] = &a02; @@ -2283,7 +2283,9 @@ TPS_PUBLIC int add_user_db_entry(const char *agentid, char *userid, char *userPa mods[2] = &a03; mods[3] = &a04; mods[4] = &a05; - mods[5] = &a06; + if (givenName != NULL && PL_strlen(givenName) > 0) { + mods[5] = &a06; + } // now handle certificate certlen = strlen(userCert); @@ -2310,8 +2312,15 @@ TPS_PUBLIC int add_user_db_entry(const char *agentid, char *userid, char *userPa a07.mod_type = USER_CERT; a07.mod_bvalues = userCert_values; - mods[6] = &a07; + if (givenName != NULL && PL_strlen(givenName) > 0) { + mods[6] = &a07; + } else { + mods[5] = &a07; + } } else { + if (givenName == NULL || PL_strlen(givenName) == 0) { + mods[5] = NULL; + } mods[6] = NULL; } |