Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
struct pakfire_pty;
-enum pakfire_pty_flags {
- PAKFIRE_PTY_FORWARD = (1 << 0),
-};
-
int pakfire_pty_create(struct pakfire_pty** pty,
struct pakfire_ctx* ctx, sd_event* loop, int flags);
if (ctx.flags & PAKFIRE_JAIL_PTY_FORWARDING)
ctx.flags |= PAKFIRE_JAIL_HAS_NETWORKING;
- // Enable PTY forwarding
- if (ctx.flags & PAKFIRE_JAIL_PTY_FORWARDING)
- pty_flags |= PAKFIRE_PTY_FORWARD;
-
/*
Setup a file descriptor which can be used to notify the client that the parent
has completed configuration.
// Set description
sd_event_source_set_description(pty->master.event, "pty-master");
- // Do we need to set up PTY forwarding?
- if (pty->flags & PAKFIRE_PTY_FORWARD) {
- r = pakfire_pty_setup_forwarding(pty);
- if (r)
- return r;
- }
+ // Setup forwarding
+ r = pakfire_pty_setup_forwarding(pty);
+ if (r < 0)
+ return r;
- return r;
+ return 0;
}
static void pakfire_pty_free(struct pakfire_pty* pty) {