From af78ffa1471e2a4d821dc31b8b523dc2b95f464a Mon Sep 17 00:00:00 2001 From: Patrick Murphy Date: Wed, 22 Apr 2020 22:11:23 -0500 Subject: fixed error that mislabeld username when assigning password --- src/commission_func.cc | 2 +- src/commission_func.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commission_func.cc b/src/commission_func.cc index e28cda3..08840c9 100644 --- a/src/commission_func.cc +++ b/src/commission_func.cc @@ -169,7 +169,7 @@ int begin_fcgi() { } /****passwd****/ - fpopen = popen(passwd_cmd_gen(tmp_pass).c_str(), "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 diff --git a/src/commission_func.h b/src/commission_func.h index 5f9307e..6bddba8 100644 --- a/src/commission_func.h +++ b/src/commission_func.h @@ -59,7 +59,7 @@ const std::string AASTYPE_ERR = "error"; /* popen cmd declarations */ const std::string POPEN_CLOSEALL = "/usr/sbin/start-stop-daemon -S -p /var/run/commissionoff.pid -b -a /bin/bash -- -c /usr/libexec/commission/off.sh"; -const std::string POPEN_MTS_UBPW = "/sbin/mts-uppasswd -up"; +const std::string POPEN_MTS_UBPW = "/sbin/mts-ubpasswd -up"; /* popen cmd generators */ std::string passwd_cmd_gen(std::string pw); -- cgit v1.2.3