cfengine/cfengine-2.1.22-chflags.dif

39 lines
1018 B
Plaintext

--- src/filedir.c
+++ src/filedir.c
@@ -276,7 +276,7 @@
int amroot = true, fixmode = true, docompress=false;
unsigned char digest[EVP_MAX_MD_SIZE+1];
-#if defined HAVE_CHFLAGS
+#if defined HAVE_CHFLAGS && ! defined __linux__
u_long newflags;
#endif
@@ -294,7 +294,7 @@
Debug("%s: Checking fs-object %s\n",VPREFIX,file);
-#if defined HAVE_CHFLAGS
+#if defined HAVE_CHFLAGS && ! defined __linux__
if (ptr != NULL)
{
Debug("CheckExistingFile(+%o,-%o,+%o,-%o)\n",plus,minus,ptr->plus_flags,ptr->minus_flags);
@@ -512,7 +512,7 @@
}
}
-#ifndef HAVE_CHFLAGS
+#if ! defined HAVE_CHFLAGS || defined __linux__
if (((newperm & 07777) == (dstat->st_mode & 07777)) && (action != touch)) /* file okay */
{
Debug("File okay, newperm = %o, stat = %o\n",(newperm & 07777),(dstat->st_mode & 07777));
@@ -661,7 +661,7 @@
}
-#if defined HAVE_CHFLAGS /* BSD special flags */
+#if defined HAVE_CHFLAGS && ! defined __linux__ /* BSD special flags */
if (ptr != NULL)
{