Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
external_libselinux
Commits
d2302ca4
Commit
d2302ca4
authored
12 years ago
by
Alice Chu
Browse files
Options
Download
Email Patches
Plain Diff
Check mkdir return value before calling mount.
Change-Id: If058da4431215fa4b6f895563ba13620b7d9a81a
parent
d10c3437
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
src/android.c
src/android.c
+6
-1
No files found.
src/android.c
View file @
d2302ca4
...
...
@@ -682,7 +682,12 @@ int selinux_android_load_policy(void)
if
(
errno
==
ENOENT
)
{
/* Fall back to legacy mountpoint. */
mnt
=
OLDSELINUXMNT
;
mkdir
(
mnt
,
0755
);
rc
=
mkdir
(
mnt
,
0755
);
if
(
rc
==
-
1
&&
errno
!=
EEXIST
)
{
selinux_log
(
SELINUX_ERROR
,
"SELinux: Could not mkdir: %s
\n
"
,
strerror
(
errno
));
return
-
1
;
}
rc
=
mount
(
SELINUXFS
,
mnt
,
SELINUXFS
,
0
,
NULL
);
}
}
...
...
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