From nobody Mon Jun 12 13:20:18 2023 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QfskF3s9bz4c8yN for ; Mon, 12 Jun 2023 13:20:21 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QfskF3MWvz41fB; Mon, 12 Jun 2023 13:20:21 +0000 (UTC) (envelope-from jbeich@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686576021; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=AZnwq9JKfXsNLrQjhF6sezwXLYaFZ+v8Ai71hGIf7Rs=; b=GAqEb1gkohgbVJsWBIvYyC8qLbg4KdLjWqdQGAQgLmWcvpz+WA1xRs4DiCsbqv6rvLppLv fhnvqu/lEVFd2K1ujS6DXnx/cJi8hHps8oew5EiXewBeEUKAgeBpxehls2z8lbbaeyENbO iNnrkQ869Zv4EF66Tz3N7A9QsTaRUt7qlNZQa9cmc2na1Yxi/v3n9yLRCTrQOMoKhnnHz5 LCMs5eyiiRoEx+gJKEJWWb40rKVqmcUj18ERV1gAZeDEC2dm2SvRsGRkFNn1mBy1kPeElR NK4G5VgSYJrVru60oxMggHr44Mt+c0SJJ9y79ViiLkwpiwGZ7gIiSH8wUn7slw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686576021; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=AZnwq9JKfXsNLrQjhF6sezwXLYaFZ+v8Ai71hGIf7Rs=; b=harsGq4FOClr8cUlNhEHTLCTbZLUqNHIf/QdgB02lb3bXAljcjYvCJjwClTBDVDbUfetDV sLgimYB7zkT/VlyltS2hmcnrAvtg4pu7FoIpqBNiX9dTMDTiuy1TcnfJwgnHA5M+vtv5wl G94/9o5KNXdbYznwtnZKza+7NEhtFoxPd2tiwU/jsoBEC55ekIyU3SQsfLWOOCPLIvhRc+ Ck60RJ8ZXRWyayXUhlcV1FysOh6MGwcp0X7hOXVOatpMjnD8WB8o7jWKqaZy4FTD6FPTx8 UPL/quKw9AjW4r6tfzaGbgCzYv/Cyk7QEPgaMKtDRoERYLgz6poxJpRW2mqDgw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686576021; a=rsa-sha256; cv=none; b=JW6i/4WiQbX9Hfk+gh+/YD+aUW7pnrLivQSZWOvjjfwx9EATR7/DDHRJV7gvQfKsgsytNg TJo5Zzy7e5nizEKL1by5RR4MY4+XyGAQoVehwkldwuQP6xUfVNhaqkZSh+4vZAdORUL+sj ZLCVqC/RjRWthARqFEiQAVAOJJO15/wFc8AbCiO+F8mZIvfY8UOrjFLxS/B1Pxgg8vPS6i Jr13uFcjAEKW5DY5GT5dLyxaKW4hHXfCb+kXH7UB1EKyVFiJOZmrhlouYG7PdhMqEKTqV+ cpsOKVgnTO+mZCMtFU3vXsMpG1OIegANNzyinFosHSHA3rRqF0hBYRW6ox+zzw== Received: by freefall.freebsd.org (Postfix, from userid 1354) id 60A33E03A; Mon, 12 Jun 2023 13:20:21 +0000 (UTC) From: Jan Beich To: Graham Perrin Cc: FreeBSD CURRENT Subject: Re: Directory 1002/ missing from /var/run/user/ In-Reply-To: (Graham Perrin's message of "Mon, 12 Jun 2023 01:32:42 +0100") References: Date: Mon, 12 Jun 2023 15:20:18 +0200 Message-ID: List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 Content-Type: text/plain X-ThisMailContainsUnwantedMimeParts: N Graham Perrin writes: > What normally takes care of creation of the numbered directories? /var/run/user/ (or /run/user/ on Linux with systemd) is a common prefix for XDG_RUNTIME_DIR, a standardized place for user-owned unix(4) sockets. Fallbacks are either app-specific or shared (e.g., CVE-2020-25697). /var/run/user/ is managed by sysutils/consolekit2 or sysutils/pam_xdg. In consolekit2 case the directory is created (contents destroyed if already exists) on the first session of the specific UID either via C API, DBus API, ck-launch-session(1) or pam_ck_connector(8) and removed when the last session terminates. In pam_xdg case the directory is created but not removed unless track_sessions is set. > A few hours ago, it was unexpectedly missing: Probably auto-removed by consolekit2 either due to logout or dbus restart. > I recreated the directory. Can be automated via PAM e.g., # pkg install consolekit2 # echo "session optional pam_ck_connector.so nox11" >>/etc/pam.d/system # service dbus onestart $ exit # log out on VT console to re-trigger PAM or # pkg install pam_xdg # echo "session optional pam_xdg.so notroot runtime" >>/etc/pam.d/system $ exit # log out on VT console to re-trigger PAM