summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPatrick Murphy <patrick.muprphy@multitech.com>2020-04-23 17:09:19 -0500
committerPatrick Murphy <patrick.muprphy@multitech.com>2020-04-23 17:09:19 -0500
commitae78344c45a861b1357695b575a0127656f80aa1 (patch)
treec7eeb6cdfd4395a58ee283f107677b449f6e4afe /src
parent0e6ff85e261941abb6890063929855670e40b718 (diff)
downloadcommissioning-ae78344c45a861b1357695b575a0127656f80aa1.tar.gz
commissioning-ae78344c45a861b1357695b575a0127656f80aa1.tar.bz2
commissioning-ae78344c45a861b1357695b575a0127656f80aa1.zip
modified passwd
Diffstat (limited to 'src')
-rw-r--r--src/commission_func.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/commission_func.cc b/src/commission_func.cc
index 5daccbd..aae520f 100644
--- a/src/commission_func.cc
+++ b/src/commission_func.cc
@@ -169,15 +169,11 @@ int begin_fcgi() {
}
/****passwd****/
- char cmd[64];
- sprintf(cmd, " sudo /usr/bin/passwd %s", tmp_usrname);
- //fpopen = popen(passwd_cmd_gen(tmp_usrname).c_str(), "w");
- fpopen = popen(cmd, "w");
+ fpopen = popen(passwd_cmd_gen(tmp_usrname).c_str(), "w");
if (fpopen == NULL) {
syslog (LOG_ALERT, "popen for passwd failed to return a useful pointer");
//handle error via logging, closing
}
- //parse_cmd = tmp_pass + "\n" + tmp_pass;
fprintf(fpopen, "%s\n", tmp_pass.c_str());
fprintf(fpopen, "%s\n", tmp_pass.c_str());
popen_ret = pclose(fpopen);
@@ -186,7 +182,7 @@ int begin_fcgi() {
// handle error via logging, closing
}
- /****mts-ubpasswd*/
+ /****mts-ubpasswd****/
fpopen = popen(POPEN_MTS_UBPW.c_str(), "w");
if (fpopen == NULL) {
syslog (LOG_ALERT, "mts-ubpasswd for passwd failed to return a useful pointer");