From 7423ff98eb234188a9441ad95e5490ac5584df7b Mon Sep 17 00:00:00 2001 From: Patrick Murphy Date: Fri, 12 Jun 2020 11:15:57 -0500 Subject: loosened checks on legalName function to only prevent commissioning root user --- src/commission_func.cc | 4 ++-- 1 file 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 +} -- cgit v1.2.3