archlinuxhardened / selinux

PKGBUILDs to build SELinux enabled packages for Arch Linux
145 stars 25 forks source link

Incorrect paths. From another policy #97

Open javlock opened 2 years ago

javlock commented 2 years ago

no such file or directory

/etc/selinux/config SELINUX=permissive SELINUXTYPE=refpolicy-arch

Скриншот_Выберите область_20220110143848

fishilico commented 2 years ago

Hello, I do not understand what issue you are reporting. What are you trying to do and what issue are you encountering? More precisely, which command are you running, which triggers the make -f /usr/share/selinux/devel/Makefile... command?

jMeTeora commented 2 years ago

Скриншот_Выберите область_20220129062448

jMeTeora commented 2 years ago

policy build script calls 'make' with non-existent Makefile

Here are the files i currently have:

find 2>/dev/null /etc /usr/ -type f  -name *akefile*|grep -i seli 

/etc/selinux/refpolicy/src/policy/doc/Makefile.example
/etc/selinux/refpolicy/src/policy/support/Makefile.devel
/etc/selinux/refpolicy/src/policy/Makefile
/usr/lib/modules/5.15.16-hardened1-1-hardened/build/scripts/selinux/Makefile
/usr/lib/modules/5.15.16-hardened1-1-hardened/build/scripts/selinux/genheaders/Makefile
/usr/lib/modules/5.15.16-hardened1-1-hardened/build/scripts/selinux/mdp/Makefile
/usr/lib/modules/5.15.18-1-lts/build/scripts/selinux/Makefile
/usr/lib/modules/5.15.18-1-lts/build/scripts/selinux/genheaders/Makefile
/usr/lib/modules/5.15.18-1-lts/build/scripts/selinux/mdp/Makefile
/usr/lib/modules/5.16.4-arch1-1/build/scripts/selinux/Makefile
/usr/lib/modules/5.16.4-arch1-1/build/scripts/selinux/genheaders/Makefile
/usr/lib/modules/5.16.4-arch1-1/build/scripts/selinux/mdp/Makefile
/usr/lib/modules/5.16.4-zen1-1-zen/build/scripts/selinux/Makefile
/usr/lib/modules/5.16.4-zen1-1-zen/build/scripts/selinux/genheaders/Makefile
/usr/lib/modules/5.16.4-zen1-1-zen/build/scripts/selinux/mdp/Makefile
/usr/share/selinux/refpolicy-arch/include/Makefile
/usr/share/selinux/refpolicy-git/include/Makefile
jMeTeora commented 2 years ago

I can get the full path to the makefile of the policy in use like so:

echo /usr/share/selinux/$(cat /etc/selinux/config|grep -v "^#"|grep -i SELINUXTYPE|tr "=" "\n"|grep -v SELINUXTYPE)/include/Makefile

0 0 2 png

jMeTeora commented 2 years ago

in *.sh script file rpmbuild from community/rpm-tools package 3

freedom1b2830 commented 2 years ago

@fishilico javlock ,jMeTeora is my account (can't restore access ...) using the policy creation wizard (its console and graphical versions), an executable $policy_name.sh is generated in which a makefile is used from a non-existent directory: /usr/share/selinux/devel/Makefile

there are only 3 policies:

/etc/selinux/refpolicy/src/policy/Makefile
/usr/share/selinux/refpolicy-arch/include/Makefile
/usr/share/selinux/refpolicy-git/include/Makefile