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

@@ -15907,3 +15907,6 @@
* Fixed a bug in 'lib/rdevent_line.cpp' that caused embedded traffic * Fixed a bug in 'lib/rdevent_line.cpp' that caused embedded traffic
import events to be assigned incorrect link parameters when scheduled import events to be assigned incorrect link parameters when scheduled
immediately after a voice track. immediately after a voice track.
2017-07-28 Fred Gleason <fredg@paravelsystems.com>
* Refactored the 'RDUser::authenticated()' method to eliminate use
of rdauth(8).

View File

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