Skip to contentSkip to conversation

Compile error with the SVN version of the refpolicy.

PATCH Ryan Bradetich 2 participants 4 messages Feb 17, 2007 – Feb 20, 2007 SELinux security module

lore
Share & tools
lore
#0 lore raw

Hello all,

I am having a compile problem with the latest SVN check out of the refpolicy. Here is the error message:

/usr/bin/checkpolicy policy.conf -o /etc/selinux/refpolicy/policy/policy.21 /usr/bin/checkpolicy: loading policy configuration from policy.conf policy/modules/services/zebra.te:1136:ERROR 'syntax error' at token 'ntfs-3g' on line 1523915:
genfscon msdos / system_u:object_r:dosfs_t
genfscon ntfs-3g / system_u:object_r:dosfs_t
checkpolicy: error(s) encountered while parsing configuration
make: *** [/etc/selinux/refpolicy/policy/policy.21] Error 1

The problem is that checkpolicy does not appear to like the '-' character. I changed the '-' to a '_' in the policy/modules/kernel/filesystem.te file to fix the compile problem.

If this change is correct, I have provided a patch to someone can apply.

Thanks!

- Ryan

modules/kernel/filesystem.te +1 -1
Index: policy/modules/kernel/filesystem.te
===================================================================
@@ -153,7 +153,7 @@
 allow dosfs_t fs_t:filesystem associate;
 genfscon fat / gen_context(system_u:object_r:dosfs_t,s0)
 genfscon msdos / gen_context(system_u:object_r:dosfs_t,s0)
-genfscon ntfs-3g / gen_context(system_u:object_r:dosfs_t,s0)
+genfscon ntfs_3g / gen_context(system_u:object_r:dosfs_t,s0)
 genfscon ntfs / gen_context(system_u:object_r:dosfs_t,s0)
 genfscon vfat / gen_context(system_u:object_r:dosfs_t,s0)
 
#1 lore raw
Quoted 16 lines · Ryan Bradetich

Hello all,

I am having a compile problem with the latest SVN check out of the refpolicy. Here is the error message:

/usr/bin/checkpolicy policy.conf -o /etc/selinux/refpolicy/policy/policy.21 /usr/bin/checkpolicy: loading policy configuration from policy.conf policy/modules/services/zebra.te:1136:ERROR 'syntax error' at token 'ntfs-3g' on line 1523915:
genfscon msdos / system_u:object_r:dosfs_t
genfscon ntfs-3g / system_u:object_r:dosfs_t
checkpolicy: error(s) encountered while parsing configuration
make: *** [/etc/selinux/refpolicy/policy/policy.21] Error 1

Quoted 6 lines

The problem is that checkpolicy does not appear to like the '-' character. I changed the '-' to a '_' in the policy/modules/kernel/filesystem.te file to fix the compile problem.

If this change is correct, I have provided a patch to someone can apply.

No, the filesystem type string must match what the kernel module defines it to be, and in this case, it truly is "ntfs-3g". You need a newer checkpolicy (1.33.1 or later). When building refpolicy from the tresys svn, use the latest checkpolicy from the sourceforge svn.

Signature · 8 lines
Stephen Smalley
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#2 lore raw

Hello Stephen,

I had used the package from the Ubuntu Feisty repository which is version 1.32-1. I will revert my patch in my local tree and use the source from the SVN checkpolicy from sourceforge.

Thanks for your response!

- Ryan

Quoted 24 lines · Stephen Smalley
Quoted 16 lines · Ryan Bradetich

Hello all,

I am having a compile problem with the latest SVN check out of the refpolicy. Here is the error message:

/usr/bin/checkpolicy policy.conf -o /etc/selinux/refpolicy/policy/policy.21 /usr/bin/checkpolicy: loading policy configuration from policy.conf policy/modules/services/zebra.te:1136:ERROR 'syntax error' at token 'ntfs-3g' on line 1523915:
genfscon msdos / system_u:object_r:dosfs_t
genfscon ntfs-3g / system_u:object_r:dosfs_t
checkpolicy: error(s) encountered while parsing configuration
make: *** [/etc/selinux/refpolicy/policy/policy.21] Error 1

Quoted 6 lines

The problem is that checkpolicy does not appear to like the '-' character. I changed the '-' to a '_' in the policy/modules/kernel/filesystem.te file to fix the compile problem.

If this change is correct, I have provided a patch to someone can apply.

Quoted 10 lines

No, the filesystem type string must match what the kernel module defines it to be, and in this case, it truly is "ntfs-3g". You need a newer checkpolicy (1.33.1 or later). When building refpolicy from the tresys svn, use the latest checkpolicy from the sourceforge svn.

--
Stephen Smalley
National Security Agency

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#3 lore raw
Quoted 7 lines · Ryan Bradetich

Hello Stephen,

I had used the package from the Ubuntu Feisty repository which is version 1.32-1. I will revert my patch in my local tree and use the source from the SVN checkpolicy from sourceforge.

Thanks for your response!

Yes, 1.32 wouldn't have that change. 1.34 is available from the last nsa.gov/selinux release, so you could use that one, or you can use the sourceforge svn tree. Note that there is a stable branch in the sourceforge svn tree that you may want to track rather than the trunk.

Signature · 8 lines
Stephen Smalley
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.