summaryrefslogtreecommitdiff
path: root/src/commission_func.cc
diff options
context:
space:
mode:
authorPatrick Murphy <patrick.muprphy@multitech.com>2020-04-23 12:48:42 -0500
committerPatrick Murphy <patrick.muprphy@multitech.com>2020-04-23 12:48:42 -0500
commitb4c9a323c262f8e3f240574247adecaf6fddfda4 (patch)
tree6b187a10da6a9d6cd5ec65c668a1a87b7ad776ff /src/commission_func.cc
parentb32b04c3f1b354b0b75c5c8badae714a35b9d62b (diff)
downloadcommissioning-b4c9a323c262f8e3f240574247adecaf6fddfda4.tar.gz
commissioning-b4c9a323c262f8e3f240574247adecaf6fddfda4.tar.bz2
commissioning-b4c9a323c262f8e3f240574247adecaf6fddfda4.zip
modified password assignment
Diffstat (limited to 'src/commission_func.cc')
-rw-r--r--src/commission_func.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/commission_func.cc b/src/commission_func.cc
index 14dd49f..c74a137 100644
--- a/src/commission_func.cc
+++ b/src/commission_func.cc
@@ -169,7 +169,10 @@ int begin_fcgi() {
}
/****passwd****/
- fpopen = popen(passwd_cmd_gen(tmp_usrname).c_str(), "w");
+ char cmd[64];
+ sprintf(cmd, "/usr/bin/passwd %s", tmp_usrname);
+ //fpopen = popen(passwd_cmd_gen(tmp_usrname).c_str(), "w");
+ fpopen = popen(cmd, "w");
if (fpopen == NULL) {
syslog (LOG_ALERT, "popen for passwd failed to return a useful pointer");
//handle error via logging, closing
@@ -382,7 +385,7 @@ bool legalName(std::string name) {
/*** generate command functions ***/
std::string passwd_cmd_gen(std::string pw) {
- std::string cmd = "passwd \"";
+ std::string cmd = "/usr/bin/passwd \"";
cmd +=pw;
cmd +="\"";
return cmd;