]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Declare iruserok and iruserok_af.
authorUlrich Drepper <drepper@redhat.com>
Mon, 5 Apr 2010 05:01:52 +0000 (22:01 -0700)
committerPetr Baudis <pasky@ucw.cz>
Wed, 12 May 2010 01:21:11 +0000 (03:21 +0200)
(cherry picked from commit 2cd9670885d32eed6f4de12ddbeb2a9d049f198e)

ChangeLog
resolv/netdb.h

index 8f3aef43238346954a80902d0077d484b19ce444..44659bbf197d5ae9728ec694f95c2ca88c20862d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2010-04-04  Ulrich Drepper  <drepper@redhat.com>
 
+       [BZ #11070]
+       * resolv/netdb.h: Declare iruserok and iruserok_af.
+
        * argp/Makefile: Add rules to build and run bug-argp2.
        * argp/bug-argp2.c: New file.
 
index dc1f7cec612011720ef71b80573d986a4ec45fee..06e9a9a6e8a7f662b38c4c6a05ba5d2b105cc506 100644 (file)
@@ -516,6 +516,30 @@ extern int ruserok_af (__const char *__rhost, int __suser,
                       __const char *__remuser, __const char *__locuser,
                       sa_family_t __af);
 
+/* Check whether user REMUSER on system indicated by IPv4 address
+   RADDR is allowed to login as LOCUSER.  Non-IPv4 (e.g., IPv6) are
+   not supported.  If SUSER is not zero the user tries to become
+   superuser.  Return 0 if it is possible.
+
+   This function is not part of POSIX and therefore no official
+   cancellation point.  But due to similarity with an POSIX interface
+   or due to the implementation it is a cancellation point and
+   therefore not marked with __THROW.  */
+extern int iruserok (uint32_t __raddr, int __suser,
+                    __const char *__remuser, __const char *__locuser);
+
+/* This is the equivalent function where the pfamiliy if the address
+   pointed to by RADDR is determined by the value of AF.  It therefore
+   can be used for IPv6
+
+   This function is not part of POSIX and therefore no official
+   cancellation point.  But due to similarity with an POSIX interface
+   or due to the implementation it is a cancellation point and
+   therefore not marked with __THROW.  */
+extern int iruserok_af (__const void *__raddr, int __suser,
+                       __const char *__remuser, __const char *__locuser,
+                       sa_family_t __af);
+
 /* Try to allocate reserved port, returning a descriptor for a socket opened
    at this port or -1 if unsuccessful.  The search for an available port
    will start at ALPORT and continues with lower numbers.