Accepting request 385182 from home:kukuk:deprecate

- tcp_wrappers_7.6.diff: don't use public headers for own
  functions, make own yp_get_default_domain static.

OBS-URL: https://build.opensuse.org/request/show/385182
OBS-URL: https://build.opensuse.org/package/show/network:utilities/tcpd?expand=0&rev=25
This commit is contained in:
Marcus Meissner 2016-04-08 12:39:05 +00:00 committed by Git OBS Bridge
parent a4faf550b7
commit efcb176954
3 changed files with 11 additions and 13 deletions

View File

@ -121,34 +121,26 @@
+ +
--- hosts_access.c.orig --- hosts_access.c.orig
+++ hosts_access.c +++ hosts_access.c
@@ -33,6 +33,7 @@ static char sccsid[] = "@(#) hosts_acces
#include <errno.h>
#include <setjmp.h>
#include <string.h>
+#include <rpcsvc/ypclnt.h>
extern char *fgets();
extern int errno;
@@ -89,6 +90,33 @@ static int masked_match(); @@ -89,6 +90,33 @@ static int masked_match();
/* hosts_access - host access control facility */ /* hosts_access - host access control facility */
+int +static int
+yp_get_default_domain (char **outdomain) +yp_get_default_domain (char **outdomain)
+{ +{
+ static char __ypdomainname[1025] = "\0"; + static char __ypdomainname[1025] = "\0";
+ int result = YPERR_SUCCESS;; + int result = 0;
+ *outdomain = NULL; + *outdomain = NULL;
+ +
+ if (__ypdomainname[0] == '\0') + if (__ypdomainname[0] == '\0')
+ { + {
+ if (getdomainname (__ypdomainname, 1024)) + if (getdomainname (__ypdomainname, 1024))
+ result = YPERR_NODOM; + result = 1;
+ else if (strcmp (__ypdomainname, "(none)") == 0) + else if (strcmp (__ypdomainname, "(none)") == 0)
+ { + {
+ /* If domainname is not set, some Systems will return "(none)" */ + /* If domainname is not set, some Systems will return "(none)" */
+ __ypdomainname[0] = '\0'; + __ypdomainname[0] = '\0';
+ result = YPERR_NODOM; + result = 1;
+ } + }
+ else + else
+ *outdomain = __ypdomainname; + *outdomain = __ypdomainname;

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Apr 6 10:35:38 CEST 2016 - kukuk@suse.de
- tcp_wrappers_7.6.diff: don't use public headers for own
functions, make own yp_get_default_domain static.
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Jul 20 14:08:16 UTC 2015 - okir@suse.com Mon Jul 20 14:08:16 UTC 2015 - okir@suse.com

View File

@ -1,7 +1,7 @@
# #
# spec file for package tcpd # spec file for package tcpd
# #
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed