Hi,
I have been facing the same issue this morning.
The code called at that time is the following :
``` sudo ${_runcon} chroot ${TARGET_ROOT} \ /usr/sbin/setfiles -F ${_dash_m} \ /etc/selinux/targeted/contexts/files/file_contexts ${MOUNTPOINT} fi done ```
The thing is `sudo` needs the `-t` option to execute commands in an SELinux context.
We could call it like that to fix this bug:
``` sudo -t "${_runcon}" chroot ${TARGET_ROOT} \ /usr/sbin/setfiles -F ${_dash_m} \ /etc/selinux/targeted/contexts/files/file_contexts ${MOUNTPOINT} fi done ```
`-t ""` allows us to run sudo even if there is no context.
Hi,
I have been facing the same issue this morning.
The code called at that time is the following :
```
/usr/ sbin/setfiles -F ${_dash_m} \
/etc/ selinux/ targeted/ contexts/ files/file_ contexts ${MOUNTPOINT}
sudo ${_runcon} chroot ${TARGET_ROOT} \
fi
done
```
The thing is `sudo` needs the `-t` option to execute commands in an SELinux context.
We could call it like that to fix this bug:
```
/usr/ sbin/setfiles -F ${_dash_m} \
/etc/ selinux/ targeted/ contexts/ files/file_ contexts ${MOUNTPOINT}
sudo -t "${_runcon}" chroot ${TARGET_ROOT} \
fi
done
```
`-t ""` allows us to run sudo even if there is no context.