Martijn van Duren wrote: > I'm not convinced that LOGIN_SETPATH is a good idea here. From what I > gathered that sets PATH from login.conf(5), while most environments I > know will use .profile to set it and could cause unexpected behaviour > if the my and targ PATH are reset to unexpected values. > > I would vote to safe PATH from the caller instead of getting a likely > unexpected or incomplete PATH environment based on login.conf.
Short answer is this is what su - does. We can set a default safe path, but there's no reason that's better than what's in .profile either. With login.conf, we get a safe default and a way for the admin to fix it if it's not what they want.