Fwiw, I looked at the code of "su.c" from util-linux (because debian/ubuntu may switch to it, see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=833256) and it looks like the bug is not present there. The su-common.c:modify_environment() code will first setenv_path() from login.defs and then do the supam_export_environment() which will override the existing PATH if /etc/environment also defines it.
Fwiw, I looked at the code of "su.c" from util-linux (because debian/ubuntu may switch to it, see https:/ /bugs.debian. org/cgi- bin/bugreport. cgi?bug= 833256) and it looks like the bug is not present there. The su-common. c:modify_ environment( ) code will first setenv_path() from login.defs and then do the supam_export_ environment( ) which will override the existing PATH if /etc/environment also defines it.