Merge pull request #176 from metalefty/v0.6-fix-pam-authentication-on-freebsd

sesman: Fix PAM authentication on FreeBSD
This commit is contained in:
jsorg71 2014-10-20 13:27:57 -07:00
commit 32f3f14e26

View File

@ -117,6 +117,14 @@ auth_userpass(char* user, char* pass)
g_free(auth_info);
return 0;
}
error = pam_set_item(auth_info->ph, PAM_TTY, service_name);
if (error != PAM_SUCCESS)
{
g_printf("pam_set_item failed: %s\r\n",
pam_strerror(auth_info->ph, error));
}
error = pam_authenticate(auth_info->ph, 0);
if (error != PAM_SUCCESS)
{