Skip to content

Commit

Permalink
cmd/snap-confine: remove temporary helper inv
Browse files Browse the repository at this point in the history
Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
  • Loading branch information
zyga committed Mar 11, 2019
1 parent 947252e commit 824e01d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions cmd/snap-confine/snap-confine.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,16 +200,14 @@ int main(int argc, char **argv)
.classic_confinement = classic_confinement
/* is_normal_mode is not probed yet */
};
/* For the ease of introducing inv to the if branch below. */
sc_invocation *inv = &invocation;
struct sc_apparmor *aa = &apparmor;

// TODO: check for similar situation and linux capabilities.
if (geteuid() == 0) {
if (classic_confinement) {
enter_classic_execution_environment();
} else {
enter_non_classic_execution_environment(inv, aa,
enter_non_classic_execution_environment(&invocation, aa,
real_uid,
real_gid,
saved_gid);
Expand Down

0 comments on commit 824e01d

Please sign in to comment.