e2fsprogs/contrib
Nick Kralevich b7343ebb63 AOSP: android/perms.c: clean up error handling
There are a number of error conditions which, due to the way
ext2fs_dir_iterate2 operates, would not be propagated to the upper
layers of the call stack. As a result, certain error conditions,
such as not having enough room to allocate blocks for SELinux
labels, would fail silently, instead of causing a compile
failure.

As suggested in
https://android-review.googlesource.com/c/platform/external/e2fsprogs/+/324363
, add a error field to the caller's private data structure, and use the
bit in the field to indicate an error condition. Now, certain errors
which were silently ignored will cause a compile failure when compiling
Android.

Test: Artifically modify selabel_lookup() to return a failure, and
      verify Android doesn't compile.
Test: Verify Android compiles under normal circumstances.
Test: Artifically modify ino_add_xattr() to return a failure, and
      verify Android doesn't compile.
Bug: 117502873
Bug: 117567573
Bug: 117473440

Signed-off-by: Theodore Ts'o <tytso@mit.edu>

Change-Id: Icdb0105a77e98c3428f20d3c59bf824dcad5db8d
From AOSP commit: 7ca13b8b2953f93536ea09eb2ff19bd7cc85b3c1
2018-10-12 22:58:08 -04:00
..
android AOSP: android/perms.c: clean up error handling 2018-10-12 22:58:08 -04:00
python-uuid Add sample python bindings for the uuid library 2008-01-03 15:39:19 -05:00
add_ext4_encrypt.c Fix typos in code comments and developer docs 2017-10-15 23:00:11 -04:00
Android.bp AOSP: use e2fsprogs-defaults for ccflags 2018-02-26 13:54:20 -05:00
build-rpm allow integrating the "make rpm" command into a build system 2008-08-24 21:03:17 -04:00
dconf Many files: 1997-04-26 13:58:21 +00:00
dir2fs contrib: script to create minified ext4 image from a directory 2015-05-05 10:52:12 -04:00
e2croncheck tests: avoid using mktemp -t 2014-07-04 16:39:49 -04:00
fallocate.c e2fsprogs: fix Free Software Foundation address 2018-04-19 11:39:09 -04:00
fsstress.c Add fsstress to contrib so it can be built for use in Android 2015-05-25 22:27:47 -04:00
jbd2-resync.sh contrib: add script to help resync journal code with kernel 2014-08-26 23:32:05 -04:00
make-sparse.c Eliminate doubly defined _LARGEFILE_SOURCE warning 2015-07-12 22:54:37 -04:00
populate-extfs.sh contrib/populate-extfs.sh: use debugfs to populate extX fs 2013-10-13 22:09:12 -04:00
spd_readdir.c contrib: fix namespace leakage in spd_readdir 2013-01-21 17:19:50 -05:00