tool_xattr: create the user.creator xattr attribute

This indicates that the file was created by curl which can help a user
determine the origin of a file. Like the other attributes, this is only
enabled with the --xattr option.

Closes #15237
This commit is contained in:
Dan Fandrich 2024-10-09 16:47:20 -07:00
parent dfd36d3ee0
commit 954177b9da
5 changed files with 8 additions and 5 deletions

View file

@ -114,7 +114,7 @@ static int xattr(int fd,
int fwrite_xattr(CURL *curl, const char *url, int fd)
{
int i = 0;
int err = 0;
int err = xattr(fd, "user.creator", "curl");
/* loop through all xattr-curlinfo pairs and abort on a set error */
while(!err && mappings[i].attr) {