Blame SOURCES/fapolicyd-1.1.1-static.patch

df5829
diff -urp fapolicyd-1.1.1.orig/src/library/event.c fapolicyd-1.1.1/src/library/event.c
df5829
--- fapolicyd-1.1.1.orig/src/library/event.c	2022-01-28 15:23:58.000000000 -0500
df5829
+++ fapolicyd-1.1.1/src/library/event.c	2022-01-30 20:11:05.516785465 -0500
df5829
@@ -140,7 +140,14 @@ int new_event(const struct fanotify_even
df5829
 
df5829
 		// We need to reset everything now that execve has finished
df5829
 		if (s->info->state == STATE_STATIC_PARTIAL && !rc) {
df5829
-			s->info->state = STATE_STATIC;
df5829
+			// If the static app itself launches an app right
df5829
+			// away, go back to collecting.
df5829
+			if (e->type & FAN_OPEN_EXEC_PERM)
df5829
+				s->info->state = STATE_COLLECTING;
df5829
+			else {
df5829
+				s->info->state = STATE_STATIC;
df5829
+				skip_path = 1;
df5829
+			}
df5829
 			evict = 0;
df5829
 			skip_path = 1;
df5829
 			subject_reset(s, EXE);