From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12957 invoked by alias); 9 Dec 2009 17:28:35 -0000 Received: (qmail 12909 invoked by uid 48); 9 Dec 2009 17:28:16 -0000 Date: Wed, 09 Dec 2009 17:28:00 -0000 Message-ID: <20091209172816.12908.qmail@sourceware.org> From: "simon at josefsson dot org" To: glibc-bugs@sources.redhat.com In-Reply-To: <20091209110403.11070.simon@josefsson.org> References: <20091209110403.11070.simon@josefsson.org> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug libc/11070] Glibc netdb.h does not provide prototype for 'iruserok' X-Bugzilla-Reason: CC Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org X-SW-Source: 2009-12/txt/msg00036.txt.bz2 ------- Additional Comments From simon at josefsson dot org 2009-12-09 17:28 ------- If you want to take the opportunity to also export the iruserok_af interface, which seems equally exported by libc.so but not prototyped in any header file, here is an alternative patch. The iruserok_af interface appears to be a more usable interface (because it is not IPv4 specific). /Simon 2009-12-09 Simon Josefsson * resolv/netdb.h [__USE_BSD]: Add prototype for iruserok and iruserok_af. >>From e3db0b2ff7bd1d645d6b28a0eda344b0141f0c49 Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Wed, 9 Dec 2009 18:26:15 +0100 Subject: [PATCH] Add prototype for iruserok and iruserok_af to netdb.h. --- resolv/netdb.h | 25 +++++++++++++++++++++++++ 1 files changed, 25 insertions(+), 0 deletions(-) diff --git a/resolv/netdb.h b/resolv/netdb.h index dc1f7ce..c84f65e 100644 --- a/resolv/netdb.h +++ b/resolv/netdb.h @@ -516,6 +516,31 @@ 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); + +/* Check whether user REMUSER on system indicated by socket address + RADDR with family AF is allowed to login as LOCUSER. 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_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. -- 1.6.5.3 -- http://sourceware.org/bugzilla/show_bug.cgi?id=11070 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.