mirror of
https://github.com/NAStools/zerotierone.git
synced 2025-07-05 20:41:54 -07:00
Clean up authtoken CGI
This commit is contained in:
parent
c4546ac7e0
commit
784b1b95ff
1 changed files with 8 additions and 4 deletions
12
debian/readynas/authtoken.c
vendored
12
debian/readynas/authtoken.c
vendored
|
@ -3,14 +3,18 @@
|
|||
|
||||
int main() {
|
||||
FILE *f;
|
||||
char c;
|
||||
char c[32];
|
||||
|
||||
f=fopen("/apps/nastools-zerotier-one/var/authtoken.secret","rt");
|
||||
f=fopen("/apps/nastools-zerotier-one/var/authtoken.secret","r");
|
||||
if(!f)
|
||||
return 1;
|
||||
|
||||
printf("Content-Type: text/plain\n\n");
|
||||
|
||||
while ((c=fgetc(f))!=EOF)
|
||||
printf("%c", c);
|
||||
size_t ret = fread(c, 1, sizeof(c), f);
|
||||
if(!ret)
|
||||
return 1;
|
||||
fwrite(c, ret, 1, stdout);
|
||||
|
||||
fclose(f);
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue