8cffd2
From 0c9f411efb7fb7bd7df5f07f2225af3f75bdf342 Mon Sep 17 00:00:00 2001
8cffd2
From: Alexander Bokovoy <abokovoy@redhat.com>
8cffd2
Date: Wed, 24 Feb 2021 20:51:40 +0200
8cffd2
Subject: [PATCH] ipa-kdb: add missing prototypes
8cffd2
8cffd2
On Fedora 33 GCC defaults to -Wmissing-prototypes and emits warnings
8cffd2
about function prototypes missing. If -Werror is specified, this breaks
8cffd2
compilation.
8cffd2
8cffd2
We also default to -Werror=implicit-function-declaration
8cffd2
8cffd2
Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
8cffd2
Reviewed-By: Robbie Harwood <rharwood@redhat.com>
8cffd2
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
8cffd2
Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
8cffd2
---
8cffd2
 daemons/ipa-kdb/ipa_kdb_mspac.c         | 20 ++++++++++++--------
8cffd2
 daemons/ipa-kdb/ipa_kdb_mspac_private.h |  4 ++++
8cffd2
 2 files changed, 16 insertions(+), 8 deletions(-)
8cffd2
8cffd2
diff --git a/daemons/ipa-kdb/ipa_kdb_mspac.c b/daemons/ipa-kdb/ipa_kdb_mspac.c
8cffd2
index 9f95d0dc407df4566467f2b4a960086a7d940bcc..b6e7516859ce59232364f6ae93dee3063914ecf4 100644
8cffd2
--- a/daemons/ipa-kdb/ipa_kdb_mspac.c
8cffd2
+++ b/daemons/ipa-kdb/ipa_kdb_mspac.c
8cffd2
@@ -2325,9 +2325,10 @@ void ipadb_mspac_struct_free(struct ipadb_mspac **mspac)
8cffd2
     *mspac = NULL;
8cffd2
 }
8cffd2
 
8cffd2
-krb5_error_code ipadb_adtrusts_fill_sid_blacklist(char **source_sid_blacklist,
8cffd2
-                                                  struct dom_sid **result_sids,
8cffd2
-                                                  int *result_length)
8cffd2
+static krb5_error_code
8cffd2
+ipadb_adtrusts_fill_sid_blacklist(char **source_sid_blacklist,
8cffd2
+                                  struct dom_sid **result_sids,
8cffd2
+                                  int *result_length)
8cffd2
 {
8cffd2
     int len, i;
8cffd2
     char **source;
8cffd2
@@ -2358,9 +2359,10 @@ krb5_error_code ipadb_adtrusts_fill_sid_blacklist(char **source_sid_blacklist,
8cffd2
     return 0;
8cffd2
 }
8cffd2
 
8cffd2
-krb5_error_code ipadb_adtrusts_fill_sid_blacklists(struct ipadb_adtrusts *adtrust,
8cffd2
-                                                   char **sid_blacklist_incoming,
8cffd2
-                                                   char **sid_blacklist_outgoing)
8cffd2
+static krb5_error_code
8cffd2
+ipadb_adtrusts_fill_sid_blacklists(struct ipadb_adtrusts *adtrust,
8cffd2
+                                   char **sid_blacklist_incoming,
8cffd2
+                                   char **sid_blacklist_outgoing)
8cffd2
 {
8cffd2
     krb5_error_code kerr;
8cffd2
 
8cffd2
@@ -2381,7 +2383,8 @@ krb5_error_code ipadb_adtrusts_fill_sid_blacklists(struct ipadb_adtrusts *adtrus
8cffd2
     return 0;
8cffd2
 }
8cffd2
 
8cffd2
-krb5_error_code ipadb_mspac_check_trusted_domains(struct ipadb_context *ipactx)
8cffd2
+static krb5_error_code
8cffd2
+ipadb_mspac_check_trusted_domains(struct ipadb_context *ipactx)
8cffd2
 {
8cffd2
     char *attrs[] = { NULL };
8cffd2
     char *filter = "(objectclass=ipaNTTrustedDomain)";
8cffd2
@@ -2426,7 +2429,8 @@ static void ipadb_free_sid_blacklists(char ***sid_blacklist_incoming, char ***si
8cffd2
     }
8cffd2
 }
8cffd2
 
8cffd2
-krb5_error_code ipadb_mspac_get_trusted_domains(struct ipadb_context *ipactx)
8cffd2
+static krb5_error_code
8cffd2
+ipadb_mspac_get_trusted_domains(struct ipadb_context *ipactx)
8cffd2
 {
8cffd2
     struct ipadb_adtrusts *t;
8cffd2
     LDAP *lc = ipactx->lcontext;
8cffd2
diff --git a/daemons/ipa-kdb/ipa_kdb_mspac_private.h b/daemons/ipa-kdb/ipa_kdb_mspac_private.h
8cffd2
index 30382d2eefaeddc6d5aff38553fb4668e0173201..82397cc40febfef91f8f58cb643daaa5b9b1d6d9 100644
8cffd2
--- a/daemons/ipa-kdb/ipa_kdb_mspac_private.h
8cffd2
+++ b/daemons/ipa-kdb/ipa_kdb_mspac_private.h
8cffd2
@@ -52,3 +52,7 @@ struct ipadb_adtrusts {
8cffd2
 
8cffd2
 int string_to_sid(const char *str, struct dom_sid *sid);
8cffd2
 char *dom_sid_string(TALLOC_CTX *memctx, const struct dom_sid *dom_sid);
8cffd2
+krb5_error_code filter_logon_info(krb5_context context, TALLOC_CTX *memctx,
8cffd2
+                                  krb5_data realm, struct PAC_LOGON_INFO_CTR *info);
8cffd2
+void get_authz_data_types(krb5_context context, krb5_db_entry *entry,
8cffd2
+                          bool *_with_pac, bool *_with_pad);
8cffd2
\ No newline at end of file
8cffd2
-- 
8cffd2
2.26.3
8cffd2