Bug 8101 - Chcon strange behavior when context not changed
Summary: Chcon strange behavior when context not changed
Status: NEW
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.24.x
Hardware: PC Linux
: P5 minor
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-11 05:40 UTC by Tatsuyuki Ishi
Modified: 2015-05-11 05:40 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tatsuyuki Ishi 2015-05-11 05:40:39 UTC
Chcon returns 1 when context not changed without verbose (-v) but with verbose it says the context not changed and returns 0.
I read the source code and the problem is VERBOSE is included when checking for error.
Reference: 
BusyBox Implementation: http://git.busybox.net/busybox/plain/selinux/chcon.c
Coreutils (near official) Implementation: http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=blob_plain;f=src/chcon.c;h=bdf6137314fd95fa1f7e7852637bb2332a69f5fd;hb=HEAD