Changeset d5acb5
- Timestamp:
- 06/24/09 19:28:13 (3 years ago)
- Branches:
- master
- Children:
- a62ae8
- Parents:
- 17105a
- git-author:
- Sebastien Raveau <sebastien.raveau@…> (06/24/09 19:28:13)
- git-committer:
- Erik Ekman <erik@…> (02/04/12 20:34:02)
- Files:
-
- 1 added
- 7 edited
-
CHANGELOG (modified) (1 diff)
-
doc/iodine.te (added)
-
man/iodine.8 (modified) (3 diffs)
-
src/common.c (modified) (2 diffs)
-
src/common.h (modified) (1 diff)
-
src/iodine.c (modified) (7 diffs)
-
src/iodined.c (modified) (8 diffs)
-
src/osflags (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
CHANGELOG
r17105a rd5acb5 11 11 - Multiple installed TAP32 interfaces are now supported, fixes #46. 12 12 - Return nonzero if tunnel fails to open, fixes #62. 13 - Support for setting a SELinux context, based on patch by 14 Sebastien Raveau. Sample context file in doc/iodine.te 13 15 14 16 2009-06-01: 0.5.2 "WifiFree" -
man/iodine.8
rda0de3 rd5acb5 20 20 .B ] [-m 21 21 .I fragsize 22 .B ] [-z 23 .I context 22 24 .B ] 23 25 .B [ … … 48 50 .B ] [-P 49 51 .I password 50 .B ] 52 .B ] [-z 53 .I context 54 .B ] 51 55 .I tunnel_ip 52 56 .B [ … … 90 94 .B stdin 91 95 will be used as input. Only the first 32 characters will be used. 96 .TP 97 .B -z context 98 Apply SELinux 'context' after initialization. 92 99 .SS Client Options: 93 100 .TP -
src/common.c
rc92ed9 rd5acb5 40 40 #include <arpa/inet.h> 41 41 #include <netinet/in.h> 42 #endif 43 44 #ifdef HAVE_SETCON 45 # include <selinux/selinux.h> 42 46 #endif 43 47 … … 169 173 170 174 void 175 do_setcon(char *context) 176 { 177 #ifdef HAVE_SETCON 178 if (-1 == setcon(context)) 179 err(1, "%s", context); 180 #else 181 warnx("No SELinux support built in"); 182 #endif 183 } 184 185 void 171 186 do_detach() 172 187 { -
src/common.h
rc92ed9 rd5acb5 91 91 92 92 void do_chroot(char *); 93 void do_setcon(char *); 93 94 void do_detach(); 94 95 -
src/iodine.c
rda5002 rd5acb5 1105 1105 1106 1106 fprintf(stderr, "Usage: %s [-v] [-h] [-f] [-u user] [-t chrootdir] [-d device] " 1107 "[-P password] [-m maxfragsize] [ nameserver] topdomain\n", __progname);1107 "[-P password] [-m maxfragsize] [-z context] [nameserver] topdomain\n", __progname); 1108 1108 exit(2); 1109 1109 } … … 1115 1115 fprintf(stderr, "iodine IP over DNS tunneling client\n"); 1116 1116 fprintf(stderr, "Usage: %s [-v] [-h] [-f] [-u user] [-t chrootdir] [-d device] " 1117 "[-P password] [-m maxfragsize] [ nameserver] topdomain\n", __progname);1117 "[-P password] [-m maxfragsize] [-z context] [nameserver] topdomain\n", __progname); 1118 1118 fprintf(stderr, " -v to print version info and exit\n"); 1119 1119 fprintf(stderr, " -h to print this help and exit\n"); … … 1124 1124 fprintf(stderr, " -P password used for authentication (max 32 chars will be used)\n"); 1125 1125 fprintf(stderr, " -m maxfragsize, to limit size of downstream packets\n"); 1126 fprintf(stderr, " -z context, to apply specified SELinux context after initialization\n"); 1126 1127 fprintf(stderr, "nameserver is the IP number of the relaying nameserver, if absent /etc/resolv.conf is used\n"); 1127 1128 fprintf(stderr, "topdomain is the FQDN that is delegated to the tunnel endpoint.\n"); … … 1152 1153 int foreground; 1153 1154 char *newroot; 1155 char *context; 1154 1156 char *device; 1155 1157 int choice; … … 1164 1166 foreground = 0; 1165 1167 newroot = NULL; 1168 context = NULL; 1166 1169 device = NULL; 1167 1170 chunkid = 0; … … 1223 1226 max_downstream_frag_size = atoi(optarg); 1224 1227 break; 1228 case 'z': 1229 context = optarg; 1230 break; 1225 1231 default: 1226 1232 usage(); … … 1322 1328 #endif 1323 1329 } 1330 1331 if (context != NULL) 1332 do_setcon(context); 1324 1333 1325 1334 downstream_seqno = 0; -
src/iodined.c
r196b37 rd5acb5 982 982 983 983 fprintf(stderr, "Usage: %s [-v] [-h] [-c] [-s] [-f] [-D] [-u user] " 984 "[-t chrootdir] [-d device] [-m mtu] "984 "[-t chrootdir] [-d device] [-m mtu] [-z context] " 985 985 "[-l ip address to listen on] [-p port] [-n external ip] [-b dnsport] [-P password]" 986 986 " tunnel_ip[/netmask] topdomain\n", __progname); … … 994 994 fprintf(stderr, "iodine IP over DNS tunneling server\n"); 995 995 fprintf(stderr, "Usage: %s [-v] [-h] [-c] [-s] [-f] [-D] [-u user] " 996 "[-t chrootdir] [-d device] [-m mtu] "996 "[-t chrootdir] [-d device] [-m mtu] [-z context] " 997 997 "[-l ip address to listen on] [-p port] [-n external ip] [-b dnsport] [-P password]" 998 998 " tunnel_ip[/netmask] topdomain\n", __progname); … … 1008 1008 fprintf(stderr, " -d device to set tunnel device name\n"); 1009 1009 fprintf(stderr, " -m mtu to set tunnel device mtu\n"); 1010 fprintf(stderr, " -z context to apply SELinux context after initialization\n"); 1010 1011 fprintf(stderr, " -l ip address to listen on for incoming dns traffic " 1011 1012 "(default 0.0.0.0)\n"); … … 1040 1041 char *username; 1041 1042 char *newroot; 1043 char *context; 1042 1044 char *device; 1043 1045 int dnsd_fd; … … 1058 1060 username = NULL; 1059 1061 newroot = NULL; 1062 context = NULL; 1060 1063 device = NULL; 1061 1064 foreground = 0; … … 1091 1094 fw_query_init(); 1092 1095 1093 while ((choice = getopt(argc, argv, "vcsfhDu:t:d:m:l:p:n:b:P: ")) != -1) {1096 while ((choice = getopt(argc, argv, "vcsfhDu:t:d:m:l:p:n:b:P:z:")) != -1) { 1094 1097 switch(choice) { 1095 1098 case 'v': … … 1142 1145 /* XXX: find better way of cleaning up ps(1) */ 1143 1146 memset(optarg, 0, strlen(optarg)); 1147 break; 1148 case 'z': 1149 context = optarg; 1144 1150 break; 1145 1151 default: … … 1288 1294 } 1289 1295 1296 if (context != NULL) 1297 do_setcon(context); 1298 1290 1299 #ifndef WINDOWS32 1291 1300 openlog(__progname, LOG_NOWAIT, LOG_DAEMON); -
src/osflags
r541959 rd5acb5 17 17 echo '-lws2_32 -liphlpapi'; 18 18 ;; 19 Linux) 20 [ -e /usr/include/selinux/selinux.h ] && echo '-lselinux'; 21 ;; 19 22 esac 20 23 ;; … … 24 27 echo '-Dsocklen_t=int'; 25 28 ;; 29 Linux) 30 [ -e /usr/include/selinux/selinux.h ] && echo '-DHAVE_SETCON'; 31 ;; 26 32 esac 27 33 ;;
Note: See TracChangeset
for help on using the changeset viewer.
