"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);
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 session_activate(Session *s) {
int r;
- Session *old_active;
assert(s);
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) {
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;
}
- mkdir_parents(t, 0755);
-
if (link(f, t) < 0) {
if (errno == EEXIST) {
unlink(t);
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);
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;