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 [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id B5E7E388C01C for ; Mon, 18 Jan 2021 18:27:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B5E7E388C01C Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-17-8UFiEjEePy2Y4vdstaMOxQ-1; Mon, 18 Jan 2021 13:27:05 -0500 X-MC-Unique: 8UFiEjEePy2Y4vdstaMOxQ-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 A55AE80A5C8; Mon, 18 Jan 2021 18:27:04 +0000 (UTC) Received: from greed.delorie.com (ovpn-113-151.rdu2.redhat.com [10.10.113.151]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 76999100239F; Mon, 18 Jan 2021 18:27:04 +0000 (UTC) Received: from greed.delorie.com.redhat.com (localhost [127.0.0.1]) by greed.delorie.com (8.14.7/8.14.7) with ESMTP id 10IIR3tr012190; Mon, 18 Jan 2021 13:27:03 -0500 From: DJ Delorie To: Andreas Schwab Cc: libc-alpha@sourceware.org Subject: Re: nsswitch: do not reload if "/" changes In-Reply-To: <87eeiil8m8.fsf@igel.home> (message from Andreas Schwab on Mon, 18 Jan 2021 13:42:07 +0100) Date: Mon, 18 Jan 2021 13:27:03 -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.9 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_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: Mon, 18 Jan 2021 18:27:08 -0000 Andreas Schwab writes: > How does that interact with pivot_root? If the initroot has an nsswitch.conf (I can't imagine why, but it wouldn't surprise me if the initroot had a copy of emacs) then pivot_root would lock that version, just like before. If the initroot and the pivot root have different versions of nss modules, something has gone horribly wrong building your distro. Note that the pivot_root(8) man page says you should exec a chroot after pivoting anyway, which resets nsswitch.conf. The pivot_root(2) man page says that changes to the current process's / and pwd may or may not change, and it's up to the calling process to deal with it. Either way, I don't think we have to worry about it.