/[Apache-SVN]/spamassassin/trunk/spamd/spamd.raw
ViewVC logotype

Diff of /spamassassin/trunk/spamd/spamd.raw

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- spamassassin/trunk/spamd/spamd.raw	2005/04/27 17:58:59	165018
+++ spamassassin/trunk/spamd/spamd.raw	2005/04/27 17:59:01	165019
@@ -889,12 +889,14 @@ sub spawn {
       }
 
       # if we changed UID during processing, change back!
-      if ( $> != $< and $> != ( $< - 2**32 ) ) {
+      if ($setuid_to_user && ($> != $<) && ($> != ($< - 2**32))) {
         $) = "$( $(";    # change eGID
         $> = $<;         # change eUID
-        if ( $> != $< and $> != ( $< - 2**32 ) ) {
-           # make it fatal to avoid security breaches
-	   die("spamd: return setuid failed");
+
+        # check again; ensure the change happened
+        if ($> != $< && ($> != ( $< - 2**32))) {
+          # make it fatal to avoid security breaches
+          die("spamd: return setuid failed");
         }
       }
 

 

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26