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

* Added an 'RDEscapeShellString()' function in 'lib/rdescape_string.h'
	and 'lib/rdescape_string.cpp'.
	* Fixed a bug in 'lib/rduser.cpp' that caused PAM authentication of
	accounts with a password containing one or more '$' characters to fail.
This commit is contained in:
Fred Gleason
2017-07-17 12:05:58 -04:00
parent 4d6187bb61
commit 095ee50edc
4 changed files with 16 additions and 79 deletions

View File

@@ -70,7 +70,8 @@ bool RDUser::authenticated(bool webuser) const
#ifndef WIN32
else {
QString cmd=
"rdauth "+pamService()+" \""+user_name+"\" \""+user_password+"\"";
"rdauth "+pamService()+" "+RDEscapeShellString(user_name)+" "+
RDEscapeShellString(user_password);
int exitcode=system(cmd);
return WEXITSTATUS(exitcode)==0;
}