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

Commit 07cb6941 authored by Nick Kralevich's avatar Nick Kralevich Committed by Gerrit Code Review
Browse files

Merge "init: Don't ignore setsockcreatecon errors"

parents ddf41f1a 83ccb1c7
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -105,8 +105,12 @@ int create_socket(const char *name, int type, mode_t perm, uid_t uid,
    int fd, ret;
    char *filecon;

    if (socketcon)
        setsockcreatecon(socketcon);
    if (socketcon) {
        if (setsockcreatecon(socketcon) == -1) {
            ERROR("setsockcreatecon(\"%s\") failed: %s\n", socketcon, strerror(errno));
            return -1;
        }
    }

    fd = socket(PF_UNIX, type, 0);
    if (fd < 0) {