libselinux/libselinux-rhat.patch
Daniel J Walsh d4111cf41f - Update from NSA
Changed matchpathcon_common to ignore any non-format bits in the mode.
2005-03-02 04:04:04 +00:00

16 lines
553 B
Diff

diff --exclude-from=exclude -N -u -r nsalibselinux/src/matchpathcon.c libselinux-1.21.11/src/matchpathcon.c
--- nsalibselinux/src/matchpathcon.c 2005-02-22 16:34:17.000000000 -0500
+++ libselinux-1.21.11/src/matchpathcon.c 2005-02-28 13:27:33.000000000 -0500
@@ -679,6 +679,11 @@
mode_t mode,
security_context_t *con)
{
+ /* If the user provides a mode but does not provide a file type
+ default to regular file */
+ if (mode && ((mode & S_IFMT)==0)) {
+ mode = mode | S_IFREG;
+ }
int i = matchpathcon_common(name, mode);
if (i < 0)