This service will be undergoing maintenance at 03:30 UTC, 2016-05-27. It is expected to last about 2 hours
Bug 515077 - selinuxdefcon: Invalid argument
selinuxdefcon: Invalid argument
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: libselinux (Show other bugs)
12
All Linux
low Severity low
: ---
: ---
Assigned To: Daniel Walsh
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-08-01 13:31 EDT by Jón Fairbairn
Modified: 2010-02-03 16:44 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-02-03 16:44:44 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Jón Fairbairn 2009-08-01 13:31:27 EDT
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 17:54:51 EST
Still present in Fedora 12
Comment 2 Daniel Walsh 2010-01-18 11:10:17 EST
Fixed man page in libselinux-2.0.90-3
Comment 3 Jón Fairbairn 2010-02-03 16:44:44 EST
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.