| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
The Hurd is intended to have no hardcoded limits, and POSIX makes it
possible for a system to not define PATH_MAX. Switch to the simpler
solution which is to generate the constants at compile time.
|
|
|
|
|
| |
The run script is in $srcdir, not $PWD (aka $builddir).
This fixes `make distcheck`.
|
|
|
|
| |
This is for the recent "Fix acl_from_text() returning NULL on all input".
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Invoke AC_SYS_LARGEFILE to enable large-file support.
This fixes acl_get_fd and acl_get_file that invoke *stat functions,
as well their users, perm_copy_fd and perm_copy_file.
The tools are the most spectacularly affected because without the fix
they just cannot process large files, e.g.
$ truncate -s2G large-file && getfacl large-file
getfacl: large-file: Value too large for defined data type
|
|
|
|
|
|
|
|
|
| |
When the ACL to be set is equivalent to a file mode, on filesystems
without POSIX ACL support, setfacl falls back to chmod(1) for setting
the file mode to the equivalent of the ACL.
Unfortunately it did not preserve the set-user-ID, set-group-ID, and
sticky bits in that case; fix that.
|
|
|
|
|
|
|
|
| |
The root/permissions test can fail if run by a root user with umask 077,
because the "d" temporary directory ends up unreadable/unexecutable by
bin or daemon.
Reported anonymously on Savannah: http://savannah.nongnu.org/bugs/?47949
|
|
|
|
|
|
| |
The root-specific tests use two additional groups. Add them to
test/test.group and don't create / delete the non-standard group with
groupadd / groupdel.
|
| |
|
|
|
|
|
|
|
| |
ls adds a '.' at the end of the permission field list on SELinux
machines, filter this out so root tests work on SELinux machines.
Signed-off-by: He Zhe <zhe.he@windriver.com>
|
|
|
|
|
|
|
|
|
| |
Move #include "config.h" from misc.h to every source file. It's incorrect
to include it after a system header file because it does things like:
Those must come before you include any system header file in order for
them to work properly. It hasn't bitten us so far, but we still should
fix the files to do the right thing.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The octal unquote code can't handle escaping backslashes except by
specifying the octal code for the backslash. That's not exactly a
user-friendly interface for a scenario that may not be that uncommon.
The unquote code isn't documented in the man page and can result in
confusion when specifying names via a Windows domain that are entirely
numeric (e.g. WINDOM\1234).
This patch adds handling to allow literal escaping of the backslash (\\)
as both input and output and documents the quoting rules in the setfacl
man page. Also included are test cases for escaped backslashes followed
by letters, escaped backslashes followed by numbers, and the original
use case of escaped character literals.
[Minor fixes by Andreas Gruenbacher.]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The requirements for testing are currently that the system have several
users and groups predefined. The chosen users and groups are typically
found on every system so that's a safe bet. However, tests for the quote
code may involve more esoteric names that include backslashes or other
quoted characters. This patch adds a helper library that implements
the passwd and group calls and redirects the reads to project-defined
passwd and group files. That way, we know for certain that those
usernames and groups will be found during testing. The helper library is
enabled using LD_PRELOAD via a wrapper script. The library will not be
installed as part of the project's make install. Since the local user
might not be found in the local test.{group,passwd}, we extend test/run
to use numeric uid/gids if the lookup fails.
|
|
|
|
|
|
|
| |
After "cp -p", the cp.test case was checking the permissions
of the source file instead of the target file.
Reported by: Nic <nic.henke@versity.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This deletes the hand rolled build system and replaces it entirely
with autotools. The overall diffstat shows that this is a clear
win, and it makes the package build/install like every other autotool
package out there which makes the lives of distro maintainers a lot
easier.
This should also be faster by virtue of using a non-recursive build.
Things to note:
- to generate autotools:
./autogen.sh
- to see full compile output:
make V=1
- to build specific targets:
make attr getfattr ...
- to run tests:
make check
- to create a release:
make distcheck -j
Other non-developer things:
- man pages are no longer compressed as this is uncommon in the
autotools world and distros don't need it anyways (they already
handle it automatically for most pakages)
- the minor # of the shared library is now based on the package
version so it'll be much bigger ... this isn't a problem, and
is actually a bugfix (older releases didn't change when they
should have)
(Again, this is all using the standard autotool targets.)
|
|
|
|
|
|
|
|
|
|
| |
Change the run program to update PATH to find the tools locally
automatically. This lets us avoid having to always build in the
tree and allows for direct running.
Also update the program to create a tempdir for each test to run
inside of. This way we can run all the tests in parallel without
randomly clobbering each other.
|
|
|
|
| |
We simply make sure that at least one tab is used for indentation.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a follow-up to 7f2c91b8369242a8dbc2b304a5b71b2a85f5b855, which
caused sbits-restore.test to fail in the following way in case SELinux
was disabled:
*** sbits-restore.test ***
[3] $ umask 022 -- ok
[4] $ mkdir d -- ok
[5] $ touch d/g -- ok
[6] $ touch d/u -- ok
[7] $ chmod u+s d/u -- ok
[8] $ chmod g+s d/g -- ok
[9] $ chmod +t d -- ok
[10] $ getfacl -R d > d.acl -- ok
[11] $ rm -R d -- ok
[12] $ mkdir d -- ok
[13] $ touch d/g -- ok
[14] $ touch d/u -- ok
[15] $ setfacl --restore d.acl -- ok
[16] $ ls -dl d | awk '{print $1}' | sed 's/.$//g' -- failed
drwxr-xr- != drwxr-xr-t
[18] $ ls -dl d/u | awk '{print $1}' | sed 's/.$//g' -- failed
-rwSr--r- != -rwSr--r--
[20] $ ls -dl d/g | awk '{print $1}' | sed 's/.$//g' -- failed
-rw-r-Sr- != -rw-r-Sr--
[22] $ rm -Rf d -- ok
17 commands (14 passed, 3 failed)
|
|
|
|
| |
umask 022 is expected on some of the tests. Set it.
|
|
|
|
|
| |
ls adds a '.' at the end of the permission field list on SELinux
machines, filter this out so tests work on SELinux machines.
|
|
|
|
| |
test/ isn't necessary as this is in test/Makefile
|
|
|
|
|
| |
f might exist before this test is ran. remove it first so the test
always starts from the same state.
|
|
|
|
|
| |
originally reported at:
https://bugzilla.redhat.com/576550
|
|
|
|
|
|
| |
Fixes http://savannah.nongnu.org/bugs/?28131
Signed-off-by: Brandon Philips <bphilips@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Malformed input to setfacl --restore can cause a crash due to a double
free.
Ensure that freed memory is set to NULL.
Fixes this bug:
https://savannah.nongnu.org/bugs/index.php?28185
Signed-off-by: Brandon Philips <bphilips@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix a problem in setfacl --restore when the owner or group is changed
and the S_ISUID and S_ISGID are to be set.
The root of the problem is that chown() can clear the S_ISUID and
S_ISGID bits as described in chown(2):
When the owner or group of an executable file are changed by a
non- superuser, the S_ISUID and S_ISGID mode bits are cleared. POSIX
does not specify whether this also should happen when root does the
chown(); the Linux behavior depends on the kernel version. In case of
a non- group-executable file (i.e., one for which the S_IXGRP bit is
not set) the S_ISGID bit indicates mandatory locking, and is not
cleared by a chown().
To fix the issue re-stat() the file after chown() so that the logic
surrounding the chmod() has the updated mode of the file.
Signed-off-by: Brandon Philips <bphilips@suse.de>
|
|
|
|
|
|
|
| |
tests/sort-getfacl-output and examples/copyperm.c were missing from respective
Makefiles
Signed-off-by: Brandon Philips <bphilips@suse.de>
|
|
|
|
|
|
|
|
|
| |
On some platforms libtool prefixes the in-tree binaries under .libs with
"lt-". This causes the tests to break. This patch removes the lt-
prefix from program error output.
A discussion on the issue is here:
http://lists.gnu.org/archive/html/libtool/2009-05/msg00042.html
|
| |
|
|
|
|
| |
restore them with "setfacl --restore=file".
|
|
|
|
|
| |
Add license headers to a number of small files which were only licenses as
GPLv2+ implicitly so far.
|
|
|
|
|
|
|
|
| |
When reading directories, different filesystems return files in different
orders. Some tests depended on a specific order; remove this dependency by
sorting the results before checking them.
Signed-off: Andreas Gruenbacher <agruen@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The tests are difficult to run. So, this patch adds a Make target that
sets up the path and runs *.test files in the test/ directory.
nfs specific tests can be ran from the test directory by running
`make nfs-tests`
tests requiring root can be ran from the test directory by running
`make root-tests`
Signed-off-by: Brandon Philips <bphilips@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Resolved Red Hat bugs:
rh#183181 - Bad: utf8 long filenames - invalid argument
rh#287701 - PATH_MAX patch seems incomplete
From: Andrey <afletdinov@dc.baikal.ru>
From: Thomas Woerner <twoerner@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Acked-by: Brandon Philips <bphilips@suse.de>
|
|
|
|
|
|
| |
Test fixes to walk_tree.c by Andreas.
Signed-off-by: Brandon Philips <bphilips@suse.de>
|
|
|
|
|
|
| |
X -> x
Signed-off-by: Brandon Philips <bphilips@suse.de>
|
|
|
|
|
|
|
| |
Since these tests require nfs mounts to run move them into a seperate
folder so they don't run by default.
Signed-off-by: Brandon Philips <bphilips@suse.de>
|
|
|
|
|
|
|
| |
Since these tests require root perms to run move them into a seperate
folder so they don't run by default.
Signed-off-by: Brandon Philips <bphilips@suse.de>
|
|
|
|
|
| |
Signed-off-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Avoid a warning:
main::process_test() called too early to check prototype at ./run line 47.
main::process_test() called too early to check prototype at ./run line 60.
Add a >~ test line that is similar to > but is interpreted as a regular
expression.
Signed-off-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
|
|
|
|
|
|
| |
Legals preferences.
Merge of master-melb:xfs-cmds:24326a by kenmcd.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Undo xfs-cmds:slinx:120772a, inadvertently whacked a previous mod.
|
| |
|
| |
|
| |
|