From patchwork Thu Jul 21 11:02:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 56223 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0309B385AE69 for ; Thu, 21 Jul 2022 11:03:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0309B385AE69 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1658401408; bh=trEWLf5jRGJbFN5UrfWXuF0oerK0Qwv2CpEusZgUXuk=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=MxvThHXcKacyV2k37+oQ8sN1syf2sCE3tzT9DAcLcqwtDYYjiraAepzW+yMn+nTpr Srnwa1ulalnYHBcCMTr9bzGrORL2ZCGqUAZ1KYImeuv0CyTFxvatp5ods//CgSNSok JssqOhygYfGXsQcMvPORH9IXxPS8EbDA26WwedlU= 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 F2DB238582A1 for ; Thu, 21 Jul 2022 11:02:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F2DB238582A1 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-294-5XlWdtKaOkSxjbap2Dbfeg-1; Thu, 21 Jul 2022 07:02:56 -0400 X-MC-Unique: 5XlWdtKaOkSxjbap2Dbfeg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 310EC3C0ED47 for ; Thu, 21 Jul 2022 11:02:56 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.154]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A0F8F1121314 for ; Thu, 21 Jul 2022 11:02:55 +0000 (UTC) To: libc-alpha@sourceware.org Subject: [PATCH] inet: Turn __ivaliduser into a compatibility symbol Date: Thu, 21 Jul 2022 13:02:53 +0200 Message-ID: <8735eu4tk2.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.78 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.5 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 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+patchwork=sourceware.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. Tested on i686-linux-gnu and x86_64-linux-gnu. --- inet/rcmd.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/inet/rcmd.c b/inet/rcmd.c index 0d6b595572..624561f830 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,6 +622,7 @@ iruserok (uint32_t raddr, int superuser, const char *ruser, const char *luser) return iruserok_af (&raddr, superuser, ruser, luser, AF_INET); } +#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_36) /* * XXX * Don't make static, used by lpd(8). @@ -632,7 +634,7 @@ iruserok (uint32_t raddr, int superuser, const char *ruser, const char *luser) * or PAM. * Returns 0 if ok, -1 if not ok. */ -int +int attribute_compat_text_section __ivaliduser (FILE *hostf, uint32_t raddr, const char *luser, const char *ruser) { @@ -643,7 +645,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