krb5_wrap: Rename krb5_copy_data_contents()
authorAndreas Schneider <asn@samba.org>
Fri, 26 Aug 2016 09:57:30 +0000 (11:57 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 31 Aug 2016 18:59:13 +0000 (20:59 +0200)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
lib/krb5_wrap/krb5_samba.c
lib/krb5_wrap/krb5_samba.h
source4/kdc/db-glue.c
source4/kdc/pac-glue.c
source4/kdc/sdb_to_hdb.c
source4/kdc/wdc-samba4.c

index b8c1d63..c636fb0 100644 (file)
@@ -836,10 +836,9 @@ void smb_krb5_free_data_contents(krb5_context context, krb5_data *pdata)
  *
  * Caller has to free krb5_data with smb_krb5_free_data_contents().
  */
-
-krb5_error_code krb5_copy_data_contents(krb5_data *p,
-                                       const void *data,
-                                       size_t len)
+krb5_error_code smb_krb5_copy_data_contents(krb5_data *p,
+                                           const void *data,
+                                           size_t len)
 {
 #if defined(HAVE_KRB5_DATA_COPY)
        return krb5_data_copy(p, data, len);
@@ -2789,9 +2788,9 @@ krb5_error_code smb_krb5_principal_set_realm(krb5_context context,
 
        old_data = krb5_princ_realm(context, principal);
 
-       ret = krb5_copy_data_contents(&data,
-                                     realm,
-                                     strlen(realm));
+       ret = smb_krb5_copy_data_contents(&data,
+                                         realm,
+                                         strlen(realm));
        if (ret) {
                return ret;
        }
index e28bb73..7840631 100644 (file)
@@ -388,9 +388,9 @@ char *smb_krb5_principal_get_comp_string(TALLOC_CTX *mem_ctx,
                                         krb5_const_principal principal,
                                         unsigned int component);
 
-krb5_error_code krb5_copy_data_contents(krb5_data *p,
-                                       const void *data,
-                                       size_t len);
+krb5_error_code smb_krb5_copy_data_contents(krb5_data *p,
+                                           const void *data,
+                                           size_t len);
 
 int smb_krb5_principal_get_type(krb5_context context,
                                krb5_const_principal principal);
index 5884607..91c34a2 100644 (file)
@@ -498,9 +498,9 @@ static krb5_error_code samba_kdc_message2entry_keys(krb5_context context,
 
                                key.salt->type = KRB5_PW_SALT;
 
-                               ret = krb5_copy_data_contents(&key.salt->salt,
-                                                             salt.data,
-                                                             salt.length);
+                               ret = smb_krb5_copy_data_contents(&key.salt->salt,
+                                                                 salt.data,
+                                                                 salt.length);
                                if (ret) {
                                        free(key.salt);
                                        key.salt = NULL;
@@ -556,9 +556,9 @@ static krb5_error_code samba_kdc_message2entry_keys(krb5_context context,
 
                                key.salt->type = KRB5_PW_SALT;
 
-                               ret = krb5_copy_data_contents(&key.salt->salt,
-                                                             salt.data,
-                                                             salt.length);
+                               ret = smb_krb5_copy_data_contents(&key.salt->salt,
+                                                                 salt.data,
+                                                                 salt.length);
                                if (ret) {
                                        free(key.salt);
                                        key.salt = NULL;
index b232f6a..99140fc 100644 (file)
@@ -432,18 +432,18 @@ krb5_error_code samba_make_krb5_pac(krb5_context context,
                return 0;
        }
 
-       ret = krb5_copy_data_contents(&logon_data,
-                                     logon_blob->data,
-                                     logon_blob->length);
+       ret = smb_krb5_copy_data_contents(&logon_data,
+                                         logon_blob->data,
+                                         logon_blob->length);
        if (ret != 0) {
                return ret;
        }
 
        ZERO_STRUCT(cred_data);
        if (cred_blob != NULL) {
-               ret = krb5_copy_data_contents(&cred_data,
-                                             cred_blob->data,
-                                             cred_blob->length);
+               ret = smb_krb5_copy_data_contents(&cred_data,
+                                                 cred_blob->data,
+                                                 cred_blob->length);
                if (ret != 0) {
                        smb_krb5_free_data_contents(context, &logon_data);
                        return ret;
@@ -452,9 +452,9 @@ krb5_error_code samba_make_krb5_pac(krb5_context context,
 
        ZERO_STRUCT(upn_data);
        if (upn_blob != NULL) {
-               ret = krb5_copy_data_contents(&upn_data,
-                                             upn_blob->data,
-                                             upn_blob->length);
+               ret = smb_krb5_copy_data_contents(&upn_data,
+                                                 upn_blob->data,
+                                                 upn_blob->length);
                if (ret != 0) {
                        smb_krb5_free_data_contents(context, &logon_data);
                        smb_krb5_free_data_contents(context, &cred_data);
@@ -464,9 +464,9 @@ krb5_error_code samba_make_krb5_pac(krb5_context context,
 
        ZERO_STRUCT(deleg_data);
        if (deleg_blob != NULL) {
-               ret = krb5_copy_data_contents(&deleg_data,
-                                             deleg_blob->data,
-                                             deleg_blob->length);
+               ret = smb_krb5_copy_data_contents(&deleg_data,
+                                                 deleg_blob->data,
+                                                 deleg_blob->length);
                if (ret != 0) {
                        smb_krb5_free_data_contents(context, &logon_data);
                        smb_krb5_free_data_contents(context, &cred_data);
index 7ac0b0e..7ec4046 100644 (file)
@@ -72,7 +72,7 @@ static int sdb_salt_to_Salt(const struct sdb_salt *s, Salt *h)
        int ret;
 
        h->type = s->type;
-       ret = krb5_copy_data_contents(&h->salt, s->salt.data, s->salt.length);
+       ret = smb_krb5_copy_data_contents(&h->salt, s->salt.data, s->salt.length);
        if (ret != 0) {
                free_Salt(h);
                return ENOMEM;
@@ -97,9 +97,9 @@ static int sdb_key_to_Key(const struct sdb_key *s, Key *h)
        }
 
        h->key.keytype = s->key.keytype;
-       rc = krb5_copy_data_contents(&h->key.keyvalue,
-                                     s->key.keyvalue.data,
-                                     s->key.keyvalue.length);
+       rc = smb_krb5_copy_data_contents(&h->key.keyvalue,
+                                        s->key.keyvalue.data,
+                                        s->key.keyvalue.length);
        if (rc != 0) {
                goto error_nomem;
        }
index 0b15734..b90578c 100644 (file)
@@ -429,9 +429,9 @@ static krb5_error_code samba_wdc_reget_pac(void *priv, krb5_context context,
                }
 
                if (type_blob.length != 0) {
-                       ret = krb5_copy_data_contents(&type_data,
-                                                     type_blob.data,
-                                                     type_blob.length);
+                       ret = smb_krb5_copy_data_contents(&type_data,
+                                                         type_blob.data,
+                                                         type_blob.length);
                        if (ret != 0) {
                                SAFE_FREE(types);
                                krb5_pac_free(context, new_pac);