chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
man: fix typo in sd_notify
[elogind.git]
/
src
/
execute.c
diff --git
a/src/execute.c
b/src/execute.c
index 1ab321851792f8d772dd4176f38d4cfccb9948e9..250d53a424a07655929439929a62a56d6eec99c0 100644
(file)
--- a/
src/execute.c
+++ b/
src/execute.c
@@
-188,9
+188,9
@@
static int connect_logger_as(const ExecContext *context, ExecOutput output, cons
zero(sa);
sa.sa.sa_family = AF_UNIX;
zero(sa);
sa.sa.sa_family = AF_UNIX;
- strncpy(sa.un.sun_path,
LOGGER
_SOCKET, sizeof(sa.un.sun_path));
+ strncpy(sa.un.sun_path,
STDOUT_SYSLOG_BRIDGE
_SOCKET, sizeof(sa.un.sun_path));
- if (connect(fd, &sa.sa, offsetof(struct sockaddr_un, sun_path) + sizeof(
LOGGER
_SOCKET) - 1) < 0) {
+ if (connect(fd, &sa.sa, offsetof(struct sockaddr_un, sun_path) + sizeof(
STDOUT_SYSLOG_BRIDGE
_SOCKET) - 1) < 0) {
close_nointr_nofail(fd);
return -errno;
}
close_nointr_nofail(fd);
return -errno;
}
@@
-895,12
+895,9
@@
static int do_capability_bounding_set_drop(uint64_t drop) {
}
}
}
}
- for (i = 0; i <=
MAX(63LU, (unsigned long) CAP_LAST_CAP
); i++)
+ for (i = 0; i <=
cap_last_cap(
); i++)
if (drop & ((uint64_t) 1ULL << (uint64_t) i)) {
if (prctl(PR_CAPBSET_DROP, i) < 0) {
if (drop & ((uint64_t) 1ULL << (uint64_t) i)) {
if (prctl(PR_CAPBSET_DROP, i) < 0) {
- if (errno == EINVAL)
- break;
-
r = -errno;
goto finish;
}
r = -errno;
goto finish;
}
@@
-1173,7
+1170,7
@@
int exec_spawn(ExecCommand *command,
}
if (context->utmp_id)
}
if (context->utmp_id)
- utmp_put_init_process(
0,
context->utmp_id, getpid(), getsid(0), context->tty_path);
+ utmp_put_init_process(context->utmp_id, getpid(), getsid(0), context->tty_path);
if (context->user) {
username = context->user;
if (context->user) {
username = context->user;
@@
-1720,7
+1717,7
@@
void exec_context_dump(ExecContext *c, FILE* f, const char *prefix) {
unsigned long l;
fprintf(f, "%sCapabilityBoundingSet:", prefix);
unsigned long l;
fprintf(f, "%sCapabilityBoundingSet:", prefix);
- for (l = 0; l <=
(unsigned long) CAP_LAST_CAP
; l++)
+ for (l = 0; l <=
cap_last_cap()
; l++)
if (!(c->capability_bounding_set_drop & ((uint64_t) 1ULL << (uint64_t) l))) {
char *t;
if (!(c->capability_bounding_set_drop & ((uint64_t) 1ULL << (uint64_t) l))) {
char *t;