VirtualBox

Changeset 77049 in vbox for trunk/src/VBox/Additions


Ignore:
Timestamp:
Jan 30, 2019 5:06:07 PM (6 years ago)
Author:
vboxsync
Message:

Additions/linux/installer: mute chcon error output.
ticketref:18221:Getting /cant apply partial context to unlabeled file/ in Version 6.0.0
We do various chcon invocations in the Additions installer to make SELinux
happy on old Fedora/EL distributions which are mostly forgotten, but on which
people may still try to install. The invocations are not even correct on
recent systems, so mute the error output. Do not change them so as not to
break the actual target systems.

Location:
trunk/src/VBox/Additions/linux/installer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/linux/installer/vboxadd-x11.sh

    r76553 r77049  
    167167                semanage fcontext -a -t lib_t "/var/lib/VBoxGuestAdditions/lib/libGL.so.1"
    168168            fi
    169             chcon -h  -t lib_t "/var/lib/VBoxGuestAdditions/lib/libGL.so.1"
     169            # This is needed on old Fedora/Redhat systems.  No one remembers which.
     170            chcon -h  -t lib_t "/var/lib/VBoxGuestAdditions/lib/libGL.so.1" 2>/dev/null
    170171        fi
    171172        echo "/var/lib/VBoxGuestAdditions/lib" > /etc/ld.so.conf.d/00vboxvideo.conf
     
    465466    case "$redhat_release" in
    466467        Fedora\ release\ 8* )
    467             chcon -u system_u -t lib_t "${lib_dir}"/*.so
     468            chcon -u system_u -t lib_t "${lib_dir}"/*.so 2>/dev/null
    468469            ;;
    469470    esac
     
    472473    # needs a rule to allow this.  Send all output to /dev/null in case this is
    473474    # completely irrelevant on the target system.
     475    # chcon is needed on old Fedora/Redhat systems.  No one remembers which.
    474476    chcon -t unconfined_execmem_exec_t '/usr/bin/VBoxClient' > /dev/null 2>&1
    475477    semanage fcontext -a -t unconfined_execmem_exec_t '/usr/bin/VBoxClient' > /dev/null 2>&1
  • trunk/src/VBox/Additions/linux/installer/vboxadd.sh

    r76984 r77049  
    475475        command -v semanage > /dev/null &&
    476476            semanage fcontext -a -t mount_exec_t "${INSTALL_DIR}/other/mount.vboxsf"
    477         chcon -t mount_exec_t "${INSTALL_DIR}/other/mount.vboxsf"
     477        chcon -t mount_exec_t "${INSTALL_DIR}/other/mount.vboxsf" 2>/dev/null
    478478    fi
    479479}
     
    489489    MODULE_SRC="$INSTALL_DIR/src/vboxguest-$INSTALL_VER"
    490490    BUILDINTMP="$MODULE_SRC/build_in_tmp"
     491    # chcon is needed on old Fedora/Redhat systems.  No one remembers which.
    491492    test ! -e /etc/selinux/config ||
    492         chcon -t bin_t "$BUILDINTMP"
     493        chcon -t bin_t "$BUILDINTMP" 2>/dev/null
    493494
    494495    if test -z "$INSTALL_NO_MODULE_BUILDS"; then
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette