keyutils: fix deprecated function usage
authorRosen Penev <rosenp@gmail.com>
Wed, 12 Aug 2020 20:00:52 +0000 (13:00 -0700)
committerRosen Penev <rosenp@gmail.com>
Fri, 14 Aug 2020 04:44:42 +0000 (21:44 -0700)
Signed-off-by: Rosen Penev <rosenp@gmail.com>
libs/keyutils/Makefile
libs/keyutils/patches/020-rindex.patch [new file with mode: 0644]

index 7c8390e0e206868daaa94dd54118db4658f3b98d..f7186e989bd969b7bdb09002c4c19b8791ced183 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=keyutils
 PKG_VERSION:=1.6.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://people.redhat.com/dhowells/keyutils/
diff --git a/libs/keyutils/patches/020-rindex.patch b/libs/keyutils/patches/020-rindex.patch
new file mode 100644 (file)
index 0000000..11cf6c0
--- /dev/null
@@ -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);