Bug 217177

Summary: id <username> fails with "id: cannot print security context when user specified"
Product: [Fedora] Fedora Reporter: Mike Bonnet <mikeb>
Component: coreutilsAssignee: Tim Waugh <twaugh>
Status: CLOSED RAWHIDE QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: rawhideCC: meyering, nobody+pnasrat
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 5.97-16.fc6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-11-24 18:36:38 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
fix for the above none

Description Mike Bonnet 2006-11-24 17:35:37 UTC
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):
coreutils-5.97-15.fc7

How reproducible:
Always

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

Expected results:
No error

Additional info:

Comment 2 Jim Meyering 2006-11-24 17:45:01 UTC
Hi,
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 18:05:33 UTC
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 18:13:27 UTC
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 18:25:33 UTC
Created attachment 142084 [details]
fix for the above

FYI, here's the obvious (albeit untested) patch.

Comment 6 Tim Waugh 2006-11-24 18:36:38 UTC
Sorry!