Iustin Pop [Sun, 3 Mar 2019 01:40:04 +0000 (02:40 +0100)]
Increase test coverage
These are old changes from October 2016 which I forgot to commit. I
think they're related to test coverage, although a few changes (object
structure) seems a bit different.
Iustin Pop [Sat, 2 Mar 2019 20:09:30 +0000 (21:09 +0100)]
Travis: remove "sudo:false"
Per the deprecation of container-based
builds (https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration),
remove the sudo:false setting.
Iustin Pop [Thu, 30 Apr 2015 17:43:53 +0000 (19:43 +0200)]
tests: don't call acl_to_text on an invalid ACL
While Linux is happy to convert it to text, it seems that under
FreeBSD this doesn't (always? sometimes?) work, so let's use a proper
ACL in the str() test.
Iustin Pop [Sat, 28 Jun 2014 12:13:32 +0000 (14:13 +0200)]
Try to fix uid_t/gid_t usage in entry qualifiers
The current code is very broken with regards to the casting between
Python's integer type (either int in Py2 or the magic int/long in Py3)
and the uid_t/gid_t POSIX types. This means that the code is broken
outside "small" integer values.
By using uid_t/gid_t as appropriate, we can fix most of the problem
(at least as far as the new unittests are concerned). There's still no
automatic printf format modifier for them, so the code hardcodes
unsigned (which is what Linux/glibc defines them to), and also there's
a unittest that expects negative values to fail when set.
Iustin Pop [Sat, 12 May 2012 22:40:10 +0000 (00:40 +0200)]
Fix critical issues found by static analyser
Fix issues found per https://bugzilla.redhat.com/800126, thanks Dave
Malcolm! Upon inspection, indeed all were cases of bad refcounting or
other significant issues.
Iustin Pop [Sun, 27 Dec 2009 16:48:04 +0000 (17:48 +0100)]
Accept both unicode and string objects
This converts PyArg functions from "s" to "et" and also adds check for
PyUnicode object in methods that accept generic objects (previously only
PyBytes checks were done).
Iustin Pop [Sat, 28 Jun 2008 13:41:57 +0000 (15:41 +0200)]
Docstring updates for epydoc compatibility
By just changing a few docstrings, epydoc can generate much better
documentation - the docstrings were half-compatible already with the
epytext format.
Also the makefile and manifest were updated not to include and build the
default pydoc documentation.
Iustin Pop [Fri, 27 Jun 2008 22:55:02 +0000 (00:55 +0200)]
Implement the acl_extended_* functions
This patch adds support for the Linux-specific acl_extended_fd and
acl_extended_file function, both exposed at module level through the
has_extended function name.
Iustin Pop [Fri, 27 Jun 2008 22:44:18 +0000 (00:44 +0200)]
unittests: abstract basic acl text into a constant
This patch just moved the basic acl text from being hardcoded in
multiple functions to a constant that can be easily modified, and
changes slightly the ACL.
Iustin Pop [Fri, 27 Jun 2008 22:08:00 +0000 (00:08 +0200)]
Try to enhance the FreeBSD support
FreeBSD 7.0 supports more functions, so we split some Linux-only
functions out from the HAVE_LEVEL2 defs and into a HAVE_ACL_COPY_EXT so
FreeBSD can define HAVE_LEVEL2 too.
Iustin Pop [Fri, 27 Jun 2008 07:00:08 +0000 (09:00 +0200)]
Export features as a module attributes
Currently it's hard to check from python if the current build of the
library has support for X or Y (e.g. acl from mode, etc.). So we export
this as module-level constants and this will allow users to check:
if posix1e.HAS_ACL_FROM_MODE:
acl = posix1e.ACL(mode=0644)
Iustin Pop [Mon, 8 Oct 2007 04:56:07 +0000 (06:56 +0200)]
Fix a compilation warning with python2.4
It seems python2.4 expects the format argument to
PyArg_ParseTupleAndKeywords to be "char*" and thus the compiler emits a
warning when passing "const char*" (python2.5 is betteri here). Remove
the const from format in ACL_init to fix this.
Iustin Pop [Sun, 7 Oct 2007 20:22:15 +0000 (22:22 +0200)]
Implement acl_from_mode
When using the Linux libacl, there is another method to construct an ACL
object: from a mode_t. This patch adds a new parameter (mode) to the ACL
constructor (when HAVE_LINUX is defined) that uses this function to
create the ACL.
Iustin Pop [Sun, 3 Dec 2006 12:43:52 +0000 (12:43 +0000)]
- Update setup.py to 0.2.2
- remove posix1e from freebsd libs, as recent freebsd versions don't need it
and also they don't have this lib anymore (the acls are in libc now)