removed waiting from valid token during opening process

This commit is contained in:
cricket 2010-03-02 20:44:56 +01:00
parent 84a2061f00
commit 3b30f51572
14 changed files with 22 additions and 12 deletions

View File

@ -1 +1 @@
magic_run
/home/cricket/door/magic_run

View File

@ -1 +1 @@
magic_run
/home/cricket/door/magic_run

View File

@ -1 +1 @@
addtoken
/home/cricket/door/magic_run

View File

@ -3,7 +3,7 @@
config = {
['db'] = "cricket",
['prefix_len'] = 4,
['open_cmd'] = "ssh root@fe80::218:84ff:fe1d:3fbc%eth0 door",
['open_cmd'] = "ssh root@fe80::218:84ff:fe1d:3fbc%eth0 door &",
['key_len'] = 164, -- key_len/8*6 must be an integer!!!1!
['ttl'] = 60 * 60 * 24 * 7 * 8, -- s m h d w factor Time To Life (while alive)
['ttrd'] = 60 * 60 * 24 * 365, -- s m h d y Time To Real Death (while in graveyard)

View File

@ -1,7 +1,10 @@
#!/usr/bin/env lua
require 'config'
require 'helper'
function open_door()
require 'config'
kill_stdio()
os.execute(config.open_cmd)
end

View File

@ -7,7 +7,7 @@ end
function qspawn(program) -- quit spawn
kill_stdio()
os.execute(program .. " &")
os.execute(program .. " &> /dev/null &")
end
function rows(con, stmt)

View File

@ -49,7 +49,7 @@ else
token = set_prefix(token,generate_token())
if b ~= false then
add_token(con, token)
qspawn("lua door.lua")
qspawn("./openseamless")
end
print(token)
else

8
door/openseamless Executable file
View File

@ -0,0 +1,8 @@
#!/bin/sh
exec 0>/dev/null
exec 1>/dev/null
exec 2>/dev/null
lua door.lua &

View File

@ -1 +1 @@
magic_run
/home/cricket/door/magic_run

1
open
View File

@ -1 +0,0 @@
magic_run

2
revoke
View File

@ -1 +1 @@
magic_run
/home/cricket/door/magic_run

View File

@ -1 +1 @@
magic_run
/home/cricket/door/magic_run

View File

@ -1 +1 @@
/home/cricket/open
/home/cricket/door/magic_run