Mercurial > dropbear
comparison common-session.c @ 1634:aabde6f57fce
Add a sanity check for DROPBEAR_SVR_MULTIUSER==0 mode
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Wed, 20 Mar 2019 22:57:06 +0800 |
parents | 60fceff95858 |
children | 76189c9ffea2 |
comparison
equal
deleted
inserted
replaced
1633:592a18dac250 | 1634:aabde6f57fce |
---|---|
66 | 66 |
67 ses.socket_prio = DROPBEAR_PRIO_DEFAULT; | 67 ses.socket_prio = DROPBEAR_PRIO_DEFAULT; |
68 /* Sets it to lowdelay */ | 68 /* Sets it to lowdelay */ |
69 update_channel_prio(); | 69 update_channel_prio(); |
70 | 70 |
71 #if !DROPBEAR_SVR_MULTIUSER | |
72 /* A sanity check to prevent an accidental configuration option | |
73 leaving multiuser systems exposed */ | |
74 errno = 0; | |
75 getuid(); | |
76 if (errno != ENOSYS) { | |
77 dropbear_exit("Non-multiuser Dropbear requires a non-multiuser kernel"); | |
78 } | |
79 #endif | |
80 | |
71 now = monotonic_now(); | 81 now = monotonic_now(); |
72 ses.connect_time = now; | 82 ses.connect_time = now; |
73 ses.last_packet_time_keepalive_recv = now; | 83 ses.last_packet_time_keepalive_recv = now; |
74 ses.last_packet_time_idle = now; | 84 ses.last_packet_time_idle = now; |
75 ses.last_packet_time_any_sent = 0; | 85 ses.last_packet_time_any_sent = 0; |