Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 659b7d63 authored by Elliott Hughes's avatar Elliott Hughes Committed by Gerrit Code Review
Browse files

Merge "Remove now-unusable 'setcon' command."

parents fa66b4e1 7b15ac99
Loading
Loading
Loading
Loading
+0 −9
Original line number Original line Diff line number Diff line
@@ -515,15 +515,6 @@ int do_swapon_all(int nargs, char **args)
    return ret;
    return ret;
}
}


int do_setcon(int nargs, char **args) {
    if (is_selinux_enabled() <= 0)
        return 0;
    if (setcon(args[1]) < 0) {
        return -errno;
    }
    return 0;
}

int do_setprop(int nargs, char **args)
int do_setprop(int nargs, char **args)
{
{
    const char *name = args[1];
    const char *name = args[1];
+0 −1
Original line number Original line Diff line number Diff line
@@ -184,7 +184,6 @@ static int lookup_keyword(const char *s)
    case 's':
    case 's':
        if (!strcmp(s, "eclabel")) return K_seclabel;
        if (!strcmp(s, "eclabel")) return K_seclabel;
        if (!strcmp(s, "ervice")) return K_service;
        if (!strcmp(s, "ervice")) return K_service;
        if (!strcmp(s, "etcon")) return K_setcon;
        if (!strcmp(s, "etenv")) return K_setenv;
        if (!strcmp(s, "etenv")) return K_setenv;
        if (!strcmp(s, "etprop")) return K_setprop;
        if (!strcmp(s, "etprop")) return K_setprop;
        if (!strcmp(s, "etrlimit")) return K_setrlimit;
        if (!strcmp(s, "etrlimit")) return K_setrlimit;
+0 −2
Original line number Original line Diff line number Diff line
@@ -20,7 +20,6 @@ int do_restorecon(int nargs, char **args);
int do_restorecon_recursive(int nargs, char **args);
int do_restorecon_recursive(int nargs, char **args);
int do_rm(int nargs, char **args);
int do_rm(int nargs, char **args);
int do_rmdir(int nargs, char **args);
int do_rmdir(int nargs, char **args);
int do_setcon(int nargs, char **args);
int do_setprop(int nargs, char **args);
int do_setprop(int nargs, char **args);
int do_setrlimit(int nargs, char **args);
int do_setrlimit(int nargs, char **args);
int do_start(int nargs, char **args);
int do_start(int nargs, char **args);
@@ -76,7 +75,6 @@ enum {
    KEYWORD(rmdir,       COMMAND, 1, do_rmdir)
    KEYWORD(rmdir,       COMMAND, 1, do_rmdir)
    KEYWORD(seclabel,    OPTION,  0, 0)
    KEYWORD(seclabel,    OPTION,  0, 0)
    KEYWORD(service,     SECTION, 0, 0)
    KEYWORD(service,     SECTION, 0, 0)
    KEYWORD(setcon,      COMMAND, 1, do_setcon)
    KEYWORD(setenv,      OPTION,  2, 0)
    KEYWORD(setenv,      OPTION,  2, 0)
    KEYWORD(setprop,     COMMAND, 2, do_setprop)
    KEYWORD(setprop,     COMMAND, 2, do_setprop)
    KEYWORD(setrlimit,   COMMAND, 3, do_setrlimit)
    KEYWORD(setrlimit,   COMMAND, 3, do_setrlimit)
+0 −5
Original line number Original line Diff line number Diff line
@@ -252,11 +252,6 @@ rm <path>
rmdir <path>
rmdir <path>
   Calls rmdir(2) on the given path.
   Calls rmdir(2) on the given path.


setcon <seclabel>
   Set the current process security context to the specified string.
   This is typically only used from early-init to set the init context
   before any other process is started.

setprop <name> <value>
setprop <name> <value>
   Set system property <name> to <value>. Properties are expanded
   Set system property <name> to <value>. Properties are expanded
   within <value>.
   within <value>.