Bug 515077 - selinuxdefcon: Invalid argument
selinuxdefcon: Invalid argument
Product: Fedora
Classification: Fedora
Component: libselinux (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Daniel Walsh
Fedora Extras Quality Assurance
Depends On:
  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:
Last Closed: 2010-02-03 16:44:44 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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):

How reproducible:

Steps to Reproduce:
1. type selinuxdefcon $USER at a command prompt
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


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

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.