s4-auth/kerberos: Rename create_keytab() to smb_krb5_fill_keytab()
authorAndrew Bartlett <abartlet@samba.org>
Tue, 19 Dec 2023 22:08:57 +0000 (11:08 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 14 Mar 2024 22:06:39 +0000 (22:06 +0000)
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jo Sutton <josutton@catalyst.net.nz>
source4/auth/kerberos/srv_keytab.c

index 7b28c37a5c6360b88ac4dbaeb15496c117e346bf..024fab547296f503af4cc08d467b2b1dcc9eaa0a 100644 (file)
@@ -114,18 +114,22 @@ static krb5_error_code keytab_add_keys(TALLOC_CTX *parent_ctx,
        return 0;
 }
 
-static krb5_error_code create_keytab(TALLOC_CTX *parent_ctx,
-                                    const char *saltPrincipal,
-                                    int kvno,
-                                    const char *new_secret,
-                                    const char *old_secret,
-                                    uint32_t supp_enctypes,
-                                    uint32_t num_principals,
-                                    krb5_principal *principals,
-                                    krb5_context context,
-                                    krb5_keytab keytab,
-                                    bool add_old,
-                                    const char **perror_string)
+/*
+ * This is the inner part of smb_krb5_update_keytab on an open keytab
+ * and without the deletion
+ */
+static krb5_error_code smb_krb5_fill_keytab(TALLOC_CTX *parent_ctx,
+                                           const char *saltPrincipal,
+                                           int kvno,
+                                           const char *new_secret,
+                                           const char *old_secret,
+                                           uint32_t supp_enctypes,
+                                           uint32_t num_principals,
+                                           krb5_principal *principals,
+                                           krb5_context context,
+                                           krb5_keytab keytab,
+                                           bool add_old,
+                                           const char **perror_string)
 {
        krb5_error_code ret;
        krb5_principal salt_princ = NULL;
@@ -314,7 +318,7 @@ krb5_error_code smb_krb5_update_keytab(TALLOC_CTX *parent_ctx,
                        goto done;
                }
 
-               ret = create_keytab(tmp_ctx,
+               ret = smb_krb5_fill_keytab(tmp_ctx,
                                    saltPrincipal,
                                    kvno, new_secret, old_secret,
                                    supp_enctypes,