ask-password-api.c | ask-password-api.c | |||
---|---|---|---|---|
skipping to change at line 273 | skipping to change at line 273 | |||
} | } | |||
snprintf(sa.un.sun_path, sizeof(sa.un.sun_path)-1, "/run/systemd/as k-password/sck.%" PRIx64, random_u64()); | snprintf(sa.un.sun_path, sizeof(sa.un.sun_path)-1, "/run/systemd/as k-password/sck.%" PRIx64, random_u64()); | |||
RUN_WITH_UMASK(0177) { | RUN_WITH_UMASK(0177) { | |||
r = bind(fd, &sa.sa, offsetof(struct sockaddr_un, sun_path) + strlen(sa.un.sun_path)); | r = bind(fd, &sa.sa, offsetof(struct sockaddr_un, sun_path) + strlen(sa.un.sun_path)); | |||
} | } | |||
if (r < 0) { | if (r < 0) { | |||
r = -errno; | r = -errno; | |||
log_error("bind() failed: %m"); | log_error("bind(%s) failed: %m", sa.un.sun_path); | |||
goto fail; | goto fail; | |||
} | } | |||
if (setsockopt(fd, SOL_SOCKET, SO_PASSCRED, &one, sizeof(one)) < 0) { | if (setsockopt(fd, SOL_SOCKET, SO_PASSCRED, &one, sizeof(one)) < 0) { | |||
r = -errno; | r = -errno; | |||
log_error("SO_PASSCRED failed: %m"); | log_error("SO_PASSCRED failed: %m"); | |||
goto fail; | goto fail; | |||
} | } | |||
c = strdup(sa.un.sun_path); | c = strdup(sa.un.sun_path); | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |