2008-05-26 09:54:33 +00:00
|
|
|
diff -up squid-3.0.STABLE6/src/tools.cc.bad_allocation squid-3.0.STABLE6/src/tools.cc
|
|
|
|
--- squid-3.0.STABLE6/src/tools.cc.bad_allocation 2008-05-20 17:01:16.000000000 +0200
|
|
|
|
+++ squid-3.0.STABLE6/src/tools.cc 2008-05-23 11:14:24.000000000 +0200
|
|
|
|
@@ -1354,10 +1354,14 @@ static void
|
2008-05-21 09:28:02 +00:00
|
|
|
restoreCapabilities(int keep)
|
|
|
|
{
|
|
|
|
#if defined(_SQUID_LINUX_) && HAVE_SYS_CAPABILITY_H
|
|
|
|
- cap_user_header_t head = (cap_user_header_t) xcalloc(1, sizeof(cap_user_header_t));
|
|
|
|
- cap_user_data_t cap = (cap_user_data_t) xcalloc(1, sizeof(cap_user_data_t));
|
|
|
|
+ cap_user_header_t head = (cap_user_header_t) xcalloc(1, sizeof(*head));
|
|
|
|
+ cap_user_data_t cap = (cap_user_data_t) xcalloc(1, sizeof(*cap));
|
|
|
|
|
2008-05-26 09:54:33 +00:00
|
|
|
+#ifdef _LINUX_CAPABILITY_VERSION_1
|
|
|
|
+ head->version = _LINUX_CAPABILITY_VERSION_1;
|
|
|
|
+#else
|
2008-05-21 09:28:02 +00:00
|
|
|
head->version = _LINUX_CAPABILITY_VERSION;
|
2008-05-26 09:54:33 +00:00
|
|
|
+#endif
|
2008-05-21 09:28:02 +00:00
|
|
|
|
2008-05-26 09:54:33 +00:00
|
|
|
if (capget(head, cap) != 0) {
|
|
|
|
debugs(50, 1, "Can't get current capabilities");
|