chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
unit: add missing deps in unit_dependency_table
[elogind.git]
/
src
/
shared
/
util.c
diff --git
a/src/shared/util.c
b/src/shared/util.c
index a0755efb147593a2046e0feaf386986b047b4664..2e7ae63db2e50253d4a50ad42b2243bab13dd98d 100644
(file)
--- a/
src/shared/util.c
+++ b/
src/shared/util.c
@@
-909,7
+909,7
@@
int load_env_file(
continue;
if (!(u = normalize_env_assignment(p))) {
continue;
if (!(u = normalize_env_assignment(p))) {
- log_error("Out of memory");
+ log_error("Out of memory
.
");
r = -ENOMEM;
goto finish;
}
r = -ENOMEM;
goto finish;
}
@@
-918,7
+918,7
@@
int load_env_file(
free(u);
if (!t) {
free(u);
if (!t) {
- log_error("Out of memory");
+ log_error("Out of memory
.
");
r = -ENOMEM;
goto finish;
}
r = -ENOMEM;
goto finish;
}
@@
-4278,7
+4278,7
@@
void execute_directory(const char *directory, DIR *d, char *argv[]) {
continue;
if (asprintf(&path, "%s/%s", directory, de->d_name) < 0) {
continue;
if (asprintf(&path, "%s/%s", directory, de->d_name) < 0) {
- log_error("Out of memory");
+ log_error("Out of memory
.
");
continue;
}
continue;
}
@@
-4905,7
+4905,12
@@
int socket_from_display(const char *display, char **path) {
return 0;
}
return 0;
}
-int get_user_creds(const char **username, uid_t *uid, gid_t *gid, const char **home) {
+int get_user_creds(
+ const char **username,
+ uid_t *uid, gid_t *gid,
+ const char **home,
+ const char **shell) {
+
struct passwd *p;
uid_t u;
struct passwd *p;
uid_t u;
@@
-4926,6
+4931,10
@@
int get_user_creds(const char **username, uid_t *uid, gid_t *gid, const char **h
if (home)
*home = "/root";
if (home)
*home = "/root";
+
+ if (shell)
+ *shell = "/bin/sh";
+
return 0;
}
return 0;
}
@@
-4957,6
+4966,9
@@
int get_user_creds(const char **username, uid_t *uid, gid_t *gid, const char **h
if (home)
*home = p->pw_dir;
if (home)
*home = p->pw_dir;
+ if (shell)
+ *shell = p->pw_shell;
+
return 0;
}
return 0;
}