1 /* $KAME: cftoken.l,v 1.69 2002/09/27 06:03:51 itojun Exp $ */
6 #include <sys/socket.h>
8 #include <netinet/in.h>
9 #include <netinet6/ipsec.h>
30 #include "algorithm.h"
33 #include "localconf.h"
35 #include "isakmp_var.h"
37 #include "ipsec_doi.h"
43 /*#include "y.tab.h"*/
47 #if defined(YIPS_DEBUG)
48 # define YYDB plog(LLV_DEBUG2, LOCATION, NULL, \
49 "begin <%d>%s\n", yy_start, yytext);
51 plog(LLV_DEBUG2, LOCATION, NULL, "<%d>%s", \
52 yy_start, loglevel >= LLV_DEBUG2 ? "\n" : ""); \
57 #endif /* defined(YIPS_DEBUG) */
59 #define MAX_INCLUDE_DEPTH 10
61 static struct include_stack {
64 YY_BUFFER_STATE prevstate;
68 } incstack[MAX_INCLUDE_DEPTH];
69 static int incstackp = 0;
71 static int yy_first_time = 1;
80 /*octet (([01]?{digit}?{digit})|((2([0-4]{digit}))|(25[0-5]))) */
93 bracketstring \<[^>]*\>
94 quotedstring \"[^"]*\"
95 addrstring [a-fA-F0-9:]([a-fA-F0-9:\.]*|[a-fA-F0-9:\.]*%[a-zA-Z0-9]*)
97 hexstring 0x{hexdigit}+
99 %s S_INI S_PTH S_INF S_LOG S_PAD S_LST S_RTRY
102 %s S_RMT S_RMTS S_RMTP
114 <S_INI>path { BEGIN S_PTH; YYDB; return(PATH); }
115 <S_PTH>include { YYD; yylval.num = LC_PATHTYPE_INCLUDE;
117 <S_PTH>pre_shared_key { YYD; yylval.num = LC_PATHTYPE_PSK;
119 <S_PTH>certificate { YYD; yylval.num = LC_PATHTYPE_CERT;
121 <S_PTH>backupsa { YYD; yylval.num = LC_PATHTYPE_BACKUPSA;
123 <S_PTH>{semi} { BEGIN S_INI; YYDB; return(EOS); }
126 <S_INI>include { YYDB; return(INCLUDE); }
128 /* self information */
129 <S_INI>identifier { BEGIN S_INF; YYDB; yywarn("it is obsoleted. use \"my_identifier\" in each remote directives."); return(IDENTIFIER); }
130 <S_INF>{semi} { BEGIN S_INI; return(EOS); }
133 <S_INI>complex_bundle { YYDB; return(COMPLEX_BUNDLE); }
136 <S_INI>log { BEGIN S_LOG; YYDB; return(LOGGING); }
137 <S_LOG>info { YYD; yywarn("it is obsoleted. use \"notify\""); yylval.num = 0; return(LOGLEV); }
138 <S_LOG>notify { YYD; yylval.num = 0; return(LOGLEV); }
139 <S_LOG>debug { YYD; yylval.num = 1; return(LOGLEV); }
140 <S_LOG>debug2 { YYD; yylval.num = 2; return(LOGLEV); }
141 <S_LOG>debug3 { YYD; yywarn("it is osboleted. use \"debug2\""); yylval.num = 2; return(LOGLEV); }
142 <S_LOG>debug4 { YYD; yywarn("it is obsoleted. use \"debug2\""); yylval.num = 2; return(LOGLEV); }
143 <S_LOG>{semi} { BEGIN S_INI; return(EOS); }
146 <S_INI>padding { BEGIN S_PAD; YYDB; return(PADDING); }
147 <S_PAD>{bcl} { return(BOC); }
148 <S_PAD>randomize { YYD; return(PAD_RANDOMIZE); }
149 <S_PAD>randomize_length { YYD; return(PAD_RANDOMIZELEN); }
150 <S_PAD>maximum_length { YYD; return(PAD_MAXLEN); }
151 <S_PAD>strict_check { YYD; return(PAD_STRICT); }
152 <S_PAD>exclusive_tail { YYD; return(PAD_EXCLTAIL); }
153 <S_PAD>{ecl} { BEGIN S_INI; return(EOC); }
156 <S_INI>listen { BEGIN S_LST; YYDB; return(LISTEN); }
157 <S_LST>{bcl} { return(BOC); }
158 <S_LST>isakmp { YYD; return(X_ISAKMP); }
159 <S_LST>admin { YYD; return(X_ADMIN); }
160 <S_LST>strict_address { YYD; return(STRICT_ADDRESS); }
161 <S_LST>{ecl} { BEGIN S_INI; return(EOC); }
164 <S_INI>timer { BEGIN S_RTRY; YYDB; return(RETRY); }
165 <S_RTRY>{bcl} { return(BOC); }
166 <S_RTRY>counter { YYD; return(RETRY_COUNTER); }
167 <S_RTRY>interval { YYD; return(RETRY_INTERVAL); }
168 <S_RTRY>persend { YYD; return(RETRY_PERSEND); }
169 <S_RTRY>phase1 { YYD; return(RETRY_PHASE1); }
170 <S_RTRY>phase2 { YYD; return(RETRY_PHASE2); }
171 <S_RTRY>{ecl} { BEGIN S_INI; return(EOC); }
174 <S_INI>sainfo { BEGIN S_SAINF; YYDB; return(SAINFO); }
175 <S_SAINF>anonymous { YYD; return(ANONYMOUS); }
176 <S_SAINF>{blcl}any{elcl} { YYD; return(PORTANY); }
177 <S_SAINF>any { YYD; return(ANY); }
179 <S_SAINF>{bcl} { BEGIN S_SAINFS; return(BOC); }
180 <S_SAINF>{semi} { BEGIN S_INI; return(EOS); }
181 <S_SAINFS>{ecl} { BEGIN S_INI; return(EOC); }
182 <S_SAINFS>pfs_group { YYD; return(PFS_GROUP); }
183 <S_SAINFS>identifier { YYD; yywarn("it is obsoleted. use \"my_identifier\"."); return(IDENTIFIER); }
184 <S_SAINFS>my_identifier { YYD; return(MY_IDENTIFIER); }
185 <S_SAINFS>lifetime { YYD; return(LIFETIME); }
186 <S_SAINFS>time { YYD; return(LIFETYPE_TIME); }
187 <S_SAINFS>byte { YYD; return(LIFETYPE_BYTE); }
188 <S_SAINFS>encryption_algorithm { YYD; yylval.num = algclass_ipsec_enc; return(ALGORITHM_CLASS); }
189 <S_SAINFS>authentication_algorithm { YYD; yylval.num = algclass_ipsec_auth; return(ALGORITHM_CLASS); }
190 <S_SAINFS>compression_algorithm { YYD; yylval.num = algclass_ipsec_comp; return(ALGORITHM_CLASS); }
191 <S_SAINFS>{comma} { YYD; return(COMMA); }
194 <S_INI>remote { BEGIN S_RMT; YYDB; return(REMOTE); }
195 <S_RMT>anonymous { YYD; return(ANONYMOUS); }
197 <S_RMT>{bcl} { BEGIN S_RMTS; return(BOC); }
198 <S_RMTS>{ecl} { BEGIN S_INI; return(EOC); }
199 <S_RMTS>exchange_mode { YYD; return(EXCHANGE_MODE); }
200 <S_RMTS>{comma} { YYD; /* XXX ignored, but to be handled. */ ; }
201 <S_RMTS>base { YYD; yylval.num = ISAKMP_ETYPE_BASE; return(EXCHANGETYPE); }
202 <S_RMTS>main { YYD; yylval.num = ISAKMP_ETYPE_IDENT; return(EXCHANGETYPE); }
203 <S_RMTS>aggressive { YYD; yylval.num = ISAKMP_ETYPE_AGG; return(EXCHANGETYPE); }
204 <S_RMTS>doi { YYD; return(DOI); }
205 <S_RMTS>ipsec_doi { YYD; yylval.num = IPSEC_DOI; return(DOITYPE); }
206 <S_RMTS>situation { YYD; return(SITUATION); }
207 <S_RMTS>identity_only { YYD; yylval.num = IPSECDOI_SIT_IDENTITY_ONLY; return(SITUATIONTYPE); }
208 <S_RMTS>secrecy { YYD; yylval.num = IPSECDOI_SIT_SECRECY; return(SITUATIONTYPE); }
209 <S_RMTS>integrity { YYD; yylval.num = IPSECDOI_SIT_INTEGRITY; return(SITUATIONTYPE); }
210 <S_RMTS>identifier { YYD; yywarn("it is obsoleted. use \"my_identifier\"."); return(IDENTIFIER); }
211 <S_RMTS>my_identifier { YYD; return(MY_IDENTIFIER); }
212 <S_RMTS>peers_identifier { YYD; return(PEERS_IDENTIFIER); }
213 <S_RMTS>verify_identifier { YYD; return(VERIFY_IDENTIFIER); }
214 <S_RMTS>open_dir_auth_group { YYD; return(OPEN_DIR_AUTH_GROUP); }
215 <S_RMTS>certificate_type { YYD; return(CERTIFICATE_TYPE); }
216 <S_RMTS>shared_secret { YYD; return(SHARED_SECRET); }
217 <S_RMTS>x509 { YYD; yylval.num = ISAKMP_CERT_X509SIGN; return(CERT_X509); }
218 <S_RMTS>in_keychain { YYD; return(IN_KEYCHAIN); }
219 <S_RMTS>certificate_verification { YYD; return(CERTIFICATE_VERIFICATION); }
220 <S_RMTS>peers_certfile { YYD; return(PEERS_CERTFILE); }
221 <S_RMTS>dnssec { YYD; return(DNSSEC); }
222 <S_RMTS>verify_cert { YYD; return(VERIFY_CERT); }
223 <S_RMTS>send_cert { YYD; return(SEND_CERT); }
224 <S_RMTS>send_cr { YYD; return(SEND_CR); }
225 <S_RMTS>dh_group { YYD; return(DH_GROUP); }
226 <S_RMTS>nonce_size { YYD; return(NONCE_SIZE); }
227 <S_RMTS>generate_policy { YYD; return(GENERATE_POLICY); }
228 <S_RMTS>support_mip6 { YYD; return(SUPPORT_MIP6); }
229 <S_RMTS>initial_contact { YYD; return(INITIAL_CONTACT); }
230 <S_RMTS>proposal_check { YYD; return(PROPOSAL_CHECK); }
231 <S_RMTS>obey { YYD; yylval.num = PROP_CHECK_OBEY; return(PROPOSAL_CHECK_LEVEL); }
232 <S_RMTS>strict { YYD; yylval.num = PROP_CHECK_STRICT; return(PROPOSAL_CHECK_LEVEL); }
233 <S_RMTS>exact { YYD; yylval.num = PROP_CHECK_EXACT; return(PROPOSAL_CHECK_LEVEL); }
234 <S_RMTS>claim { YYD; yylval.num = PROP_CHECK_CLAIM; return(PROPOSAL_CHECK_LEVEL); }
235 <S_RMTS>keepalive { YYD; return(KEEPALIVE); }
236 <S_RMTS>passive { YYD; return(PASSIVE); }
237 <S_RMTS>lifetime { YYD; return(LIFETIME); }
238 <S_RMTS>time { YYD; return(LIFETYPE_TIME); }
239 <S_RMTS>byte { YYD; return(LIFETYPE_BYTE); }
240 /* remote proposal */
241 <S_RMTS>proposal { BEGIN S_RMTP; YYDB; return(PROPOSAL); }
242 <S_RMTP>{bcl} { return(BOC); }
243 <S_RMTP>{ecl} { BEGIN S_RMTS; return(EOC); }
244 <S_RMTP>lifetime { YYD; return(LIFETIME); }
245 <S_RMTP>time { YYD; return(LIFETYPE_TIME); }
246 <S_RMTP>byte { YYD; return(LIFETYPE_BYTE); }
247 <S_RMTP>encryption_algorithm { YYD; yylval.num = algclass_isakmp_enc; return(ALGORITHM_CLASS); }
248 <S_RMTP>authentication_method { YYD; yylval.num = algclass_isakmp_ameth; return(ALGORITHM_CLASS); }
249 <S_RMTP>hash_algorithm { YYD; yylval.num = algclass_isakmp_hash; return(ALGORITHM_CLASS); }
250 <S_RMTP>dh_group { YYD; return(DH_GROUP); }
251 <S_RMTP>gssapi_id { YYD; return(GSSAPI_ID); }
254 on { YYD; yylval.num = TRUE; return(SWITCH); }
255 off { YYD; yylval.num = FALSE; return(SWITCH); }
258 {slash}{digit}{1,3} {
261 yylval.num = atoi(yytext);
266 {blcl}{decstring}{elcl} {
269 while (*++p != ']') ;
272 yylval.num = atoi(yytext);
277 esp { YYD; yylval.num = IPPROTO_ESP; return(UL_PROTO); }
278 ah { YYD; yylval.num = IPPROTO_AH; return(UL_PROTO); }
279 ipcomp { YYD; yylval.num = IPPROTO_IPCOMP; return(UL_PROTO); }
280 icmp { YYD; yylval.num = IPPROTO_ICMP; return(UL_PROTO); }
281 icmp6 { YYD; yylval.num = IPPROTO_ICMPV6; return(UL_PROTO); }
282 tcp { YYD; yylval.num = IPPROTO_TCP; return(UL_PROTO); }
283 udp { YYD; yylval.num = IPPROTO_UDP; return(UL_PROTO); }
286 des_iv64 { YYD; yylval.num = algtype_des_iv64; return(ALGORITHMTYPE); }
287 des { YYD; yylval.num = algtype_des; return(ALGORITHMTYPE); }
288 3des { YYD; yylval.num = algtype_3des; return(ALGORITHMTYPE); }
289 rc5 { YYD; yylval.num = algtype_rc5; return(ALGORITHMTYPE); }
290 idea { YYD; yylval.num = algtype_idea; return(ALGORITHMTYPE); }
291 cast128 { YYD; yylval.num = algtype_cast128; return(ALGORITHMTYPE); }
292 blowfish { YYD; yylval.num = algtype_blowfish; return(ALGORITHMTYPE); }
293 3idea { YYD; yylval.num = algtype_3idea; return(ALGORITHMTYPE); }
294 des_iv32 { YYD; yylval.num = algtype_des_iv32; return(ALGORITHMTYPE); }
295 rc4 { YYD; yylval.num = algtype_rc4; return(ALGORITHMTYPE); }
296 null_enc { YYD; yylval.num = algtype_null_enc; return(ALGORITHMTYPE); }
297 rijndael { YYD; yylval.num = algtype_rijndael; return(ALGORITHMTYPE); }
298 aes { YYD; yylval.num = algtype_rijndael; return(ALGORITHMTYPE); }
299 twofish { YYD; yylval.num = algtype_twofish; return(ALGORITHMTYPE); }
300 non_auth { YYD; yylval.num = algtype_non_auth; return(ALGORITHMTYPE); }
301 hmac_md5 { YYD; yylval.num = algtype_hmac_md5; return(ALGORITHMTYPE); }
302 hmac_sha1 { YYD; yylval.num = algtype_hmac_sha1; return(ALGORITHMTYPE); }
303 hmac_sha2_256 { YYD; yylval.num = algtype_hmac_sha2_256; return(ALGORITHMTYPE); }
304 hmac_sha2_384 { YYD; yylval.num = algtype_hmac_sha2_384; return(ALGORITHMTYPE); }
305 hmac_sha2_512 { YYD; yylval.num = algtype_hmac_sha2_512; return(ALGORITHMTYPE); }
306 des_mac { YYD; yylval.num = algtype_des_mac; return(ALGORITHMTYPE); }
307 kpdk { YYD; yylval.num = algtype_kpdk; return(ALGORITHMTYPE); }
308 md5 { YYD; yylval.num = algtype_md5; return(ALGORITHMTYPE); }
309 sha1 { YYD; yylval.num = algtype_sha1; return(ALGORITHMTYPE); }
310 tiger { YYD; yylval.num = algtype_tiger; return(ALGORITHMTYPE); }
311 sha2_256 { YYD; yylval.num = algtype_sha2_256; return(ALGORITHMTYPE); }
312 sha2_384 { YYD; yylval.num = algtype_sha2_384; return(ALGORITHMTYPE); }
313 sha2_512 { YYD; yylval.num = algtype_sha2_512; return(ALGORITHMTYPE); }
314 oui { YYD; yylval.num = algtype_oui; return(ALGORITHMTYPE); }
315 deflate { YYD; yylval.num = algtype_deflate; return(ALGORITHMTYPE); }
316 lzs { YYD; yylval.num = algtype_lzs; return(ALGORITHMTYPE); }
317 modp768 { YYD; yylval.num = algtype_modp768; return(ALGORITHMTYPE); }
318 modp1024 { YYD; yylval.num = algtype_modp1024; return(ALGORITHMTYPE); }
319 modp1536 { YYD; yylval.num = algtype_modp1536; return(ALGORITHMTYPE); }
320 ec2n155 { YYD; yylval.num = algtype_ec2n155; return(ALGORITHMTYPE); }
321 ec2n185 { YYD; yylval.num = algtype_ec2n185; return(ALGORITHMTYPE); }
322 modp2048 { YYD; yylval.num = algtype_modp2048; return(ALGORITHMTYPE); }
323 modp3072 { YYD; yylval.num = algtype_modp3072; return(ALGORITHMTYPE); }
324 modp4096 { YYD; yylval.num = algtype_modp4096; return(ALGORITHMTYPE); }
325 modp6144 { YYD; yylval.num = algtype_modp6144; return(ALGORITHMTYPE); }
326 modp8192 { YYD; yylval.num = algtype_modp8192; return(ALGORITHMTYPE); }
327 pre_shared_key { YYD; yylval.num = algtype_psk; return(ALGORITHMTYPE); }
328 rsasig { YYD; yylval.num = algtype_rsasig; return(ALGORITHMTYPE); }
329 dsssig { YYD; yylval.num = algtype_dsssig; return(ALGORITHMTYPE); }
330 rsaenc { YYD; yylval.num = algtype_rsaenc; return(ALGORITHMTYPE); }
331 rsarev { YYD; yylval.num = algtype_rsarev; return(ALGORITHMTYPE); }
332 gssapi_krb { YYD; yylval.num = algtype_gssapikrb; return(ALGORITHMTYPE); }
334 /* identifier type */
335 vendor_id { YYD; yywarn("it is obsoleted."); return(VENDORID); }
336 user_fqdn { YYD; yylval.num = IDTYPE_USERFQDN; return(IDENTIFIERTYPE); }
337 fqdn { YYD; yylval.num = IDTYPE_FQDN; return(IDENTIFIERTYPE); }
338 keyid { YYD; yylval.num = IDTYPE_KEYID; return(IDENTIFIERTYPE); }
339 address { YYD; yylval.num = IDTYPE_ADDRESS; return(IDENTIFIERTYPE); }
340 asn1dn { YYD; yylval.num = IDTYPE_ASN1DN; return(IDENTIFIERTYPE); }
341 certname { YYD; yywarn("certname will be obsoleted in near future."); yylval.num = IDTYPE_ASN1DN; return(IDENTIFIERTYPE); }
343 /* shared secret type */
344 use { YYD; yylval.num = SECRETTYPE_USE; return(SECRETTYPE); }
345 key { YYD; yylval.num = SECRETTYPE_KEY; return(SECRETTYPE); }
346 keychain { YYD; yylval.num = SECRETTYPE_KEYCHAIN; return(SECRETTYPE); }
348 /* certificate verification */
349 openssl { YYD; yylval.num = VERIFICATION_MODULE_OPENSSL; return(VERIFICATION_MODULE); }
350 sec_framework { YYD; yylval.num = VERIFICATION_MODULE_SEC_FRAMEWORK; return(VERIFICATION_MODULE); }
351 use_open_dir { YYD; yylval.num = VERIFICATION_OPTION_OPEN_DIR; return(VERIFICATION_OPTION); }
352 use_peers_identifier { YYD; yylval.num = VERIFICATION_OPTION_PEERS_IDENTIFIER; return(VERIFICATION_OPTION); }
355 B|byte|bytes { YYD; return(UNITTYPE_BYTE); }
356 KB { YYD; return(UNITTYPE_KBYTES); }
357 MB { YYD; return(UNITTYPE_MBYTES); }
358 TB { YYD; return(UNITTYPE_TBYTES); }
359 sec|secs|second|seconds { YYD; return(UNITTYPE_SEC); }
360 min|mins|minute|minutes { YYD; return(UNITTYPE_MIN); }
361 hour|hours { YYD; return(UNITTYPE_HOUR); }
364 yes { YYD; yylval.num = TRUE; return(BOOLEAN); }
365 no { YYD; yylval.num = FALSE; return(BOOLEAN); }
371 yylval.num = strtol(yytext, &bp, 10);
379 yylval.val = vmalloc(yyleng + (yyleng & 1) + 1);
380 if (yylval.val == NULL) {
381 yyerror("vmalloc failed");
389 /* fixed string if length is odd. */
392 memcpy(p, &yytext[2], yyleng - 1);
401 while (*++p != '"') ;
404 yylval.val = vmalloc(yyleng - 1);
405 if (yylval.val == NULL) {
406 yyerror("vmalloc failed");
409 memcpy(yylval.val->v, &yytext[1], yylval.val->l);
411 return(QUOTEDSTRING);
417 yylval.val = vmalloc(yyleng + 1);
418 if (yylval.val == NULL) {
419 yyerror("vmalloc failed");
422 memcpy(yylval.val->v, yytext, yylval.val->l);
428 yy_delete_buffer(YY_CURRENT_BUFFER);
429 fclose(incstack[incstackp].fp);
430 incstack[incstackp].fp = -1;
431 racoon_free(incstack[incstackp].path);
432 incstack[incstackp].path = NULL;
435 if (incstack[incstackp].matchon < incstack[incstackp].matches.gl_pathc)
437 char* filepath = incstack[incstackp].matches.gl_pathv[incstack[incstackp].matchon];
438 incstack[incstackp].matchon++;
440 if (yycf_set_buffer(filepath) != 0)
446 yy_switch_to_buffer(yy_create_buffer(yyin, YY_BUF_SIZE));
452 globfree(&incstack[incstackp].matches);
456 yy_switch_to_buffer(incstack[incstackp].prevstate);
462 {nl} { incstack[incstackp].lineno++; }
464 {semi} { return(EOS); }
470 yyerror(char *s, ...)
480 snprintf(fmt, sizeof(fmt), "%s:%d: \"%s\" %s\n",
481 incstack[incstackp].path, incstack[incstackp].lineno,
483 plogv(LLV_ERROR, LOCATION, NULL, fmt, ap);
500 snprintf(fmt, sizeof(fmt), "%s:%d: \"%s\" %s\n",
501 incstack[incstackp].path, incstack[incstackp].lineno,
503 plogv(LLV_WARNING, LOCATION, NULL, fmt, ap);
508 yycf_switch_buffer(path)
511 char* filepath = NULL;
512 /* got the include file name */
513 if (incstackp >= MAX_INCLUDE_DEPTH) {
514 plog(LLV_ERROR, LOCATION, NULL,
515 "Includes nested too deeply");
519 if (glob(path, GLOB_TILDE, NULL, &incstack[incstackp].matches) != 0 ||
520 incstack[incstackp].matches.gl_pathc == 0)
522 plog(LLV_DEBUG, LOCATION, NULL,
523 "glob found no matches for path\n");
526 incstack[incstackp].matchon = 0;
527 incstack[incstackp].prevstate = YY_CURRENT_BUFFER;
530 if (incstack[incstackp].matchon >= incstack[incstackp].matches.gl_pathc) return -1;
531 filepath = incstack[incstackp].matches.gl_pathv[incstack[incstackp].matchon];
532 incstack[incstackp].matchon++;
535 if (yycf_set_buffer(filepath) != 0)
541 yy_switch_to_buffer(yy_create_buffer(yyin, YY_BUF_SIZE));
549 yycf_set_buffer(path)
552 yyin = fopen(path, "r");
554 fprintf(stderr, "failed to open file %s (%s)\n",
555 path, strerror(errno));
556 plog(LLV_ERROR, LOCATION, NULL,
557 "failed to open file %s (%s)\n",
558 path, strerror(errno));
563 incstack[incstackp].fp = yyin;
564 incstack[incstackp].path = strdup(path);
565 incstack[incstackp].lineno = 1;
566 plog(LLV_DEBUG, LOCATION, NULL,
567 "reading config file %s\n",
578 for (i = 0; i < MAX_INCLUDE_DEPTH; i++)
579 memset(&incstack[i], 0, sizeof(incstack[i]));
588 for (i = 0; i < MAX_INCLUDE_DEPTH; i++) {
589 if (incstack[i].path != NULL) {
590 if (incstack[i].fp >= 0)
591 fclose(incstack[i].fp);
592 racoon_free(incstack[i].path);
593 incstack[i].path = NULL;