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

* Added an rdauth(1) utility in 'utils/rdauth/'.
	* Fixed a regression in 'lib/rdcart.cpp' that caused the 'Import'
	web API call to fail with an 'unsupported format' error.
This commit is contained in:
Fred Gleason
2017-04-06 15:26:30 -04:00
parent 2dd20efbad
commit 0eda6b79fc
10 changed files with 181 additions and 17 deletions

View File

@@ -18,6 +18,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
#include <stdlib.h>
#include <rdconf.h>
#include <rdpam.h>
#include <rduser.h>
@@ -66,10 +68,10 @@ bool RDUser::authenticated(bool webuser) const
delete q;
}
else {
RDPam *pam=new RDPam(pamService());
bool ret=pam->authenticate(user_name,user_password);
delete pam;
return ret;
QString cmd=
"rdauth "+pamService()+" \""+user_name+"\" \""+user_password+"\"";
int exitcode=system(cmd);
return WEXITSTATUS(exitcode)==0;
}
return false;