Merge pull request #176 from metalefty/v0.6-fix-pam-authentication-on-freebsd
sesman: Fix PAM authentication on FreeBSD
This commit is contained in:
commit
32f3f14e26
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user