From af008e0f308d0120ecc59aff836682909d2371a2 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Wed, 24 Mar 2010 01:08:56 +0100 Subject: [PATCH] pt_chown: Don't depend on GPLed modules. --- ChangeLog | 8 ++++++++ lib/pt_chown.c | 6 ++---- modules/pt_chown | 1 - 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8166c5d79..0b1dc208c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2010-03-23 Bruno Haible + + pt_chown: Don't depend on GPLed modules. + * lib/pt_chown.c: Don't include idpriv.h. + (main): Don't drop privileges. + * modules/pt_chown (Depends-on): Remove idpriv-drop. + Reported by Simon Josefsson. + 2010-03-24 Simon Josefsson * top/maint.mk (sc_texinfo_acronym): Add rule, based on diff --git a/lib/pt_chown.c b/lib/pt_chown.c index d79ad3a87..8ecaa902c 100644 --- a/lib/pt_chown.c +++ b/lib/pt_chown.c @@ -25,7 +25,6 @@ #include #include -#include "idpriv.h" #include "pty-private.h" /* For security reasons, we try to minimize the dependencies on libraries @@ -83,9 +82,8 @@ main (int argc, char *argv[]) return do_pt_chown (); } - /* We aren't going to be using privileges, so drop them right now. */ - if (idpriv_drop () < 0) - return EXIT_FAILURE; + /* It would be possible to drop setuid/setgid privileges here. But it is not + really needed, since the code below only calls strcmp and [f]printf. */ { int do_help = 0; diff --git a/modules/pt_chown b/modules/pt_chown index 8cae3d148..a52fef0d0 100644 --- a/modules/pt_chown +++ b/modules/pt_chown @@ -6,7 +6,6 @@ lib/pt_chown.c lib/pty-private.h Depends-on: -idpriv-drop ptsname configure.ac: -- 2.11.0