]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
inet: Turn __ivaliduser into a compatibility symbol
authorFlorian Weimer <fweimer@redhat.com>
Wed, 10 Aug 2022 06:35:41 +0000 (08:35 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Wed, 10 Aug 2022 06:40:15 +0000 (08:40 +0200)
It is not declared in a header file, and as the comment indicates,
it is not expected to be used.

inet/rcmd.c
stdlib/Versions

index 0d6b59557270c0018e6b8465e29c9df0b5b20a3a..2b95fa11d8d762d245e12c909e3ae1fd92045e3d 100644 (file)
@@ -79,6 +79,7 @@
 #include <wchar.h>
 #include <sys/uio.h>
 #include <sigsetops.h>
+#include <shlib-compat.h>
 
 
 int __ivaliduser (FILE *, uint32_t, const char *, const char *);
@@ -621,18 +622,9 @@ iruserok (uint32_t raddr, int superuser, const char *ruser, const char *luser)
   return iruserok_af (&raddr, superuser, ruser, luser, AF_INET);
 }
 
-/*
- * XXX
- * Don't make static, used by lpd(8).
- *
- * This function is not used anymore. It is only present because lpd(8)
- * calls it (!?!). We simply call __invaliduser2() with an illegal rhost
- * argument. This means that netgroups won't work in .rhost/hosts.equiv
- * files. If you want lpd to work with netgroups, fix lpd to use ruserok()
- * or PAM.
- * Returns 0 if ok, -1 if not ok.
- */
-int
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_37)
+/* Previously used by lpd.  Current lpd versions have their own copy.  */
+int attribute_compat_text_section
 __ivaliduser (FILE *hostf, uint32_t raddr, const char *luser,
              const char *ruser)
 {
@@ -643,7 +635,8 @@ __ivaliduser (FILE *hostf, uint32_t raddr, const char *luser,
        return __validuser2_sa(hostf, (struct sockaddr *)&ra, sizeof(ra),
                               luser, ruser, "-");
 }
-
+compat_symbol (libc, __ivaliduser, __ivaliduser, GLIBC_2_0);
+#endif
 
 /* Returns 1 on positive match, 0 on no match, -1 on negative match.  */
 static int
index d09a308fb5238d18b7c9f321d349afe6567da8d1..ebc43263d69b896fbc689290c68b19c5237b405a 100644 (file)
@@ -141,6 +141,8 @@ libc {
     arc4random_buf;
     arc4random_uniform;
   }
+  GLIBC_2.37 {
+  }
   GLIBC_PRIVATE {
     # functions which have an additional interface since they are
     # are cancelable.