summaryrefslogtreecommitdiff
path: root/src/commission_func.cc
diff options
context:
space:
mode:
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;