This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author hynek
Recipients Arfrever, benjamin.peterson, eric.araujo, hynek, neologix, pitrou
Date 2012-04-06.09:52:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1333705938.64.0.743606507616.issue14082@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2012-04-06 09:52:18hyneksetrecipients: + hynek, pitrou, benjamin.peterson, eric.araujo, Arfrever, neologix
2012-04-06 09:52:18hyneksetmessageid: <1333705938.64.0.743606507616.issue14082@psf.upfronthosting.co.za>
2012-04-06 09:52:18hyneklinkissue14082 messages
2012-04-06 09:52:17hynekcreate