hesiod/hesiod-3.0.2-env.patch

30 lines
973 B
Diff
Raw Permalink Normal View History

Ignore environment variables in setuid or setgid programs. The glibc-internal
copy of the library already implements a similar check.
auto-import changelog data from hesiod-3.0.2-17.src.rpm Wed Feb 20 2002 Nalin Dahyabhai <nalin@redhat.com> 3.0.2-17 - rebuild in new environment Wed Jan 09 2002 Tim Powers <timp@redhat.com> - automated rebuild Fri Oct 26 2001 Nalin Dahyabhai <nalin@redhat.com> 3.0.2-15 - actually set the soname in the shared library (ld doesn't automatically set the soname to the output file's name, oops) Fri Oct 05 2001 Nalin Dahyabhai <nalin@redhat.com> 3.0.2-14 - on second thought, put the shared library back in, using a soversion of 0 to have a chance at providing compatibility with apps linked dynamically on other distributions - make -devel depend on the same version of the main package Wed Oct 03 2001 Nalin Dahyabhai <nalin@redhat.com> - remove the shared library patch -- different packages with shared libraries tend to use different sonames, so we'd run inevitably run into problems Tue Aug 21 2001 Nalin Dahyabhai <nalin@redhat.com> - remove pre and post scripts -- authconfig handles that stuff now - add the hesiod man page back in, as bind-devel doesn't provide it any more Wed Jan 17 2001 Jeremy Katz <jlkatz@eos.ncsu.edu> - hesiod-devel requires hesiod (bug #128) Thu Sep 14 2000 Jeremy Katz <jlkatz@eos.ncsu.edu> - remove hesiod man page from hesiod-devel as it conflicts with the one from bind-devel Thu Sep 14 2000 Jeremy Katz <jlkatz@eos.ncsu.edu> - use rpm macros where possible and FHS-ify - split into main and devel packages - add back requires for nscd Fri Jul 28 2000 Jeremy Katz <jlkatz@eos.ncsu.edu> - rebuild in new environment Thu Mar 16 2000 Jeremy Katz <jlkatz@unity.ncsu.edu> - rebuild in new environment Thu Sep 02 1999 Nalin Dahyabhai <nsdahya1@eos.ncsu.edu> - removed dependency on nscd - changed requires: nscd back to caching-nameserver Mon May 17 1999 Nalin Dahyabhai <nsdahya1@eos.ncsu.edu> - started changelog - moved addition of hesiod to nsswitch.conf to this package because we no longer use a separate libnss_hesiod.so - changed requires: caching-nameserver to nscd - added post-install script snippet to activate nscd on install
2004-09-09 06:05:49 +00:00
--- hesiod-3.0.2/hesiod.c Wed Oct 3 14:53:37 2001
+++ hesiod-3.0.2/hesiod.c Wed Oct 3 14:55:02 2001
@@ -52,6 +52,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
#include <ctype.h>
#include "hesiod.h"
#include "hesiod_p.h"
@@ -79,13 +80,13 @@
if (ctx)
{
*context = ctx;
- configname = getenv("HESIOD_CONFIG");
+ configname = ((getuid() == geteuid()) && (getgid() == getegid())) ? getenv("HESIOD_CONFIG") : NULL;
if (!configname)
configname = SYSCONFDIR "/hesiod.conf";
if (read_config_file(ctx, configname) >= 0)
{
/* The default rhs can be overridden by an environment variable. */
- p = getenv("HES_DOMAIN");
+ p = ((getuid() == geteuid()) && (getgid() == getegid())) ? getenv("HES_DOMAIN") : NULL;
if (p)
{
if (ctx->rhs)