Changeset 507
- Timestamp:
- 07/01/09 16:05:12 (3 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
-
AUTHORS (modified) (1 diff)
-
ChangeLog (modified) (1 diff)
-
configure (modified) (10 diffs)
-
src/ocat.c (modified) (6 diffs)
-
src/ocat.h (modified) (1 diff)
-
src/ocatctrl.c (modified) (1 diff)
-
src/ocatsetup.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/AUTHORS
r472 r507 4 4 - Debian package 5 5 - Ubuntu package 6 * Basic conceptual ideas, Mac OSX Testing: Daniel Haslinger <creo _at_ cypherpunk.at> 6 7 -
trunk/ChangeLog
r506 r507 1 1 * version 0.2.0 2 - syslog messages contain name and PID 2 3 3 4 * version 0.1.13 -
trunk/configure
r506 r507 1 1 #! /bin/sh 2 2 # Guess values for system-dependent variables and create Makefiles. 3 # Generated by GNU Autoconf 2.61 for onioncat 0.2.0.r50 4.3 # Generated by GNU Autoconf 2.61 for onioncat 0.2.0.r506. 4 4 # 5 5 # Report bugs to <rahra@cypherpunk.at>. … … 575 575 PACKAGE_NAME='onioncat' 576 576 PACKAGE_TARNAME='onioncat' 577 PACKAGE_VERSION='0.2.0.r50 4'578 PACKAGE_STRING='onioncat 0.2.0.r50 4'577 PACKAGE_VERSION='0.2.0.r506' 578 PACKAGE_STRING='onioncat 0.2.0.r506' 579 579 PACKAGE_BUGREPORT='rahra@cypherpunk.at' 580 580 … … 1179 1179 # This message is too long to be a string in the A/UX 3.1 sh. 1180 1180 cat <<_ACEOF 1181 \`configure' configures onioncat 0.2.0.r50 4to adapt to many kinds of systems.1181 \`configure' configures onioncat 0.2.0.r506 to adapt to many kinds of systems. 1182 1182 1183 1183 Usage: $0 [OPTION]... [VAR=VALUE]... … … 1249 1249 if test -n "$ac_init_help"; then 1250 1250 case $ac_init_help in 1251 short | recursive ) echo "Configuration of onioncat 0.2.0.r50 4:";;1251 short | recursive ) echo "Configuration of onioncat 0.2.0.r506:";; 1252 1252 esac 1253 1253 cat <<\_ACEOF … … 1338 1338 if $ac_init_version; then 1339 1339 cat <<\_ACEOF 1340 onioncat configure 0.2.0.r50 41340 onioncat configure 0.2.0.r506 1341 1341 generated by GNU Autoconf 2.61 1342 1342 … … 1352 1352 running configure, to aid debugging if configure makes a mistake. 1353 1353 1354 It was created by onioncat $as_me 0.2.0.r50 4, which was1354 It was created by onioncat $as_me 0.2.0.r506, which was 1355 1355 generated by GNU Autoconf 2.61. Invocation command line was 1356 1356 … … 2042 2042 # Define the identity of the package. 2043 2043 PACKAGE='onioncat' 2044 VERSION='0.2.0.r50 4'2044 VERSION='0.2.0.r506' 2045 2045 2046 2046 … … 2193 2193 2194 2194 cat >>confdefs.h <<\_ACEOF 2195 #define SVN_REVISION "50 4"2195 #define SVN_REVISION "506" 2196 2196 _ACEOF 2197 2197 … … 4941 4941 # values after options handling. 4942 4942 ac_log=" 4943 This file was extended by onioncat $as_me 0.2.0.r50 4, which was4943 This file was extended by onioncat $as_me 0.2.0.r506, which was 4944 4944 generated by GNU Autoconf 2.61. Invocation command line was 4945 4945 … … 4994 4994 cat >>$CONFIG_STATUS <<_ACEOF 4995 4995 ac_cs_version="\\ 4996 onioncat config.status 0.2.0.r50 44996 onioncat config.status 0.2.0.r506 4997 4997 configured by $0, generated by GNU Autoconf 2.61, 4998 4998 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -
trunk/src/ocat.c
r502 r507 89 89 90 90 91 int mk_pid_file( void)91 int mk_pid_file(uid_t uid) 92 92 { 93 93 FILE *f; … … 102 102 fclose(f); 103 103 log_debug("pid_file %s created, pid = %d", CNF(pid_file), getpid()); 104 105 if (chown(CNF(pid_file), uid, 0) == -1) 106 log_msg(LOG_ERR, "could not change owner of pid_file \"%s\" to %d: %s", CNF(pid_file), uid, strerror(errno)); 104 107 105 108 return 0; … … 208 211 209 212 delete_listeners(CNF(oc_listen), CNF(oc_listen_fd), CNF(oc_listen_cnt)); 213 214 if (CNF(create_pid_file) && (unlink(CNF(pid_file)) == -1)) 215 log_msg(LOG_ERR, "could not remove pid file \"%s\": %s", CNF(pid_file), strerror(errno)); 210 216 } 211 217 … … 275 281 276 282 case 'P': 277 CNF(pid_file) = optarg; 283 CNF(create_pid_file) = 1; 284 if (optarg[0] == '-') 285 optind--; 286 else 287 CNF(pid_file) = optarg; 278 288 break; 279 289 … … 326 336 CNF(logf) = stderr; 327 337 328 (void) open_logfile(); 338 if ((open_logfile() == -1) && !CNF(logf)) 339 openlog(PACKAGE_NAME, LOG_NDELAY | LOG_PID, LOG_DAEMON); 329 340 330 341 // init main thread … … 439 450 440 451 // create pid_file 441 mk_pid_file(); 452 if (CNF(create_pid_file)) 453 mk_pid_file(pwd->pw_uid); 442 454 443 455 if (!runasroot && !getuid()) -
trunk/src/ocat.h
r500 r507 277 277 uint8_t ocat_hwaddr[ETHER_ADDR_LEN]; 278 278 char *pid_file; 279 int create_pid_file; 279 280 char *logfn; 280 281 FILE *logf; -
trunk/src/ocatctrl.c
r499 r507 161 161 if (peer->tcpfd == cfd) 162 162 { 163 log_msg(LOG_INFO | LOG_FCONN, "close request for %d", cfd);164 163 oe_close(cfd); 165 164 delete_peer(peer); 165 log_msg(LOG_INFO | LOG_FCONN, "%d was successfully closed up on user request", cfd); 166 166 break; 167 167 } -
trunk/src/ocatsetup.c
r497 r507 61 61 #endif 62 62 {0x00, 0x00, 0x6c, 0x00, 0x00, 0x00}, // ocat_hwaddr (OnionCat MAC address) 63 PID_FILE, 63 PID_FILE, // pid_file 64 0, // create_pid_file 64 65 NULL, NULL, // logfile 66 #ifdef __CYGWIN__ 67 0, 68 #else 65 69 1, // daemon 70 #endif 66 71 { 67 72 /* … … 232 237 setup_.daemon, 233 238 t / (3600 * 24), t / 3600 % 24, t / 60 % 60, 234 strlen(setup_.version), VERSION_STRING_LEN, setup_.version,239 (int) strlen(setup_.version), VERSION_STRING_LEN, setup_.version, 235 240 setup_.sizeof_setup, 236 241 setup_.term_req
Note: See TracChangeset
for help on using the changeset viewer.
