diff --git a/userspace/engine/falco_engine.cpp b/userspace/engine/falco_engine.cpp index 101ffe49..9f28c80e 100644 --- a/userspace/engine/falco_engine.cpp +++ b/userspace/engine/falco_engine.cpp @@ -448,7 +448,7 @@ void falco_engine::read_file(const std::string& filename, std::string& contents) is.open(filename); if (!is.is_open()) { - throw falco_exception("Could not open " + filename + " for reading."); + throw falco_exception("Could not open " + filename + " for reading"); } contents.assign(istreambuf_iterator(is), diff --git a/userspace/falco/app_actions/create_requested_paths.cpp b/userspace/falco/app_actions/create_requested_paths.cpp index 77d73bf5..80ff14cd 100644 --- a/userspace/falco/app_actions/create_requested_paths.cpp +++ b/userspace/falco/app_actions/create_requested_paths.cpp @@ -37,7 +37,7 @@ application::run_result application::create_requested_paths() std::ifstream reader(m_options.gvisor_config); if (reader.fail()) { - return run_result::fatal(m_options.gvisor_config + ": cannot open file."); + return run_result::fatal(m_options.gvisor_config + ": cannot open file"); } nlohmann::json parsed_json; diff --git a/userspace/falco/app_actions/create_signal_handlers.cpp b/userspace/falco/app_actions/create_signal_handlers.cpp index 46fa1e99..82ca9900 100644 --- a/userspace/falco/app_actions/create_signal_handlers.cpp +++ b/userspace/falco/app_actions/create_signal_handlers.cpp @@ -93,7 +93,7 @@ application::run_result application::attach_inotify_signals() inot_fd = inotify_init(); if (inot_fd == -1) { - return run_result::fatal("Could not create inotify handler."); + return run_result::fatal("Could not create inotify handler"); } struct sigaction sa; @@ -102,13 +102,13 @@ application::run_result application::attach_inotify_signals() sa.sa_handler = restart_falco; if (sigaction(SIGIO, &sa, NULL) == -1) { - return run_result::fatal("Failed to link SIGIO to inotify handler."); + return run_result::fatal("Failed to link SIGIO to inotify handler"); } /* Set owner process that is to receive "I/O possible" signal */ if (fcntl(inot_fd, F_SETOWN, getpid()) == -1) { - return run_result::fatal("Failed to setting owner on inotify handler."); + return run_result::fatal("Failed to setting owner on inotify handler"); } /* @@ -118,14 +118,14 @@ application::run_result application::attach_inotify_signals() int flags = fcntl(inot_fd, F_GETFL); if (fcntl(inot_fd, F_SETFL, flags | O_ASYNC | O_NONBLOCK) == -1) { - return run_result::fatal("Failed to setting flags on inotify handler."); + return run_result::fatal("Failed to setting flags on inotify handler"); } // Watch conf file int wd = inotify_add_watch(inot_fd, m_options.conf_filename.c_str(), IN_CLOSE_WRITE); if (wd == -1) { - return run_result::fatal("Failed to watch conf file."); + return run_result::fatal("Failed to watch conf file"); } falco_logger::log(LOG_DEBUG, "Watching " + m_options.conf_filename +"\n"); diff --git a/userspace/falco/app_actions/daemonize.cpp b/userspace/falco/app_actions/daemonize.cpp index f5ba009f..df6492d5 100644 --- a/userspace/falco/app_actions/daemonize.cpp +++ b/userspace/falco/app_actions/daemonize.cpp @@ -34,7 +34,7 @@ application::run_result application::daemonize() pid = fork(); if (pid < 0) { // error - return run_result::fatal("Could not fork."); + return run_result::fatal("Could not fork"); } else if (pid > 0) { // parent. Write child pid to pidfile and exit std::ofstream pidfile; @@ -54,7 +54,7 @@ application::run_result application::daemonize() // Become own process group. sid = setsid(); if (sid < 0) { - return run_result::fatal("Could not set session id."); + return run_result::fatal("Could not set session id"); } // Set umask so no files are world anything or group writable. @@ -62,7 +62,7 @@ application::run_result application::daemonize() // Change working directory to '/' if ((chdir("/")) < 0) { - return run_result::fatal("Could not change working directory to '/'."); + return run_result::fatal("Could not change working directory to '/'"); } // Close stdin, stdout, stderr and reopen to /dev/null diff --git a/userspace/falco/app_actions/open_inspector.cpp b/userspace/falco/app_actions/open_inspector.cpp index 3c909bad..0a136c8a 100644 --- a/userspace/falco/app_actions/open_inspector.cpp +++ b/userspace/falco/app_actions/open_inspector.cpp @@ -108,7 +108,7 @@ application::run_result application::open_live_inspector( catch(sinsp_exception &e) { // Try to insert the Falco kernel module - falco_logger::log(LOG_INFO, "Trying to inject the Kernel module and starting the capture again..."); + falco_logger::log(LOG_INFO, "Trying to inject the Kernel module and opening the capture again..."); if(system("modprobe " DRIVER_NAME " > /dev/null 2> /dev/null")) { falco_logger::log(LOG_ERR, "Unable to load the driver\n");