MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / createGroup

Function createGroup

programs/install/Install.cpp:150–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148}
149
150static void createGroup(const String & group_name)
151{
152 if (!group_name.empty())
153 {
154#if defined(OS_DARWIN)
155 // TODO: implement.
156 throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Unable to create a group in macOS");
157#elif defined(OS_FREEBSD)
158 std::string command = fmt::format("pw groupadd {}", shellQuote(group_name));
159 fmt::print(" {}\n", command);
160 executeScript(command);
161#else
162 std::string command = fmt::format("groupadd -r {}", shellQuote(group_name));
163 fmt::print(" {}\n", command);
164 executeScript(command);
165#endif
166 }
167}
168
169static void createUser(const String & user_name, [[maybe_unused]] const String & group_name)
170{

Callers 1

Install.cppFile · 0.85

Calls 6

shellQuoteFunction · 0.85
executeScriptFunction · 0.85
ExceptionClass · 0.50
formatFunction · 0.50
printFunction · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected