pt_chown: Don't depend on GPLed modules.
authorBruno Haible <bruno@clisp.org>
Wed, 24 Mar 2010 00:08:56 +0000 (01:08 +0100)
committerBruno Haible <bruno@clisp.org>
Wed, 24 Mar 2010 08:18:00 +0000 (09:18 +0100)
ChangeLog
lib/pt_chown.c
modules/pt_chown

index 8166c5d..0b1dc20 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-03-23  Bruno Haible  <bruno@clisp.org>
+
+       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  <simon@josefsson.org>
 
        * top/maint.mk (sc_texinfo_acronym): Add rule, based on
index d79ad3a..8ecaa90 100644 (file)
@@ -25,7 +25,6 @@
 #include <sys/stat.h>
 #include <unistd.h>
 
-#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;
index 8cae3d1..a52fef0 100644 (file)
@@ -6,7 +6,6 @@ lib/pt_chown.c
 lib/pty-private.h
 
 Depends-on:
-idpriv-drop
 ptsname
 
 configure.ac: