yum install ~/rpmbuild/RPMS/noarch/whitehack_brother_printer_with_selinux-enabled-0.3-12m.noarch.rpm
This creates: /usr/bin/whitehack_brother_printer_with_selinux
Once installed it can be temporarily disabled with this command:
/usr/bin/whitehack_brother_printer_with_selinux disable
Once installed it's status can queried with this command:
/usr/bin/whitehack_brother_printer_with_selinux status
To remove again use yum:
yum remove whitehack_brother_printer_with_selinux-enabled
You can also install without enabling with this command:
yum install ~/rpmbuild/RPMS/noarch/whitehack_brother_printer_with_selinux-0.3-12m.noarch.rpm
This alternate install gives you the chance to visually inspect the code in
/usr/bin/whitehack_brother_printer_with_selinux before you run it.
To build the .spec file simply run ../whitehack_bin/mkwhitehack in this src directory
Wrote: ~/rpmbuild/SRPMS/whitehack_brother_printer_with_selinux-0.3-12m.src.rpm Wrote: ~/rpmbuild/RPMS/noarch/whitehack_brother_printer_with_selinux-0.3-12m.noarch.rpm Wrote: ~/rpmbuild/RPMS/noarch/whitehack_brother_printer_with_selinux-enabled-0.3-12m.noarch.rpm
Download from: https://sourceforge.net/projects/whitehack/files
audit/audit.log: type=AVC msg=audit(1332817474.398:174): avc: denied { execute } for pid=9242 comm="brlpdwrappermfc" name="filtermfcj6910dw" dev=dm-0 ino=1212446 scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:usr_t:s0 tclass=file audit/audit.log: type=SYSCALL msg=audit(1332817474.398:174): arch=40000003 syscall=33 success=no exit=-13 a0=93812d8 a1=1 a2=11 a3=93812d8 items=0 ppid=9226 pid=9242 auid=4294967295 uid=4 gid=7 euid=4 suid=4 fsuid=4 egid=7 sgid=7 fsgid=7 tty=(none) ses=4294967295 comm="brlpdwrappermfc" exe="/bin/bash" subj=system_u:system_r:cupsd_t:s0-s0:c0.c1023 key=(null)
But: cups/error_log: I [27/Mar/2012:13:04:34 +1000] [Job 569] Completed successfully.
# rpm -ivh whitehack_brother_printer_with_selinux-enabled-0.3-12m.noarch.rpm
Preparing... ########################################### [100%]
1:whitehack_brother_print########################################### [100%]
+ semanage fcontext -a -f -- -s system_u -t bin_t -r s0 /opt/brother/Printers/mfcj6910dw/lpd/.
+ restorecon . brmfcj6910dwfilter filtermfcj6910dw psconvertij2
+ semanage fcontext -a -f -- -s system_u -t bin_t -r s0 /opt/brother/Printers/mfcj6910dw/cupswrapper/.
+ restorecon . brcupsconfpt1 cupswrappermfcj6910dw mfcj6910dw.ppd
+ semanage fcontext -f -- -a -s system_u -t cupsd_rw_etc_t -r s0 /etc/opt/brother/Printers/mfcj6910dw/inf/.*
+ semanage fcontext -f -d -a -s system_u -t cupsd_rw_etc_t -r s0 /etc/opt/brother/Printers/mfcj6910dw/inf
+ restorecon . brmfcj6910dwfunc brmfcj6910dwrc ImagingArea lut paperinfij2 setupPrintcapij
+ restorecon brlpdwrappermfcj6910dw
+ restorecon brprintconf_mfcj6910dw brushtopbm
NOTE: semodule -i "whitehackXbrotherXprinterXwithXselinux.pp" has now been applied!