[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[linux-security] Re: Problem with TCP_wrappers
- From: wietse porcupine org (Wietse Venema)
- To: kas informatics muni cz (Jan Kasprzak)
- Cc: wietse porcupine org, linux-security redhat com
- Subject: [linux-security] Re: Problem with TCP_wrappers
- Date: Thu, 6 Aug 1998 16:25:04 -0400 (EDT)
Wietse Venema:
> What is the problem with a non-empty RELAYCLIENT variable?
Jan Kasprzak:
> Qmail appends its contents to the envelope destination address,
> so it has to be empty. I hope vmailer will be better :-)
> Again, how can I "setenv" an empty variable in tcp-wrappers?
That would involve two small code changes: one to change the syntax
of the `setenv' option; one change to use an empty string as default.
Untested patch follows; it probably works, but given the structure
of the code it is pretty straightforward to fix if need be.
Wietse
*** ./options.c- Thu Aug 6 16:17:52 1998
--- ./options.c Thu Aug 6 16:19:48 1998
***************
*** 116,122 ****
"spawn", spawn_option, NEED_ARG | EXPAND_ARG,
"twist", twist_option, NEED_ARG | EXPAND_ARG | USE_LAST,
"rfc931", rfc931_option, OPT_ARG,
! "setenv", setenv_option, NEED_ARG | EXPAND_ARG,
"nice", nice_option, OPT_ARG,
"severity", severity_option, NEED_ARG,
"allow", allow_option, USE_LAST,
--- 116,122 ----
"spawn", spawn_option, NEED_ARG | EXPAND_ARG,
"twist", twist_option, NEED_ARG | EXPAND_ARG | USE_LAST,
"rfc931", rfc931_option, OPT_ARG,
! "setenv", setenv_option, OPT_ARG | EXPAND_ARG,
"nice", nice_option, OPT_ARG,
"severity", severity_option, NEED_ARG,
"allow", allow_option, USE_LAST,
***************
*** 429,434 ****
--- 429,436 ----
{
char *var_value;
+ if (value == 0)
+ value = "";
if (*(var_value = value + strcspn(value, whitespace)))
*var_value++ = 0;
if (setenv(chop_string(value), chop_string(var_value), 1))
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]