chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
login: move seat udev rules to login subdir
[elogind.git]
/
src
/
login
/
logind-session.c
diff --git
a/src/login/logind-session.c
b/src/login/logind-session.c
index 63ee75808b546f9ef668b380ebde57907c89d797..5ea7e260a7d3d0bf2fa4a8e3e45d136927d4c1b0 100644
(file)
--- a/
src/login/logind-session.c
+++ b/
src/login/logind-session.c
@@
-185,7
+185,7
@@
int session_save(Session *s) {
"SERVICE=%s\n",
s->service);
"SERVICE=%s\n",
s->service);
- if (s->seat && seat_
is_vtconsole
(s->seat))
+ if (s->seat && seat_
can_multi_session
(s->seat))
fprintf(f,
"VTNR=%i\n",
s->vtnr);
fprintf(f,
"VTNR=%i\n",
s->vtnr);
@@
-270,7
+270,7
@@
int session_load(Session *s) {
seat_attach_session(o, s);
}
seat_attach_session(o, s);
}
- if (vtnr && s->seat && seat_
is_vtconsole
(s->seat)) {
+ if (vtnr && s->seat && seat_
can_multi_session
(s->seat)) {
int v;
k = safe_atoi(vtnr, &v);
int v;
k = safe_atoi(vtnr, &v);
@@
-324,7
+324,6
@@
finish:
int session_activate(Session *s) {
int r;
int session_activate(Session *s) {
int r;
- Session *old_active;
assert(s);
assert(s);
@@
-343,10
+342,7
@@
int session_activate(Session *s) {
if (r < 0)
return r;
if (r < 0)
return r;
- old_active = s->seat->active;
- s->seat->active = s;
-
- return seat_apply_acls(s->seat, old_active);
+ return seat_set_active(s->seat, s);
}
static int session_link_x11_socket(Session *s) {
}
static int session_link_x11_socket(Session *s) {
@@
-380,15
+376,13
@@
static int session_link_x11_socket(Session *s) {
return -ENOENT;
}
return -ENOENT;
}
- t = strappend(s->user->runtime_path, "/X11
/
display");
+ t = strappend(s->user->runtime_path, "/X11
-
display");
if (!t) {
log_error("Out of memory");
free(f);
return -ENOMEM;
}
if (!t) {
log_error("Out of memory");
free(f);
return -ENOMEM;
}
- mkdir_parents(t, 0755);
-
if (link(f, t) < 0) {
if (errno == EEXIST) {
unlink(t);
if (link(f, t) < 0) {
if (errno == EEXIST) {
unlink(t);
@@
-440,7
+434,7
@@
static int session_create_one_group(Session *s, const char *controller, const ch
if (r < 0)
return r;
if (r < 0)
return r;
- r = cg_set_task_access(controller, path, 0644, s->user->uid, s->user->gid);
+ r = cg_set_task_access(controller, path, 0644, s->user->uid, s->user->gid
, -1
);
if (r >= 0)
r = cg_set_group_access(controller, path, 0755, s->user->uid, s->user->gid);
if (r >= 0)
r = cg_set_group_access(controller, path, 0755, s->user->uid, s->user->gid);
@@
-641,7
+635,7
@@
static int session_unlink_x11_socket(Session *s) {
s->user->display = NULL;
s->user->display = NULL;
- t = strappend(s->user->runtime_path, "/X11
/
display");
+ t = strappend(s->user->runtime_path, "/X11
-
display");
if (!t) {
log_error("Out of memory");
return -ENOMEM;
if (!t) {
log_error("Out of memory");
return -ENOMEM;