summaryrefslogtreecommitdiff
path: root/popt/popt.c
diff options
context:
space:
mode:
authorewt <devnull@localhost>1998-03-23 20:28:01 +0000
committerewt <devnull@localhost>1998-03-23 20:28:01 +0000
commit36f4818c99398201153fbacab968811f30c7497d (patch)
treeb7f80bdd6f0748ab078e23beddcdb90ac456fdcc /popt/popt.c
parent508c31d7040cd6968dd50544b7c2b98a57a6a44d (diff)
downloadrpm-36f4818c99398201153fbacab968811f30c7497d.tar.gz
rpm-36f4818c99398201153fbacab968811f30c7497d.tar.bz2
rpm-36f4818c99398201153fbacab968811f30c7497d.zip
don't read ~/.popt in setuid apps
CVS patchset: 2045 CVS date: 1998/03/23 20:28:01
Diffstat (limited to 'popt/popt.c')
-rw-r--r--popt/popt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/popt/popt.c b/popt/popt.c
index 2afffb9c2..bf814ebb6 100644
--- a/popt/popt.c
+++ b/popt/popt.c
@@ -519,6 +519,8 @@ int poptReadDefaultConfig(poptContext con, int useEnv) {
rc = poptReadConfigFile(con, "/etc/popt");
if (rc) return rc;
+ if (getuid() != geteuid()) return 0;
+
if ((home = getenv("HOME"))) {
fn = alloca(strlen(home) + 20);
sprintf(fn, "%s/.popt", home);