Hello community,

here is the log from the commit of package squid for openSUSE:Factory checked 
in at 2012-11-18 20:27:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/squid (Old)
 and      /work/SRC/openSUSE:Factory/.squid.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "squid", Maintainer is "dr...@suse.com"

Changes:
--------
--- /work/SRC/openSUSE:Factory/squid/squid.changes      2012-10-24 
10:24:09.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.squid.new/squid.changes 2012-11-18 
20:27:04.000000000 +0100
@@ -1,0 +2,5 @@
+Sat Nov 17 09:38:19 UTC 2012 - a...@suse.de
+
+- Fix build with glibc 2.17 (add patch squid-glibc217.patch).
+
+-------------------------------------------------------------------

New:
----
  squid-glibc217.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ squid.spec ++++++
--- /var/tmp/diff_new_pack.O0Zsfx/_old  2012-11-18 20:27:05.000000000 +0100
+++ /var/tmp/diff_new_pack.O0Zsfx/_new  2012-11-18 20:27:05.000000000 +0100
@@ -60,7 +60,8 @@
 ## File is compiled without RPM_OPT_FLAGS
 # squid3 no-rpm-opt-flags <cmdline>:./cf_gen.cc
 Patch102:       %{name}-compiled_without_RPM_OPT_FLAGS.patch
-
+# Handle setuid/setgid failure
+Patch103:       squid-glibc217.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 PreReq:         %fillup_prereq
 PreReq:         %insserv_prereq
@@ -149,6 +150,7 @@
 chmod a-x CREDITS
 %patch101
 %patch102
+%patch103 -p1
 
 %build
 export CFLAGS="%{optflags} -fPIE -fPIC -DOPENSSL_LOAD_CONF"

++++++ squid-glibc217.patch ++++++
Index: squid-3.2.3/src/icmp/pinger.cc
===================================================================
--- squid-3.2.3.orig/src/icmp/pinger.cc
+++ squid-3.2.3/src/icmp/pinger.cc
@@ -180,8 +180,18 @@ main(int argc, char *argv[])
     }
     max_fd = max(max_fd, squid_link);
 
-    setgid(getgid());
-    setuid(getuid());
+    if (setgid(getgid()) < 0) {
+        debugs(42, 0, "FATAL: pinger: setgid failed.");
+        icmp4.Close();
+        icmp6.Close();
+       exit (1);
+    }
+    if (setuid(getuid()) < 0) {
+        debugs(42, 0, "FATAL: pinger: setuid failed.");
+        icmp4.Close();
+        icmp6.Close();
+        exit (1);
+    }
 
     last_check_time = squid_curtime;
 
Index: squid-3.2.3/src/tools.cc
===================================================================
--- squid-3.2.3.orig/src/tools.cc
+++ squid-3.2.3/src/tools.cc
@@ -757,7 +757,8 @@ enter_suid(void)
     debugs(21, 3, "enter_suid: PID " << getpid() << " taking root priveleges");
 #if HAVE_SETRESUID
 
-    setresuid((uid_t)-1, 0, (uid_t)-1);
+    if (setresuid((uid_t)-1, 0, (uid_t)-1) < 0)
+       debugs (21, 3, "enter_suid: setresuid failed" << xstrerror ());
 #else
 
     setuid(0);
@@ -782,7 +783,8 @@ no_suid(void)
     uid = geteuid();
     debugs(21, 3, "no_suid: PID " << getpid() << " giving up root priveleges 
forever");
 
-    setuid(0);
+    if (setuid(0) < 0)
+       debugs(50, 1, "no_suid: setuid (0): " << xstrerror());
 
     if (setuid(uid) < 0)
         debugs(50, 1, "no_suid: setuid: " << xstrerror());
-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to