This commit is contained in:
kento2 2026-09-09 20:02:39 +02:00
parent 684bc7c3e5
commit 247e889006
3 changed files with 5 additions and 94 deletions

View file

@ -12,15 +12,16 @@ static stralloc token;
static char *tokenfile, *cmd_valid, *cmd_invalid;
static void run(void) {
char tmp[] = PATH_TMP"/nobotgate.XXXXXX";
char tmp[]=PATH_TMP"/nobotgate.XXXXXX";
int tmpfd;
char buf[8192];
buffer b;
char *cmd;
tmpfd = mkstemp(tmp);
tmpfd=mkstemp(tmp);
if (tmpfd<0) diesys(111,"create temporary file ",tmp);
buffer_init_write(&b,tmpfd,buf,sizeof buf);
if (!send_headers(buffer_0, &b))
if (!send_headers(buffer_0,&b))
die(111,"copy stdin to temporary file");
lseek(tmpfd,0,SEEK_SET);