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

Method Daemon

src/Daemon/Daemon.cpp:107–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105 }
106
107 Daemon::Daemon()
108 : _config(G_config_known_names),
109 _audit(_audit_identity)
110 {
111 sigset_t signal_set;
112 sigfillset(&signal_set);
113
114 for (int del_signum : {
115 SIGSEGV, SIGABRT, SIGKILL, SIGILL
116 }) {
117 sigdelset(&signal_set, del_signum);
118 }
119 USBGUARD_SYSCALL_THROW("Daemon initialization",
120 (errno = pthread_sigmask(SIG_BLOCK, &signal_set, nullptr)) != 0);
121 _device_manager_backend = "uevent";
122 _implicit_policy_target = Rule::Target::Block;
123 _present_device_policy_method = DevicePolicyMethod::ApplyPolicy;
124 _present_controller_policy_method = DevicePolicyMethod::Keep;
125 _inserted_device_policy_method = DevicePolicyMethod::ApplyPolicy;
126 _device_rules_with_port = false;
127 _restore_controller_device_state = false;
128 pid_fd = -1;
129 }
130
131 Daemon::~Daemon()
132 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected