This is the mail archive of the cygwin-developers mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bug or feature missing in rsync.


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]