sesman: hand merge #176 from v0.6 branch, indent changes
This commit is contained in:
parent
a3e017cd58
commit
29ebab2ce5
@ -118,22 +118,31 @@ auth_userpass(char *user, char *pass, int *errorcode)
|
||||
|
||||
if (error != PAM_SUCCESS)
|
||||
{
|
||||
if(errorcode!=NULL){
|
||||
*errorcode = error ;
|
||||
}
|
||||
if (errorcode != NULL)
|
||||
{
|
||||
*errorcode = error;
|
||||
}
|
||||
g_printf("pam_start failed: %s\r\n", pam_strerror(auth_info->ph, error));
|
||||
pam_end(auth_info->ph, error);
|
||||
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)
|
||||
{
|
||||
if(errorcode!=NULL){
|
||||
*errorcode = error ;
|
||||
}
|
||||
if (errorcode != NULL)
|
||||
{
|
||||
*errorcode = error;
|
||||
}
|
||||
g_printf("pam_authenticate failed: %s\r\n",
|
||||
pam_strerror(auth_info->ph, error));
|
||||
pam_end(auth_info->ph, error);
|
||||
@ -150,9 +159,10 @@ auth_userpass(char *user, char *pass, int *errorcode)
|
||||
|
||||
if (error != PAM_SUCCESS)
|
||||
{
|
||||
if(errorcode!=NULL){
|
||||
*errorcode = error ;
|
||||
}
|
||||
if (errorcode != NULL)
|
||||
{
|
||||
*errorcode = error;
|
||||
}
|
||||
g_printf("pam_acct_mgmt failed: %s\r\n",
|
||||
pam_strerror(auth_info->ph, error));
|
||||
pam_end(auth_info->ph, error);
|
||||
|
Loading…
Reference in New Issue
Block a user