Bug 144878 - restorecon segfaults when no previous context
Summary: restorecon segfaults when no previous context
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: policycoreutils
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-01-12 10:29 UTC by Sami Farin
Modified: 2007-11-30 22:10 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2005-01-26 14:09:02 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
check for null pointers in only_changed_user (456 bytes, patch)
2005-01-12 10:31 UTC, Sami Farin
no flags Details | Diff

Description Sami Farin 2005-01-12 10:29:49 UTC
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,...

Comment 1 Sami Farin 2005-01-12 10:31:16 UTC
Created attachment 109661 [details]
check for null pointers in only_changed_user

Comment 2 Daniel Walsh 2005-01-26 14:09:02 UTC
Fixed in policycoreutils-1.21.3-2


Note You need to log in before you can comment on or make changes to this bug.