On Thu, Nov 28, 2019 at 8:00 AM Marcelo Ricardo Leitner <marcelo.leitner@xxxxxxxxx> wrote: > I'm no SELinux expert, but my /etc/ssh/sshd_config has this nice handy > comment: > # If you want to change the port on a SELinux system, you have to tell > # SELinux about this change. > # semanage port -a -t ssh_port_t -p tcp #PORTNUMBER > > The kernel has no specific knowledge of 'ssh_port_t' and all I need to > do to allow such port, is run the command above. No compiler, etc. > The distribution would have to have a policy, say, > 'unbindable_ports_t', and it could work similarly, I suppose, but I > have no knowledge on this part. For security reasons, Android does not allow reloading selinux policy after boot. I'm not a selinux expert either, but semanage-port(8) has: -N, --noreload Do not reload policy after commit which suggests that it works by reloading the policy.