Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sepolicy
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CodeLinaro
public-release-test
platform
system
sepolicy
Commits
0be02b36
Commit
0be02b36
authored
10 years ago
by
Daniel Cashman
Committed by
Gerrit Code Review
10 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Fix sepolicy-analyze build with different toolchains"
parents
7d715164
47c14611
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/sepolicy-analyze/sepolicy-analyze.c
+7
-2
7 additions, 2 deletions
tools/sepolicy-analyze/sepolicy-analyze.c
with
7 additions
and
2 deletions
tools/sepolicy-analyze/sepolicy-analyze.c
+
7
−
2
View file @
0be02b36
...
@@ -25,9 +25,11 @@ static struct {
...
@@ -25,9 +25,11 @@ static struct {
void
usage
(
char
*
arg0
)
void
usage
(
char
*
arg0
)
{
{
int
i
;
fprintf
(
stderr
,
"%s must be called on a policy file with a component and the appropriate arguments specified
\n
"
,
arg0
);
fprintf
(
stderr
,
"%s must be called on a policy file with a component and the appropriate arguments specified
\n
"
,
arg0
);
fprintf
(
stderr
,
"%s <policy-file>:
\n
"
,
arg0
);
fprintf
(
stderr
,
"%s <policy-file>:
\n
"
,
arg0
);
for
(
int
i
=
0
;
i
<
NUM_COMPONENTS
;
i
++
)
{
for
(
i
=
0
;
i
<
NUM_COMPONENTS
;
i
++
)
{
analyze_components
[
i
].
usage
();
analyze_components
[
i
].
usage
();
}
}
exit
(
1
);
exit
(
1
);
...
@@ -39,12 +41,14 @@ int main(int argc, char **argv)
...
@@ -39,12 +41,14 @@ int main(int argc, char **argv)
struct
policy_file
pf
;
struct
policy_file
pf
;
policydb_t
policydb
;
policydb_t
policydb
;
int
rc
;
int
rc
;
int
i
;
if
(
argc
<
3
)
if
(
argc
<
3
)
usage
(
argv
[
0
]);
usage
(
argv
[
0
]);
policy
=
argv
[
1
];
policy
=
argv
[
1
];
if
(
load_policy
(
policy
,
&
policydb
,
&
pf
))
if
(
load_policy
(
policy
,
&
policydb
,
&
pf
))
exit
(
1
);
exit
(
1
);
for
(
int
i
=
0
;
i
<
NUM_COMPONENTS
;
i
++
)
{
for
(
i
=
0
;
i
<
NUM_COMPONENTS
;
i
++
)
{
if
(
!
strcmp
(
analyze_components
[
i
].
key
,
argv
[
2
]))
{
if
(
!
strcmp
(
analyze_components
[
i
].
key
,
argv
[
2
]))
{
rc
=
analyze_components
[
i
].
func
(
argc
-
2
,
argv
+
2
,
&
policydb
);
rc
=
analyze_components
[
i
].
func
(
argc
-
2
,
argv
+
2
,
&
policydb
);
if
(
rc
&&
USAGE_ERROR
)
{
if
(
rc
&&
USAGE_ERROR
)
{
...
@@ -53,4 +57,5 @@ int main(int argc, char **argv)
...
@@ -53,4 +57,5 @@ int main(int argc, char **argv)
}
}
}
}
usage
(
argv
[
0
]);
usage
(
argv
[
0
]);
exit
(
0
);
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment