Bug 1205820 - sed command in %post section causes issues on SELinux systems
Summary: sed command in %post section causes issues on SELinux systems
Status: NEW
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Peter Varkoly
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-28 15:52 UTC by Johannes Segitz
Modified: 2022-11-28 15:52 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Segitz 2022-11-28 15:52:52 UTC
This line
445                 sed -i -E "s/(btree|hash):/lmdb:/g" %{pf_config_directory}/{main.cf,master.cf}

causes issues on SELinux enabled system. Sed creates a tmp file, which receives tmp_t as type. After that postfix fails on systems with selinux.

You need to restore the proper types with something like:
if selinuxenabled then;
  restorecon %{pf_config_directory}/{main.cf,master.cf}
fi
after the sed command