diff options
author | Rob Crittenden <rcritten@redhat.com> | 2012-01-10 17:40:55 -0500 |
---|---|---|
committer | Simo Sorce <ssorce@redhat.com> | 2012-01-11 12:04:23 -0500 |
commit | 1dadd06067acbf21ce1bd2ca73c082b21f907579 (patch) | |
tree | b183b6230d9caf51374b6f7ee6a59ef2d2747a92 /daemons | |
parent | 39d0488f1b0d025cc8c7de3229228cc6a6fac6eb (diff) | |
download | freeipa.git-1dadd06067acbf21ce1bd2ca73c082b21f907579.tar.gz freeipa.git-1dadd06067acbf21ce1bd2ca73c082b21f907579.tar.xz freeipa.git-1dadd06067acbf21ce1bd2ca73c082b21f907579.zip |
Remove ipa_get_random_salt() from ipapwd_encoding.c
This appeared only in the 2.1 branch and is not needed
Diffstat (limited to 'daemons')
-rw-r--r-- | daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd_encoding.c | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd_encoding.c b/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd_encoding.c index e11caef9..8e59e19c 100644 --- a/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd_encoding.c +++ b/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd_encoding.c @@ -102,36 +102,6 @@ void ipapwd_keyset_free(struct ipapwd_keyset **pkset) *pkset = NULL; } -static krb5_error_code ipa_get_random_salt(krb5_context krbctx, - krb5_data *salt) -{ - krb5_error_code kerr; - int i, v; - - /* make random salt */ - salt->length = KRB5P_SALT_SIZE; - salt->data = malloc(KRB5P_SALT_SIZE); - if (!salt->data) { - return ENOMEM; - } - kerr = krb5_c_random_make_octets(krbctx, salt); - if (kerr) { - return kerr; - } - - /* Windows treats the salt as a string. - * To avoid any compatibility issue, limits octects only to - * the ASCII printable range, or 0x20 <= val <= 0x7E */ - for (i = 0; i < salt->length; i++) { - v = (unsigned char)salt->data[i]; - v %= 0x5E; /* 7E - 20 */ - v += 0x20; /* add base */ - salt->data[i] = v; - } - - return 0; -} - static Slapi_Value **encrypt_encode_key(struct ipapwd_krbcfg *krbcfg, struct ipapwd_data *data, char **errMesg) |