From patchwork Wed Aug 10 07:07:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 1665141 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=nFvnBIRf; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4M2gxM1WDnz9sGk for ; Wed, 10 Aug 2022 17:07:35 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 34FF7385734C for ; Wed, 10 Aug 2022 07:07:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 34FF7385734C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1660115250; bh=rX6RxzVIkmV7kcHDS6KApTaGy36i59KXg8ColJwxIvI=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=nFvnBIRfORz+6fVohZHDDjegT7XCVDVlM++t+1zFWtIdD58lpRo3PlAj8OFgb1wZl CvR5DlxUy/RKuRuoLV4h29IR+o2qNRiblsbk3swTBybbbgTSkanGSUGKadaJa/4x+a lmzeLeLN1WKzhL1jmXTXd4HqSY0+av+JvuXYUY+s= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 230433858401 for ; Wed, 10 Aug 2022 07:07:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 230433858401 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-662-k6j3DnGsN8GZTPWBEqm4pQ-1; Wed, 10 Aug 2022 03:07:14 -0400 X-MC-Unique: k6j3DnGsN8GZTPWBEqm4pQ-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 650511019DE1 for ; Wed, 10 Aug 2022 07:07:14 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.75]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C51F040315F for ; Wed, 10 Aug 2022 07:07:13 +0000 (UTC) To: libc-alpha@sourceware.org Subject: [PATCH v2] inet: Turn __ivaliduser into a compatibility symbol Date: Wed, 10 Aug 2022 09:07:12 +0200 Message-ID: <87wnbgfufz.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Florian Weimer via Libc-alpha From: Florian Weimer Reply-To: Florian Weimer Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" It is not declared in a header file, and as the comment indicates, it is not expected to be used. --- v2: Update comment. Rebase to glibc 2.37. inet/rcmd.c | 19 ++++++------------- stdlib/Versions | 2 ++ 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/inet/rcmd.c b/inet/rcmd.c index 0d6b595572..2b95fa11d8 100644 --- a/inet/rcmd.c +++ b/inet/rcmd.c @@ -79,6 +79,7 @@ #include #include #include +#include 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 diff --git a/stdlib/Versions b/stdlib/Versions index d09a308fb5..ebc43263d6 100644 --- a/stdlib/Versions +++ b/stdlib/Versions @@ -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.