[2036] in linux-security and linux-alert archive
[linux-security] Re: Problem with TCP_wrappers
daemon@ATHENA.MIT.EDU (Wietse Venema)
Fri Aug 7 02:52:26 1998
To: kas@informatics.muni.cz (Jan Kasprzak)
Date: Thu, 6 Aug 1998 16:25:04 -0400 (EDT)
Cc: wietse@porcupine.org, linux-security@redhat.com
In-Reply-To: <199808061603.SAA02910@gloin.fi.muni.cz> from Jan Kasprzak at "Aug 6, 98 06:03:04 pm"
From: wietse@porcupine.org (Wietse Venema)
Resent-From: linux-security@redhat.com
Resent-Reply-To: linux-security@redhat.com
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))
--
----------------------------------------------------------------------
Please refer to the information about this list as well as general
information about Linux security at http://www.aoy.com/Linux/Security.
----------------------------------------------------------------------
To unsubscribe:
mail -s unsubscribe linux-security-request@redhat.com < /dev/null