Date: Fri, 20 Jan 2023 23:24:12 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 268547] /bin/sh 'cd' should get user's home directory from password database if HOME is unset Message-ID: <bug-268547-227-L8rf8tt544@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-268547-227@https.bugs.freebsd.org/bugzilla/> References: <bug-268547-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D268547 --- Comment #3 from jschauma@netmeister.org --- > The code looks reasonable, but I don't really understand the point. What = use=20 > case is helped by this?=20 I had a scenario where a process had cleared its ENV before changing eUID, and then did a 'cd'. Yes, "well, don't do that", but it still took me by surprise. > Also note that this might use an unexpected directory=20 > if there are multiple /etc/passwd lines for the same UID.=20 True. Not much that can be done about that, I suppose.=20 > Apart from that, if you want this fallback here, you'll also want it for = tilde=20 > expansion without a user name (the tilde is currently left unchanged if H= OME is=20 > not set or empty). If there's interest in merging this change, then I can take a look and update the diff. Otherwise, if folks think it's not useful, no big deal. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-268547-227-L8rf8tt544>