[packages] add krb5, the MIT Kerberos 5 implementation (#6101)
[openwrt/svn-archive/archive.git] / net / imsnif / patches / 001-openwrt_paths.patch
1 diff -Naur imsniff.orig/docs/imsniff.conf.sample imsniff/docs/imsniff.conf.sample
2 --- imsniff.orig/docs/imsniff.conf.sample 2005-05-23 21:14:06.000000000 +0300
3 +++ imsniff/docs/imsniff.conf.sample 2007-07-25 04:20:31.000000000 +0300
4 @@ -1,7 +1,7 @@
5 -daemonize = 0
6 +daemonize = 1
7 promisc = 0
8 -verbose = 2
9 -chatdir = /tmp/chats
10 -debugdir = /tmp/debug
11 -interface eth0
12 +verbose = 1
13 +chatdir = /var/log/imsnif
14 +debugdir = /var/log
15 +interface = eth0.1
16
17 diff -Naur imsniff.orig/src/imsniff.cpp imsniff/src/imsniff.cpp
18 --- imsniff.orig/src/imsniff.cpp 2005-09-02 15:52:28.000000000 +0300
19 +++ imsniff/src/imsniff.cpp 2007-07-25 03:14:00.000000000 +0300
20 @@ -4,8 +4,8 @@
21 //char debuglogdir[1024]="/var/log";
22
23
24 -char chatlogdir[MAX_DIR_LENGTH+1]="";
25 -char debuglogdir[MAX_DIR_LENGTH+1]="";
26 +char chatlogdir[MAX_DIR_LENGTH+1]="/var/log/imsnif";
27 +char debuglogdir[MAX_DIR_LENGTH+1]="/var/log";
28 int daemonize=0;
29 char *currentversion = "0.04";
30 int data_offset = -1;
31 @@ -652,7 +652,14 @@
32 c--;
33 c++; /* Start of real name */
34 if (strlen (c) == 0) /* Uh? */
35 + { //Jake's hack to read default configuration file if it exists.
36 + f = fopen("/etc/imsnif.conf", "r");
37 + if (f!=NULL)
38 + {
39 + read_file (f);
40 + }
41 return 0;
42 + }
43 if (strchr (c, '%')!=NULL) /* Prevent strange things */
44 return -1;
45 fn = (char *) malloc (strlen (c) + 11);
46 diff -Naur imsniff.orig/src/util.cpp imsniff/src/util.cpp
47 --- imsniff.orig/src/util.cpp 2005-09-02 15:27:58.000000000 +0300
48 +++ imsniff/src/util.cpp 2007-07-25 04:17:36.000000000 +0300
49 @@ -254,11 +254,11 @@
50 #ifdef WIN32
51 struct tm *stm;
52 stm= localtime (&now);
53 - sprintf (fn, "%s/imsniff_%04d-%02d-%02d.log", debuglogdir, stm->tm_year, stm->tm_mon, stm->tm_mday);
54 + sprintf (fn, "%s/imsnif_%04d-%02d-%02d.log", debuglogdir, stm->tm_year, stm->tm_mon, stm->tm_mday);
55 #else
56 struct tm stm;
57 localtime_r (&now, &stm);
58 - sprintf (fn, "%s/imsniff_%04d-%02d-%02d.log", debuglogdir, stm.tm_year, stm.tm_mon, stm.tm_mday);
59 + sprintf (fn, "%s/imsnif_%04d-%02d-%02d.log", debuglogdir, stm.tm_year, stm.tm_mon, stm.tm_mday);
60 #endif
61 FILE *o=fopen (fn, "a+t");
62 if (o!=NULL)