summaryrefslogtreecommitdiff
path: root/session.h
diff options
context:
space:
mode:
Diffstat (limited to 'session.h')
-rw-r--r--session.h34
1 files changed, 32 insertions, 2 deletions
diff --git a/session.h b/session.h
index ec8284a5f..81f024c9b 100644
--- a/session.h
+++ b/session.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: session.h,v 1.14 2002/02/03 17:53:25 markus Exp $ */ 1/* $OpenBSD: session.h,v 1.15 2002/03/18 17:50:31 provos Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. 4 * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
@@ -26,12 +26,42 @@
26#ifndef SESSION_H 26#ifndef SESSION_H
27#define SESSION_H 27#define SESSION_H
28 28
29#define TTYSZ 64
30typedef struct Session Session;
31struct Session {
32 int used;
33 int self;
34 struct passwd *pw;
35 Authctxt *authctxt;
36 pid_t pid;
37 /* tty */
38 char *term;
39 int ptyfd, ttyfd, ptymaster;
40 int row, col, xpixel, ypixel;
41 char tty[TTYSZ];
42 /* X11 */
43 int display_number;
44 char *display;
45 int screen;
46 char *auth_display;
47 char *auth_proto;
48 char *auth_data;
49 int single_connection;
50 /* proto 2 */
51 int chanid;
52 int is_subsystem;
53};
54
29void do_authenticated(Authctxt *); 55void do_authenticated(Authctxt *);
30 56
31int session_open(Authctxt*, int); 57int session_open(Authctxt*, int);
32int session_input_channel_req(Channel *, const char *); 58int session_input_channel_req(Channel *, const char *);
33void session_close_by_pid(pid_t, int); 59void session_close_by_pid(pid_t, int);
34void session_close_by_channel(int, void *); 60void session_close_by_channel(int, void *);
35void session_destroy_all(void); 61void session_destroy_all(void (*)(Session *));
36 62
63Session *session_new(void);
64Session *session_by_tty(char *);
65void session_close(Session *);
66void do_setusercontext(struct passwd *);
37#endif 67#endif