MCPcopy Create free account
hub / github.com/USBGuard/usbguard / removeIPCAccessControlFile

Function removeIPCAccessControlFile

src/CLI/usbguard-remove-user.cpp:54–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52 }
53
54 static void removeIPCAccessControlFile(const std::string& path, const std::string& name, bool is_group)
55 {
56 IPCServer::checkAccessControlName(name);
57 const std::string basename = getIPCAccessControlFileBasename(name, is_group);
58 const std::string separator = (path.at(path.size() - 1) == '/' ? "" : "/");
59 const std::string filepath = path + separator + basename;
60
61 if (unlink(filepath.c_str()) != 0) {
62 throw ErrnoException("removeIPCAccessControlFile", filepath, errno);
63 }
64 }
65
66 int usbguard_remove_user(int argc, char* argv[])
67 {

Callers 1

usbguard_remove_userFunction · 0.85

Calls 2

ErrnoExceptionClass · 0.85

Tested by

no test coverage detected