chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
machine-id-setup: add a machine_id_commit call to commit on disk a transient machine-id
[elogind.git]
/
src
/
core
/
execute.c
diff --git
a/src/core/execute.c
b/src/core/execute.c
index f9011cfef5affccac89f6362269e426adfcca946..ea745aa198334051c611b2d817c15248966d9f40 100644
(file)
--- a/
src/core/execute.c
+++ b/
src/core/execute.c
@@
-885,7
+885,7
@@
fail:
log_error("PAM failed: %s", pam_strerror(handle, pam_code));
err = -EPERM; /* PAM errors do not map to errno */
} else {
log_error("PAM failed: %s", pam_strerror(handle, pam_code));
err = -EPERM; /* PAM errors do not map to errno */
} else {
- log_error
(
"PAM failed: %m");
+ log_error
_errno(errno,
"PAM failed: %m");
err = -errno;
}
err = -errno;
}
@@
-1241,8
+1241,8
@@
static int exec_child(ExecCommand *command,
const char *username = NULL, *home = NULL, *shell = NULL;
unsigned n_dont_close = 0;
int dont_close[n_fds + 4];
const char *username = NULL, *home = NULL, *shell = NULL;
unsigned n_dont_close = 0;
int dont_close[n_fds + 4];
- uid_t uid =
(uid_t) -1
;
- gid_t gid =
(gid_t) -1
;
+ uid_t uid =
UID_INVALID
;
+ gid_t gid =
GID_INVALID
;
int i, err;
assert(command);
int i, err;
assert(command);
@@
-1436,7
+1436,7
@@
static int exec_child(ExecCommand *command,
#ifdef ENABLE_KDBUS
if (params->bus_endpoint_fd >= 0 && context->bus_endpoint) {
#ifdef ENABLE_KDBUS
if (params->bus_endpoint_fd >= 0 && context->bus_endpoint) {
- uid_t ep_uid = (uid ==
(uid_t) -1
) ? 0 : uid;
+ uid_t ep_uid = (uid ==
UID_INVALID
) ? 0 : uid;
err = bus_kernel_set_endpoint_policy(params->bus_endpoint_fd, ep_uid, context->bus_endpoint);
if (err < 0) {
err = bus_kernel_set_endpoint_policy(params->bus_endpoint_fd, ep_uid, context->bus_endpoint);
if (err < 0) {