Red Hat Bugzilla – Bug 144878
restorecon segfaults when no previous context
Last modified: 2007-11-30 17:10:58 EST
Description of problem:
if I e.g. install a new file to /usr/local/bin and run restorecon for it,
it segfaults after setting the context because
param b in function only_changed_user is 0.
Also, on system startup I get segfault errors when restorecon
fails for /tmp/.ICE-unix and other files.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. create a new file at almost any dir
2. run restorecon on it
restorecon gets killed because it dereferences null pointer
showing that context was restored and exiting normally...
patch attached. quickie fix, it just checks for null pointers,
works for me,...
Created attachment 109661 [details]
check for null pointers in only_changed_user
Fixed in policycoreutils-1.21.3-2