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

Method write

src/Daemon/FileAuditBackend.cpp:29–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27namespace usbguard
28{
29 void FileAuditBackend::write(const AuditEvent& event)
30 {
31 std::string message;
32 message.append("uid=");
33 message.append(numberToString(event.identity().uid()));
34 message.append(" ");
35 message.append("pid=");
36 message.append(numberToString(event.identity().pid()));
37 message.append(" ");
38
39 for (const auto& kv_pair : event.keys()) {
40 message.append(kv_pair.first);
41 message.append("='");
42 message.append(kv_pair.second);
43 message.append("' ");
44 }
45
46 USBGUARD_LOG(Audit) << message;
47 }
48}
49
50/* vim: set ts=2 sw=2 et */

Callers

nothing calls this directly

Calls 4

appendMethod · 0.80
uidMethod · 0.80
pidMethod · 0.80
numberToStringFunction · 0.50

Tested by

no test coverage detected