e2fsprogs/contrib/android
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.bp AOSP: e2fsdroid and mke2fs are dynamic executable in recovery partition 2018-06-27 23:51:40 -04:00
base_fs.c AOSP: e2fsdroid/libext2fs: move hashmap into libext2fs 2018-06-21 09:37:52 -04:00
base_fs.h AOSP: e2fsdroid/libext2fs: move hashmap into libext2fs 2018-06-21 09:37:52 -04:00
basefs_allocator.c AOSP: e2fsdroid/libext2fs: move hashmap into libext2fs 2018-06-21 09:37:52 -04:00
basefs_allocator.h AOSP: e2fsdroid: create incremental images 2017-05-23 22:23:34 -04:00
block_list.c AOSP: e2fsdroid: don't print empty files in block_list.c:end_new_file 2017-05-23 23:04:43 -04:00
block_list.h AOSP: e2fsdroid: a tool to create android compatible image 2017-05-23 22:08:44 -04:00
block_range.c AOSP: _GNU_SOURCE must be defined before any #include. 2017-05-23 22:31:06 -04:00
block_range.h AOSP: e2fsdroid: a tool to create android compatible image 2017-05-23 22:08:44 -04:00
e2fsdroid.c AOSP: e2fsdroid: Set android_configure when product out is passed. 2018-08-18 16:00:18 -04:00
ext2simg.c AOSP: Fix android build warnings in e2fsdroid and libext2fs 2018-02-26 12:23:08 -05:00
fsmap.c AOSP: e2fsdroid: report error from ext2fs 2017-05-23 22:57:15 -04:00
fsmap.h AOSP: e2fsdroid: a tool to create android compatible image 2017-05-23 22:08:44 -04:00
perms.c AOSP: android/perms.c: clean up error handling 2018-10-12 22:58:08 -04:00
perms.h AOSP: Support UID/GID mapping 2018-06-21 10:02:19 -04:00