Merge pull request #13118 from neheb/xcr

keyutils: fix deprecated function usage
This commit is contained in:
Rosen Penev 2020-08-13 23:54:31 -07:00 committed by GitHub
commit 98cef1f44a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 1 deletions

View file

@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=keyutils PKG_NAME:=keyutils
PKG_VERSION:=1.6.1 PKG_VERSION:=1.6.1
PKG_RELEASE:=1 PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://people.redhat.com/dhowells/keyutils/ PKG_SOURCE_URL:=https://people.redhat.com/dhowells/keyutils/

View file

@ -0,0 +1,17 @@
--- a/key.dns_resolver.c
+++ b/key.dns_resolver.c
@@ -529,12 +529,12 @@ int main(int argc, char *argv[])
keyend = buf + ktlen + 1;
/* the actual key description follows the last semicolon */
- keyend = rindex(keyend, ';');
+ keyend = strrchr(keyend, ';');
if (!keyend)
error("Invalid key description: %s", buf);
keyend++;
- name = index(keyend, ':');
+ name = strchr(keyend, ':');
if (!name)
dns_query_a_or_aaaa(keyend, callout_info);