Changeset 347 for trunk/src/sh_readconf.c
- Timestamp:
- Jun 7, 2011, 9:41:30 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_readconf.c
r315 r347 136 136 static char * sh_readconf_expand_value (const char * str) 137 137 { 138 #ifdef SH_EVAL_SHELL 138 139 char * tmp = (char*)str; 139 140 char * out; … … 152 153 } 153 154 } 155 #endif 154 156 return sh_util_strdup(str); 155 157 } … … 161 163 SH_RC_FILE = 3, 162 164 SH_RC_IFACE = 4, 165 #ifdef SH_EVAL_SHELL 163 166 SH_RC_CMD = 5 167 #endif 164 168 }; 165 169 … … 218 222 p += 15; cond_type = SH_RC_SYSTEM; 219 223 } 224 #ifdef SH_EVAL_SHELL 220 225 else if (0 == strncasecmp(p, _("command_succeeds "), 17)) 221 226 { 222 227 p += 17; cond_type = SH_RC_CMD; 223 228 } 229 #endif 224 230 else 225 231 { … … 271 277 match = negate; 272 278 break; 279 #ifdef SH_EVAL_SHELL 273 280 case SH_RC_CMD: 274 281 if (0 == sh_unix_run_command(p)) 275 282 match = negate; 276 283 break; 284 #endif 277 285 default: 278 286 match = 0; … … 337 345 #if defined(SH_STEALTH) && !defined(SH_STEALTH_MICRO) 338 346 SL_TICKET fdTmp = -1; 339 SL_TICKET open_tmp (void); 347 #endif 348 #if defined(WITH_GPG) || defined(WITH_PGP) 349 SL_TICKET fdGpg = -1; 340 350 #endif 341 351 char * tmp; … … 464 474 sl_close(fd); 465 475 fd = fdTmp; 476 sl_rewind (fd); 477 #endif 478 479 #if defined(WITH_GPG) || defined(WITH_PGP) 480 481 /* extract the data and copy to temporary file 482 */ 483 fdGpg = sh_gpg_extract_signed(fd); 484 485 sl_close(fd); 486 fd = fdGpg; 487 488 /* Validate signature of open file. 489 */ 490 if (0 != sh_gpg_check_sign (fd, 0, 1)) 491 { 492 SH_FREE(line_in); 493 aud_exit (FIL__, __LINE__, EXIT_FAILURE); 494 } 466 495 sl_rewind (fd); 467 496 #endif … … 664 693 (long) conf_line); 665 694 666 #if defined(WITH_GPG) || defined(WITH_PGP)667 /* Validate signature of open file.668 */669 sl_rewind (fd);670 if (0 != sh_gpg_check_sign (fd, 0, 1))671 {672 SH_FREE(line_in);673 aud_exit (FIL__, __LINE__, EXIT_FAILURE);674 }675 #endif676 677 695 sl_close (fd); 678 696 … … 1358 1376 1359 1377 /* Expand shell expressions. This return allocated memory which we must free. 1378 * If !defined(SH_EVAL_SHELL), this will reduce to a strdup. 1360 1379 */ 1361 1380 value = sh_readconf_expand_value(value);
Note:
See TracChangeset
for help on using the changeset viewer.