Thank you for your response. I still have some questions regarding the issue with the patch *aide-verbose.patch*. You mentioned that it is easy to verify if the patch gets applied and that it is a revert. However, I am unsure why the following issues are not causing any errors during compilation:
1. *Scope Issue with num Variable*: The num variable is defined in the set_database_attr_option function, but it is used in the eval_config_statement function. As per my understanding of C language, variables are only accessible within the scope in which they are defined. Therefore, I would expect a compilation error when trying to use num in a different function. Could you please clarify why this scope issue does not prevent the code from compiling successfully? 2. *Illogical Condition (if (num < 0 && num > 255))*: The condition if (num < 0 && num > 255) seems logically incorrect because num cannot simultaneously be less than 0 and greater than 255. In most cases, such a condition would either be flagged as an error or at least a warning by the compiler. However, the code compiles without any issues. Is it possible that the compiler optimizes this out, or is there something else I'm missing? I would appreciate your insights on these issues and any clarification regarding how they do not interfere with the patch's application or compilation process. Thank you once again for your time and attention. Peng Ian Kent <ra...@themaw.net> 于2025年2月24日周一 11:59写道: > On 24/2/25 11:07, Jian Peng wrote: > > Dear Fedora Development Team, > > I hope this email finds you well. > > I have submitted a bug report on Fedora's Bugzilla regarding an issue > > with the Aide project (ID: 2346091 > > <https://bugzilla.redhat.com/show_bug.cgi?id=2346091>), which involves > > a patch fix and modification for the project. > > As I have not received a response yet, I would like to follow up > > through this mailing list. I am seeking further assistance or guidance > > regarding the progress of the patch and the steps for handling it. > > If replying to Bugzilla is not convenient for you, I’ll briefly > > summarize the issue here: > > What is it you are asking to be done? > > > It's easy enough to verify the patch gets applied and it is a revert. > > The package builds fine as it is. > > So I don't know what you are asking. > > > Ian > > > > > ``` diff -up ./src/conf_eval.c.fix ./src/conf_eval.c --- > > ./src/conf_eval.c.fix 2023-12-22 12:12:22.961141634 +0100 +++ > > ./src/conf_eval.c 2023-12-22 14:09:21.217786675 +0100 @@ -166,6 +166,7 > > @@ static DB_ATTR_TYPE eval_attribute_expre static void > > set_database_attr_option(DB_ATTR_TYPE attr, int linenumber, char > > *filename, char* linebuf) { char *str; + long num; > > DB_ATTR_TYPE hashes = get_hashes(true); if > > (attr&(~hashes)) { @@ -298,8 +299,20 @@ static void > > eval_config_statement(config > > LOG_CONFIG_FORMAT_LINE(LOG_LEVEL_CONFIG, "set 'config_version' option > > to '%s'", str) break; case VERBOSE_OPTION: - > > log_msg(LOG_LEVEL_ERROR, "%s:%d: 'verbose' option is no longer > > supported, use 'log_level' and 'report_level' options instead (see man > > aide.conf for details) (line: '%s')", conf_filename, conf_linenumber, > > conf_linebuf); - exit(INVALID_CONFIGURELINE_ERROR); + > > log_msg(LOG_LEVEL_CONFIG, "%s:%d: 'verbose' option is deprecated, > > use 'log_level' and 'report_level' options instead (see man aide.conf > > for details) (line: '%s')", conf_filename, conf_linenumber, > > conf_linebuf); + str = eval_string_expression(statement.e, > > linenumber, filename, linebuf); + num = strtol(str, NULL, > > 10); + + if (num < 0 && num > 255) { + > > LOG_CONFIG_FORMAT_LINE(LOG_LEVEL_ERROR, "invalid verbose level: > > '%s'", str); + exit(INVALID_CONFIGURELINE_ERROR); + > > } + + if (num >= 10) { + > > set_log_level(LOG_LEVEL_DEBUG); + } + + > > free(str); break; case LIMIT_CMDLINE_OPTION: > > /* command-line options are ignored here */ ``` > > The patch 'aide-verbose.patch' contains a scoping issue with the `num` > > variable, which is defined in one function > > (`set_database_attr_option`) but used in another > > (`eval_config_statement`), causing a compilation error. Additionally, > > the condition `if (num < 0 && num > 255)` is logically incorrect as > > `num` cannot simultaneously be less than 0 and greater than 255. > > Thank you for your time and attention. Looking forward to your response. > > Thank you! > > penny > > Student > > > -- > _______________________________________________ > devel mailing list -- devel@lists.fedoraproject.org > To unsubscribe send an email to devel-le...@lists.fedoraproject.org > Fedora Code of Conduct: > https://docs.fedoraproject.org/en-US/project/code-of-conduct/ > List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines > List Archives: > https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org > Do not reply to spam, report it: > https://pagure.io/fedora-infrastructure/new_issue >
-- _______________________________________________ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue