Hynek Schlawack <h...@ox.cx> added the comment:

This ticket has a small catch:

There are several namespaces. According to 
http://en.wikipedia.org/wiki/Xattr#Linux :

- user: can be set by anyone
- trusted: root only
- security: root only
- system: even root can’t do that, at least not in my vm

I’m writing a shutil.copyxattr() first which could simple get another argument 
for the namespaces that should be copied.

However what to do inside copy2()?

I’m tending to either:

1. copy only user.*
2. ignore errors in any namespace != user

Personally, I find the second approach rather non-deterministic.

So I’d suggest:

- copyxattr has an extra argument called namespaces with default being 
['user'], so that in theory someone who wants to do something more 
sophisticated can do it.
- copy2 copies only user.* though because that’s what you usually want.

Please let me know what you think about it.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14082>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to