[PATCH] Remove redundant prototypes

Lukas Slebodnik lslebodn at redhat.com
Sat Sep 17 21:29:34 UTC 2016


ehlo,

I tried to build sssd with warning -Wredundant-decls
but there were some warnings caused by public samba header files.

I tried to enable warning in buildtools.
e.g.
diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py
index 795d130..098cc3d 100644
--- a/buildtools/wafsamba/samba_autoconf.py
+++ b/buildtools/wafsamba/samba_autoconf.py
@@ -709,6 +709,7 @@ def SAMBA_CONFIG_H(conf, path=None):
 
         conf.ADD_CFLAGS('-Wformat=2 -Wno-format-y2k', testflags=True)
         conf.ADD_CFLAGS('-Werror=format-security -Wformat-security', testflags=True)
+        conf.ADD_CFLAGS('-Wredundant-decls', testflags=True)
         # This check is because for ldb_search(), a NULL format string
         # is not an error, but some compilers complain about that.
         if CHECK_CFLAGS(conf, ["-Werror=format", "-Wformat=2"], '''

But I not think it would be very usefull because
there are still lots of this warnings.
Many of them are in heimdal code and I was not able to
pursuade waf to disable warnings there (add -Wno-redundant-decls to
heimdal subsystem).




There are also bunch of warnings caused by ndr/ and gen_ndr/
e.g.
In file included from ../bin/default/librpc/gen_ndr/ndr_negoex.h:9:0,
                 from default/librpc/gen_ndr/ndr_negoex.c:4:
../librpc/../librpc/ndr/ndr_negoex.h:30:28: note: previous declaration of ‘ndr_push_negoex_EXTENSION_VECTOR’ was here
 _PUBLIC_ enum ndr_err_code ndr_push_negoex_EXTENSION_VECTOR(struct ndr_push *ndr, int ndr_flags, const struct negoex_EXTENSION_VECTOR *r);
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from default/librpc/gen_ndr/ndr_negoex.c:4:0:
../bin/default/librpc/gen_ndr/ndr_negoex.h:32:19: warning: redundant redeclaration of ‘ndr_pull_negoex_EXTENSION_VECTOR’ [-Wredundant-decls]
 enum ndr_err_code ndr_pull_negoex_EXTENSION_VECTOR(struct ndr_pull *ndr, int ndr_flags, struct negoex_EXTENSION_VECTOR *r);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Another source of warnings are in source3 code.
e.g.
The same prototype of functions are in source3/include/proto.h
and lib/util/samba_util.h. But they are included at the same time.

In file included from ../source3/include/includes.h:339:0,
                 from default/source3/librpc/gen_ndr/ndr_open_files.c:3:
../source3/include/proto.h:52:8: warning: redundant redeclaration of ‘ucs2_align’ [-Wredundant-decls]
 size_t ucs2_align(const void *base_ptr, const void *p, int flags);
        ^~~~~~~~~~
In file included from ../source3/include/includes.h:304:0,
                 from default/source3/librpc/gen_ndr/ndr_open_files.c:3:
../source3/../lib/util/samba_util.h:276:17: note: previous declaration of ‘ucs2_align’ was here
 _PUBLIC_ size_t ucs2_align(const void *base_ptr, const void *p, int flags);
                 ^~~~~~~~~~



Most of attached patches fix warnings in public header files.

LS
-------------- next part --------------
From 3bc840e807161eb6df72ad1b707b519ed68edf09 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn at redhat.com>
Date: Sat, 17 Sep 2016 14:56:25 +0200
Subject: [PATCH 01/12] charset: Remove redundant prototype of strchr_m
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

/usr/include/samba-4.0/charset.h:141:7:
     warning: redundant redeclaration of ‘strchr_m’ [-Wredundant-decls]
 char *strchr_m(const char *s, char c);
       ^~~~~~~~
/usr/include/samba-4.0/charset.h:96:7:
     note: previous declaration of ‘strchr_m’ was here
 char *strchr_m(const char *s, char c);
       ^~~~~~~~

Signed-off-by: Lukas Slebodnik <lslebodn at redhat.com>
---
 lib/util/charset/charset.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/lib/util/charset/charset.h b/lib/util/charset/charset.h
index ca7a4377455bd846a978c4135f1266371640bec1..dd60b42ace7d992ac9ed36a097f39005ef85698c 100644
--- a/lib/util/charset/charset.h
+++ b/lib/util/charset/charset.h
@@ -93,7 +93,6 @@ typedef struct smb_iconv_s {
 struct loadparm_context;
 struct smb_iconv_handle;
 
-char *strchr_m(const char *s, char c);
 /**
  * Calculate the number of units (8 or 16-bit, depending on the
  * destination charset), that would be needed to convert the input
-- 
2.9.3


From 2a1b93bb718489ab44f3900a326eab2bc6c42241 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn at redhat.com>
Date: Sat, 17 Sep 2016 14:59:04 +0200
Subject: [PATCH 02/12] libndr: Remove redundant prototype of
 ndr_print_bitmap_flag
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

/usr/include/samba-4.0/ndr.h:639:6:
    warning: redundant redeclaration of ‘ndr_print_bitmap_flag’
             [-Wredundant-decls]
 void ndr_print_bitmap_flag(struct ndr_print *ndr, size_t size,
                            const char *flag_name, uint32_t flag,
                            uint32_t value);
      ^~~~~~~~~~~~~~~~~~~~~
/usr/include/samba-4.0/ndr.h:638:6:
    note: previous declaration of ‘ndr_print_bitmap_flag’ was here
 void ndr_print_bitmap_flag(struct ndr_print *ndr, size_t size,
                            const char *flag_name, uint32_t flag,
                            uint32_t value);

Signed-off-by: Lukas Slebodnik <lslebodn at redhat.com>
---
 librpc/ndr/libndr.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/librpc/ndr/libndr.h b/librpc/ndr/libndr.h
index 0c3c55a9bf2ca7857599d04f3115f59927e7ff18..155222a2dbba377bfc55e6471a8356f28976ca3e 100644
--- a/librpc/ndr/libndr.h
+++ b/librpc/ndr/libndr.h
@@ -636,7 +636,6 @@ void ndr_print_struct(struct ndr_print *ndr, const char *name, const char *type)
 void ndr_print_null(struct ndr_print *ndr);
 void ndr_print_enum(struct ndr_print *ndr, const char *name, const char *type, const char *val, uint32_t value);
 void ndr_print_bitmap_flag(struct ndr_print *ndr, size_t size, const char *flag_name, uint32_t flag, uint32_t value);
-void ndr_print_bitmap_flag(struct ndr_print *ndr, size_t size, const char *flag_name, uint32_t flag, uint32_t value);
 void ndr_print_ptr(struct ndr_print *ndr, const char *name, const void *p);
 void ndr_print_union(struct ndr_print *ndr, const char *name, int level, const char *type);
 void ndr_print_bad_level(struct ndr_print *ndr, const char *name, uint16_t level);
-- 
2.9.3


From 03a493cb1624735ca5d54c3a04e675935095e237 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn at redhat.com>
Date: Sat, 17 Sep 2016 16:27:15 +0200
Subject: [PATCH 03/12] ldb: Remove redundant declaration of
 ldb_modules_list_from_string
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The function ldb_modules_list_from_string is public
but was also declared in ldb_private.h

sh$ objdump -T /usr/lib64/libldb.so | grep ldb_modules_list_from_string
00000000000081b0 g    DF .text  00000000000001da  LDB_0.9.10  ldb_modules_list_from_string

In file included from ../lib/ldb/common/ldb_modules.c:34:0:
../lib/ldb/include/ldb_private.h:179:14: warning:
    redundant redeclaration of ‘ldb_modules_list_from_string’
    [-Wredundant-decls]
 const char **ldb_modules_list_from_string(struct ldb_context *ldb,
                                           TALLOC_CTX *mem_ctx,
                                           const char *string);
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../lib/ldb/include/ldb_private.h:44:0,
                 from ../lib/ldb/common/ldb_modules.c:34:
../lib/ldb/include/ldb_module.h:332:14:
    note: previous declaration of ‘ldb_modules_list_from_string’ was here
 const char **ldb_modules_list_from_string(struct ldb_context *ldb,
                                           TALLOC_CTX *mem_ctx,
                                           const char *string);
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Lukas Slebodnik <lslebodn at redhat.com>
---
 lib/ldb/include/ldb_private.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/lib/ldb/include/ldb_private.h b/lib/ldb/include/ldb_private.h
index 26a9d426afb857103c6008e29f0f34b3a1fb14a7..267a4616e56053429d1598e6ca3451c8ad096f4e 100644
--- a/lib/ldb/include/ldb_private.h
+++ b/lib/ldb/include/ldb_private.h
@@ -176,7 +176,6 @@ void ldb_dump_results(struct ldb_context *ldb, struct ldb_result *result, FILE *
 
 /* The following definitions come from lib/ldb/common/ldb_modules.c  */
 
-const char **ldb_modules_list_from_string(struct ldb_context *ldb, TALLOC_CTX *mem_ctx, const char *string);
 int ldb_load_modules(struct ldb_context *ldb, const char *options[]);
 
 struct ldb_val ldb_binary_decode(TALLOC_CTX *mem_ctx, const char *str);
-- 
2.9.3


From 7c70ad7c1a3da44b3735e773af63b0091bf3e92e Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn at redhat.com>
Date: Sat, 17 Sep 2016 16:30:24 +0200
Subject: [PATCH 04/12] ldb: Remove redundant declaration
 ldb_default_modules_dir

The prorotype of the functions ldb_default_modules_dir
was twice in ldb_module.h

Signed-off-by: Lukas Slebodnik <lslebodn at redhat.com>
---
 lib/ldb/include/ldb_module.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/lib/ldb/include/ldb_module.h b/lib/ldb/include/ldb_module.h
index 833d5a8f3d07d380ff030e0943b8884f070aa468..ff07e692bb5aee79caf41bfd0d734fc88459e513 100644
--- a/lib/ldb/include/ldb_module.h
+++ b/lib/ldb/include/ldb_module.h
@@ -202,8 +202,6 @@ struct ldb_backend_ops {
 	ldb_connect_fn connect_fn;
 };
 
-const char *ldb_default_modules_dir(void);
-
 int ldb_register_backend(const char *url_prefix, ldb_connect_fn, bool);
 
 struct ldb_handle *ldb_handle_new(TALLOC_CTX *mem_ctx, struct ldb_context *ldb);
-- 
2.9.3


From dd9f0f1ad5f916761eeb1858b071745944842e51 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn at redhat.com>
Date: Sat, 17 Sep 2016 16:31:26 +0200
Subject: [PATCH 05/12] auth: remove redundant prototypes in credentials.h

Signed-off-by: Lukas Slebodnik <lslebodn at redhat.com>
---
 auth/credentials/credentials.h | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/auth/credentials/credentials.h b/auth/credentials/credentials.h
index 523793f090da6d68b6d7b27b50ccda0459eff8ac..9ee8a5f69062075398627a15147e69d795c5b979 100644
--- a/auth/credentials/credentials.h
+++ b/auth/credentials/credentials.h
@@ -246,9 +246,6 @@ NTSTATUS cli_credentials_set_secrets(struct cli_credentials *cred,
 				     char **error_string);
  int cli_credentials_get_kvno(struct cli_credentials *cred);
 
-bool cli_credentials_set_username_callback(struct cli_credentials *cred,
-				  const char *(*username_cb) (struct cli_credentials *));
-
 /**
  * Obtain the client principal for this credentials context.
  * @param cred credentials context
@@ -256,11 +253,6 @@ bool cli_credentials_set_username_callback(struct cli_credentials *cred,
  * @note Return value will never be NULL except by programmer error.
  */
 const char *cli_credentials_get_principal_and_obtained(struct cli_credentials *cred, TALLOC_CTX *mem_ctx, enum credentials_obtained *obtained);
-bool cli_credentials_set_principal(struct cli_credentials *cred, 
-				   const char *val, 
-				   enum credentials_obtained obtained);
-bool cli_credentials_set_principal_callback(struct cli_credentials *cred,
-				  const char *(*principal_cb) (struct cli_credentials *));
 
 /**
  * Obtain the 'old' password for this credentials context (used for join accounts).
@@ -271,8 +263,6 @@ const char *cli_credentials_get_old_password(struct cli_credentials *cred);
 bool cli_credentials_set_old_password(struct cli_credentials *cred, 
 				      const char *val, 
 				      enum credentials_obtained obtained);
-bool cli_credentials_set_domain_callback(struct cli_credentials *cred,
-					 const char *(*domain_cb) (struct cli_credentials *));
 bool cli_credentials_set_realm_callback(struct cli_credentials *cred,
 					const char *(*realm_cb) (struct cli_credentials *));
 bool cli_credentials_set_workstation_callback(struct cli_credentials *cred,
@@ -289,6 +279,5 @@ void *_cli_credentials_callback_data(struct cli_credentials *cred);
 /**
  * Return attached NETLOGON credentials 
  */
-struct netlogon_creds_CredentialState *cli_credentials_get_netlogon_creds(struct cli_credentials *cred);
 
 #endif /* __CREDENTIALS_H__ */
-- 
2.9.3


From ac3d292365c4d9c4a2e24dd5d410155d4b8b4a53 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn at redhat.com>
Date: Sat, 17 Sep 2016 16:32:20 +0200
Subject: [PATCH 06/12] addns: remove redundant prototypes in dns.h

Signed-off-by: Lukas Slebodnik <lslebodn at redhat.com>
---
 lib/addns/dns.h | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/lib/addns/dns.h b/lib/addns/dns.h
index de1897b6e87bef9b1603c729aade9418209488d7..4cee6b9d530e69d89e292c4a3de918b5b14a51b9 100644
--- a/lib/addns/dns.h
+++ b/lib/addns/dns.h
@@ -285,8 +285,6 @@ DNS_ERROR dns_create_tsig_record(TALLOC_CTX *mem_ctx, const char *keyname,
 				 uint16_t mac_length, const uint8_t *mac,
 				 uint16_t original_id, uint16_t error,
 				 struct dns_rrec **prec);
-DNS_ERROR dns_add_rrec(TALLOC_CTX *mem_ctx, struct dns_rrec *rec,
-		       uint16_t *num_records, struct dns_rrec ***records);
 DNS_ERROR dns_create_update_request(TALLOC_CTX *mem_ctx,
 				    const char *domainname,
 				    const char *hostname,
@@ -321,9 +319,6 @@ void dns_unmarshall_buffer(struct dns_buffer *buf, uint8_t *data,
 			   size_t len);
 void dns_unmarshall_uint16(struct dns_buffer *buf, uint16_t *val);
 void dns_unmarshall_uint32(struct dns_buffer *buf, uint32_t *val);
-void dns_unmarshall_domain_name(TALLOC_CTX *mem_ctx,
-				struct dns_buffer *buf,
-				struct dns_domain_name **pname);
 void dns_marshall_domain_name(struct dns_buffer *buf,
 			      const struct dns_domain_name *name);
 void dns_unmarshall_domain_name(TALLOC_CTX *mem_ctx,
-- 
2.9.3


From f0cd80f03acc903b219893d9f38d5c9b738deaa2 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn at redhat.com>
Date: Sat, 17 Sep 2016 16:33:00 +0200
Subject: [PATCH 07/12] util: Remove redundant declaration in debug.h and
 util_net.h

Signed-off-by: Lukas Slebodnik <lslebodn at redhat.com>
---
 lib/util/debug.h    | 1 -
 lib/util/util_net.h | 1 -
 2 files changed, 2 deletions(-)

diff --git a/lib/util/debug.h b/lib/util/debug.h
index 95b0a30b05691653bfc5a2e79a59c9fcac32218e..5eccadd068d552f1cf907692875f05d1e7cd1a17 100644
--- a/lib/util/debug.h
+++ b/lib/util/debug.h
@@ -268,7 +268,6 @@ void force_check_log_size( void );
 bool need_to_check_log_size( void );
 void check_log_size( void );
 void dbgflush( void );
-bool dbghdrclass(int level, int cls, const char *location, const char *func);
 bool debug_get_output_is_stderr(void);
 bool debug_get_output_is_stdout(void);
 void debug_schedule_reopen_logs(void);
diff --git a/lib/util/util_net.h b/lib/util/util_net.h
index 29468b4263d719dc208bb735a28b14459973463a..08aa78920aaab32bf10996e78654e2e7571088be 100644
--- a/lib/util/util_net.h
+++ b/lib/util/util_net.h
@@ -96,7 +96,6 @@ bool same_net(const struct sockaddr *ip1,
 bool sockaddr_equal(const struct sockaddr *ip1,
 		    const struct sockaddr *ip2);
 
-bool is_address_any(const struct sockaddr *psa);
 uint16_t get_sockaddr_port(const struct sockaddr_storage *pss);
 char *print_sockaddr_len(char *dest,
 			 size_t destlen,
-- 
2.9.3


From 228f920e6f396f4bfe4a19c8539fe90755519200 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn at redhat.com>
Date: Sat, 17 Sep 2016 16:42:15 +0200
Subject: [PATCH 08/12] util: Remove redundant declaration of panic_action

The extern variable panic_action was declared in header files
fault.h and samba_util.h but fault.h is included by samba_util.h

Signed-off-by: Lukas Slebodnik <lslebodn at redhat.com>
---
 lib/util/samba_util.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/lib/util/samba_util.h b/lib/util/samba_util.h
index 416fde8aeb03fd2b18e1537061f95690ccace118..52776e8938216c81e16bed1ce1564df2c519838f 100644
--- a/lib/util/samba_util.h
+++ b/lib/util/samba_util.h
@@ -42,8 +42,6 @@
 
 struct smbsrv_tcon;
 
-extern const char *panic_action;
-
 #include "lib/util/time.h"
 #include "lib/util/data_blob.h"
 #include "lib/util/xfile.h"
-- 
2.9.3


From b92287a0f0a326b9337842d8980d5997b36098b7 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn at redhat.com>
Date: Sat, 17 Sep 2016 16:46:49 +0200
Subject: [PATCH 09/12] util: Remove declaration of idr_get_new_random from
 idtree.h

The prototype of idr_get_new_random is in idtree_random.h

Signed-off-by: Lukas Slebodnik <lslebodn at redhat.com>
---
 lib/util/idtree.h | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/lib/util/idtree.h b/lib/util/idtree.h
index e7864a86968cda9dc6f6dab8cf60b77653fa0d1b..79d2d8cd2600f27f0b63ed06cdf77038623969d9 100644
--- a/lib/util/idtree.h
+++ b/lib/util/idtree.h
@@ -51,11 +51,6 @@ int idr_get_new(struct idr_context *idp, void *ptr, int limit);
 int idr_get_new_above(struct idr_context *idp, void *ptr, int starting_id, int limit);
 
 /**
-  allocate a new id randomly in the given range
-*/
-int idr_get_new_random(struct idr_context *idp, void *ptr, int limit);
-
-/**
   find a pointer value previously set with idr_get_new given an id
 */
 void *idr_find(struct idr_context *idp, int id);
-- 
2.9.3


From 6f66a8c2e7662cb00445fe4460b562b4cdc06a10 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn at redhat.com>
Date: Sat, 17 Sep 2016 17:09:30 +0200
Subject: [PATCH 10/12] utit: Remove redundant declaration of
 set_socket_options

The function set_socket_options is already defined in more suitable
header file source4/lib/socket/socket.h

Signed-off-by: Lukas Slebodnik <lslebodn at redhat.com>
---
 lib/util/util_net.c       | 1 +
 lib/util/util_net.h       | 2 --
 libcli/smb/smbXcli_base.c | 1 +
 3 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/util/util_net.c b/lib/util/util_net.c
index cb238adcf5d89dbe29e65b3d9418663301f6659e..b57edea5d33baceb468e781109c030d2f3312090 100644
--- a/lib/util/util_net.c
+++ b/lib/util/util_net.c
@@ -28,6 +28,7 @@
 #include "system/locale.h"
 #include "system/filesys.h"
 #include "lib/util/util_net.h"
+#include "lib/socket/socket.h"
 #undef strcasecmp
 
 /*******************************************************************
diff --git a/lib/util/util_net.h b/lib/util/util_net.h
index 08aa78920aaab32bf10996e78654e2e7571088be..c4e16590dbf5df6d5583be0e2eec4e99f19e3981 100644
--- a/lib/util/util_net.h
+++ b/lib/util/util_net.h
@@ -109,6 +109,4 @@ char *print_canonical_sockaddr(TALLOC_CTX *ctx,
 int get_socket_port(int fd);
 const char *client_socket_addr(int fd, char *addr, size_t addr_len);
 
-void set_socket_options(int fd, const char *options);
-
 #endif /* _SAMBA_UTIL_NET_H_ */
diff --git a/libcli/smb/smbXcli_base.c b/libcli/smb/smbXcli_base.c
index 0a2473ef632d6d965ff58875546330e5378e9b6a..48805aded4bdae553f7696acc24ef5789b20e785 100644
--- a/libcli/smb/smbXcli_base.c
+++ b/libcli/smb/smbXcli_base.c
@@ -26,6 +26,7 @@
 #include "lib/util/util_net.h"
 #include "lib/util/dlinklist.h"
 #include "lib/util/iov_buf.h"
+#include "lib/socket/socket.h"
 #include "../libcli/smb/smb_common.h"
 #include "../libcli/smb/smb_seal.h"
 #include "../libcli/smb/smb_signing.h"
-- 
2.9.3


From f21e82d8d28b084f698e9e2cf90397c8a264850d Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn at redhat.com>
Date: Sat, 17 Sep 2016 17:15:18 +0200
Subject: [PATCH 11/12] auth: Remove redundant declaration of system_session

The function system_session was declared in source4/auth/session.h
and source4/auth/auth.h. But session.h is included in auth.h

Signed-off-by: Lukas Slebodnik <lslebodn at redhat.com>
---
 source4/auth/auth.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/source4/auth/auth.h b/source4/auth/auth.h
index fb486941697ccd9dffcefc1665924d6f476bda89..d379eb72704285f01f0c22bb0c4e996d302c8c12 100644
--- a/source4/auth/auth.h
+++ b/source4/auth/auth.h
@@ -119,7 +119,6 @@ NTSTATUS authsam_account_ok(TALLOC_CTX *mem_ctx,
 			    bool allow_domain_trust,
 			    bool password_change);
 
-struct auth_session_info *system_session(struct loadparm_context *lp_ctx);
 NTSTATUS authsam_make_user_info_dc(TALLOC_CTX *mem_ctx, struct ldb_context *sam_ctx,
 					   const char *netbios_name,
 					   const char *domain_name,
-- 
2.9.3


From 1ad57ff26a0d4dd90e6f81eb86d60bb742cfe81f Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn at redhat.com>
Date: Sat, 17 Sep 2016 17:18:55 +0200
Subject: [PATCH 12/12] auth/kerberos: Remove few redundant prototypes

The function krb5_set_default_tgs_ktypes and krb5_auth_con_setuseruserkey
had prototypes in source4/auth/kerberos/kerberos.h but also
in lib/krb5_wrap/krb5_samba.h which are included y 1st header file

Signed-off-by: Lukas Slebodnik <lslebodn at redhat.com>
---
 source4/auth/kerberos/kerberos.h | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/source4/auth/kerberos/kerberos.h b/source4/auth/kerberos/kerberos.h
index 2ff9e3868af94ee82b0e910d13c63267c1caffab..1150d6985fbb98a4a71d66e7010620df16d181c9 100644
--- a/source4/auth/kerberos/kerberos.h
+++ b/source4/auth/kerberos/kerberos.h
@@ -53,14 +53,6 @@ struct keytab_container {
 #define ENC_ALL_TYPES (ENC_CRC32 | ENC_RSA_MD5 | ENC_RC4_HMAC_MD5 |	\
 		       ENC_HMAC_SHA1_96_AES128 | ENC_HMAC_SHA1_96_AES256)
 
-#ifndef HAVE_KRB5_SET_DEFAULT_TGS_KTYPES
-krb5_error_code krb5_set_default_tgs_ktypes(krb5_context ctx, const krb5_enctype *enc);
-#endif
-
-#if defined(HAVE_KRB5_AUTH_CON_SETKEY) && !defined(HAVE_KRB5_AUTH_CON_SETUSERUSERKEY)
-krb5_error_code krb5_auth_con_setuseruserkey(krb5_context context, krb5_auth_context auth_context, krb5_keyblock *keyblock);
-#endif
-
 #if defined(HAVE_KRB5_PRINCIPAL_GET_COMP_STRING) && !defined(HAVE_KRB5_PRINC_COMPONENT)
 const krb5_data *krb5_princ_component(krb5_context context, krb5_principal principal, int i );
 #endif
-- 
2.9.3



More information about the samba-technical mailing list