Bug 217177 - id <username> fails with "id: cannot print security context when user specified"
id <username> fails with "id: cannot print security context when user specified"
Product: Fedora
Classification: Fedora
Component: coreutils (Show other bugs)
All Linux
medium Severity high
: ---
: ---
Assigned To: Tim Waugh
Depends On:
  Show dependency treegraph
Reported: 2006-11-24 12:35 EST by Mike Bonnet
Modified: 2007-11-30 17:11 EST (History)
2 users (show)

See Also:
Fixed In Version: 5.97-16.fc6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-11-24 13:36:38 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
fix for the above (470 bytes, patch)
2006-11-24 13:25 EST, Jim Meyering
no flags Details | Diff

  None (edit)
Description Mike Bonnet 2006-11-24 12:35:37 EST
Description of problem:
When passing a username to id, it prints the message

id: cannot print security context when user specified

and exits with status 1.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. run: id root
Actual results:
id: cannot print security context when user specified

Expected results:
No error

Additional info:
Comment 2 Jim Meyering 2006-11-24 12:45:01 EST
Running id with both a user name and -Z doesn't make sense.
And that's why id now fails -- this recent change addressed BZ#211089.
The problem is not with coreutils, but rather with the code that
invokes "id" that way.
Comment 3 Mike Bonnet 2006-11-24 13:05:33 EST
I am not passing -Z to id.  The problem occurs with a straight

$ id root

and with

$ id -g root

There is no -Z being passed on the command-line.
Comment 4 Jim Meyering 2006-11-24 13:13:27 EST
Oh!  That makes all the difference.  Obviously a bug.  I should have tried your
"How to reproduce" command.
Comment 5 Jim Meyering 2006-11-24 13:25:33 EST
Created attachment 142084 [details]
fix for the above

FYI, here's the obvious (albeit untested) patch.
Comment 6 Tim Waugh 2006-11-24 13:36:38 EST

Note You need to log in before you can comment on or make changes to this bug.