Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
twrp
android_bootable_recovery
Commits
ae95d1a9
Commit
ae95d1a9
authored
10 years ago
by
Dees Troy
Browse files
Options
Download
Email Patches
Plain Diff
Check sehandle before fixing permissions
Change-Id: I73ba5519bf650f0c7f0a683f311099ff13747155
parent
6277c797
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
fixPermissions.cpp
fixPermissions.cpp
+8
-1
No files found.
fixPermissions.cpp
View file @
ae95d1a9
...
...
@@ -71,6 +71,10 @@ int fixPermissions::restorecon(string entry, struct stat *sb) {
int
fixPermissions
::
fixDataDataContexts
(
void
)
{
string
dir
=
"/data/data/"
;
sehandle
=
selabel_open
(
SELABEL_CTX_FILE
,
selinux_options
,
1
);
if
(
!
sehandle
)
{
LOGINFO
(
"Unable to open /file_contexts
\n
"
);
return
0
;
}
if
(
TWFunc
::
Path_Exists
(
dir
))
{
fixContextsRecursively
(
dir
,
0
);
}
...
...
@@ -112,7 +116,10 @@ int fixPermissions::fixDataInternalContexts(void) {
struct
stat
sb
;
string
dir
,
androiddir
;
sehandle
=
selabel_open
(
SELABEL_CTX_FILE
,
selinux_options
,
1
);
if
(
!
sehandle
)
{
LOGINFO
(
"Unable to open /file_contexts
\n
"
);
return
0
;
}
if
(
TWFunc
::
Path_Exists
(
"/data/media/0"
))
dir
=
"/data/media/0"
;
else
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment