Skip to content

Commit

Permalink
selinux: fix Makefile dependencies of flask.h
Browse files Browse the repository at this point in the history
Make the flask.h target depend on the genheaders binary instead of
classmap.h to ensure that it is rebuilt if any of the dependencies of
genheaders are changed.

Notably this fixes flask.h not being rebuilt when
initial_sid_to_string.h is modified.

Fixes: 8753f6b ("selinux: generate flask headers during kernel build")
Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
Acked-by: Stephen Smalley <stephen.smalley.work@gmail.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
  • Loading branch information
Ondrej Mosnacek authored and Paul Moore committed Apr 12, 2023
1 parent 539813e commit bcab1ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions security/selinux/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ ccflags-y := -I$(srctree)/security/selinux -I$(srctree)/security/selinux/include
$(addprefix $(obj)/,$(selinux-y)): $(obj)/flask.h

quiet_cmd_flask = GEN $(obj)/flask.h $(obj)/av_permissions.h
cmd_flask = scripts/selinux/genheaders/genheaders $(obj)/flask.h $(obj)/av_permissions.h
cmd_flask = $< $(obj)/flask.h $(obj)/av_permissions.h

targets += flask.h av_permissions.h
$(obj)/flask.h: $(src)/include/classmap.h FORCE
$(obj)/flask.h: scripts/selinux/genheaders/genheaders FORCE
$(call if_changed,flask)

0 comments on commit bcab1ad

Please sign in to comment.