From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id UJeULn6NeGBPoQAAgWs5BA (envelope-from ) for ; Thu, 15 Apr 2021 21:01:18 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id KF4PKX6NeGBDCAAAbx9fmQ (envelope-from ) for ; Thu, 15 Apr 2021 19:01:18 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 1C8148F23 for ; Thu, 15 Apr 2021 21:01:17 +0200 (CEST) Received: from localhost ([::1]:44408 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lX7Eo-0005YS-L0 for larch@yhetil.org; Thu, 15 Apr 2021 15:01:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60410) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lX7Ec-0005YG-HG for bug-guix@gnu.org; Thu, 15 Apr 2021 15:01:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:55899) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lX7Eb-0004Wr-Nh for bug-guix@gnu.org; Thu, 15 Apr 2021 15:01:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lX7Eb-0001Ad-MZ for bug-guix@gnu.org; Thu, 15 Apr 2021 15:01:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#36508: GDM files have incorrect owner after temporarily removing service Resent-From: Mark H Weaver Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 15 Apr 2021 19:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36508 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 36508-submit@debbugs.gnu.org id=B36508.16185132084424 (code B ref 36508); Thu, 15 Apr 2021 19:01:01 +0000 Received: (at 36508) by debbugs.gnu.org; 15 Apr 2021 19:00:08 +0000 Received: from localhost ([127.0.0.1]:39212 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lX7Dk-00019I-ID for submit@debbugs.gnu.org; Thu, 15 Apr 2021 15:00:08 -0400 Received: from world.peace.net ([64.112.178.59]:40764) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lX7Dj-00017b-2a for 36508@debbugs.gnu.org; Thu, 15 Apr 2021 15:00:07 -0400 Received: from mhw by world.peace.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lX7Dc-00021r-Jm; Thu, 15 Apr 2021 15:00:00 -0400 From: Mark H Weaver In-Reply-To: <875z0pgnqn.fsf@gnu.org> References: <20190705083620.lbzu7a33awbymh3d@cf0> <1576552162.14721.1618320275616@office.mailbox.org> <87czuxsya5.fsf@netris.org> <875z0pgnqn.fsf@gnu.org> Date: Thu, 15 Apr 2021 14:58:16 -0400 Message-ID: <87eefbidcs.fsf@netris.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Brendan Tildesley , 36508@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1618513278; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=wLjH4nqE2pILQ5W6QPZlknyrJUofHbCBnV0+lpifq8s=; b=YDs8AAjMn6Zj9pO7QkjizFjJbRDlcf+mpwOC5vAq3D2bEJ664r7faSN4sgOqSmaytl591V H0tY0tuaONh2eddWyG/VqCf2mOubCrwC/2AGON+KefBHzrkVh7+1P+d9jdJIAYEb74b7ac ZffWozwpdWLI6B0CghgZH0A18o0qRGavBXRUQoNrdWY7WeshiHHNBfHWXb+3h69G368quF n5+YKcSJI69qgN3BOgrPXVwYZjRJ30tpgONMLK+kEJ0AIvlgo1j6+/XQfnw/cQLglQH7L6 S9EzIGps97lGCQyQ4a+fxQ3t0okbwBdjOVcygxV5TSwUScBqfU6c04q3cdKzxw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1618513278; a=rsa-sha256; cv=none; b=Z6BW0GUcBc+vMomoVHZR9QnxOgNJ/Bs3NTXcuoEPEQnuhe9SfC0S9EkDIpkSTcbyJoiYMk q54kCeX03UkgknFV31JbOWPN1giOicEV1A5rjf1DEQZcu67E/JbjQLHM+/gloVWbMJzsGE /Lqhej/emx36imTRHNspUIaX3sfzmQybTM+b0qDT+1bs5KfNK098m9OsTS4RIUHnqd/CT6 xIz1HB7Wc73QgrOs4j08ICHXPEXaOnbKdDaPfRhn5YPKolJ3P9YJVUC75xbU8sh7kJqLiz Jy67JWOoZP7f6F/GeWkY373fB6UabsRP87JIv5SmF9ZHD3R54rOWJpuYdwjM2w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -2.44 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: 1C8148F23 X-Spam-Score: -2.44 X-Migadu-Scanner: scn0.migadu.com X-TUID: 8MYCz0WhrqDj Ludovic Court=C3=A8s writes: > Mark H Weaver skribis: > >> Here's one idea: when activating a system, *never* delete users or >> groups if files still exist that are owned by those users/groups. >> Checking all filesystems would likely be too expensive, but perhaps it >> would be sufficient to check certain directories such as /var, /etc, and >> possibly the top directory of /home. > > How would you determine which directories to look at though? What if we > miss an important one? I have another idea: Maintain historical mappings from user/group names to UIDs/GIDs, perhaps in some file in /etc, where entries are added but *never* automatically removed. When allocating UIDs/GIDs, we would avoid any UIDs/GIDs in the range of those mappings. Then, provide a UID/GID garbage collector, to be explicitly run by users if desired, which would scan all filesystems to find the set of UID/GIDs currently referenced, and remove entries from the historical mappings that are no longer needed. What do you think? Mark