Bug or feature missing in rsync.

Dave Korn dave.korn.cygwin@googlemail.com
Wed Sep 16 14:36:00 GMT 2009


Dave Korn wrote:
> 
>   Ah, looks like Cygwin only supports xattr on Samba filesystems.

  Or that could just be a logic bug.

> int __stdcall
> write_ea (HANDLE hdl, path_conv &pc, const char *name, const char *value,
> 	  size_t size, int flags)
> {
>   OBJECT_ATTRIBUTES attr;
>   NTSTATUS status;
>   IO_STATUS_BLOCK io;
>   int ret = -1;
>   HANDLE h = hdl;
>   PFILE_FULL_EA_INFORMATION fea;
>   ULONG flen;
>   size_t nlen;
> 
>   myfault efault;
>   if (efault.faulted (EFAULT))
>     goto out;
> 
>   pc.get_object_attr (attr, sec_none_nih);
> 
>   debug_printf ("write_ea (%S, %s, %p, %lu, %d)",
> 		attr.ObjectName, name, value, size, flags);
> 
>   /* Samba hides the user namespace from Windows clients.  If we get a
>      user namespace item, we remove the leading namespace from the name.
>      This keeps tools like attr/getfattr/setfattr happy.  Otherwise
>      setting the EA fails as if we don't have the permissions. */
>   if (pc.fs_is_samba () && ascii_strncasematch (name, "user.", 5))
>     name += 5;
>   else
>     {
>       set_errno (EOPNOTSUPP);
>       goto out;
>     }

  I wonder if that unconditional else clause should in fact be "else if
(pc.fs_is_samba())"?

    cheers,
      DaveK




More information about the Cygwin-developers mailing list