diff options
Diffstat (limited to 'session.h')
-rw-r--r-- | session.h | 34 |
1 files changed, 32 insertions, 2 deletions
@@ -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 | ||
30 | typedef struct Session Session; | ||
31 | struct 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 | |||
29 | void do_authenticated(Authctxt *); | 55 | void do_authenticated(Authctxt *); |
30 | 56 | ||
31 | int session_open(Authctxt*, int); | 57 | int session_open(Authctxt*, int); |
32 | int session_input_channel_req(Channel *, const char *); | 58 | int session_input_channel_req(Channel *, const char *); |
33 | void session_close_by_pid(pid_t, int); | 59 | void session_close_by_pid(pid_t, int); |
34 | void session_close_by_channel(int, void *); | 60 | void session_close_by_channel(int, void *); |
35 | void session_destroy_all(void); | 61 | void session_destroy_all(void (*)(Session *)); |
36 | 62 | ||
63 | Session *session_new(void); | ||
64 | Session *session_by_tty(char *); | ||
65 | void session_close(Session *); | ||
66 | void do_setusercontext(struct passwd *); | ||
37 | #endif | 67 | #endif |