Bug 515077 - selinuxdefcon: Invalid argument
Summary: selinuxdefcon: Invalid argument
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: libselinux
Version: 12
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-08-01 17:31 UTC by Jón Fairbairn
Modified: 2010-02-03 21:44 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2010-02-03 21:44:44 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jón Fairbairn 2009-08-01 17:31:27 UTC
Description of problem:
The man page for selinuxdefcon gives the synopsis as 
selinuxdefcon [-l level] user [fromcon]
but if the "fromcon" argument is omitted the behaviour is sometimes an error.


Version-Release number of selected component (if applicable):
libselinux-utils-2.0.80-1.fc11

How reproducible:
Generally

Steps to Reproduce:
1. type selinuxdefcon $USER at a command prompt
2.
3.
  
Actual results:
The behaviour varies maybe depending on context.

(Logged in via ssh)
$ secon
user: unconfined_u
role: unconfined_r
type: unconfined_t
sensitivity: s0
clearance: s0:c0.c1023
mls-range: s0-s0:c0.c1023
$ selinuxdefcon $USER
selinuxdefcon: Invalid argument

but

(in a vnc session)
$ secon
user: system_u
role: system_r
type: unconfined_notrans_t
sensitivity: s0
clearance: s0
mls-range: s0
$ selinuxdefcon $USER
unconfined_u:system_r:rpm_script_t:s0-s0:c0.c1023 



Expected results:
The first should output an selinux context (or a comprehensible error message)

Additional info:

Comment 1 Jón Fairbairn 2010-01-15 22:54:51 UTC
Still present in Fedora 12

Comment 2 Daniel Walsh 2010-01-18 16:10:17 UTC
Fixed man page in libselinux-2.0.90-3

Comment 3 Jón Fairbairn 2010-02-03 21:44:44 UTC
Thanks. The error message seems to be correct from at least libselinux-utils-2.0.87-1.fc12.x86_64 and the libselinux-2.0.90-3 man page makes the reason clear.


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