comparison svr-x11fwd.c @ 475:52a644e7b8e1 pubkey-options

* Patch from Frédéric Moulins adding options to authorized_keys. Needs review.
author Matt Johnston <matt@ucc.asn.au>
date Mon, 08 Sep 2008 15:14:02 +0000
parents 161557a9dde8
children a98a2138364a
comparison
equal deleted inserted replaced
474:f33b0898aaa6 475:52a644e7b8e1
31 #include "dbutil.h" 31 #include "dbutil.h"
32 #include "chansession.h" 32 #include "chansession.h"
33 #include "channel.h" 33 #include "channel.h"
34 #include "packet.h" 34 #include "packet.h"
35 #include "buffer.h" 35 #include "buffer.h"
36 #include "auth.h"
36 37
37 #define X11BASEPORT 6000 38 #define X11BASEPORT 6000
38 #define X11BINDBASE 6010 39 #define X11BINDBASE 6010
39 40
40 static void x11accept(struct Listener* listener, int sock); 41 static void x11accept(struct Listener* listener, int sock);
44 /* called as a request for a session channel, sets up listening X11 */ 45 /* called as a request for a session channel, sets up listening X11 */
45 /* returns DROPBEAR_SUCCESS or DROPBEAR_FAILURE */ 46 /* returns DROPBEAR_SUCCESS or DROPBEAR_FAILURE */
46 int x11req(struct ChanSess * chansess) { 47 int x11req(struct ChanSess * chansess) {
47 48
48 int fd; 49 int fd;
50
51 if (!svr_pubkey_allows_x11fwd()) {
52 return DROPBEAR_FAILURE;
53 }
49 54
50 /* we already have an x11 connection */ 55 /* we already have an x11 connection */
51 if (chansess->x11listener != NULL) { 56 if (chansess->x11listener != NULL) {
52 return DROPBEAR_FAILURE; 57 return DROPBEAR_FAILURE;
53 } 58 }