diff options
| author | erdgeist <> | 2007-01-14 20:15:04 +0000 |
|---|---|---|
| committer | erdgeist <> | 2007-01-14 20:15:04 +0000 |
| commit | 22a0829f9470e1cf4b084cd22881ee4f35d93f6e (patch) | |
| tree | 7186ba5322b944f1481c61ba2b182b36c907aa3d | |
| parent | ad6c1b2019a368ae41508599bbddb265c1374308 (diff) | |
Drop permission, if we can
| -rw-r--r-- | opentracker.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/opentracker.c b/opentracker.c index f4b5e21..2579ab8 100644 --- a/opentracker.c +++ b/opentracker.c | |||
| @@ -378,10 +378,12 @@ int main( int argc, char **argv ) { | |||
| 378 | } | 378 | } |
| 379 | 379 | ||
| 380 | allparsed: | 380 | allparsed: |
| 381 | ot_start_time = time( NULL ); | ||
| 382 | if (socket_bind4_reuse(s,serverip,port)==-1) | 381 | if (socket_bind4_reuse(s,serverip,port)==-1) |
| 383 | panic("socket_bind4_reuse"); | 382 | panic("socket_bind4_reuse"); |
| 384 | 383 | ||
| 384 | setegid((gid_t)-2); setuid((uid_t)-2); | ||
| 385 | setgid((gid_t)-2); seteuid((uid_t)-2); | ||
| 386 | |||
| 385 | if (socket_listen(s,16)==-1) | 387 | if (socket_listen(s,16)==-1) |
| 386 | panic("socket_listen"); | 388 | panic("socket_listen"); |
| 387 | 389 | ||
| @@ -393,6 +395,8 @@ allparsed: | |||
| 393 | if( init_logic( serverdir ) == -1 ) | 395 | if( init_logic( serverdir ) == -1 ) |
| 394 | panic("Logic not started"); | 396 | panic("Logic not started"); |
| 395 | 397 | ||
| 398 | ot_start_time = time( NULL ); | ||
| 399 | |||
| 396 | io_wantread( s ); | 400 | io_wantread( s ); |
| 397 | taia_now( &next_timeout_check ); | 401 | taia_now( &next_timeout_check ); |
| 398 | taia_addsec( &next_timeout_check, &next_timeout_check, OT_CLIENT_TIMEOUT_CHECKINTERVAL ); | 402 | taia_addsec( &next_timeout_check, &next_timeout_check, OT_CLIENT_TIMEOUT_CHECKINTERVAL ); |
