_secure_path
int _secure_path(const char *_path, uid_t _uid, gid_t _gid);
if (_secure_path(userpath, pwd->pw_uid, pwd->pw_gid) != -1)
if (_secure_path(path_login_conf, 0, 0) != -1)