From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 2669B3858D20 for ; Tue, 1 Mar 2022 01:03:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2669B3858D20 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-630-y-iyw-8JPMCa1ZiiWPUoqw-1; Mon, 28 Feb 2022 20:02:59 -0500 X-MC-Unique: y-iyw-8JPMCa1ZiiWPUoqw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 72829800422; Tue, 1 Mar 2022 01:02:58 +0000 (UTC) Received: from greed.delorie.com (ovpn-112-2.rdu2.redhat.com [10.10.112.2]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CD2ED10013D6; Tue, 1 Mar 2022 01:02:39 +0000 (UTC) Received: from greed.delorie.com.redhat.com (localhost [127.0.0.1]) by greed.delorie.com (8.15.2/8.15.2) with ESMTP id 22112b7q184852; Mon, 28 Feb 2022 20:02:37 -0500 From: DJ Delorie To: Joseph Myers Cc: carlos@redhat.com, fweimer@redhat.com, ashankar@redhat.com, ludo@gnu.org, libc-alpha@sourceware.org Subject: Re: On the removal of nscd from Fedora, and the future of nscd. In-Reply-To: (message from Joseph Myers on Mon, 28 Feb 2022 23:09:27 +0000) Date: Mon, 28 Feb 2022 20:02:37 -0500 Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-6.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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-List-Received-Date: Tue, 01 Mar 2022 01:03:05 -0000 Joseph Myers writes: > I think there is a reasonable case that all NSS modules that aren't in > libc (especially those not shipped with glibc) should be loaded only in a > separate process, not in the main process doing the name lookup, to avoid > issues with name lookup loading more or less arbitrary libraries into the > process doing the lookup. Hmm... I hadn't thought of it that way, but the security implications are compelling... and we don't hardcode the search path either, so the user can override it via environment (unless setuid), I think. { char *shlib_name; if (__asprintf (&shlib_name, "libnss_%s.so%s", module->name, __nss_shlib_revision) < 0) /* This is definitely a temporary failure. Do not update module->state. This will trigger another attempt at the next call. */ return false; handle = __libc_dlopen (shlib_name); free (shlib_name); }