[issue18694] getxattr on Linux ZFS native filesystem happily returns partial values

2013-08-13 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
nosy: +Arfrever

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18694
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18694] getxattr on Linux ZFS native filesystem happily returns partial values

2013-08-12 Thread Larry Hastings

Larry Hastings added the comment:

Attached is an updated patch, this time for 3.3.  (So I'm guessing we won't get 
a review link.)  It incorporates Benjamin's two comments.

--
Added file: http://bugs.python.org/file31249/larry.setxattr.zfs.3.3.patch.1.txt

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18694
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18694] getxattr on Linux ZFS native filesystem happily returns partial values

2013-08-12 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Okay. Hopefully, we can kill that thing one day...

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18694
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18694] getxattr on Linux ZFS native filesystem happily returns partial values

2013-08-12 Thread Larry Hastings

Larry Hastings added the comment:

Kill what thing?  The review link?  I love that thing?

Anyway, we did get a review link, hoopla!

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18694
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18694] getxattr on Linux ZFS native filesystem happily returns partial values

2013-08-12 Thread Benjamin Peterson

Benjamin Peterson added the comment:

No, this extra code you're adding. :)

2013/8/12 Benjamin Peterson rep...@bugs.python.org:

 Benjamin Peterson added the comment:

 Okay. Hopefully, we can kill that thing one day...

 --

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue18694
 ___

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18694
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18694] getxattr on Linux ZFS native filesystem happily returns partial values

2013-08-09 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +benjamin.peterson

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18694
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18694] getxattr on Linux ZFS native filesystem happily returns partial values

2013-08-08 Thread Larry Hastings

New submission from Larry Hastings:

The getxattr() system call retrieves an extended attribute on a file.  When 
you call it you pass in a buffer and a size.  The expected behavior is, if you 
pass in a buffer that's too small, the function returns -1 and sets errno to 
ERANGE.

On a ZFS filesystem on Linux, using the ZFS On Linux port:
http://zfsonlinux.org/

getxattr() does not behave this way.  Instead, it fills the buffer with the 
first buffer-size bytes of data (without a zero terminator).

Python's implementation of getxattr() interprets this as success.  Which means 
that, the way it's implemented, if you call getxattr() to retrieve a value 
that's  128 bytes in length, you only get the first 128 bytes.  (Happily, we 
already have a regression test that finds this!)

Attached is a patch fixing this behavior.  It checks the return value of 
getxattr() to see if the buffer was filled to 100%.  If so, it retries with a 
larger buffer.

--
assignee: larry
components: Library (Lib)
files: larry.setxattr.zfs.patch.1.txt
messages: 194716
nosy: larry
priority: normal
severity: normal
stage: patch review
status: open
title: getxattr on Linux ZFS native filesystem happily returns partial values
type: behavior
versions: Python 3.3, Python 3.4
Added file: http://bugs.python.org/file31203/larry.setxattr.zfs.patch.1.txt

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18694
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com