OSSP CVS Repository

ossp - Check-in [314]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 314
Date: 2001-Jan-19 14:05:13 (local)
2001-Jan-19 13:05:13 (UTC)
User:simons
Branch:
Comment: Added code that will set the real user id of the process equal to the effective user id.
Tickets:
Inspections:
Files:
ossp-pkg/petidomo/main.c      1.10 -> 1.11     6 inserted, 1 deleted

ossp-pkg/petidomo/main.c 1.10 -> 1.11

--- main.c       2001/01/19 12:49:44     1.10
+++ main.c       2001/01/19 13:05:13     1.11
@@ -1,6 +1,6 @@
 /*
    $Source: /v/ossp/cvs/ossp-pkg/petidomo/main.c,v $
-   $Revision: 1.10 $
+   $Revision: 1.11 $
 
    Copyright (C) 2000 by CyberSolutions GmbH, Germany.
 
@@ -75,6 +75,11 @@
         who_am_i = text_easy_sprintf("%s/%s", buf, argv[0]);
         }
 
+    /* Set our real user id equal to the effective user id to avoid
+       confusion in case we're started as a setuid binary. */
+
+    setreuid(geteuid(), geteuid());
+
     /* Parse the command line. */
 
     argv_help_string = "Petidomo Mailing List Server";

CVSTrac 2.0.1