Bug 217177 - id <username> fails with "id: cannot print security context when user specified"
Summary: id <username> fails with "id: cannot print security context when user specified"
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: coreutils
Version: rawhide
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
Assignee: Tim Waugh
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-11-24 17:35 UTC by Mike Bonnet
Modified: 2007-11-30 22:11 UTC (History)
2 users (show)

Fixed In Version: 5.97-16.fc6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-11-24 18:36:38 UTC
Type: ---
Embargoed:


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

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!


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