-
Notifications
You must be signed in to change notification settings - Fork 0
/
rdoedit.h
27 lines (25 loc) · 1.04 KB
/
rdoedit.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <pwd.h>
#include <string.h>
#include <shadow.h>
#include <termios.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <time.h>
#define PWD_MAX 200
#define FNM_MAX 512
#define HARDENED /*clear the password in memory, with a performance hit*/
#define ALLOWED_USER "stefan" /*the allowed user*/
#define EDITOR "/bin/nano" /*fallback editor*/
#define TMPDIR "/tmp/" /*directory to store temporary files, must end with / */
/* use ./ to save temporary files in the current directory*/
/*#define EXTERN_EDITOR*/ /*uncomment to set editor using $EDITOR envvar*/
#define LENGTH 16 /*temporary file length*/
#define BUFSIZE 4096 /*file buffer size, default is 4k*/
#define REQUIRE_PASSWORD /*comment to not require password for the allowed user*/
#define ALLOW_ROOT /*comment to not allow the root user to use rdoedit*/
#define CHARSET "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" /*charset for temporary filename*/
/* GLOBALS */
static char file_existed = 1;