mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-22 18:17:09 +00: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
@ -202,6 +202,7 @@ void include_filename(char *filename, int search, bool if_exists)
|
|||||||
yypush_buffer_state(yy_create_buffer( yyin, YY_BUF_SIZE ));
|
yypush_buffer_state(yy_create_buffer( yyin, YY_BUF_SIZE ));
|
||||||
} else if (S_ISDIR(my_stat.st_mode)) {
|
} else if (S_ISDIR(my_stat.st_mode)) {
|
||||||
struct cb_struct data = { fullpath, filename };
|
struct cb_struct data = { fullpath, filename };
|
||||||
|
update_mru_tstamp(include_file, fullpath);
|
||||||
fclose(include_file);
|
fclose(include_file);
|
||||||
include_file = NULL;
|
include_file = NULL;
|
||||||
if (dirat_for_each(AT_FDCWD, fullpath, &data, include_dir_cb)) {
|
if (dirat_for_each(AT_FDCWD, fullpath, &data, include_dir_cb)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user