]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
src/install.c (setdefaultfilecon): Stub-out the entire function.
authorJim Meyering <meyering@redhat.com>
Wed, 14 Nov 2007 22:34:19 +0000 (23:34 +0100)
committerJim Meyering <meyering@redhat.com>
Wed, 14 Nov 2007 22:34:56 +0000 (23:34 +0100)
ChangeLog
src/install.c

index b6b86bb9644c958ede9240bfac4e44c737830e4c..d598557267407b27ee6b9c65ae2d5e313ba7df38 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,7 @@
        #ifdef-out matchpathcon-related code, for now.
        * src/install.c (setdefaultfilecon): #ifdef-out all of the
        matchpathcon-related code, until it's more efficient.
+       (setdefaultfilecon): Instead of the above, stub-out the entire function.
 
        Use gnulib's stpncpy module, now required by install.c
        * bootstrap.conf (gnulib_modules): Add stpncpy.
index 450370e6c97013ab31c07165a318a5ced64bba8a..8e48758448540e2b81978671ce6ca62c1b7a5f09 100644 (file)
@@ -197,6 +197,7 @@ cp_option_init (struct cp_options *x)
   x->src_info = NULL;
 }
 
+#ifdef ENABLE_WHEN_MATCHPATHCON_IS_MORE_EFFICIENT
 /* Modify file context to match the specified policy.
    If an error occurs the file will remain with the default directory
    context.  */
@@ -213,7 +214,6 @@ setdefaultfilecon (char const *file)
   if (lstat (file, &st) != 0)
     return;
 
-#ifdef ENABLE_WHEN_MATCHPATHCON_IS_MORE_EFFICIENT
   if (IS_ABSOLUTE_FILE_NAME (file))
     {
       /* Calling matchpathcon_init_prefix (NULL, "/first_component/")
@@ -255,7 +255,6 @@ setdefaultfilecon (char const *file)
        freecon (scontext);
       return;
     }
-#endif
 
   if (lsetfilecon (file, scontext) < 0 && errno != ENOTSUP)
     error (0, errno,
@@ -265,6 +264,13 @@ setdefaultfilecon (char const *file)
   freecon (scontext);
   return;
 }
+#else
+static void
+setdefaultfilecon (char const *file)
+{
+  (void) file;
+}
+#endif
 
 /* FILE is the last operand of this command.  Return true if FILE is a
    directory.  But report an error there is a problem accessing FILE,