xfs
[Top] [All Lists]

Re: fileutils patches?

To: werner maes <werner.maes@xxxxxxxxxxxxxxxxx>
Subject: Re: fileutils patches?
From: Hasch@xxxxxxxxxxx (Juergen Hasch)
Date: Thu, 10 May 2001 23:16:25 +0200
Cc: linux-xfs@xxxxxxxxxxx
References: <3.0.6.32.20010510092131.007cc370@xxxxxxxxxxxxxxxxxxxxxx>
Sender: owner-linux-xfs@xxxxxxxxxxx
werner maes schrieb:
> 
> 
>         Hello,
> 
> I installed XFS using the RH 7.1 installer.
> I tried working with acl and this works but I was wondering where
> I can find the patch to enable the fileutils commands (ls, rm, mv, cp,...)
> to recognize ACL's.
> In the ISO for RH 7.1 there's a special kernel and the xfsprogs but I can't
> seem to find these patched fileutils.
> 
> Does somebody has more information?

I am using patched fileutils with XFS. You can use the patch from
acl.bestbits.at
together with fileutils-4.0.43, but you will need to add a few lines to
permission.c
because the XFS implementation doesn't match the one from Andreas
Gruenbacher
(see patch below).

The autoconf stuff is broken for most versions right now, so you have to
do some hand editing after configure.
In config.h add:
#define USE_ACL 1
#define HAVE_ACL 1
#define HAVE_ACL_GET_FILE 1
#define HAVE_ACL_TO_TEXT 1
#define HAVE_ACL_FREE 1
#define HAVE_ACL_SET_FILE 1

In src/Makefile add -lacl in the LIBS line:
LIBS = -lacl

This works for me.
  ...Juergen

--- permissions.orig    Thu May 10 22:24:35 2001
+++ permissions.c       Thu May 10 22:34:27 2001
@@ -32,6 +32,11 @@
 # define ENOTSUP ENOSYS
 #endif
 
 #ifndef errno
 extern int errno;
 #endif
@@ -288,7 +293,7 @@
 
   if ((acl = acl_get_file(path, ACL_TYPE_ACCESS)) == NULL)
     {
-      if (errno == ENOSYS || errno == ENOTSUP)
+      if (errno == EINVAL || errno == ENOSYS || errno == ENOTSUP)
         {
           return 0;
         }
@@ -298,6 +303,10 @@
           return -1;
         }
    }
+
+  if (acl->acl_cnt == ACL_NOT_PRESENT) /* XFS */
+       return 0;
+
   return_val = count_acl_entries(acl);
   acl_free(acl);
   if (return_val < 0)
@@ -323,6 +332,9 @@
              return -1;
            }
        }
+    if (acl->acl_cnt == ACL_NOT_PRESENT) /* XFS */
+       return 0;
+
       return_val = count_acl_entries(acl);
       acl_free(acl);
       if (return_val < 0)

<Prev in Thread] Current Thread [Next in Thread>