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): 1.20.1-2 How reproducible: always Steps to Reproduce: 1. create a new file at almost any dir 2. run restorecon on it 3. Actual results: restorecon gets killed because it dereferences null pointer Expected results: showing that context was restored and exiting normally... Additional info: 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