2017-07-28 Fred Gleason <fredg@paravelsystems.com>

* Refactored the 'RDUser::authenticated()' method to eliminate use
	of rdauth(8).
This commit is contained in:
Fred Gleason
2017-07-28 09:09:56 -04:00
parent e344975433
commit 2b3919ff6c
2 changed files with 8 additions and 5 deletions

View File

@@ -69,11 +69,11 @@ bool RDUser::authenticated(bool webuser) const
}
#ifndef WIN32
else {
QString cmd=
"rdauth "+pamService()+" "+RDEscapeShellString(user_name)+" "+
RDEscapeShellString(user_password);
int exitcode=system(cmd);
return WEXITSTATUS(exitcode)==0;
bool ret=false;
RDPam *pam=new RDPam(pamService());
ret=pam->authenticate(user_name,user_password);
delete pam;
return ret;
}
#endif // WIN32
return false;