| 47 | const char* const G_optstring = "dfskKl:p:c:hWCP"; |
| 48 | |
| 49 | static void printUsage(std::ostream& stream, const char* arg0) |
| 50 | { |
| 51 | stream << std::endl; |
| 52 | stream << "Usage: " << filenameFromPath(std::string(arg0), true) << " [OPTIONS]" << std::endl; |
| 53 | stream << std::endl; |
| 54 | stream << " -d Enable debugging messages in the log." << std::endl; |
| 55 | stream << " -f Enable classical daemon forking behavior." << std::endl; |
| 56 | stream << " -s Log to syslog." << std::endl; |
| 57 | stream << " -k Log to console." << std::endl; |
| 58 | stream << " -K Disable Logging to console." << std::endl; |
| 59 | stream << " -l <path> Log to a file at `path'." << std::endl; |
| 60 | stream << " -p <path> Write PID to a file at `path'." << std::endl; |
| 61 | stream << " -c <path> Load configuration from a file at `path'." << std::endl; |
| 62 | stream << " -P Disable permissions check on conf and policy files" << std::endl; |
| 63 | stream << " (default: /etc/usbguard/usbguard-daemon.conf)" << std::endl; |
| 64 | stream << " -C Drop capabilities to limit privileges of the process." << std::endl; |
| 65 | stream << " -W Use a seccomp allowlist to limit available syscalls to the process." << std::endl; |
| 66 | stream << " -h Show this usage screen." << std::endl; |
| 67 | stream << std::endl; |
| 68 | } |
| 69 | |
| 70 | int main(int argc, char* argv[]) |
| 71 | { |
no test coverage detected