+ /* Confirmation by an environment variable. The valid value is y/Y.
+ * If the user provide anything other string, it is considered as
+ * n/N; please note that the old code only accepts y/Y/n/N. So if
+ * the variable OSSEC_ACTION_CONFIRMED is 'foobar', the program will
+ * go into an infinite loop. */
+ user_input = getenv("OSSEC_ACTION_CONFIRMED");
+ if (user_input == NULL) user_input = read_from_user();
+
+ /* If user accepts to add */