Date: Fri, 11 Jun 2021 16:32:58 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 256554] /usr/bin/id -c returns current users's login class, not specified user's Message-ID: <bug-256554-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D256554 Bug ID: 256554 Summary: /usr/bin/id -c returns current users's login class, not specified user's Product: Base System Version: 13.0-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: asomers@FreeBSD.org It's tempting to run "id -c somebody" to get somebody's login class. Such = an invocation seems to work. But it actually returns the login class of the current user, not "somebody". The man page and git history suggests that t= his is the intended behavior. However, I believe it is a bug to accept and ign= ore a user argument. Instead, id should return an error if a user is specified along with "-c". Steps to reproduce: # Create a user with a non-default login class > sudo pw useradd testy -L russian # Try to lookup his login class. It's wrong! > id -c testy default # su to testy and lookup his current login class. It's right. > sudo su -m testy % id -c russian --=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-256554-227>