Skip to content

Conversation

@MatthiasHeinz
Copy link

@MatthiasHeinz MatthiasHeinz commented Jun 26, 2022

Change in behavior:

  • Lines 91, 181-184: Previously running "/home/user/logrotten -d -p /home/user/payload /home/user/.logs_backup/moodle_access" would yield a debug output of
    logfile: /home/user/.logs_backup/moodle_access
    [...]
    p: moodle_access
    where clearly "p" should display "payload". Lines 182, 183 are necessary, because otherwise a relative path to payload (by calling "./logrotten -d -p payload ./.logs_backup/moodle_access") would just yield "ayload" (without the "p"). I'd assume, the same issue could arise for some of the other parameters, if their path does not contain a "/" (the parameter "index" is set to "j+1" unconditionally).

Cosmetic change:

  • Line 222: Modified the debug-print to display "payloadfile" instead of "p", as every other parameter is displayed by its long name.

Change in behavior:
- Lines 91, 181-184: Previously running "/home/user/logrotten -d -p /home/user/payload /home/user/.logs_backup/moodle_access" would yield a debug output of
	logfile: /home/user/.logs_backup/moodle_access
	[...]
	p: moodle_access
where clearly "p" should display "payload". Lines 182, 183 are necessary, because otherwise a relative path to payload (by calling "./logrotten -d -p payload ./.logs_backup/moodle_access") would just yield "ayload" (without the "p"). I'd assume, the same issue could arise for some of the other parameters, if their path does not contain a "/" (the parameter "index" is set to "j+1" unconditionally).

Cosmetic change:
- Line 222: Modified the debug-print to display "payloadfile" instead of "p", as every other parameter is displayed by its long name.
@MatthiasHeinz
Copy link
Author

I just realized, that the comparison "if(strcmp(event->name,p) == 0)" later on breaks after this change.

"event->name" equals "moodle_access" (name of the moved file) in my previous example, so the previously attached commit does not quite work.

Nonetheless, the debug-print is kind of wrong for the parameter "p".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant