mirror of
https://github.com/skeeto/endlessh.git
synced 2025-12-08 22:23:23 +00:00
committed by
Christopher Wellons
parent
a154fcaf43
commit
b2c811ecf7
12
endlessh.c
12
endlessh.c
@@ -1,4 +1,9 @@
|
|||||||
#define _XOPEN_SOURCE 600
|
#if defined(__OpenBSD__)
|
||||||
|
# define _BSD_SOURCE /* for pledge(2) */
|
||||||
|
#else
|
||||||
|
# define _XOPEN_SOURCE 600
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@@ -596,6 +601,11 @@ sendline(struct client *client, int max_line_length, unsigned long *rng)
|
|||||||
int
|
int
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
#if (defined(__OpenBSD__))
|
||||||
|
if (pledge("inet stdio rpath", NULL) == -1)
|
||||||
|
die();
|
||||||
|
#endif
|
||||||
|
|
||||||
struct config config = CONFIG_DEFAULT;
|
struct config config = CONFIG_DEFAULT;
|
||||||
const char *config_file = DEFAULT_CONFIG_FILE;
|
const char *config_file = DEFAULT_CONFIG_FILE;
|
||||||
config_load(&config, config_file, 1);
|
config_load(&config, config_file, 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user