diff options
author | Patrick Murphy <Patrick.Murphy@multitech.com> | 2020-06-12 11:15:57 -0500 |
---|---|---|
committer | Patrick Murphy <Patrick.Murphy@multitech.com> | 2020-06-12 11:15:57 -0500 |
commit | 7423ff98eb234188a9441ad95e5490ac5584df7b (patch) | |
tree | fb9e1395c73a32f8706039c01bb98df39ae17c1c | |
parent | d3f1ca834316c060197ab90e1e7e8618600aeda5 (diff) | |
download | commissioning-7423ff98eb234188a9441ad95e5490ac5584df7b.tar.gz commissioning-7423ff98eb234188a9441ad95e5490ac5584df7b.tar.bz2 commissioning-7423ff98eb234188a9441ad95e5490ac5584df7b.zip |
loosened checks on legalName function to only prevent commissioning root user
-rw-r--r-- | src/commission_func.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/commission_func.cc b/src/commission_func.cc index aae520f..21c5d16 100644 --- a/src/commission_func.cc +++ b/src/commission_func.cc @@ -370,7 +370,7 @@ bool legalName(std::string name) { char *temp = NULL; std::string popen_out; */ - if (getpwnam(name.c_str()) == NULL) { + if (name != "root") { syslog (LOG_ALERT, "Received a legal name request"); //the name is available return true; @@ -392,4 +392,4 @@ std::string useradd_cmd_gen(std::string usr) { cmd +=usr; cmd +="\""; return cmd; -}
\ No newline at end of file +} |