mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
parser: fix cache time stamp check to include dir time stamps
Currently for directory includes the directory timestamp is ignored. This is wrong as operations like removing a file from the dir won't be considered in the timestamp check. Fix this by updating the timestamp check to include the included directories timestamp. MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/760 Signed-off-by: John Johansen <john@jjmx.net> Acked-by: Georgia Garcia <georgia.garcia@canonical.com>
This commit is contained in:
parent
f466e80d18
commit
3d1232e640
1 changed files with 1 additions and 0 deletions
|
@ -202,6 +202,7 @@ void include_filename(char *filename, int search, bool if_exists)
|
|||
yypush_buffer_state(yy_create_buffer( yyin, YY_BUF_SIZE ));
|
||||
} else if (S_ISDIR(my_stat.st_mode)) {
|
||||
struct cb_struct data = { fullpath, filename };
|
||||
update_mru_tstamp(include_file, fullpath);
|
||||
fclose(include_file);
|
||||
include_file = NULL;
|
||||
if (dirat_for_each(AT_FDCWD, fullpath, &data, include_dir_cb)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue