summaryrefslogtreecommitdiffstats
path: root/mDNSResponder/mDNSMacOSX
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-09-19 08:52:21 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-09-20 11:23:32 +0200
commitf761b290f135957f47e1c9af71b4a81c76c32b48 (patch)
tree2b7d273db4ff2388867efec5ad432fa49cd4047e /mDNSResponder/mDNSMacOSX
parentmDNSResponder: Update to v576.30.4 (diff)
downloadrtems-libbsd-f761b290f135957f47e1c9af71b4a81c76c32b48.tar.bz2
mDNSResponder: Update to v625.41.2
The sources can be obtained via: https://opensource.apple.com/tarballs/mDNSResponder/mDNSResponder-625.41.2.tar.gz Update #3522.
Diffstat (limited to 'mDNSResponder/mDNSMacOSX')
-rw-r--r--mDNSResponder/mDNSMacOSX/BonjourEvents.c7
-rw-r--r--mDNSResponder/mDNSMacOSX/CUPolicy.c95
-rw-r--r--mDNSResponder/mDNSMacOSX/CryptoSupport.c106
-rw-r--r--mDNSResponder/mDNSMacOSX/CryptoSupport.h3
-rw-r--r--mDNSResponder/mDNSMacOSX/DNSProxySupport.c9
-rw-r--r--mDNSResponder/mDNSMacOSX/DNSSECSupport.c11
-rw-r--r--mDNSResponder/mDNSMacOSX/DNSSECSupport.h2
-rw-r--r--mDNSResponder/mDNSMacOSX/DNSServiceDiscovery.c5
-rw-r--r--mDNSResponder/mDNSMacOSX/DNSServiceDiscovery.h2
-rw-r--r--mDNSResponder/mDNSMacOSX/DNSServiceDiscoveryDefines.h2
-rw-r--r--mDNSResponder/mDNSMacOSX/DNSServiceDiscoveryReply.defs2
-rw-r--r--mDNSResponder/mDNSMacOSX/DNSServiceDiscoveryRequest.defs2
-rw-r--r--mDNSResponder/mDNSMacOSX/LaunchDaemonInfo-Tiger.helper.plist18
-rw-r--r--mDNSResponder/mDNSMacOSX/LaunchDaemonInfo-Tiger.plist17
-rw-r--r--mDNSResponder/mDNSMacOSX/LegacyNATTraversal.c16
-rw-r--r--mDNSResponder/mDNSMacOSX/Metrics.h (renamed from mDNSResponder/mDNSMacOSX/VPNService.c)34
-rw-r--r--mDNSResponder/mDNSMacOSX/Metrics.m531
-rw-r--r--mDNSResponder/mDNSMacOSX/P2PPacketFilter.c5
-rw-r--r--mDNSResponder/mDNSMacOSX/P2PPacketFilter.h2
-rw-r--r--mDNSResponder/mDNSMacOSX/PreferencePane/DNSServiceDiscoveryPref.m26
-rw-r--r--mDNSResponder/mDNSMacOSX/PreferencePane/English.lproj/InfoPlist.stringsbin484 -> 219 bytes
-rw-r--r--mDNSResponder/mDNSMacOSX/PreferencePane/PrivilegedOperations.c33
-rw-r--r--mDNSResponder/mDNSMacOSX/PreferencePane/ddnswriteconfig.m42
-rw-r--r--mDNSResponder/mDNSMacOSX/Private/dns_sd_private.h32
-rw-r--r--mDNSResponder/mDNSMacOSX/Private/dns_services.c245
-rw-r--r--mDNSResponder/mDNSMacOSX/Private/dns_services.h55
-rw-r--r--mDNSResponder/mDNSMacOSX/Private/dns_xpc.h4
-rw-r--r--mDNSResponder/mDNSMacOSX/Private/xpc_services.c36
-rw-r--r--mDNSResponder/mDNSMacOSX/SymptomReporter.c187
-rw-r--r--mDNSResponder/mDNSMacOSX/base.xcconfig2
-rw-r--r--mDNSResponder/mDNSMacOSX/com.apple.dnsextd.plist (renamed from mDNSResponder/mDNSMacOSX/LaunchDaemonInfo.dnsextd.plist)0
-rw-r--r--mDNSResponder/mDNSMacOSX/com.apple.mDNSResponder.plist (renamed from mDNSResponder/mDNSMacOSX/LaunchDaemonInfo.plist)10
-rw-r--r--mDNSResponder/mDNSMacOSX/com.apple.mDNSResponderHelper.plist (renamed from mDNSResponder/mDNSMacOSX/LaunchDaemonInfo.helper.plist)4
-rw-r--r--mDNSResponder/mDNSMacOSX/daemon.c326
-rw-r--r--mDNSResponder/mDNSMacOSX/helper-error.h2
-rw-r--r--mDNSResponder/mDNSMacOSX/helper-main.c19
-rw-r--r--mDNSResponder/mDNSMacOSX/helper-server.h2
-rw-r--r--mDNSResponder/mDNSMacOSX/helper-stubs.c27
-rw-r--r--mDNSResponder/mDNSMacOSX/helper.c137
-rw-r--r--mDNSResponder/mDNSMacOSX/helper.h2
-rw-r--r--mDNSResponder/mDNSMacOSX/helpermsg-types.h2
-rw-r--r--mDNSResponder/mDNSMacOSX/helpermsg.defs2
-rw-r--r--mDNSResponder/mDNSMacOSX/ipsec_strerror.h6
-rw-r--r--mDNSResponder/mDNSMacOSX/libpfkey.h6
-rw-r--r--mDNSResponder/mDNSMacOSX/mDNSMacOSX.c1136
-rw-r--r--mDNSResponder/mDNSMacOSX/mDNSMacOSX.h14
-rw-r--r--mDNSResponder/mDNSMacOSX/mDNSResponder-entitlements.plist4
-rw-r--r--mDNSResponder/mDNSMacOSX/mDNSResponder.pbproj/project.pbxproj2338
-rw-r--r--mDNSResponder/mDNSMacOSX/mDNSResponder.sb15
-rw-r--r--mDNSResponder/mDNSMacOSX/mDNSResponder.xcodeproj/project.pbxproj783
-rw-r--r--mDNSResponder/mDNSMacOSX/mDNSResponderHelper.82
-rw-r--r--mDNSResponder/mDNSMacOSX/pfkey.c6
-rw-r--r--mDNSResponder/mDNSMacOSX/uDNSPathEvalulation.c155
53 files changed, 2503 insertions, 4026 deletions
diff --git a/mDNSResponder/mDNSMacOSX/BonjourEvents.c b/mDNSResponder/mDNSMacOSX/BonjourEvents.c
index f4f3e83c..e06106e8 100644
--- a/mDNSResponder/mDNSMacOSX/BonjourEvents.c
+++ b/mDNSResponder/mDNSMacOSX/BonjourEvents.c
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 4 -*-
*
- * Copyright (c) 2010 Apple Inc. All rights reserved.
+ * Copyright (c) 2010-2015 Apple Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -291,7 +291,8 @@ void * UserEventAgentFactory(CFAllocatorRef allocator, CFUUIDRef typeID)
(void)allocator;
BonjourUserEventsPlugin * result = NULL;
- if (typeID && CFEqual(typeID, kUserEventAgentTypeID)) {
+ if (typeID && CFEqual(typeID, kUserEventAgentTypeID))
+ {
result = Alloc(kUserEventAgentFactoryID);
}
@@ -604,8 +605,6 @@ NetBrowserInfo* CreateBrowser(BonjourUserEventsPlugin* plugin, CFStringRef type,
// Add the dictionary to the browsers dictionary.
CFDictionarySetValue(plugin->_browsers, browser, browserDict);
- NetBrowserInfoRelease(NULL, browser);
-
// Release Memory
CFRelease(browserDict);
}
diff --git a/mDNSResponder/mDNSMacOSX/CUPolicy.c b/mDNSResponder/mDNSMacOSX/CUPolicy.c
deleted file mode 100644
index 187748e1..00000000
--- a/mDNSResponder/mDNSMacOSX/CUPolicy.c
+++ /dev/null
@@ -1,95 +0,0 @@
-/* -*- Mode: C; tab-width: 4 -*-
- *
- * Copyright (c) 2013 Apple Computer, Inc. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "mDNSMacOSX.h"
-#include <network/config.h>
-
-#if TARGET_OS_IPHONE
-
-mDNSexport void CUPInit(mDNS *const m)
-{
-
- m->p->handle = cellular_usage_policy_create_client();
- if (!m->p->handle)
- {
- LogMsg("CUPInit: cellular_usage_policy_create_client failed");
- }
-}
-
-mDNSexport mDNSBool mDNSPlatformAllowPID(mDNS *const m, DNSQuestion *q)
-{
- // Currently the policy applies only for DNS requests sent over cellular interface
- if (m->p->handle && q->qDNSServer && q->qDNSServer->cellIntf)
- {
- mDNSBool allowed;
- if (q->pid)
- {
- allowed = (mDNSBool) cellular_usage_policy_is_data_allowed_for_pid(m->p->handle, q->pid);
- if (!allowed)
- {
- xpc_object_t pidx = xpc_uint64_create(q->pid);
- if (pidx)
- {
- network_config_cellular_blocked_notify(pidx, NULL, NULL);
- LogInfo("mDNSPlaformAllowPID: Notified PID(%d) for %##s (%s)", q->pid, q->qname.c, DNSTypeName(q->qtype));
- xpc_release(pidx);
- }
- }
- }
- else
- {
- xpc_object_t uuidx = xpc_uuid_create(q->uuid);
- if (uuidx)
- {
- allowed = (mDNSBool) cellular_usage_policy_is_data_allowed_for_uuid(m->p->handle, uuidx);
- if (!allowed)
- {
- network_config_cellular_blocked_notify(NULL, uuidx, NULL);
- LogInfo("mDNSPlaformAllowPID: Notified UUID for %##s (%s)", q->qname.c, DNSTypeName(q->qtype));
- }
- xpc_release(uuidx);
- }
- else
- {
- allowed = false;
- }
- }
- return allowed;
- }
- else
- {
- return mDNStrue;
- }
-}
-
-#else // TARGET_OS_IPHONE
-
-mDNSexport void CUPInit(mDNS *const m)
-{
- (void)m; //unused
-}
-
-mDNSexport mDNSBool mDNSPlatformAllowPID(mDNS *const m, DNSQuestion *q)
-{
- (void)m; //unused
- (void)q; //unused
- //LogMsg("mDNSPlatformAllowPID: %##s (%s)", q->qname.c, DNSTypeName(q->qtype));
- return mDNStrue;
-}
-
-#endif // TARGET_OS_IPHONE
-
diff --git a/mDNSResponder/mDNSMacOSX/CryptoSupport.c b/mDNSResponder/mDNSMacOSX/CryptoSupport.c
index 408b3a22..57c70179 100644
--- a/mDNSResponder/mDNSMacOSX/CryptoSupport.c
+++ b/mDNSResponder/mDNSMacOSX/CryptoSupport.c
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 4 -*-
*
- * Copyright (c) 2011 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2011-2013 Apple Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -350,18 +350,18 @@ mDNSlocal mStatus rsa_sha_add(AlgContext *ctx, const void *data, mDNSu32 len)
mDNSlocal SecKeyRef rfc3110_import(const mDNSu8 *data, const mDNSu32 len)
{
- static const int max_key_bytes = 4096 / 8; // max DNSSEC supported modulus is 4096 bits
- static const int max_exp_bytes = 3; // DNSSEC supports 1 or 3 bytes for exponent
- static const int asn1_cmd_bytes = 3; // since there is an ASN1 SEQ and two INTs
- //static const int asn1_max_len_bytes = asn1_cmd_bytes * 3; // capped at 3 due to max payload size
- static const int asn1_max_len_bytes = 3 * 3; // capped at 3 due to max payload size
- unsigned char asn1[max_key_bytes + 1 + max_exp_bytes + asn1_cmd_bytes + asn1_max_len_bytes]; // +1 is for leading 0 for non negative asn1 number
+ static const int max_modulus_bytes = 512; // Modulus is limited to 4096 bits (512 octets) in length.
+ static const int max_exp_bytes = 512; // Exponent is limited to 4096 bits (512 octets) in length.
+ static const int asn1_type_bytes = 3; // Since there is an ASN1 SEQ and two INTs.
+ static const int asn1_max_len_bytes = 3 * 3; // Capped at 3 due to max payload size.
+ unsigned char asn1[max_modulus_bytes + 1 + max_exp_bytes + asn1_type_bytes + asn1_max_len_bytes]; // +1 is for leading 0 for non negative asn1 number
const mDNSu8 *modulus;
unsigned int modulus_length;
+ const mDNSu8 *exponent;
unsigned int exp_length;
+ unsigned int num_length_bytes;
mDNSu32 index = 0;
mDNSu32 asn1_length = 0;
- unsigned int i;
// Validate Input
if (!data)
@@ -372,16 +372,33 @@ mDNSlocal SecKeyRef rfc3110_import(const mDNSu8 *data, const mDNSu32 len)
return NULL;
// Parse Modulus and Exponent
- exp_length = data[0];
- // we have to have at least len byte + size of exponent
- if (len < 1+exp_length)
+ // If the first byte is zero, then the exponent length is in the three-byte format, otherwise the length is in the first byte.
+ if (data[0] == 0)
+ {
+ if (len < 3)
+ return NULL;
+ exp_length = (data[1] << 8) | data[2];
+ num_length_bytes = 3;
+ }
+ else
+ {
+ exp_length = data[0];
+ num_length_bytes = 1;
+ }
+
+ // RFC3110 limits the exponent length to 4096 bits (512 octets).
+ if (exp_length > 512)
+ return NULL;
+
+ // We have to have at least len bytes + size of exponent.
+ if (len < (num_length_bytes + exp_length))
return NULL;
- // -1 is for the exp_length byte
- modulus_length = len - 1 - exp_length;
+ // The modulus is the remaining space.
+ modulus_length = len - (num_length_bytes + exp_length);
- // rfc3110 limits modulus to 4096 bits
+ // RFC3110 limits the modulus length to 4096 bits (512 octets).
if (modulus_length > 512)
return NULL;
@@ -391,18 +408,30 @@ mDNSlocal SecKeyRef rfc3110_import(const mDNSu8 *data, const mDNSu32 len)
// add 1 to modulus length for pre-ceding 0 t make ASN1 value non-negative
++modulus_length;
- // 1 is to skip exp_length byte
- modulus = &data[1+exp_length];
+ exponent = &data[num_length_bytes];
+ modulus = &data[num_length_bytes + exp_length];
// 2 bytes for commands since first doesn't count
// 2 bytes for min 1 byte length field
asn1_length = modulus_length + exp_length + 2 + 2;
- // account for modulus length causing INT length field to grow
- if (modulus_length > 0xFF)
- asn1_length += 2;
- else if (modulus_length >= 128)
- ++asn1_length;
+ // Account for modulus length causing INT length field to grow.
+ if (modulus_length >= 128)
+ {
+ if (modulus_length > 255)
+ asn1_length += 2;
+ else
+ asn1_length += 1;
+ }
+
+ // Account for exponent length causing INT length field to grow.
+ if (exp_length >= 128)
+ {
+ if (exp_length > 255)
+ asn1_length += 2;
+ else
+ asn1_length += 1;
+ }
// Construct ASN1 formatted public key
// Write ASN1 SEQ byte
@@ -415,8 +444,8 @@ mDNSlocal SecKeyRef rfc3110_import(const mDNSu8 *data, const mDNSu32 len)
}
else
{
- asn1[index++] = (0x80 | ((asn1_length & 0xFF00) ? 2 : 1));
- if (asn1_length & 0xFF00)
+ asn1[index++] = (0x80 | ((asn1_length > 255) ? 2 : 1));
+ if (asn1_length > 255)
asn1[index++] = (asn1_length & 0xFF00) >> 8;
asn1[index++] = asn1_length & 0xFF;
}
@@ -426,12 +455,12 @@ mDNSlocal SecKeyRef rfc3110_import(const mDNSu8 *data, const mDNSu32 len)
// Write ASN1 length for INT
if (modulus_length < 128)
{
- asn1[index++] = asn1_length & 0xFF;
+ asn1[index++] = modulus_length & 0xFF;
}
else
{
- asn1[index++] = 0x80 | ((modulus_length & 0xFF00) ? 2 : 1);
- if (modulus_length & 0xFF00)
+ asn1[index++] = 0x80 | ((modulus_length > 255) ? 2 : 1);
+ if (modulus_length > 255)
asn1[index++] = (modulus_length & 0xFF00) >> 8;
asn1[index++] = modulus_length & 0xFF;
}
@@ -439,16 +468,26 @@ mDNSlocal SecKeyRef rfc3110_import(const mDNSu8 *data, const mDNSu32 len)
// Write preceding 0 so our integer isn't negative
asn1[index++] = 0x00;
// Write actual modulus (-1 for preceding 0)
- memcpy(&asn1[index], (void *)modulus, modulus_length-1);
- index += modulus_length-1;
+ memcpy(&asn1[index], modulus, modulus_length - 1);
+ index += (modulus_length - 1);
// Write ASN1 INT for exponent
asn1[index++] = 0x02;
// Write ASN1 length for INT
- asn1[index++] = exp_length & 0xFF;
+ if (exp_length < 128)
+ {
+ asn1[index++] = exp_length & 0xFF;
+ }
+ else
+ {
+ asn1[index++] = 0x80 | ((exp_length > 255) ? 2 : 1);
+ if (exp_length > 255)
+ asn1[index++] = (exp_length & 0xFF00) >> 8;
+ asn1[index++] = exp_length & 0xFF;
+ }
// Write exponent bytes
- for (i = 1; i <= exp_length; i++)
- asn1[index++] = data[i];
+ memcpy(&asn1[index], exponent, exp_length);
+ index += exp_length;
#if TARGET_OS_IPHONE
// index contains bytes written, use it for length
@@ -605,6 +644,8 @@ mDNSlocal Boolean VerifyData(SecKeyRef key, CFStringRef digestStr, mDNSu8 *diges
}
CFBooleanRef boolRef = SecTransformExecute(verifyXForm, &error);
+ ret = boolRef ? CFBooleanGetValue(boolRef) : false;
+ if (boolRef) CFRelease(boolRef);
CFRelease(verifyXForm);
if (error != NULL)
@@ -618,11 +659,12 @@ mDNSlocal Boolean VerifyData(SecKeyRef key, CFStringRef digestStr, mDNSu8 *diges
{
LogMsg("VerifyData: CFStringGetCString failed");
}
+ CFRelease(errStr);
}
LogMsg("VerifyData: SecTransformExecute failed with %s", errorbuf);
return false;
}
- return CFEqual(boolRef, kCFBooleanTrue);
+ return ret;
err:
CFRelease(verifyXForm);
return false;
diff --git a/mDNSResponder/mDNSMacOSX/CryptoSupport.h b/mDNSResponder/mDNSMacOSX/CryptoSupport.h
index 9c0fd079..8625ba76 100644
--- a/mDNSResponder/mDNSMacOSX/CryptoSupport.h
+++ b/mDNSResponder/mDNSMacOSX/CryptoSupport.h
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 4 -*-
*
- * Copyright (c) 2011 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2011 Apple Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
#ifndef __CRYPTO_SUPPORT_H
#define __CRYPTO_SUPPORT_H
diff --git a/mDNSResponder/mDNSMacOSX/DNSProxySupport.c b/mDNSResponder/mDNSMacOSX/DNSProxySupport.c
index 042bbc80..34f21a57 100644
--- a/mDNSResponder/mDNSMacOSX/DNSProxySupport.c
+++ b/mDNSResponder/mDNSMacOSX/DNSProxySupport.c
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 4 -*-
*
- * Copyright (c) 2011 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2011-2013 Apple Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
#include "mDNSEmbeddedAPI.h"
#include "mDNSMacOSX.h"
@@ -261,11 +262,9 @@ mDNSlocal mStatus SetupUDPProxySocket(mDNS *const m, int skt, KQSocketSet *cp, u
int *s = (sa_family == AF_INET) ? &cp->sktv4 : &cp->sktv6;
KQueueEntry *k = (sa_family == AF_INET) ? &cp->kqsv4 : &cp->kqsv6;
const int on = 1;
- mDNSIPPort port;
mStatus err = mStatus_NoError;
cp->m = m;
- port = cp->port;
cp->closeFlag = mDNSNULL;
// set default traffic class
@@ -339,11 +338,9 @@ mDNSlocal mStatus SetupTCPProxySocket(mDNS *const m, int skt, KQSocketSet *cp, u
{
int *s = (sa_family == AF_INET) ? &cp->sktv4 : &cp->sktv6;
KQueueEntry *k = (sa_family == AF_INET) ? &cp->kqsv4 : &cp->kqsv6;
- mDNSIPPort port;
mStatus err;
cp->m = m;
- port = cp->port;
// XXX may not be used by the TCP codepath
cp->closeFlag = mDNSNULL;
@@ -384,7 +381,7 @@ mDNSlocal void BindDPSocket(int fd, int sa_family)
err = setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &on, sizeof(on));
if (err < 0)
- LogMsg("BindDPSocket: setsockopt SO_REUSEPORT failed for V4 %d errno %d (%s)", fd, errno, strerror(errno));
+ LogMsg("BindDPSocket: setsockopt SO_REUSEPORT failed for IPv4 %d errno %d (%s)", fd, errno, strerror(errno));
memset(&addr, 0, sizeof(addr));
addr.sin_family = AF_INET;
diff --git a/mDNSResponder/mDNSMacOSX/DNSSECSupport.c b/mDNSResponder/mDNSMacOSX/DNSSECSupport.c
index e1255c4d..6e5ae108 100644
--- a/mDNSResponder/mDNSMacOSX/DNSSECSupport.c
+++ b/mDNSResponder/mDNSMacOSX/DNSSECSupport.c
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 4 -*-
*
- * Copyright (c) 2012 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2012-2013 Apple Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -449,9 +449,13 @@ mDNSlocal void FetchRootTA(mDNS *const m)
return;
}
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
// If we can't fetch the XML file e.g., network problems, trigger a timer. All other failures
// should hardly happen in practice for which schedule the normal interval to refetch the TA.
- if (!CFURLCreateDataAndPropertiesFromResource(kCFAllocatorDefault, url, &xmlData, NULL, NULL, NULL))
+ Boolean success = CFURLCreateDataAndPropertiesFromResource(kCFAllocatorDefault, url, &xmlData, NULL, NULL, NULL);
+#pragma clang diagnostic pop
+ if (!success)
{
LogInfo("FetchRootTA: CFURLCreateDataAndPropertiesFromResource error");
CFRelease(url);
@@ -479,7 +483,8 @@ mDNSlocal void FetchRootTA(mDNS *const m)
xmlDocPtr tadoc = xmlReadMemory((const char*)CFDataGetBytePtr(xmlData),
(int)CFDataGetLength(xmlData), xmlFileName, NULL, 0);
- CFRelease(fileRef);
+ if (fileRef)
+ CFRelease(fileRef);
CFRelease(url);
CFRelease(xmlData);
diff --git a/mDNSResponder/mDNSMacOSX/DNSSECSupport.h b/mDNSResponder/mDNSMacOSX/DNSSECSupport.h
index 2310fc2a..eaaf36e2 100644
--- a/mDNSResponder/mDNSMacOSX/DNSSECSupport.h
+++ b/mDNSResponder/mDNSMacOSX/DNSSECSupport.h
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 4 -*-
*
- * Copyright (c) 2012 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2012-2013 Apple Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/mDNSResponder/mDNSMacOSX/DNSServiceDiscovery.c b/mDNSResponder/mDNSMacOSX/DNSServiceDiscovery.c
index 717efca2..efd61b30 100644
--- a/mDNSResponder/mDNSMacOSX/DNSServiceDiscovery.c
+++ b/mDNSResponder/mDNSMacOSX/DNSServiceDiscovery.c
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 4 -*-
*
- * Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2002-2012 Apple Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -453,7 +453,6 @@ DNSServiceRegistrationReplyErrorType DNSServiceRegistrationRemoveRecord(dns_serv
void DNSServiceDiscovery_handleReply(void *replyMsg)
{
- unsigned long result = 0xFFFFFFFF;
mach_msg_header_t * msgSendBufPtr;
mach_msg_header_t * receivedMessage;
unsigned msgSendBufLength;
@@ -466,7 +465,7 @@ void DNSServiceDiscovery_handleReply(void *replyMsg)
// Call DNSServiceDiscoveryReply_server to change mig-generated message into a
// genuine mach message. It will then cause the callback to get called.
- result = DNSServiceDiscoveryReply_server ( receivedMessage, msgSendBufPtr );
+ DNSServiceDiscoveryReply_server ( receivedMessage, msgSendBufPtr );
( void ) mach_msg_send ( msgSendBufPtr );
free(msgSendBufPtr);
}
diff --git a/mDNSResponder/mDNSMacOSX/DNSServiceDiscovery.h b/mDNSResponder/mDNSMacOSX/DNSServiceDiscovery.h
index ae736477..a743dd74 100644
--- a/mDNSResponder/mDNSMacOSX/DNSServiceDiscovery.h
+++ b/mDNSResponder/mDNSMacOSX/DNSServiceDiscovery.h
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 4 -*-
*
- * Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2002, 2004, 2006, 2011 Apple Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/mDNSResponder/mDNSMacOSX/DNSServiceDiscoveryDefines.h b/mDNSResponder/mDNSMacOSX/DNSServiceDiscoveryDefines.h
index cfad0a41..22687b90 100644
--- a/mDNSResponder/mDNSMacOSX/DNSServiceDiscoveryDefines.h
+++ b/mDNSResponder/mDNSMacOSX/DNSServiceDiscoveryDefines.h
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 4 -*-
*
- * Copyright (c) 2002-2003 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2002-2003, 2006, 2009, 2011 Apple Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/mDNSResponder/mDNSMacOSX/DNSServiceDiscoveryReply.defs b/mDNSResponder/mDNSMacOSX/DNSServiceDiscoveryReply.defs
index b918bee4..993c9553 100644
--- a/mDNSResponder/mDNSMacOSX/DNSServiceDiscoveryReply.defs
+++ b/mDNSResponder/mDNSMacOSX/DNSServiceDiscoveryReply.defs
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 4 -*-
*
- * Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2002-2003, 2006 Apple Computer, Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/mDNSResponder/mDNSMacOSX/DNSServiceDiscoveryRequest.defs b/mDNSResponder/mDNSMacOSX/DNSServiceDiscoveryRequest.defs
index ad06bdb5..d3fe292a 100644
--- a/mDNSResponder/mDNSMacOSX/DNSServiceDiscoveryRequest.defs
+++ b/mDNSResponder/mDNSMacOSX/DNSServiceDiscoveryRequest.defs
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 4 -*-
*
- * Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2002-2004, 2006 Apple Computer, Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/mDNSResponder/mDNSMacOSX/LaunchDaemonInfo-Tiger.helper.plist b/mDNSResponder/mDNSMacOSX/LaunchDaemonInfo-Tiger.helper.plist
deleted file mode 100644
index 895287c7..00000000
--- a/mDNSResponder/mDNSMacOSX/LaunchDaemonInfo-Tiger.helper.plist
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>Label</key>
- <string>com.apple.mDNSResponderHelper</string>
- <key>OnDemand</key>
- <false/>
- <key>ProgramArguments</key>
- <array>
- <string>/usr/sbin/mDNSResponderHelper</string>
- <string>-t</string>
- <string>0</string>
- </array>
- <key>ServiceIPC</key>
- <false/>
-</dict>
-</plist>
diff --git a/mDNSResponder/mDNSMacOSX/LaunchDaemonInfo-Tiger.plist b/mDNSResponder/mDNSMacOSX/LaunchDaemonInfo-Tiger.plist
deleted file mode 100644
index e91b7751..00000000
--- a/mDNSResponder/mDNSMacOSX/LaunchDaemonInfo-Tiger.plist
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>Label</key>
- <string>com.apple.mDNSResponder</string>
- <key>OnDemand</key>
- <false/>
- <key>ProgramArguments</key>
- <array>
- <string>/usr/sbin/mDNSResponder</string>
- <string>-launchdaemon</string>
- </array>
- <key>ServiceIPC</key>
- <false/>
-</dict>
-</plist>
diff --git a/mDNSResponder/mDNSMacOSX/LegacyNATTraversal.c b/mDNSResponder/mDNSMacOSX/LegacyNATTraversal.c
index e7cd65f0..acfb3dca 100644
--- a/mDNSResponder/mDNSMacOSX/LegacyNATTraversal.c
+++ b/mDNSResponder/mDNSMacOSX/LegacyNATTraversal.c
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 4 -*-
*
- * Copyright (c) 2004-2013 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2004-2015 Apple Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,6 +22,7 @@
#include "assert.h" // For assert()
#if defined( WIN32 )
+# include "CommonServices.h"
# include <winsock2.h>
# include <ws2tcpip.h>
# define strcasecmp _stricmp
@@ -82,8 +83,11 @@ mDNSlocal mStatus SendPortMapRequest(mDNS *m, NATTraversalInfo *n);
mDNSlocal void AllocAndCopy(mDNSu8 **const dst, const mDNSu8 *const src)
{
if (src == mDNSNULL) return;
- if ((*dst = mDNSPlatformMemAllocate((mDNSu32)strlen((char*)src) + 1)) == mDNSNULL)
- { LogMsg("AllocAndCopy: can't allocate string"); return; }
+ if ((strlen((char*)src)) >= UINT32_MAX || (*dst = mDNSPlatformMemAllocate((mDNSu32)strlen((char*)src) + 1)) == mDNSNULL)
+ {
+ LogMsg("AllocAndCopy: can't allocate string");
+ return;
+ }
strcpy((char*)*dst, (char*)src);
}
@@ -279,7 +283,7 @@ mDNSlocal void handleLNTDeviceDescriptionResponse(tcpLNTInfo *tcpInfo)
LogInfo("handleLNTDeviceDescriptionResponse: found URLBase");
ptr += 8; // skip over "URLBase>"
// find the end of the URLBase element
- for (stop = ptr; stop < end; stop++) { if (*stop == '<') { end = stop; break; } }
+ for (stop = ptr; stop < end; stop++) { if (stop && *stop == '<') { end = stop; break; } }
if (ParseHttpUrl(ptr, end, &m->UPnPSOAPAddressString, &m->UPnPSOAPPort, mDNSNULL) != mStatus_NoError)
{
LogInfo("handleLNTDeviceDescriptionResponse: failed to parse URLBase");
@@ -412,8 +416,6 @@ mDNSlocal void tcpConnectionCallback(TCPSocket *sock, void *context, mDNSBool Co
long nsent = 0;
static int LNTERRORcount = 0;
- if (tcpInfo == mDNSNULL) { LogInfo("tcpConnectionCallback: no tcpInfo context"); status = mStatus_Invalid; goto exit; }
-
if (tcpInfo->sock != sock)
{
LogMsg("tcpConnectionCallback: WARNING- tcpInfo->sock(%p) != sock(%p) !!! Printing tcpInfo struct", tcpInfo->sock, sock);
@@ -793,7 +795,7 @@ mDNSexport void LNT_ConfigureRouterInfo(mDNS *m, const mDNSInterfaceID Interface
{
const mDNSu8 *ptr = data;
const mDNSu8 *end = data + len;
- const mDNSu8 *stop = ptr;
+ const mDNSu8 *stop;
if (!mDNSIPPortIsZero(m->UPnPRouterPort)) return; // already have the info we need
diff --git a/mDNSResponder/mDNSMacOSX/VPNService.c b/mDNSResponder/mDNSMacOSX/Metrics.h
index 623ddbf4..a9dea79a 100644
--- a/mDNSResponder/mDNSMacOSX/VPNService.c
+++ b/mDNSResponder/mDNSMacOSX/Metrics.h
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 4 -*-
*
- * Copyright (c) 2013 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2016 Apple Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,20 +14,24 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#include "mDNSMacOSX.h"
-#include <SystemConfiguration/VPNAppLayerPrivate.h>
-mDNSexport mDNSs32 mDNSPlatformGetServiceID(mDNS *const m, DNSQuestion *q)
-{
- (void) m;
- int sid;
+#include "mDNSEmbeddedAPI.h"
- if (q->pid)
- sid = VPNAppLayerGetMatchingServiceIdentifier(q->pid, NULL);
- else
- sid = VPNAppLayerGetMatchingServiceIdentifier(0, q->uuid);
-
- LogInfo("mDNSPlatformGetServiceID: returning %d for %##s (%s)", sid, q->qname.c, DNSTypeName(q->qtype));
-
- return sid;
+#ifndef __Metrics_h
+#define __Metrics_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if TARGET_OS_EMBEDDED
+mStatus MetricsInit(void);
+void MetricsUpdateUDNSStats(const domainname *inQueryName, mDNSBool inAnswered, mDNSu32 inSendCount, mDNSu32 inLatencyMs, mDNSBool inForCellular);
+void LogMetrics(void);
+#endif
+
+#ifdef __cplusplus
}
+#endif
+
+#endif // __Metrics_h
diff --git a/mDNSResponder/mDNSMacOSX/Metrics.m b/mDNSResponder/mDNSMacOSX/Metrics.m
new file mode 100644
index 00000000..56467dfc
--- /dev/null
+++ b/mDNSResponder/mDNSMacOSX/Metrics.m
@@ -0,0 +1,531 @@
+/* -*- Mode: C; tab-width: 4 -*-
+ *
+ * Copyright (c) 2016 Apple Inc. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#import "Metrics.h"
+
+#if TARGET_OS_EMBEDDED
+#import <CoreUtils/SoftLinking.h>
+#import <WirelessDiagnostics/AWDDNSDomainStats.h>
+#import <WirelessDiagnostics/AWDMDNSResponderDNSStatistics.h>
+#import <WirelessDiagnostics/AWDMetricIds_MDNSResponder.h>
+#import <WirelessDiagnostics/WirelessDiagnostics.h>
+
+#import "DNSCommon.h"
+#import "mDNSMacOSX.h"
+#import "DebugServices.h"
+
+//===========================================================================================================================
+// External Frameworks
+//===========================================================================================================================
+
+SOFT_LINK_FRAMEWORK(PrivateFrameworks, WirelessDiagnostics)
+
+SOFT_LINK_CLASS(WirelessDiagnostics, AWDServerConnection)
+#define AWDServerConnectionSoft getAWDServerConnectionClass()
+
+SOFT_LINK_CLASS(WirelessDiagnostics, AWDMDNSResponderDNSStatistics)
+#define AWDMDNSResponderDNSStatisticsSoft getAWDMDNSResponderDNSStatisticsClass()
+
+SOFT_LINK_CLASS(WirelessDiagnostics, AWDDNSDomainStats)
+#define AWDDNSDomainStatsSoft getAWDDNSDomainStatsClass()
+
+//===========================================================================================================================
+// Macros
+//===========================================================================================================================
+
+#define countof(X) (sizeof(X) / sizeof(X[0]))
+
+//===========================================================================================================================
+// Constants
+//===========================================================================================================================
+
+#define kUDNSStatsMaxQuerySendCount 10
+
+// Important: Do not update this list without getting privacy approval. See <rdar://problem/24155761>.
+
+static const char * const kUDNSStatsDomains[] =
+{
+ ".",
+ "apple.com.",
+ "icloud.com.",
+ "me.com.",
+ "google.com.",
+ "facebook.com.",
+ "youtube.com.",
+ "baidu.com.",
+ "amazon.com.",
+ "yahoo.com.",
+ "wikipedia.org."
+};
+
+static const mDNSu32 kResponseLatencyMsLimits[] =
+{
+ 1, 2, 3, 4, 5,
+ 10, 20, 30, 40, 50, 60, 70, 80, 90,
+ 100, 110, 120, 130, 140, 150, 160, 170, 180, 190,
+ 200, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700, 750, 800, 850, 900, 950,
+ 1000, 1500, 2000, 2500, 3000, 3500, 4000, 4500,
+ 5000, 6000, 7000, 8000, 9000,
+ 10000
+};
+
+//===========================================================================================================================
+// Data structures
+//===========================================================================================================================
+
+typedef struct
+{
+ uint32_t answeredQuerySendCountBins[kUDNSStatsMaxQuerySendCount + 1];
+ uint32_t unansweredQuerySendCountBins[kUDNSStatsMaxQuerySendCount + 1];
+ uint32_t responseLatencyBins[countof(kResponseLatencyMsLimits) + 1];
+
+} DNSStats;
+
+typedef struct DNSDomainStats * DNSDomainStatsRef;
+struct DNSDomainStats
+{
+ DNSDomainStatsRef next;
+ domainname domain;
+ int domainLabelCount;
+ char * domainStr;
+ DNSStats stats;
+ DNSStats statsCellular;
+};
+
+//===========================================================================================================================
+// Globals
+//===========================================================================================================================
+
+extern mDNS mDNSStorage;
+
+static DNSDomainStatsRef gDomainStatsList = NULL;
+static AWDServerConnection * gAWDServerConnection = nil;
+
+//===========================================================================================================================
+// Local Prototypes
+//===========================================================================================================================
+
+mDNSlocal mStatus DNSDomainStatsCreate(const char *inDomain, DNSDomainStatsRef *outStats);
+mDNSlocal void DNSDomainStatsFree(DNSDomainStatsRef inStats);
+mDNSlocal void DNSDomainStatsFreeList(DNSDomainStatsRef inList);
+
+mDNSlocal mStatus CreateDomainStatsList(DNSDomainStatsRef *outList);
+mDNSlocal void UpdateDNSStats(DNSStats *inStats, mDNSBool inAnswered, mDNSu32 inQuerySendCount, mDNSu32 inLatencyMs);
+mDNSlocal mStatus SubmitAWDMetric(void);
+mDNSlocal mStatus CreateAWDDNSDomainStats(DNSStats *inStats, const char *inDomain, mDNSBool inIsForCellular, AWDDNSDomainStats **outAWDStats);
+mDNSlocal void LogDNSStats(const DNSStats *inStats);
+
+//===========================================================================================================================
+// MetricsInit
+//===========================================================================================================================
+
+mStatus MetricsInit(void)
+{
+ mStatus err;
+
+ err = CreateDomainStatsList(&gDomainStatsList);
+ require_noerr_quiet(err, exit);
+
+ @autoreleasepool
+ {
+ gAWDServerConnection = [[AWDServerConnectionSoft alloc]
+ initWithComponentId: AWDComponentId_MDNSResponder
+ andBlockOnConfiguration: NO];
+
+ if (gAWDServerConnection)
+ {
+ [gAWDServerConnection
+ registerQueriableMetricCallback: ^(UInt32 metricId)
+ {
+ mStatus localErr;
+
+ (void) metricId;
+
+ localErr = SubmitAWDMetric();
+ if (localErr) LogMsg("SubmitAWDMetric failed with error %d", localErr);
+ }
+ forIdentifier: (UInt32)AWDMetricId_MDNSResponder_DNSStatistics];
+ }
+ }
+exit:
+ return (err);
+}
+
+//===========================================================================================================================
+// MetricsUpdateUDNSStats
+//===========================================================================================================================
+
+mDNSexport void MetricsUpdateUDNSStats(const domainname *inQueryName, mDNSBool inAnswered, mDNSu32 inSendCount, mDNSu32 inLatencyMs, mDNSBool inForCellular)
+{
+ DNSStats * stats;
+ DNSDomainStatsRef domainStats;
+ int queryLabelCount;
+ mDNSBool isQueryInDomain;
+
+ queryLabelCount = CountLabels(inQueryName);
+
+ for (domainStats = gDomainStatsList; domainStats; domainStats = domainStats->next)
+ {
+ isQueryInDomain = mDNSfalse;
+ if (strcmp(domainStats->domainStr, ".") == 0)
+ {
+ // All queries are in the root domain.
+ isQueryInDomain = mDNStrue;
+ }
+ else
+ {
+ int skipCount;
+ const domainname * queryParentDomain;
+
+ skipCount = queryLabelCount - domainStats->domainLabelCount;
+ if (skipCount >= 0)
+ {
+ queryParentDomain = SkipLeadingLabels(inQueryName, skipCount);
+ isQueryInDomain = SameDomainName(queryParentDomain, &domainStats->domain);
+ }
+ }
+
+ if (isQueryInDomain)
+ {
+ stats = inForCellular ? &domainStats->statsCellular : &domainStats->stats;
+ UpdateDNSStats(stats, inAnswered, inSendCount, inLatencyMs);
+ }
+ }
+}
+
+//===========================================================================================================================
+// CreateDomainStatsList
+//===========================================================================================================================
+
+mDNSlocal mStatus CreateDomainStatsList(DNSDomainStatsRef *outList)
+{
+ mStatus err;
+ size_t i;
+ DNSDomainStatsRef domainStats;
+ DNSDomainStatsRef * p;
+ DNSDomainStatsRef list = NULL;
+
+ p = &list;
+ for (i = 0; i < countof(kUDNSStatsDomains); ++i)
+ {
+ err = DNSDomainStatsCreate(kUDNSStatsDomains[i], &domainStats);
+ require_noerr_quiet(err, exit);
+
+ *p = domainStats;
+ p = &domainStats->next;
+ }
+
+ *outList = list;
+ list = NULL;
+
+exit:
+ DNSDomainStatsFreeList(list);
+ return (err);
+}
+
+//===========================================================================================================================
+// UpdateDNSStats
+//===========================================================================================================================
+
+mDNSlocal void UpdateDNSStats(DNSStats *inStats, mDNSBool inAnswered, mDNSu32 inQuerySendCount, mDNSu32 inLatencyMs)
+{
+ size_t i;
+
+ if (inAnswered)
+ {
+ i = (inQuerySendCount <= kUDNSStatsMaxQuerySendCount) ? inQuerySendCount : kUDNSStatsMaxQuerySendCount;
+ inStats->answeredQuerySendCountBins[i]++;
+
+ if (inQuerySendCount > 0)
+ {
+ for (i = 0; (i < countof(kResponseLatencyMsLimits)) && (inLatencyMs >= kResponseLatencyMsLimits[i]); ++i) {}
+ inStats->responseLatencyBins[i]++;
+ }
+ }
+ else if (inQuerySendCount > 0)
+ {
+ i = (inQuerySendCount <= kUDNSStatsMaxQuerySendCount) ? inQuerySendCount : kUDNSStatsMaxQuerySendCount;
+ inStats->unansweredQuerySendCountBins[i]++;
+ }
+}
+
+//===========================================================================================================================
+// SubmitAWDMetric
+//===========================================================================================================================
+
+mDNSlocal mStatus SubmitAWDMetric(void)
+{
+ mStatus err;
+ BOOL success;
+ DNSDomainStatsRef domainStats;
+ DNSDomainStatsRef newDomainStatsList;
+ DNSDomainStatsRef domainStatsList = NULL;
+ AWDMetricContainer * container = nil;
+ AWDMDNSResponderDNSStatistics * metric = nil;
+ AWDDNSDomainStats * awdDomainStats = nil;
+
+ err = CreateDomainStatsList(&newDomainStatsList);
+ require_noerr_quiet(err, exit);
+
+ domainStatsList = gDomainStatsList;
+
+ KQueueLock(&mDNSStorage);
+ gDomainStatsList = newDomainStatsList;
+ KQueueUnlock(&mDNSStorage, "SubmitAWDMetric");
+
+ container = [gAWDServerConnection newMetricContainerWithIdentifier:AWDMetricId_MDNSResponder_DNSStatistics];
+ require_action_quiet(container, exit, err = mStatus_UnknownErr);
+
+ metric = [[AWDMDNSResponderDNSStatisticsSoft alloc] init];
+ require_action_quiet(metric, exit, err = mStatus_UnknownErr);
+
+ for (domainStats = domainStatsList; domainStats; domainStats = domainStats->next)
+ {
+ err = CreateAWDDNSDomainStats(&domainStats->stats, domainStats->domainStr, mDNSfalse, &awdDomainStats);
+ require_noerr_quiet(err, exit);
+
+ [metric addStats:awdDomainStats];
+ [awdDomainStats release];
+ awdDomainStats = nil;
+
+ err = CreateAWDDNSDomainStats(&domainStats->statsCellular, domainStats->domainStr, mDNStrue, &awdDomainStats);
+ require_noerr_quiet(err, exit);
+
+ [metric addStats:awdDomainStats];
+ [awdDomainStats release];
+ awdDomainStats = nil;
+ }
+
+ container.metric = metric;
+ success = [gAWDServerConnection submitMetric:container];
+ LogMsg("SubmitAWDMetric: metric submission %s.", success ? "succeeded" : "failed" );
+ err = success ? mStatus_NoError : mStatus_UnknownErr;
+
+exit:
+ [awdDomainStats release];
+ [metric release];
+ [container release];
+ DNSDomainStatsFreeList(domainStatsList);
+ return (err);
+}
+
+//===========================================================================================================================
+// DNSDomainStatsCreate
+//===========================================================================================================================
+
+mDNSlocal mStatus DNSDomainStatsCreate(const char *inDomain, DNSDomainStatsRef *outStats)
+{
+ mStatus err;
+ DNSDomainStatsRef obj;
+ mDNSu8 * ptr;
+
+ obj = (DNSDomainStatsRef) calloc(1, sizeof(*obj));
+ require_action_quiet(obj, exit, err = mStatus_NoMemoryErr);
+
+ obj->domainStr = strdup(inDomain);
+ require_action_quiet(obj, exit, err = mStatus_NoMemoryErr);
+
+ // Initialize domainname for non-root domains.
+
+ if (strcmp(obj->domainStr, ".") != 0)
+ {
+ ptr = MakeDomainNameFromDNSNameString(&obj->domain, obj->domainStr);
+ require_action_quiet(ptr, exit, err = mStatus_Invalid);
+ obj->domainLabelCount = CountLabels(&obj->domain);
+ }
+
+ *outStats = obj;
+ obj = NULL;
+ err = mStatus_NoError;
+
+exit:
+ if (obj) DNSDomainStatsFree(obj);
+ return (err);
+}
+
+//===========================================================================================================================
+// DNSDomainStatsFree
+//===========================================================================================================================
+
+mDNSlocal void DNSDomainStatsFree(DNSDomainStatsRef inStats)
+{
+ if (inStats->domainStr) free(inStats->domainStr);
+ free(inStats);
+}
+
+//===========================================================================================================================
+// DNSDomainStatsFreeList
+//===========================================================================================================================
+
+mDNSlocal void DNSDomainStatsFreeList(DNSDomainStatsRef inList)
+{
+ DNSDomainStatsRef stats;
+
+ while ((stats = inList) != NULL)
+ {
+ inList = stats->next;
+ DNSDomainStatsFree(stats);
+ }
+}
+
+//===========================================================================================================================
+// CreateAWDDNSDomainStats
+//===========================================================================================================================
+
+mDNSlocal mStatus CreateAWDDNSDomainStats(DNSStats *inStats, const char *inDomain, mDNSBool inIsCellType, AWDDNSDomainStats **outAWDStats)
+{
+ mStatus err;
+ AWDDNSDomainStats * awdStats = nil;
+ NSString * domain = nil;
+
+ awdStats = [[AWDDNSDomainStatsSoft alloc] init];
+ require_action_quiet(awdStats, exit, err = mStatus_UnknownErr);
+
+ domain = [[NSString alloc] initWithUTF8String:inDomain];
+ require_action_quiet(domain, exit, err = mStatus_UnknownErr);
+
+ awdStats.domain = domain;
+ awdStats.networkType = inIsCellType ? AWDDNSDomainStats_NetworkType_Cellular : AWDDNSDomainStats_NetworkType_NonCellular;
+
+ [awdStats
+ setAnsweredQuerySendCounts: inStats->answeredQuerySendCountBins
+ count: (NSUInteger)countof(inStats->answeredQuerySendCountBins)];
+
+ [awdStats
+ setUnansweredQuerySendCounts: inStats->unansweredQuerySendCountBins
+ count: (NSUInteger)countof(inStats->unansweredQuerySendCountBins)];
+
+ [awdStats
+ setResponseLatencyMs: inStats->responseLatencyBins
+ count: (NSUInteger)countof(inStats->responseLatencyBins)];
+
+ *outAWDStats = awdStats;
+ awdStats = nil;
+ err = mStatus_NoError;
+
+exit:
+ [domain release];
+ [awdStats release];
+ return (err);
+}
+
+//===========================================================================================================================
+// LogDNSStats
+//===========================================================================================================================
+
+#define Percent(N, D) ((N) * 100) / (D), (((N) * 10000) / (D)) % 100
+#define PercentFmt "%3u.%02u"
+#define LogStat(LABEL, COUNT, ACCUMULATOR, TOTAL) \
+ LogMsgNoIdent("%s %5u " PercentFmt " " PercentFmt, (LABEL), (COUNT), Percent(COUNT, TOTAL), Percent(ACCUMULATOR, TOTAL))
+
+mDNSlocal void LogDNSStats(const DNSStats *inStats)
+{
+ uint32_t total;
+ uint32_t totalUnanswered;
+ size_t i;
+ char label[16];
+
+ totalUnanswered = 0;
+ for (i = 0; i < countof(inStats->unansweredQuerySendCountBins); ++i)
+ {
+ totalUnanswered += inStats->unansweredQuerySendCountBins[i];
+ }
+
+ total = 0;
+ for (i = 0; i <= countof(inStats->answeredQuerySendCountBins); ++i)
+ {
+ total += inStats->answeredQuerySendCountBins[i];
+ }
+
+ LogMsgNoIdent("Answered questions %5u", total);
+ LogMsgNoIdent("Unanswered questions %5u", totalUnanswered);
+ LogMsgNoIdent("+++ Number of queries sent +++");
+ if (total > 0)
+ {
+ uint32_t accumulator = 0;
+
+ for (i = 0; i < countof(inStats->answeredQuerySendCountBins); ++i)
+ {
+ uint32_t count;
+ const char * suffix;
+
+ count = inStats->answeredQuerySendCountBins[i];
+ accumulator += count;
+ suffix = (i < (countof(inStats->answeredQuerySendCountBins) - 1)) ? " " : "+";
+ snprintf(label, sizeof(label), "%2d%s", (int)i, suffix);
+ LogStat(label, count, accumulator, total);
+ }
+ }
+ else
+ {
+ LogMsgNoIdent("No data.");
+ }
+
+ total = 0;
+ for (i = 0; i < countof(inStats->responseLatencyBins); ++i)
+ {
+ total += inStats->responseLatencyBins[i];
+ }
+
+ LogMsgNoIdent("+++++++ Response times +++++++");
+ if (total > 0)
+ {
+ uint32_t accumulator = 0;
+
+ for (i = 0; i < countof(inStats->responseLatencyBins); ++i)
+ {
+ uint32_t count;
+
+ count = inStats->responseLatencyBins[i];
+ accumulator += count;
+ if (i < countof(kResponseLatencyMsLimits))
+ {
+ snprintf(label, sizeof(label), "< %5u ms", kResponseLatencyMsLimits[i]);
+ }
+ else
+ {
+ snprintf(label, sizeof(label), "< ∞ ms");
+ }
+ LogStat(label, count, accumulator, total);
+ if (accumulator == total) break;
+ }
+ }
+ else
+ {
+ LogMsgNoIdent("No data.");
+ }
+}
+
+//===========================================================================================================================
+// LogMetrics
+//===========================================================================================================================
+
+mDNSexport void LogMetrics(void)
+{
+ DNSDomainStatsRef domainStats;
+
+ LogMsgNoIdent("---- DNS stats by domain -----");
+
+ for (domainStats = gDomainStatsList; domainStats; domainStats = domainStats->next)
+ {
+ LogMsgNoIdent("Domain: %s (non-cellular)", domainStats->domainStr);
+ LogDNSStats(&domainStats->stats);
+ LogMsgNoIdent("Domain: %s (cellular)", domainStats->domainStr);
+ LogDNSStats(&domainStats->statsCellular);
+ }
+}
+#endif // TARGET_OS_EMBEDDED
diff --git a/mDNSResponder/mDNSMacOSX/P2PPacketFilter.c b/mDNSResponder/mDNSMacOSX/P2PPacketFilter.c
index 1ab8a02f..0665103f 100644
--- a/mDNSResponder/mDNSMacOSX/P2PPacketFilter.c
+++ b/mDNSResponder/mDNSMacOSX/P2PPacketFilter.c
@@ -1,4 +1,4 @@
-/*
+/* -*- Mode: C; tab-width: 4 -*-
*
* Copyright (c) 2011 Apple Inc. All rights reserved.
*
@@ -250,7 +250,8 @@ int P2PPacketFilterAddBonjourRuleSet(const char * interfaceName, u_int32_t count
require( result == 0, exit );
// open inbound port for each service
- for (i = 0; i < count; i++) {
+ for (i = 0; i < count; i++)
+ {
initPortRule( &pr, interfaceName, ticket, poolTicket, anchorPath, portArray[i], protocolArray[i] );
result = addRule( devFD, &pr );
require( result == 0, exit );
diff --git a/mDNSResponder/mDNSMacOSX/P2PPacketFilter.h b/mDNSResponder/mDNSMacOSX/P2PPacketFilter.h
index 9c196577..904b43ba 100644
--- a/mDNSResponder/mDNSMacOSX/P2PPacketFilter.h
+++ b/mDNSResponder/mDNSMacOSX/P2PPacketFilter.h
@@ -1,4 +1,4 @@
-/*
+/* -*- Mode: C; tab-width: 4 -*-
*
* Copyright (c) 2011 Apple Inc. All rights reserved.
*
diff --git a/mDNSResponder/mDNSMacOSX/PreferencePane/DNSServiceDiscoveryPref.m b/mDNSResponder/mDNSMacOSX/PreferencePane/DNSServiceDiscoveryPref.m
index 063bc724..26e3eaf0 100644
--- a/mDNSResponder/mDNSMacOSX/PreferencePane/DNSServiceDiscoveryPref.m
+++ b/mDNSResponder/mDNSMacOSX/PreferencePane/DNSServiceDiscoveryPref.m
@@ -3,9 +3,9 @@
Abstract: System Preference Pane for Dynamic DNS and Wide-Area DNS Service Discovery
- Copyright: (c) Copyright 2005-2011 Apple Computer, Inc. All rights reserved.
+ Copyright: (c) Copyright 2005-2011 Apple Inc. All rights reserved.
- Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc.
+ Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Inc.
("Apple") in consideration of your agreement to the following terms, and your
use, installation, modification or redistribution of this Apple software
constitutes acceptance of these terms. If you do not agree with these terms,
@@ -19,7 +19,7 @@
the Apple Software in its entirety and without modifications, you must retain
this notice and the following text and disclaimers in all such redistributions of
the Apple Software. Neither the name, trademarks, service marks or logos of
- Apple Computer, Inc. may be used to endorse or promote products derived from the
+ Apple Inc. may be used to endorse or promote products derived from the
Apple Software without specific prior written permission from Apple. Except as
expressly stated in this notice, no other rights or licenses, express or implied,
are granted by Apple herein, including but not limited to any patent rights that
@@ -96,8 +96,7 @@ static void ServiceDomainEnumReply( DNSServiceRef sdRef, DNSServiceFlags flags,
NSMutableArray * defaultBrowseDomainsArray = nil;
NSComboBox * domainComboBox;
NSString * domainString;
- NSString * currentDomain = nil;
- char decodedDomainString[kDNSServiceMaxDomainName] = "\0";
+ char decodedDomainString[kDNSServiceMaxDomainName] = "\0";
char nextLabel[256] = "\0";
char * buffer = (char *)replyDomain;
@@ -115,7 +114,6 @@ static void ServiceDomainEnumReply( DNSServiceRef sdRef, DNSServiceFlags flags,
if (enumType & kDNSServiceFlagsRegistrationDomains) {
domainArray = [me registrationDataSource];
domainComboBox = [me regDomainsComboBox];
- currentDomain = [me currentRegDomain];
} else {
domainArray = [me browseDataSource];
domainComboBox = [me browseDomainsComboBox];
@@ -261,6 +259,7 @@ MyDNSServiceAddServiceToRunLoop(MyDNSServiceState * query)
assert(rls != NULL);
CFRunLoopAddSource(CFRunLoopGetCurrent(), rls, kCFRunLoopCommonModes);
+ CFRelease(rls);
CFRelease(keys);
CFRelease(store);
@@ -334,7 +333,7 @@ MyDNSServiceAddServiceToRunLoop(MyDNSServiceState * query)
currentHostName = [[NSString alloc] initWithString:@""];
}
- [origDict release];
+ CFRelease((CFDictionaryRef)origDict);
CFRelease(store);
}
@@ -394,6 +393,7 @@ MyDNSServiceAddServiceToRunLoop(MyDNSServiceState * query)
[browseDomainsArray replaceObjectAtIndex:[tableView clickedRow] withObject:browseDomainDict];
[tableView reloadData];
[self updateApplyButtonState];
+ [browseDomainDict release];
}
@@ -681,12 +681,8 @@ MyDNSServiceAddServiceToRunLoop(MyDNSServiceState * query)
{
NSString *hostNameString = [hostName stringValue];
NSString *regDomainString = [regDomainsComboBox stringValue];
-
- NSComparisonResult hostNameResult = [hostNameString compare:currentHostName];
- NSComparisonResult regDomainResult = [regDomainString compare:currentRegDomain];
-
- if ((currentHostName && (hostNameResult != NSOrderedSame)) ||
- (currentRegDomain && (regDomainResult != NSOrderedSame) && ([wideAreaCheckBox state])) ||
+ if ((currentHostName && ([hostNameString compare:currentHostName] != NSOrderedSame)) ||
+ (currentRegDomain && ([regDomainString compare:currentRegDomain] != NSOrderedSame) && ([wideAreaCheckBox state])) ||
(currentHostName == nil && ([hostNameString length]) > 0) ||
(currentRegDomain == nil && ([regDomainString length]) > 0) ||
(currentWideAreaState != [wideAreaCheckBox state]) ||
@@ -946,7 +942,7 @@ MyDNSServiceAddServiceToRunLoop(MyDNSServiceState * query)
}
CFRelease(itemRef);
}
- return keyName;
+ return [keyName autorelease];
}
@@ -1000,7 +996,6 @@ MyDNSServiceAddServiceToRunLoop(MyDNSServiceState * query)
-(void)savePreferences
{
NSString *hostNameString = [hostName stringValue];
- NSString *browseDomainString = [browseDomainsComboBox stringValue];
NSString *regDomainString = [regDomainsComboBox stringValue];
NSString *tempHostNameSharedSecretName = hostNameSharedSecretName;
NSString *tempRegSharedSecretName = regSharedSecretName;
@@ -1010,7 +1005,6 @@ MyDNSServiceAddServiceToRunLoop(MyDNSServiceState * query)
OSStatus err = noErr;
hostNameString = [self trimCharactersFromDomain:hostNameString];
- browseDomainString = [self trimCharactersFromDomain:browseDomainString];
regDomainString = [self trimCharactersFromDomain:regDomainString];
tempHostNameSharedSecretName = [self trimCharactersFromDomain:tempHostNameSharedSecretName];
tempRegSharedSecretName = [self trimCharactersFromDomain:tempRegSharedSecretName];
diff --git a/mDNSResponder/mDNSMacOSX/PreferencePane/English.lproj/InfoPlist.strings b/mDNSResponder/mDNSMacOSX/PreferencePane/English.lproj/InfoPlist.strings
index e2dfa991..71d52de8 100644
--- a/mDNSResponder/mDNSMacOSX/PreferencePane/English.lproj/InfoPlist.strings
+++ b/mDNSResponder/mDNSMacOSX/PreferencePane/English.lproj/InfoPlist.strings
Binary files differ
diff --git a/mDNSResponder/mDNSMacOSX/PreferencePane/PrivilegedOperations.c b/mDNSResponder/mDNSMacOSX/PreferencePane/PrivilegedOperations.c
index 4c0ffa0e..efb41497 100644
--- a/mDNSResponder/mDNSMacOSX/PreferencePane/PrivilegedOperations.c
+++ b/mDNSResponder/mDNSMacOSX/PreferencePane/PrivilegedOperations.c
@@ -3,9 +3,9 @@
Abstract: Interface to "ddnswriteconfig" setuid root tool.
- Copyright: (c) Copyright 2005 Apple Computer, Inc. All rights reserved.
+ Copyright: (c) Copyright 2005-2015 Apple Inc. All rights reserved.
- Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc.
+ Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Inc.
("Apple") in consideration of your agreement to the following terms, and your
use, installation, modification or redistribution of this Apple software
constitutes acceptance of these terms. If you do not agree with these terms,
@@ -19,7 +19,7 @@
the Apple Software in its entirety and without modifications, you must retain
this notice and the following text and disclaimers in all such redistributions of
the Apple Software. Neither the name, trademarks, service marks or logos of
- Apple Computer, Inc. may be used to endorse or promote products derived from the
+ Apple Inc. may be used to endorse or promote products derived from the
Apple Software without specific prior written permission from Apple. Except as
expressly stated in this notice, no other rights or licenses, express or implied,
are granted by Apple herein, including but not limited to any patent rights that
@@ -48,24 +48,23 @@
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
-#include <unistd.h>
+#include <spawn.h>
#include <sys/wait.h>
#include <AssertMacros.h>
#include <Security/Security.h>
+extern char **environ;
Boolean gToolApproved = false;
-static pid_t execTool(const char *args[])
-// fork/exec and return new pid
+static pid_t execTool(const char *args[])
{
pid_t child;
- child = vfork();
- if (child == 0)
+ int err = posix_spawn(&child, args[0], NULL, NULL, (char *const *)args, environ);
+ if (err)
{
- execv(args[0], (char *const *)args);
- printf("exec of %s failed; errno = %d\n", args[0], errno);
- _exit(-1); // exec failed
+ printf("exec of %s failed; err = %d\n", args[0], err);
+ return -1;
}
else
return child;
@@ -119,11 +118,14 @@ OSStatus EnsureToolInstalled(void)
{
char *installerargs[] = { toolSourcePath, NULL };
err = AuthorizationExecuteWithPrivileges(authRef, toolInstallerPath, 0, installerargs, (FILE**) NULL);
- if (err == noErr) {
+ if (err == noErr)
+ {
int pid = wait(&status);
- if (pid > 0 && WIFEXITED(status)) {
+ if (pid > 0 && WIFEXITED(status))
+ {
err = WEXITSTATUS(status);
- if (err == noErr) {
+ if (err == noErr)
+ {
gToolApproved = true;
}
} else {
@@ -181,7 +183,8 @@ static OSStatus ExecWithCmdAndParam(const char *subCmd, CFDataRef paramData)
write(commFD, buff, len);
child = execTool(args);
- if (child > 0) {
+ if (child > 0)
+ {
int status;
waitpid(child, &status, 0);
if (WIFEXITED(status))
diff --git a/mDNSResponder/mDNSMacOSX/PreferencePane/ddnswriteconfig.m b/mDNSResponder/mDNSMacOSX/PreferencePane/ddnswriteconfig.m
index 437879bc..8e64fc46 100644
--- a/mDNSResponder/mDNSMacOSX/PreferencePane/ddnswriteconfig.m
+++ b/mDNSResponder/mDNSMacOSX/PreferencePane/ddnswriteconfig.m
@@ -87,18 +87,23 @@ WriteArrayToDynDNS(CFStringRef arrayKey, CFArrayRef domainArray)
require_action(true == SCPreferencesLock( store, true), LockFailed, err=coreFoundationUnknownErr;);
origDict = SCPreferencesPathGetValue(store, scKey);
- if (origDict) {
+ if (origDict)
+ {
dict = CFDictionaryCreateMutableCopy(NULL, 0, origDict);
}
- if (!dict) {
+ if (!dict)
+ {
dict = CFDictionaryCreateMutable(NULL, 0, &kCFCopyStringDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
}
require_action( dict != NULL, NoDict, err=memFullErr;);
- if (CFArrayGetCount(domainArray) > 0) {
+ if (CFArrayGetCount(domainArray) > 0)
+ {
CFDictionarySetValue(dict, arrayKey, domainArray);
- } else {
+ }
+ else
+ {
CFDictionaryRemoveValue(dict, arrayKey);
}
@@ -138,10 +143,13 @@ readTaggedBlock(int fd, u_int32_t *pTag, u_int32_t *pLen, char **ppBuff)
require_action(*ppBuff != NULL, AllocFailed, result = -1;);
num = read(fd, *ppBuff, len);
- if (num == (ssize_t)len) {
+ if (num == (ssize_t)len)
+ {
*pTag = tag;
*pLen = len;
- } else {
+ }
+ else
+ {
free(*ppBuff);
result = -1;
}
@@ -166,7 +174,8 @@ SetAuthInfo( int fd)
require( len == sizeof(AuthorizationExternalForm), ReadParamsFailed);
require( len == kAuthorizationExternalFormLength, ReadParamsFailed);
- if (gAuthRef != 0) {
+ if (gAuthRef != 0)
+ {
(void) AuthorizationFree(gAuthRef, kAuthorizationFlagDefaults);
gAuthRef = 0;
}
@@ -199,10 +208,15 @@ HandleWriteDomain(int fd, int domainType)
domainData = CFDataCreate(NULL, (UInt8 *)p, len);
domainArray = (CFArrayRef)[NSUnarchiver unarchiveObjectWithData:(NSData *)domainData];
+ CFRelease(domainData);
+ free(p);
- if (domainType) {
+ if (domainType)
+ {
result = WriteArrayToDynDNS(SC_DYNDNS_REGDOMAINS_KEY, domainArray);
- } else {
+ }
+ else
+ {
result = WriteArrayToDynDNS(SC_DYNDNS_BROWSEDOMAINS_KEY, domainArray);
}
@@ -232,6 +246,8 @@ HandleWriteHostname(int fd)
domainData = CFDataCreate(NULL, (const UInt8 *)p, len);
domainArray = (CFArrayRef)[NSUnarchiver unarchiveObjectWithData:(NSData *)domainData];
result = WriteArrayToDynDNS(SC_DYNDNS_HOSTNAMES_KEY, domainArray);
+ CFRelease(domainData);
+ free(p);
ReadParamsFailed:
return result;
@@ -341,6 +357,8 @@ SetKeychainEntry(int fd)
secretData = CFDataCreate(NULL, (UInt8 *)p, len);
secretDictionary = (CFDictionaryRef)[NSUnarchiver unarchiveObjectWithData:(NSData *)secretData];
+ CFRelease(secretData);
+ free(p);
keyNameString = (CFStringRef)CFDictionaryGetValue(secretDictionary, SC_DYNDNS_KEYNAME_KEY);
assert(keyNameString != NULL);
@@ -356,9 +374,11 @@ SetKeychainEntry(int fd)
CFStringGetCString(secretString, secret, kDNSServiceMaxDomainName, kCFStringEncodingUTF8);
result = SecKeychainSetPreferenceDomain(kSecPreferencesDomainSystem);
- if (result == noErr) {
+ if (result == noErr)
+ {
result = SecKeychainFindGenericPassword(NULL, strlen(domain), domain, 0, NULL, 0, NULL, &item);
- if (result == noErr) {
+ if (result == noErr)
+ {
result = SecKeychainItemDelete(item);
if (result != noErr) fprintf(stderr, "SecKeychainItemDelete returned %d\n", result);
}
diff --git a/mDNSResponder/mDNSMacOSX/Private/dns_sd_private.h b/mDNSResponder/mDNSMacOSX/Private/dns_sd_private.h
new file mode 100644
index 00000000..e0b65cce
--- /dev/null
+++ b/mDNSResponder/mDNSMacOSX/Private/dns_sd_private.h
@@ -0,0 +1,32 @@
+/* -*- Mode: C; tab-width: 4 -*-
+ *
+ * Copyright (c) 2015 Apple Inc. All rights reserved.
+ */
+
+#ifndef _DNS_SD_PRIVATE_H
+#define _DNS_SD_PRIVATE_H
+
+/* DNSServiceCreateDelegateConnection()
+ *
+ * Parameters:
+ *
+ * sdRef: A pointer to an uninitialized DNSServiceRef. Deallocating
+ * the reference (via DNSServiceRefDeallocate()) severs the
+ * connection and deregisters all records registered on this connection.
+ *
+ * pid : Process ID of the delegate
+ *
+ * uuid: UUID of the delegate
+ *
+ * Note that only one of the two arguments (pid or uuid) can be specified. If pid
+ * is zero, uuid will be assumed to be a valid value; otherwise pid will be used.
+ *
+ * return value: Returns kDNSServiceErr_NoError on success, otherwise returns
+ * an error code indicating the specific failure that occurred (in which
+ * case the DNSServiceRef is not initialized). kDNSServiceErr_NotAuth is
+ * returned to indicate that the calling process does not have entitlements
+ * to use this API.
+ */
+DNSServiceErrorType DNSSD_API DNSServiceCreateDelegateConnection(DNSServiceRef *sdRef, int32_t pid, uuid_t uuid);
+
+#endif
diff --git a/mDNSResponder/mDNSMacOSX/Private/dns_services.c b/mDNSResponder/mDNSMacOSX/Private/dns_services.c
index 1df3b21d..794e2526 100644
--- a/mDNSResponder/mDNSMacOSX/Private/dns_services.c
+++ b/mDNSResponder/mDNSMacOSX/Private/dns_services.c
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 4 -*-
*
- * Copyright (c) 2012 Apple Inc. All rights reserved.
+ * Copyright (c) 2012-2015 Apple Inc. All rights reserved.
*
* PRIVATE DNSX CLIENT LIBRARY --FOR Apple Platforms ONLY OSX/iOS--
* Resides in /usr/lib/libdns_services.dylib
@@ -10,10 +10,10 @@
#include "dns_xpc.h"
#include <xpc/xpc.h>
#include <Block.h>
-#include <stdio.h>
-#include <stdlib.h>
#include <syslog.h>
+#define LOG_NOW LOG_INFO
+
//*************************************************************************************************************
// Globals
@@ -22,7 +22,7 @@
struct _DNSXConnRef_t
{
connection_t conn_ref; // xpc_connection between client and daemon
- dispatch_queue_t lib_q; // internal queue created in library itself
+ dispatch_queue_t lib_q; // internal queue created in library itself
void *AppCallBack; // Callback function ptr for Client
dispatch_queue_t client_q; // Queue specified by client for scheduling its Callback
};
@@ -37,11 +37,11 @@ static bool LogDebugEnabled()
static void LogDebug(const char *prefix, xpc_object_t o)
{
- if (!LogDebugEnabled())
+ if (!LogDebugEnabled())
return;
char *desc = xpc_copy_description(o);
- syslog(LOG_INFO, "%s: %s", prefix, desc);
+ syslog(LOG_NOW, "%s: %s", prefix, desc);
free(desc);
}
@@ -49,164 +49,201 @@ static void LogDebug(const char *prefix, xpc_object_t o)
void DNSXRefDeAlloc(DNSXConnRef connRef)
{
- if (!connRef)
+ if (connRef == NULL)
{
- syslog(LOG_WARNING, "dns_services: DNSXRefDeAlloc called with NULL DNSXConnRef");
+ syslog(LOG_WARNING, "dns_services DD: DNSXRefDeAlloc called with NULL DNSXConnRef");
return;
}
-
+
// Schedule this work on the internal library queue
dispatch_sync(connRef->lib_q, ^{
-
+ xpc_connection_set_event_handler((connRef)->conn_ref, ^(__unused xpc_object_t event){}); // ignore any more events
xpc_release(connRef->conn_ref);
+ connRef->conn_ref = NULL;
+ dispatch_release(connRef->lib_q);
+ connRef->lib_q = NULL;
connRef->AppCallBack = NULL;
- dispatch_release(connRef->client_q);
-
+ syslog(LOG_NOW, "dns_services DD: DNSXRefDeAlloc successfully DeAllocated conn_ref & lib_q");
+
+ dispatch_async((connRef)->client_q, ^{
+ dispatch_release(connRef->client_q);
+ connRef->client_q = NULL;
+ free(connRef);
+ syslog(LOG_NOW, "dns_services DD: DNSXRefDeAlloc successfully DeAllocated client_q & freed connRef");
+ });
});
-
- dispatch_release(connRef->lib_q);
- free(connRef);
-
- syslog(LOG_INFO, "dns_services: DNSXRefDeAlloc successfully DeAllocated connRef");
-
+
+ // DO NOT reference connRef after this comment, as it may have been freed
+ syslog(LOG_NOW, "dns_services DD: DNSXRefDeAlloc successfully DeAllocated connRef");
+
}
-// Sends the Msg(Dictionary) to the Server
-static DNSXErrorType SendMsgToServer(DNSXConnRef *connRef, xpc_object_t msg, bool old_conn)
+// Sends the Msg(Dictionary) to the Server Daemon
+static DNSXErrorType SendMsgToServer(DNSXConnRef connRef, xpc_object_t msg)
{
DNSXErrorType errx = kDNSX_NoError;
-
- LogDebug("dns_services: SendMsgToServer", msg);
- xpc_connection_set_event_handler((*connRef)->conn_ref, ^(xpc_object_t recv_msg)
+ LogDebug("dns_services DD: SendMsgToServer Sending msg to Daemon", msg);
+
+ xpc_connection_send_message_with_reply((connRef)->conn_ref, msg, (connRef)->lib_q, ^(xpc_object_t recv_msg)
{
xpc_type_t type = xpc_get_type(recv_msg);
-
+
if (type == XPC_TYPE_DICTIONARY)
{
- LogDebug("dns_services: SendMsgToServer SUCCESS CALLBACK FROM SERVER", recv_msg);
- syslog(LOG_INFO, "dns_services: Successfully Sent Msg to the Daemon");
+ LogDebug("dns_services DD: SendMsgToServer Received reply msg from Daemon", recv_msg);
uint64_t daemon_status = xpc_dictionary_get_uint64(recv_msg, kDNSDaemonReply);
-
- // Schedule the AppCallBacks on the Client Specified Queue
- switch (daemon_status)
- {
- case kDNSDaemonEngaged:
- dispatch_async((*connRef)->client_q, ^{
- ((DNSXEnableProxyReply)(*connRef)->AppCallBack)((*connRef), kDNSX_Engaged);
- });
- break;
- case kDNSMsgReceived:
- dispatch_async((*connRef)->client_q, ^{
- ((DNSXEnableProxyReply)(*connRef)->AppCallBack)((*connRef), kDNSX_NoError);
- });
- break;
- default:
- dispatch_async((*connRef)->client_q, ^{
- ((DNSXEnableProxyReply)(*connRef)->AppCallBack)((*connRef), kDNSX_UnknownErr);
- });
- break;
- }
-
+
+ if (connRef == NULL || connRef->client_q == NULL || connRef->AppCallBack == NULL)
+ {
+ // If connRef is bad, do not schedule any callbacks to the client
+ syslog(LOG_WARNING, "dns_services DD: SendMsgToServer: connRef is BAD Daemon status code [%llu]", daemon_status);
+ }
+ else
+ {
+ switch (daemon_status)
+ {
+ case kDNSMsg_NoError:
+ dispatch_async((connRef)->client_q, ^{
+ if (connRef->AppCallBack != NULL)
+ ((DNSXEnableProxyReply)connRef->AppCallBack)(connRef, kDNSX_NoError);
+ });
+ break;
+
+ case kDNSMsg_BadArg:
+ dispatch_async((connRef)->client_q, ^{
+ if (connRef->AppCallBack != NULL)
+ ((DNSXEnableProxyReply)connRef->AppCallBack)(connRef, kDNSX_BadParam);
+ });
+ break;
+
+ default:
+ dispatch_async((connRef)->client_q, ^{
+ if (connRef->AppCallBack != NULL)
+ ((DNSXEnableProxyReply)connRef->AppCallBack)(connRef, kDNSX_UnknownErr);
+ });
+ break;
+ }
+ }
}
else
{
- LogDebug("dns_services: SendMsgToServer UNEXPECTED CALLBACK FROM SERVER", recv_msg);
- syslog(LOG_WARNING, "dns_services: Connection failed since NO privileges to access service OR Daemon NOT Running");
- dispatch_async((*connRef)->client_q, ^{
- ((DNSXEnableProxyReply)(*connRef)->AppCallBack)((*connRef), kDNSX_DaemonNotRunning);
- });
+ syslog(LOG_WARNING, "dns_services DD: SendMsgToServer Received unexpected reply from daemon [%s]",
+ xpc_dictionary_get_string(recv_msg, XPC_ERROR_KEY_DESCRIPTION));
+ LogDebug("dns_services DD: SendMsgToServer Unexpected Reply contents", recv_msg);
}
});
- // To prevent Over-Resume of a connection
- if (!old_conn)
- xpc_connection_resume((*connRef)->conn_ref);
- xpc_connection_send_message((*connRef)->conn_ref, msg);
- if (!errx)
- syslog(LOG_INFO, "dns_services: SendMSgToServer sent Msg Dict successfully to Daemon");
return errx;
}
-// Creates a new DNSX Connection Reference(DNSXConnRef).
-// If DNSXConnRef exists, you may want to use that depending on the use case
-static DNSXErrorType InitConnection(DNSXConnRef *connRef, const char *servname, dispatch_queue_t clientq, void *AppCallBack)
+// Creates a new DNSX Connection Reference(DNSXConnRef)
+static DNSXErrorType InitConnection(DNSXConnRef *connRefOut, const char *servname, dispatch_queue_t clientq, void *AppCallBack)
{
- if (!connRef)
+ if (connRefOut == NULL)
+ return kDNSX_BadParam;
+
+ // Use a DNSXConnRef on the stack to be captured in the blocks below, rather than capturing the DNSXConnRef* owned by the client
+ DNSXConnRef connRef = malloc(sizeof(struct _DNSXConnRef_t));
+ if (connRef == NULL)
{
- syslog(LOG_WARNING, "dns_services: InitConnection() called with NULL DNSXConnRef");
- return kDNSX_BadParam;
+ syslog(LOG_WARNING, "dns_services DD: InitConnection() No memory to allocate!");
+ return kDNSX_NoMem;
}
-
- *connRef = malloc(sizeof(struct _DNSXConnRef_t));
- if (!(*connRef))
+
+ // Initialize the DNSXConnRef
+ dispatch_retain(clientq);
+ connRef->client_q = clientq;
+ connRef->AppCallBack = AppCallBack;
+ connRef->lib_q = dispatch_queue_create("com.apple.mDNSResponder.libdns_services.q", DISPATCH_QUEUE_SERIAL);
+ connRef->conn_ref = xpc_connection_create_mach_service(servname, connRef->lib_q, XPC_CONNECTION_MACH_SERVICE_PRIVILEGED);
+
+ if (connRef->conn_ref == NULL || connRef->lib_q == NULL)
{
- syslog(LOG_WARNING, "dns_services: InitConnection() No memory to allocate");
+ syslog(LOG_WARNING, "dns_services DD: InitConnection() conn_ref/lib_q is NULL");
+ if (connRef != NULL)
+ free(connRef);
return kDNSX_NoMem;
}
-
- // Initialize the DNSXConnRef
- dispatch_retain(clientq);
- (*connRef)->client_q = clientq;
- (*connRef)->AppCallBack = AppCallBack;
- (*connRef)->lib_q = dispatch_queue_create("com.apple.mDNSResponder.libdns_services.q", NULL);
- (*connRef)->conn_ref = xpc_connection_create_mach_service(servname, (*connRef)->lib_q, XPC_CONNECTION_MACH_SERVICE_PRIVILEGED);
-
- syslog(LOG_INFO, "dns_services: InitConnection() successfully create a new DNSXConnRef");
+
+ xpc_connection_set_event_handler(connRef->conn_ref, ^(xpc_object_t event)
+ {
+ if (connRef == NULL || connRef->client_q == NULL || connRef->AppCallBack == NULL)
+ {
+ // If connRef is bad, do not schedule any callbacks to the client
+ syslog(LOG_WARNING, "dns_services DD: InitConnection: connRef is BAD Unexpected Connection Error [%s]",
+ xpc_dictionary_get_string(event, XPC_ERROR_KEY_DESCRIPTION));
+ }
+ else
+ {
+ syslog(LOG_WARNING, "dns_services DD: InitConnection: Unexpected Connection Error [%s] Ping the client",
+ xpc_dictionary_get_string(event, XPC_ERROR_KEY_DESCRIPTION));
+ dispatch_async(connRef->client_q, ^{
+ if (connRef->AppCallBack != NULL)
+ ((DNSXEnableProxyReply)connRef->AppCallBack)(connRef, kDNSX_DaemonNotRunning);
+ });
+ }
+
+ });
+ xpc_connection_resume(connRef->conn_ref);
+
+ *connRefOut = connRef;
+
return kDNSX_NoError;
}
-DNSXErrorType DNSXEnableProxy(DNSXConnRef *connRef, DNSProxyParameters proxyparam, IfIndex inIfindexArr[MaxInputIf],
- IfIndex outIfindex, dispatch_queue_t clientq, DNSXEnableProxyReply callBack)
+DNSXErrorType DNSXEnableProxy(DNSXConnRef *connRef, DNSProxyParameters proxyparam, IfIndex inIfindexArr[MaxInputIf],
+ IfIndex outIfindex, dispatch_queue_t clientq, DNSXEnableProxyReply callBack)
{
-
+
DNSXErrorType errx = kDNSX_NoError;
- bool old_conn = false;
-
+
// Sanity Checks
- if (!connRef || !callBack || !clientq)
+ if (connRef == NULL || callBack == NULL || clientq == NULL)
{
- syslog(LOG_WARNING, "dns_services: DNSXEnableProxy called with NULL DNSXConnRef OR Callback OR ClientQ parameter");
+ syslog(LOG_WARNING, "dns_services DD: DNSXEnableProxy called with NULL DNSXConnRef OR Callback OR ClientQ parameter");
return kDNSX_BadParam;
- }
-
- // If no connRef, get it from InitConnection()
- if (!*connRef)
+ }
+
+ // Get connRef from InitConnection()
+ if (*connRef == NULL)
{
errx = InitConnection(connRef, kDNSProxyService, clientq, callBack);
if (errx) // On error InitConnection() leaves *connRef set to NULL
{
- syslog(LOG_WARNING, "dns_services: Since InitConnection() returned %d error returning w/o sending msg", errx);
+ syslog(LOG_WARNING, "dns_services DD: Since InitConnection() returned %d error returning w/o sending msg", errx);
return errx;
}
}
- else // Client already has a valid connRef
+ else // Client already has a connRef and this is not valid use for this SPI
{
- old_conn = true;
+ syslog(LOG_WARNING, "dns_services DD: Client already has a valid connRef! This is incorrect usage from the client");
+ return kDNSX_BadParam;
}
-
+
// Create Dictionary To Send
- xpc_object_t dict = xpc_dictionary_create(NULL, NULL, 0);
- if (!dict)
+ xpc_object_t dict = xpc_dictionary_create(NULL, NULL, 0);
+ if (dict == NULL)
{
- syslog(LOG_WARNING, "dns_services: DNSXEnableProxy could not create the Msg Dict To Send!");
+ syslog(LOG_WARNING, "dns_services DD: DNSXEnableProxy could not create the Msg Dict To Send!");
DNSXRefDeAlloc(*connRef);
- return kDNSX_DictError;
+ return kDNSX_NoMem;
}
-
+
xpc_dictionary_set_uint64(dict, kDNSProxyParameters, proxyparam);
-
+
xpc_dictionary_set_uint64(dict, kDNSInIfindex0, inIfindexArr[0]);
xpc_dictionary_set_uint64(dict, kDNSInIfindex1, inIfindexArr[1]);
- xpc_dictionary_set_uint64(dict, kDNSInIfindex2, inIfindexArr[2]);
+ xpc_dictionary_set_uint64(dict, kDNSInIfindex2, inIfindexArr[2]);
xpc_dictionary_set_uint64(dict, kDNSInIfindex3, inIfindexArr[3]);
xpc_dictionary_set_uint64(dict, kDNSInIfindex4, inIfindexArr[4]);
-
+
xpc_dictionary_set_uint64(dict, kDNSOutIfindex, outIfindex);
-
- errx = SendMsgToServer(connRef, dict, old_conn);
+
+ errx = SendMsgToServer(*connRef, dict);
xpc_release(dict);
-
- return errx;
+ dict = NULL;
+
+ return errx;
}
diff --git a/mDNSResponder/mDNSMacOSX/Private/dns_services.h b/mDNSResponder/mDNSMacOSX/Private/dns_services.h
index 7b74e10d..25b911f1 100644
--- a/mDNSResponder/mDNSMacOSX/Private/dns_services.h
+++ b/mDNSResponder/mDNSMacOSX/Private/dns_services.h
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 4 -*-
*
- * Copyright (c) 2012 Apple Inc. All rights reserved.
+ * Copyright (c) 2012-2015 Apple Inc. All rights reserved.
*
*
* @header Interface to DNSX SPI
@@ -21,15 +21,12 @@ typedef enum
{
kDNSX_NoError = 0,
kDNSX_UnknownErr = -65537, /* 0xFFFE FFFF */
- kDNSX_NoMem = -65539,
- kDNSX_BadParam = -65540,
- kDNSX_DaemonNotRunning = -65563, /* Background daemon not running */
- kDNSX_DictError = -65565, /* Dictionary Error */
- kDNSX_Engaged = -65566, /* DNS Proxy is in use by another client */
- kDNSX_Timeout = -65568
+ kDNSX_NoMem = -65539, /* No Memory */
+ kDNSX_BadParam = -65540, /* Client passes invalid arg/Bad use of SPI */
+ kDNSX_DaemonNotRunning = -65563 /* Daemon not running */
} DNSXErrorType;
-// A max of 5 input interfaces can be processed at one time
+// A max of 5 input interfaces can be processed
#define MaxInputIf 5
#define IfIndex uint64_t
#define kDNSIfindexAny 0
@@ -42,10 +39,10 @@ typedef enum
} DNSProxyParameters;
/*********************************************************************************************
-*
-* Enable DNS Proxy Functionality
-*
-*********************************************************************************************/
+ *
+ * Enable DNS Proxy Functionality
+ *
+ *********************************************************************************************/
/* DNSXEnableProxy : Turns ON the DNS Proxy (Details below)
*
@@ -53,27 +50,26 @@ typedef enum
*
* connRef: The DNSXConnRef initialized by DNSXEnableProxy().
*
- * errCode: Will be kDNSX_NoError on success, otherwise will indicate the
- * failure that occurred. Other parameters are undefined if
- * errCode is nonzero.
+ * errCode: Will be kDNSX_NoError on success, otherwise will indicate the
+ * failure that occurred.
*
*/
typedef void (*DNSXEnableProxyReply)
(
DNSXConnRef connRef,
- DNSXErrorType errCode
+ DNSXErrorType errCode
);
/* DNSXEnableProxy
- *
- * Enables the DNS Proxy functionality which will remain ON until the client terminates explictly (or exits/crashes).
- * Client can turn it OFF by passing the returned DNSXConnRef to DNSXRefDeAlloc()
- *
+ *
+ * Enables the DNS Proxy functionality which will remain ON until the client explicitly turns it OFF
+ * by passing the returned DNSXConnRef to DNSXRefDeAlloc(), or the client exits or crashes.
+ *
* DNSXEnableProxy() Parameters:
*
- * connRef: A pointer to DNSXConnRef that is initialized to NULL when called for the first
- * time. If the call succeeds it will be initialized to a non-NULL value.
+ * connRef: A pointer to DNSXConnRef that is initialized to NULL.
+ * If the call succeeds it will be initialized to a non-NULL value.
* Client terminates the DNS Proxy by passing this DNSXConnRef to DNSXRefDeAlloc().
*
* proxyparam: Enable DNS Proxy functionality with parameters that are described in
@@ -88,16 +84,19 @@ typedef void (*DNSXEnableProxyReply)
* outIfindex: Output interface on which the query will be forwarded.
* Passing kDNSIfindexAny causes DNS Queries to be sent on the primary interface.
*
+ * Note: It is the responsibility of the client to ensure the input/output interface
+ * indexes are valid.
+ *
* clientq: Queue the client wants to schedule the callBack on (Note: Must not be NULL)
*
* callBack: CallBack function for the client that indicates success or failure.
- * Note: callback may be invoked more than once, For eg. if enabling DNS Proxy
- * first succeeds and the daemon possibly crashes sometime later.
+ * Note: callback may be invoked more than once, For e.g. if enabling DNS Proxy
+ * first succeeds and the daemon possibly crashes sometime later.
*
* return value: Returns kDNSX_NoError when no error otherwise returns an error code indicating
- * the error that occurred. Note: A return value of kDNSX_NoError does not mean
+ * the error that occurred. Note: A return value of kDNSX_NoError does not mean
* that DNS Proxy was successfully enabled. The callBack may asynchronously
- * return an error (such as kDNSX_DaemonNotRunning/ kDNSX_Engaged)
+ * return an error (such as kDNSX_DaemonNotRunning)
*
*/
@@ -109,7 +108,7 @@ DNSXErrorType DNSXEnableProxy
IfIndex outIfindex,
dispatch_queue_t clientq,
DNSXEnableProxyReply callBack
-);
+ );
/* DNSXRefDeAlloc()
*
@@ -121,4 +120,4 @@ DNSXErrorType DNSXEnableProxy
*/
void DNSXRefDeAlloc(DNSXConnRef connRef);
-#endif /* _DNS_SERVICES_H */
+#endif
diff --git a/mDNSResponder/mDNSMacOSX/Private/dns_xpc.h b/mDNSResponder/mDNSMacOSX/Private/dns_xpc.h
index 10ae01fa..4c961a84 100644
--- a/mDNSResponder/mDNSMacOSX/Private/dns_xpc.h
+++ b/mDNSResponder/mDNSMacOSX/Private/dns_xpc.h
@@ -26,8 +26,8 @@
typedef enum
{
- kDNSMsgReceived = 0,
- kDNSDaemonEngaged
+ kDNSMsg_NoError = 0,
+ kDNSMsg_BadArg
} DaemonReplyStatusCodes;
#endif // DNS_XPC_H
diff --git a/mDNSResponder/mDNSMacOSX/Private/xpc_services.c b/mDNSResponder/mDNSMacOSX/Private/xpc_services.c
index 7a0e29fb..fb357806 100644
--- a/mDNSResponder/mDNSMacOSX/Private/xpc_services.c
+++ b/mDNSResponder/mDNSMacOSX/Private/xpc_services.c
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 4 -*-
*
- * Copyright (c) 2012 Apple Inc. All rights reserved.
+ * Copyright (c) 2012-2015 Apple Inc. All rights reserved.
*
* xpc_services.c
* mDNSResponder
@@ -90,7 +90,7 @@ mDNSlocal void handle_dps_request(xpc_object_t req)
xpc_object_t reply = xpc_dictionary_create(NULL, NULL, 0);
if (reply)
{
- xpc_dictionary_set_uint64(reply, kDNSDaemonReply, kDNSDaemonEngaged);
+ xpc_dictionary_set_uint64(reply, kDNSDaemonReply, kDNSMsg_BadArg);
xpc_connection_send_message(remote_conn, reply);
xpc_release(reply);
}
@@ -104,12 +104,13 @@ mDNSlocal void handle_dps_request(xpc_object_t req)
return;
}
}
-
+
+
+ xpc_object_t response = xpc_dictionary_create_reply(req);
// Return Success Status to the client
- xpc_object_t response = xpc_dictionary_create(NULL, NULL, 0);
if (response)
{
- xpc_dictionary_set_uint64(response, kDNSDaemonReply, kDNSMsgReceived);
+ xpc_dictionary_set_uint64(response, kDNSDaemonReply, kDNSMsg_NoError);
xpc_connection_send_message(remote_conn, response);
xpc_release(response);
}
@@ -155,21 +156,26 @@ mDNSlocal mDNSBool IsEntitled(xpc_connection_t conn, const char *password)
LogMsg("IsEntitled: Client Entitlement is NULL");
}
+ if (!entitled)
+ LogMsg("IsEntitled: DNSProxyService Client is missing Entitlement!");
+
return entitled;
}
mDNSlocal void accept_dps_client(xpc_connection_t conn)
{
- uid_t euid;
- euid = xpc_connection_get_euid(conn);
+ uid_t c_euid;
+ int c_pid;
+ c_euid = xpc_connection_get_euid(conn);
+ c_pid = xpc_connection_get_pid(conn);
- if (euid != 0 || !IsEntitled(conn, kDNSProxyService))
+ if (c_euid != 0 || !IsEntitled(conn, kDNSProxyService))
{
- LogMsg("accept_dps_client: DNSProxyService Client Pid[%d] is missing Entitlement or is not root!", (int) xpc_connection_get_pid(conn));
+ LogMsg("accept_dps_client: DNSProxyService Client PID[%d] is missing Entitlement or is not running as root!", c_pid);
xpc_connection_cancel(conn);
return;
}
-
+
xpc_retain(conn);
xpc_connection_set_target_queue(conn, dps_queue);
xpc_connection_set_event_handler(conn, ^(xpc_object_t req_msg)
@@ -180,16 +186,16 @@ mDNSlocal void accept_dps_client(xpc_connection_t conn)
{
handle_dps_request(req_msg);
}
- // We hit the case below only if Client Terminated DPS Connection OR Crashed
- else
+ else // We hit this case ONLY if Client Terminated DPS Connection OR Crashed
{
LogInfo("accept_dps_client: DPS Client %p teared down the connection or Crashed", (void *) conn);
// Only the Client that has activated DPS should be able to terminate it
- if (((int)xpc_connection_get_pid(conn)) == dps_client_pid)
+ if (c_pid == dps_client_pid)
handle_dps_terminate();
xpc_release(conn);
}
});
+
xpc_connection_resume(conn);
}
@@ -215,8 +221,7 @@ mDNSlocal void init_dnsproxy_service(void)
LogInfo("init_dnsproxy_service: New DNSProxyService Client %p", eventmsg);
accept_dps_client(eventmsg);
}
- // Ideally, we would never hit the cases below
- else if (type == XPC_TYPE_ERROR)
+ else if (type == XPC_TYPE_ERROR) // Ideally, we would never hit these cases
{
LogMsg("init_dnsproxy_service: XPCError: %s", xpc_dictionary_get_string(eventmsg, XPC_ERROR_KEY_DESCRIPTION));
return;
@@ -227,6 +232,7 @@ mDNSlocal void init_dnsproxy_service(void)
return;
}
});
+
xpc_connection_resume(dps_listener);
}
diff --git a/mDNSResponder/mDNSMacOSX/SymptomReporter.c b/mDNSResponder/mDNSMacOSX/SymptomReporter.c
new file mode 100644
index 00000000..39ce0d41
--- /dev/null
+++ b/mDNSResponder/mDNSMacOSX/SymptomReporter.c
@@ -0,0 +1,187 @@
+/* -*- Mode: C; tab-width: 4 -*-
+ *
+ * Copyright (c) 2015 Apple Inc. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "mDNSEmbeddedAPI.h"
+
+#include <arpa/inet.h>
+#include <dlfcn.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <sys/socket.h>
+#include <Symptoms/SymptomReporter.h>
+
+#define SYMPTOM_REPORTER_mDNSResponder_NUMERIC_ID 101
+#define SYMPTOM_REPORTER_mDNSResponder_TEXT_ID "com.apple.mDNSResponder"
+
+#define SYMPTOM_DNS_NO_REPLIES 0x00065001
+#define SYMPTOM_DNS_RESUMED_RESPONDING 0x00065002
+
+static symptom_framework_t symptomReporter;
+static symptom_framework_t (*symptom_framework_init_f)(symptom_ident_t id, const char *originator_string) = mDNSNULL;
+static symptom_t (*symptom_new_f)(symptom_framework_t framework, symptom_ident_t id) = mDNSNULL;
+static int (*symptom_set_additional_qualifier_f)(symptom_t symptom, uint32_t qualifier_type, size_t qualifier_len, void *qualifier_data) = mDNSNULL;
+static int (*symptom_send_f)(symptom_t symptom) = mDNSNULL;
+
+mDNSlocal mStatus SymptomReporterInitCheck(void)
+{
+ mStatus err;
+ static mDNSBool isInitialized = mDNSfalse;
+ static void *symptomReporterLib = mDNSNULL;
+ static const char path[] = "/System/Library/PrivateFrameworks/Symptoms.framework/Frameworks/SymptomReporter.framework/SymptomReporter";
+
+ if (!isInitialized)
+ {
+ if (!symptomReporterLib)
+ {
+ symptomReporterLib = dlopen(path, RTLD_LAZY | RTLD_LOCAL);
+ if (!symptomReporterLib)
+ goto exit;
+ }
+
+ if (!symptom_framework_init_f)
+ {
+ symptom_framework_init_f = dlsym(symptomReporterLib, "symptom_framework_init");
+ if (!symptom_framework_init_f)
+ goto exit;
+ }
+
+ if (!symptom_new_f)
+ {
+ symptom_new_f = dlsym(symptomReporterLib, "symptom_new");
+ if (!symptom_new_f)
+ goto exit;
+ }
+
+ if (!symptom_set_additional_qualifier_f)
+ {
+ symptom_set_additional_qualifier_f = dlsym(symptomReporterLib, "symptom_set_additional_qualifier");
+ if (!symptom_set_additional_qualifier_f)
+ goto exit;
+ }
+
+ if (!symptom_send_f)
+ {
+ symptom_send_f = dlsym(symptomReporterLib, "symptom_send");
+ if (!symptom_send_f)
+ goto exit;
+ }
+
+ symptomReporter = symptom_framework_init_f(SYMPTOM_REPORTER_mDNSResponder_NUMERIC_ID, SYMPTOM_REPORTER_mDNSResponder_TEXT_ID);
+ isInitialized = mDNStrue;
+ }
+
+exit:
+ err = isInitialized ? mStatus_NoError : mStatus_NotInitializedErr;
+ return err;
+}
+
+mDNSlocal mStatus SymptomReporterReportDNSReachability(const mDNSAddr *addr, mDNSBool isReachable)
+{
+ mStatus err;
+ symptom_t symptom;
+ struct sockaddr_storage sockAddr;
+ size_t sockAddrSize;
+
+ LogInfo("SymptomReporterReportDNSReachability: DNS server %#a is %sreachable", addr, isReachable ? "" : "un");
+
+ if (addr->type == mDNSAddrType_IPv4)
+ {
+ struct sockaddr_in *sin = (struct sockaddr_in *)&sockAddr;
+ sockAddrSize = sizeof(*sin);
+ mDNSPlatformMemZero(sin, sockAddrSize);
+ sin->sin_len = sockAddrSize;
+ sin->sin_family = AF_INET;
+ sin->sin_addr.s_addr = addr->ip.v4.NotAnInteger;
+ }
+ else if (addr->type == mDNSAddrType_IPv6)
+ {
+ struct sockaddr_in6* sin6 = (struct sockaddr_in6*)&sockAddr;
+ sockAddrSize = sizeof(*sin6);
+ mDNSPlatformMemZero(sin6, sockAddrSize);
+ sin6->sin6_len = sockAddrSize;
+ sin6->sin6_family = AF_INET6;
+ sin6->sin6_addr = *(struct in6_addr *)&addr->ip.v6;
+ }
+ else
+ {
+ LogMsg("SymptomReporterReportDNSReachability: addr is not an IPv4 or IPv6 address!");
+ err = mStatus_BadParamErr;
+ goto exit;
+ }
+
+ symptom = symptom_new_f(symptomReporter, isReachable ? SYMPTOM_DNS_RESUMED_RESPONDING : SYMPTOM_DNS_NO_REPLIES);
+ symptom_set_additional_qualifier_f(symptom, 1, sockAddrSize, (void *)&sockAddr);
+ symptom_send_f(symptom);
+ err = mStatus_NoError;
+
+exit:
+ return err;
+}
+
+mDNSexport mStatus SymptomReporterDNSServerReachable(mDNS *const m, const mDNSAddr *addr)
+{
+ mStatus err;
+ DNSServer *s;
+ mDNSBool found = mDNSfalse;
+
+ err = SymptomReporterInitCheck();
+ if (err != mStatus_NoError)
+ goto exit;
+
+ for (s = m->DNSServers; s; s = s->next)
+ {
+ if (s->flags & DNSServer_FlagDelete)
+ continue;
+ if ((s->flags & DNSServer_FlagUnreachable) && mDNSSameAddress(addr, &s->addr))
+ {
+ s->flags &= ~DNSServer_FlagUnreachable;
+ NumUnreachableDNSServers--;
+ found = mDNStrue;
+ }
+ }
+
+ if (!found)
+ {
+ err = mStatus_NoSuchNameErr;
+ goto exit;
+ }
+
+ err = SymptomReporterReportDNSReachability(addr, mDNStrue);
+
+exit:
+ return err;
+}
+
+mDNSexport mStatus SymptomReporterDNSServerUnreachable(DNSServer *s)
+{
+ mStatus err;
+
+ err = SymptomReporterInitCheck();
+ if (err != mStatus_NoError)
+ goto exit;
+
+ if ((s->flags & DNSServer_FlagDelete) || (s->flags & DNSServer_FlagUnreachable))
+ goto exit;
+
+ s->flags |= DNSServer_FlagUnreachable;
+ NumUnreachableDNSServers++;
+
+ err = SymptomReporterReportDNSReachability(&s->addr, mDNSfalse);
+
+exit:
+ return err;
+}
diff --git a/mDNSResponder/mDNSMacOSX/base.xcconfig b/mDNSResponder/mDNSMacOSX/base.xcconfig
deleted file mode 100644
index 28d9c732..00000000
--- a/mDNSResponder/mDNSMacOSX/base.xcconfig
+++ /dev/null
@@ -1,2 +0,0 @@
-PUBLIC_HEADERS_FOLDER_PATH = /usr/include
-PRIVATE_HEADERS_FOLDER_PATH = /usr/local/include
diff --git a/mDNSResponder/mDNSMacOSX/LaunchDaemonInfo.dnsextd.plist b/mDNSResponder/mDNSMacOSX/com.apple.dnsextd.plist
index e31b391f..e31b391f 100644
--- a/mDNSResponder/mDNSMacOSX/LaunchDaemonInfo.dnsextd.plist
+++ b/mDNSResponder/mDNSMacOSX/com.apple.dnsextd.plist
diff --git a/mDNSResponder/mDNSMacOSX/LaunchDaemonInfo.plist b/mDNSResponder/mDNSMacOSX/com.apple.mDNSResponder.plist
index 4226c795..8f5a6408 100644
--- a/mDNSResponder/mDNSMacOSX/LaunchDaemonInfo.plist
+++ b/mDNSResponder/mDNSMacOSX/com.apple.mDNSResponder.plist
@@ -20,8 +20,8 @@
<dict>
<key>com.apple.mDNSResponder</key>
<true/>
- <key>com.apple.mDNSResponder.dnsproxy</key>
- <true/>
+ <key>com.apple.mDNSResponder.dnsproxy</key>
+ <true/>
</dict>
<key>Sockets</key>
<dict>
@@ -35,11 +35,9 @@
<integer>438</integer>
</dict>
</dict>
- <key>EnableTransactions</key>
- <true/>
- <key>BeginTransactionAtShutdown</key>
- <true/>
<key>POSIXSpawnType</key>
<string>Interactive</string>
+ <key>EnablePressuredExit</key>
+ <false/>
</dict>
</plist>
diff --git a/mDNSResponder/mDNSMacOSX/LaunchDaemonInfo.helper.plist b/mDNSResponder/mDNSMacOSX/com.apple.mDNSResponderHelper.plist
index 09b61e08..f1e3027b 100644
--- a/mDNSResponder/mDNSMacOSX/LaunchDaemonInfo.helper.plist
+++ b/mDNSResponder/mDNSMacOSX/com.apple.mDNSResponderHelper.plist
@@ -15,10 +15,6 @@
<key>com.apple.mDNSResponderHelper</key>
<true/>
</dict>
- <key>EnableTransactions</key>
- <true/>
- <key>BeginTransactionAtShutdown</key>
- <true/>
<key>POSIXSpawnType</key>
<string>Interactive</string>
</dict>
diff --git a/mDNSResponder/mDNSMacOSX/daemon.c b/mDNSResponder/mDNSMacOSX/daemon.c
index 1b257ea2..c1cabb1a 100644
--- a/mDNSResponder/mDNSMacOSX/daemon.c
+++ b/mDNSResponder/mDNSMacOSX/daemon.c
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 4 -*-
*
- * Copyright (c) 2002-2011 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2002-2015 Apple Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +13,6 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
*/
#include <mach/mach.h>
@@ -26,7 +25,6 @@
#include <fcntl.h>
#include <launch.h>
#include <launch_priv.h> // for launch_socket_service_check_in()
-#include <vproc.h>
#include <pwd.h>
#include <sys/event.h>
#include <pthread.h>
@@ -51,16 +49,33 @@
#include "../mDNSMacOSX/DNSServiceDiscovery.h"
#include "helper.h"
+#if TARGET_OS_EMBEDDED
+#include "Metrics.h"
+#endif
+
static aslclient log_client = NULL;
static aslmsg log_msg = NULL;
-// Used on Embedded Side for Reading mDNSResponder Managed Preferences Profile
+// Used on iOS ONLY for reading mDNSResponder Managed Preferences Profile
#if TARGET_OS_EMBEDDED
#define kmDNSEnableLoggingStr CFSTR("EnableLogging")
#define kmDNSResponderPrefIDStr "com.apple.mDNSResponder.plist"
#define kmDNSResponderPrefID CFSTR(kmDNSResponderPrefIDStr)
#endif
+
+// Used on OSX(10.11.x onwards) for manipulating mDNSResponder program arguments
+#if APPLE_OSX_mDNSResponder && !TARGET_OS_EMBEDDED
+// plist file to read the user's preferences
+#define kProgramArguments CFSTR("/Library/Preferences/com.apple.mDNSResponder.plist")
+// possible arguments for external customers
+#define kDebugLogging CFSTR("DebugLogging")
+#define kUnicastPacketLogging CFSTR("UnicastPacketLogging")
+#define kAlwaysAppendSearchDomains CFSTR("AlwaysAppendSearchDomains")
+#define kNoMulticastAdvertisements CFSTR("NoMulticastAdvertisements")
+#define kStrictUnicastOrdering CFSTR("StrictUnicastOrdering")
+#endif
+
//*************************************************************************************************************
#if COMPILER_LIKES_PRAGMA_MARK
#pragma mark - Globals
@@ -68,12 +83,13 @@ static aslmsg log_msg = NULL;
static mDNS_PlatformSupport PlatformStorage;
-// Start off with a default cache of 16K (99 records)
-// Each time we grow the cache we add another 99 records
-// 99 * 164 = 16236 bytes.
-// This fits in four 4kB pages, with 148 bytes spare for memory block headers and similar overhead
-#define RR_CACHE_SIZE ((16*1024) / sizeof(CacheRecord))
+// Start off with a default cache of 32K (141 records of 232 bytes each)
+// Each time we grow the cache we add another 141 records
+// 141 * 164 = 32712 bytes.
+// This fits in eight 4kB pages, with 56 bytes spare for memory block headers and similar overhead
+#define RR_CACHE_SIZE ((32*1024) / sizeof(CacheRecord))
static CacheEntity rrcachestorage[RR_CACHE_SIZE];
+struct CompileTimeAssertionChecks_RR_CACHE_SIZE { char a[(RR_CACHE_SIZE >= 141) ? 1 : -1]; };
static mach_port_t m_port = MACH_PORT_NULL;
@@ -85,7 +101,7 @@ static mach_port_t signal_port = MACH_PORT_NULL;
#endif // MDNSRESPONDER_USES_LIB_DISPATCH_AS_PRIMARY_EVENT_LOOP_MECHANISM
static dnssd_sock_t *launchd_fds = mDNSNULL;
-static mDNSu32 launchd_fds_count = 0;
+static size_t launchd_fds_count = 0;
// mDNS Mach Message Timeout, in milliseconds.
// We need this to be short enough that we don't deadlock the mDNSResponder if a client
@@ -214,22 +230,16 @@ static KQSocketEventSource *gEventSources;
char _malloc_options[] = "AXZ";
-mDNSexport void LogMemCorruption(const char *format, ...)
-{
- char buffer[512];
- va_list ptr;
- va_start(ptr,format);
- buffer[mDNS_vsnprintf((char *)buffer, sizeof(buffer), format, ptr)] = 0;
- va_end(ptr);
- LogMsg("!!!! %s !!!!", buffer);
- NotifyOfElusiveBug("Memory Corruption", buffer);
-#if ForceAlerts
- *(long*)0 = 0; // Trick to crash and get a stack trace right here, if that's what we want
+mDNSlocal void validatelists(mDNS *const m, bool checkCRActiveQuestion)
+{
+#if TARGET_OS_WATCH
+ mDNSu32 NumAllInterfaceRecords = 0;
+ mDNSu32 NumAllInterfaceQuestions = 0;
+#else
+ mDNSu32 NumAllInterfaceRecords = 1;
+ mDNSu32 NumAllInterfaceQuestions = 1;
#endif
-}
-mDNSlocal void validatelists(mDNS *const m)
-{
// Check local lists
KQSocketEventSource *k;
for (k = gEventSources; k; k=k->next)
@@ -269,11 +279,15 @@ mDNSlocal void validatelists(mDNS *const m)
if (rr->resrec.name != &rr->namestorage)
LogMemCorruption("ResourceRecords list: %p name %p does not point to namestorage %p %##s",
rr, rr->resrec.name->c, rr->namestorage.c, rr->namestorage.c);
+ if (!AuthRecord_uDNS(rr) && !RRLocalOnly(rr)) NumAllInterfaceRecords++;
}
for (rr = m->DuplicateRecords; rr; rr=rr->next)
+ {
if (rr->next == (AuthRecord *)~0 || rr->resrec.RecordType == 0 || rr->resrec.RecordType == 0xFF)
LogMemCorruption("DuplicateRecords list: %p is garbage (%X)", rr, rr->resrec.RecordType);
+ if (!AuthRecord_uDNS(rr) && !RRLocalOnly(rr)) NumAllInterfaceRecords++;
+ }
rr = m->NewLocalRecords;
if (rr)
@@ -287,20 +301,26 @@ mDNSlocal void validatelists(mDNS *const m)
DNSQuestion *q;
for (q = m->Questions; q; q=q->next)
+ {
if (q->next == (DNSQuestion*)~0 || q->ThisQInterval == (mDNSs32) ~0)
LogMemCorruption("Questions list: %p is garbage (%lX %p)", q, q->ThisQInterval, q->next);
+ if (q->InterfaceID != mDNSInterface_LocalOnly && q->InterfaceID != mDNSInterface_P2P && mDNSOpaque16IsZero(q->TargetQID))
+ NumAllInterfaceQuestions++;
+ }
- CacheGroup *cg;
- CacheRecord *cr;
- mDNSu32 slot;
- FORALL_CACHERECORDS(slot, cg, cr)
- {
- if (cr->resrec.RecordType == 0 || cr->resrec.RecordType == 0xFF)
- LogMemCorruption("Cache slot %lu: %p is garbage (%X)", slot, cr, cr->resrec.RecordType);
- if (cr->CRActiveQuestion)
+ if (checkCRActiveQuestion) {
+ CacheGroup *cg;
+ CacheRecord *cr;
+ mDNSu32 slot;
+ FORALL_CACHERECORDS(slot, cg, cr)
{
- for (q = m->Questions; q; q=q->next) if (q == cr->CRActiveQuestion) break;
- if (!q) LogMemCorruption("Cache slot %lu: CRActiveQuestion %p not in m->Questions list %s", slot, cr->CRActiveQuestion, CRDisplayString(m, cr));
+ if (cr->resrec.RecordType == 0 || cr->resrec.RecordType == 0xFF)
+ LogMemCorruption("Cache slot %lu: %p is garbage (%X)", slot, cr, cr->resrec.RecordType);
+ if (cr->CRActiveQuestion)
+ {
+ for (q = m->Questions; q; q=q->next) if (q == cr->CRActiveQuestion) break;
+ if (!q) LogMemCorruption("Cache slot %lu: CRActiveQuestion %p not in m->Questions list %s", slot, cr->CRActiveQuestion, CRDisplayString(m, cr));
+ }
}
}
@@ -317,6 +337,14 @@ mDNSlocal void validatelists(mDNS *const m)
for (t = m->TunnelClients; t; t=t->next)
if (t->next == (ClientTunnel *)~0 || t->dstname.c[0] > 63)
LogMemCorruption("m->TunnelClients: %p is garbage (%d)", t, t->dstname.c[0]);
+
+#if TARGET_OS_WATCH
+ if (m->NumAllInterfaceRecords != NumAllInterfaceRecords)
+ LogMemCorruption("NumAllInterfaceRecords is %d should be %d", m->NumAllInterfaceRecords, NumAllInterfaceRecords);
+
+ if (m->NumAllInterfaceQuestions != NumAllInterfaceQuestions)
+ LogMemCorruption("NumAllInterfaceQuestions is %d should be %d", m->NumAllInterfaceQuestions, NumAllInterfaceQuestions);
+#endif
}
mDNSexport void *mallocL(char *msg, unsigned int size)
@@ -327,13 +355,13 @@ mDNSexport void *mallocL(char *msg, unsigned int size)
{ LogMsg("malloc( %s : %d ) failed", msg, size); return(NULL); }
else
{
- if (size > 24000) LogMsg("malloc( %s : %lu ) = %p suspiciously large", msg, size, &mem[2]);
- else if (MACOSX_MDNS_MALLOC_DEBUGGING >= 2) LogMsg("malloc( %s : %lu ) = %p", msg, size, &mem[2]);
+ if (size > 32768) LogMsg("malloc( %s : %lu ) @ %p suspiciously large", msg, size, &mem[2]);
+ else if (MACOSX_MDNS_MALLOC_DEBUGGING >= 2) LogMsg("malloc( %s : %lu ) @ %p", msg, size, &mem[2]);
mem[0] = 0xDEAD1234;
mem[1] = size;
//mDNSPlatformMemZero(&mem[2], size);
memset(&mem[2], 0xFF, size);
- validatelists(&mDNSStorage);
+ validatelists(&mDNSStorage, true);
return(&mem[2]);
}
}
@@ -345,12 +373,13 @@ mDNSexport void freeL(char *msg, void *x)
else
{
mDNSu32 *mem = ((mDNSu32 *)x) - 2;
- if (mem[0] != 0xDEAD1234) { LogMsg("free( %s @ %p ) !!!! NOT ALLOCATED !!!!", msg, &mem[2]); return; }
- if (mem[1] > 24000) LogMsg("free( %s : %ld @ %p) suspiciously large", msg, mem[1], &mem[2]);
- else if (MACOSX_MDNS_MALLOC_DEBUGGING >= 2) LogMsg("free( %s : %ld @ %p)", msg, mem[1], &mem[2]);
- //mDNSPlatformMemZero(mem, sizeof(mDNSu32) * 2 + mem[1]);
- memset(mem, 0xFF, sizeof(mDNSu32) * 2 + mem[1]);
- validatelists(&mDNSStorage);
+ if (mem[0] == 0xDEADDEAD) { LogMemCorruption("free( %s : %lu @ %p ) !!!! ALREADY DISPOSED !!!!", msg, mem[1], &mem[2]); return; }
+ if (mem[0] != 0xDEAD1234) { LogMemCorruption("free( %s : %lu @ %p ) !!!! NEVER ALLOCATED !!!!", msg, mem[1], &mem[2]); return; }
+ if (mem[1] > 32768) LogMsg("free( %s : %lu @ %p) suspiciously large", msg, mem[1], &mem[2]);
+ else if (MACOSX_MDNS_MALLOC_DEBUGGING >= 2) LogMsg("free( %s : %ld @ %p)", msg, mem[1], &mem[2]);
+ mem[0] = 0xDEADDEAD;
+ memset(mem+2, 0xFF, mem[1]);
+ validatelists(&mDNSStorage, false);
free(mem);
}
}
@@ -1272,6 +1301,8 @@ mDNSlocal void mDNSPreferencesSetNames(mDNS *const m, int key, domainlabel *old,
!SameDomainLabelCS(old->c, prevold->c) ||
!SameDomainLabelCS(new->c, prevnew->c))
{
+// Work around bug radar:21397654
+#ifndef __clang_analyzer__
if (old)
*prevold = *old;
else
@@ -1280,6 +1311,7 @@ mDNSlocal void mDNSPreferencesSetNames(mDNS *const m, int key, domainlabel *old,
*prevnew = *new;
else
prevnew->c[0] = 0;
+#endif
mDNSPreferencesSetName(key, old, new);
}
else
@@ -1319,6 +1351,12 @@ mDNSlocal void mDNS_StatusCallback(mDNS *const m, mStatus result)
else if (result == mStatus_GrowCache)
{
// Allocate another chunk of cache storage
+ static unsigned int allocated = 0;
+#if TARGET_OS_IPHONE
+ if (allocated >= 1000000) return; // For now we limit the cache to at most 1MB on iOS devices
+#endif
+ allocated += sizeof(CacheEntity) * RR_CACHE_SIZE;
+ // LogMsg("GrowCache %d * %d = %d; total so far %6u", sizeof(CacheEntity), RR_CACHE_SIZE, sizeof(CacheEntity) * RR_CACHE_SIZE, allocated);
CacheEntity *storage = mallocL("mStatus_GrowCache", sizeof(CacheEntity) * RR_CACHE_SIZE);
//LogInfo("GrowCache %d * %d = %d", sizeof(CacheEntity), RR_CACHE_SIZE, sizeof(CacheEntity) * RR_CACHE_SIZE);
if (storage) mDNS_GrowCache(m, storage, RR_CACHE_SIZE);
@@ -1454,7 +1492,7 @@ mDNSlocal mStatus UpdateRecord(ServiceRecordSet *srs, mach_port_t client, AuthRe
{
errormsg = "mDNS_Update";
freeL("RData", newrdata);
- return err;
+ goto fail;
}
return(mStatus_NoError);
@@ -1544,6 +1582,7 @@ mDNSexport kern_return_t provide_DNSServiceRegistrationRemoveRecord_rpc(mach_por
if ((natural_t)e->ClientID == reference)
{
err = RemoveRecord(&si->srs, e, client);
+ if (err) { errormsg = "RemoveRecord failed"; goto fail; }
break;
}
}
@@ -1708,6 +1747,7 @@ mDNSlocal void HandleSIG(int sig)
mDNSlocal void INFOCallback(void)
{
mDNSs32 utc = mDNSPlatformUTC();
+ const mDNSs32 now = mDNS_TimeNow(&mDNSStorage);
NetworkInterfaceInfoOSX *i;
DNSServer *s;
McastResolver *mr;
@@ -1720,6 +1760,14 @@ mDNSlocal void INFOCallback(void)
LogMsg("---- BEGIN STATE LOG ---- %s %s %d", mDNSResponderVersionString, OSXVers ? "OSXVers" : "iOSVers", OSXVers ? OSXVers : iOSVers);
udsserver_info(&mDNSStorage);
+
+ LogMsgNoIdent("----- Platform Timers -----");
+ LogTimer("m->NextCacheCheck ", mDNSStorage.NextCacheCheck);
+ LogTimer("m->NetworkChanged ", mDNSStorage.NetworkChanged);
+ LogTimer("m->p->NotifyUser ", mDNSStorage.p->NotifyUser);
+ LogTimer("m->p->HostNameConflict ", mDNSStorage.p->HostNameConflict);
+ LogTimer("m->p->KeyChainTimer ", mDNSStorage.p->KeyChainTimer);
+
xpcserver_info(&mDNSStorage);
LogMsgNoIdent("----- KQSocketEventSources -----");
@@ -1787,7 +1835,7 @@ mDNSlocal void INFOCallback(void)
s->DNSSECAware ? "DNSSECAware" : "!DNSSECAware");
}
}
- mDNSs32 now = mDNS_TimeNow(&mDNSStorage);
+
LogMsgNoIdent("v4answers %d", mDNSStorage.p->v4answers);
LogMsgNoIdent("v6answers %d", mDNSStorage.p->v6answers);
LogMsgNoIdent("Last DNS Trigger: %d ms ago", (now - mDNSStorage.p->DNSTrigger));
@@ -1800,6 +1848,9 @@ mDNSlocal void INFOCallback(void)
LogMsgNoIdent("Mcast Resolver %##s timeout %u", mr->domain.c, mr->timeout);
}
+#if TARGET_OS_EMBEDDED
+ LogMetrics();
+#endif
LogMsgNoIdent("Timenow 0x%08lX (%d)", (mDNSu32)now, now);
LogMsg("---- END STATE LOG ---- %s %s %d", mDNSResponderVersionString, OSXVers ? "OSXVers" : "iOSVers", OSXVers ? OSXVers : iOSVers);
@@ -1963,10 +2014,6 @@ mDNSlocal void SignalCallback(CFMachPortRef port, void *msg, CFIndex size, void
KQueueLock(m);
switch(msg_header->msgh_id)
{
- case SIGURG:
- m->mDNSOppCaching = m->mDNSOppCaching ? mDNSfalse : mDNStrue;
- LogMsg("SIGURG: Opportunistic Caching %s", m->mDNSOppCaching ? "Enabled" : "Disabled");
- // FALL THROUGH to purge the cache so that we re-do the caching based on the new setting
case SIGHUP: {
mDNSu32 slot;
CacheGroup *cg;
@@ -2144,7 +2191,6 @@ mDNSlocal kern_return_t mDNSDaemonInitialize(void)
mDNSSetupSignal(queue, SIGINFO);
mDNSSetupSignal(queue, SIGUSR1);
mDNSSetupSignal(queue, SIGUSR2);
- mDNSSetupSignal(queue, SIGURG);
// Create a custom handler for doing the housekeeping work. This is either triggered
// by the timer or an event source
@@ -2197,16 +2243,16 @@ mDNSlocal mDNSs32 mDNSDaemonIdle(mDNS *const m)
// mDNS_Execute() generates packets, including multicasts that are looped back to ourself.
// If we call mDNS_Execute() first, and generate packets, and then call mDNSMacOSXNetworkChanged() immediately afterwards
// we then systematically lose our own looped-back packets.
- if (m->p->NetworkChanged && now - m->p->NetworkChanged >= 0) mDNSMacOSXNetworkChanged(m);
+ if (m->NetworkChanged && now - m->NetworkChanged >= 0) mDNSMacOSXNetworkChanged(m);
if (m->p->RequestReSleep && now - m->p->RequestReSleep >= 0) { m->p->RequestReSleep = 0; mDNSPowerRequest(0, 0); }
// 3. Call mDNS_Execute() to let mDNSCore do what it needs to do
mDNSs32 nextevent = mDNS_Execute(m);
- if (m->p->NetworkChanged)
- if (nextevent - m->p->NetworkChanged > 0)
- nextevent = m->p->NetworkChanged;
+ if (m->NetworkChanged)
+ if (nextevent - m->NetworkChanged > 0)
+ nextevent = m->NetworkChanged;
if (m->p->KeyChainTimer)
if (nextevent - m->p->KeyChainTimer > 0)
@@ -2411,6 +2457,7 @@ mDNSlocal mDNSBool AllowSleepNow(mDNS *const m, mDNSs32 now)
//interval = 48; // For testing
+#if !TARGET_OS_EMBEDDED
#ifdef kIOPMAcknowledgmentOptionSystemCapabilityRequirements
if (m->p->IOPMConnection) // If lightweight-wake capability is available, use that
{
@@ -2423,7 +2470,7 @@ mDNSlocal mDNSBool AllowSleepNow(mDNS *const m, mDNSs32 now)
if (!Requirements) LogMsg("ScheduleNextWake: CFNumberCreate failed");
else
{
- const void *OptionKeys[2] = { CFSTR("WakeDate"), CFSTR("Requirements") };
+ const void *OptionKeys[2] = { kIOPMAckDHCPRenewWakeDate, kIOPMAckSystemCapabilityRequirements };
const void *OptionVals[2] = { WakeDate, Requirements };
opts = CFDictionaryCreate(NULL, (void*)OptionKeys, (void*)OptionVals, 2, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
if (!opts) LogMsg("ScheduleNextWake: CFDictionaryCreate failed");
@@ -2434,7 +2481,8 @@ mDNSlocal mDNSBool AllowSleepNow(mDNS *const m, mDNSs32 now)
LogSPS("AllowSleepNow: Will request lightweight wakeup in %d seconds", interval);
}
else // else schedule the wakeup using the old API instead to
-#endif
+#endif // kIOPMAcknowledgmentOptionSystemCapabilityRequirements
+#endif // TARGET_OS_EMBEDDED
{
// If we wake within +/- 30 seconds of our requested time we'll assume the system woke for us,
// so we should put it back to sleep. To avoid frustrating the user, we always request at least
@@ -2594,9 +2642,9 @@ mDNSlocal void KQWokenFlushBytes(int fd, __unused short filter, __unused void *c
mDNSlocal void SetLowWater(const KQSocketSet *const k, const int r)
{
- if (setsockopt(k->sktv4, SOL_SOCKET, SO_RCVLOWAT, &r, sizeof(r)) < 0)
+ if (k->sktv4 >=0 && setsockopt(k->sktv4, SOL_SOCKET, SO_RCVLOWAT, &r, sizeof(r)) < 0)
LogMsg("SO_RCVLOWAT IPv4 %d error %d errno %d (%s)", k->sktv4, r, errno, strerror(errno));
- if (setsockopt(k->sktv6, SOL_SOCKET, SO_RCVLOWAT, &r, sizeof(r)) < 0)
+ if (k->sktv6 >=0 && setsockopt(k->sktv6, SOL_SOCKET, SO_RCVLOWAT, &r, sizeof(r)) < 0)
LogMsg("SO_RCVLOWAT IPv6 %d error %d errno %d (%s)", k->sktv6, r, errno, strerror(errno));
}
@@ -2634,6 +2682,10 @@ mDNSlocal void * KQueueLoop(void *m_param)
if (end - start >= WatchDogReportingThreshold)
LogInfo("WARNING: Idle task took %dms to complete", end - start);
+#if APPLE_OSX_mDNSResponder && MACOSX_MDNS_MALLOC_DEBUGGING >= 1
+ validatelists(m, true);
+#endif
+
mDNSs32 now = mDNS_TimeNow(m);
if (m->ShutdownTime)
@@ -2761,53 +2813,8 @@ mDNSlocal void * KQueueLoop(void *m_param)
mDNSlocal void LaunchdCheckin(void)
{
// Ask launchd for our socket
- launch_data_t resp_sd = launch_socket_service_check_in();
- if (!resp_sd)
- {
- LogMsg("launch_socket_service_check_in returned NULL");
- return;
- }
- else
- {
- launch_data_t skts = launch_data_dict_lookup(resp_sd, LAUNCH_JOBKEY_SOCKETS);
- if (!skts) LogMsg("launch_data_dict_lookup LAUNCH_JOBKEY_SOCKETS returned NULL");
- else
- {
- launch_data_t skt = launch_data_dict_lookup(skts, "Listeners");
- if (!skt) LogMsg("launch_data_dict_lookup Listeners returned NULL");
- else
- {
- launchd_fds_count = launch_data_array_get_count(skt);
- if (launchd_fds_count == 0) LogMsg("launch_data_array_get_count(skt) returned 0");
- else
- {
- launchd_fds = mallocL("LaunchdCheckin", sizeof(dnssd_sock_t) * launchd_fds_count);
- if (!launchd_fds) LogMsg("LaunchdCheckin: malloc failed");
- else
- {
- size_t i;
- for(i = 0; i < launchd_fds_count; i++)
- {
- launch_data_t s = launch_data_array_get_index(skt, i);
- if (!s)
- {
- launchd_fds[i] = dnssd_InvalidSocket;
- LogMsg("launch_data_array_get_index(skt, %d) returned NULL", i);
- }
- else
- {
- launchd_fds[i] = launch_data_get_fd(s);
- LogInfo("Launchd Unix Domain Socket [%d]: %d", i, launchd_fds[i]);
- }
- }
- }
- // In some early versions of 10.4.x, the permissions on the UDS were not set correctly, so we fix them here
- chmod(MDNS_UDS_SERVERPATH, S_IRUSR|S_IWUSR | S_IRGRP|S_IWGRP | S_IROTH|S_IWOTH);
- }
- }
- }
- }
- launch_data_free(resp_sd);
+ int result = launch_activate_socket("Listeners", &launchd_fds, &launchd_fds_count);
+ if (result != 0) { LogMsg("launch_activate_socket() failed errno %d (%s)", errno, strerror(errno)); }
}
static mach_port_t RegisterMachService(const char *service_name)
@@ -2838,19 +2845,22 @@ mDNSexport int main(int argc, char **argv)
int i;
kern_return_t status;
+ log_client = asl_open(NULL, "mDNSResponder", 0);
+ log_msg = asl_new(ASL_TYPE_MSG);
+
mDNSMacOSXSystemBuildNumber(NULL);
LogMsg("%s starting %s %d", mDNSResponderVersionString, OSXVers ? "OSXVers" : "iOSVers", OSXVers ? OSXVers : iOSVers);
#if 0
- LogMsg("CacheRecord %d", sizeof(CacheRecord));
- LogMsg("CacheGroup %d", sizeof(CacheGroup));
- LogMsg("ResourceRecord %d", sizeof(ResourceRecord));
- LogMsg("RData_small %d", sizeof(RData_small));
-
- LogMsg("sizeof(CacheEntity) %d", sizeof(CacheEntity));
- LogMsg("RR_CACHE_SIZE %d", RR_CACHE_SIZE);
- LogMsg("block usage %d", sizeof(CacheEntity) * RR_CACHE_SIZE);
- LogMsg("block wastage %d", 16*1024 - sizeof(CacheEntity) * RR_CACHE_SIZE);
+ LogMsg("CacheRecord %5d", sizeof(CacheRecord));
+ LogMsg("CacheGroup %5d", sizeof(CacheGroup));
+ LogMsg("ResourceRecord %5d", sizeof(ResourceRecord));
+ LogMsg("RData_small %5d", sizeof(RData_small));
+
+ LogMsg("sizeof(CacheEntity) %5d", sizeof(CacheEntity));
+ LogMsg("RR_CACHE_SIZE %5d", RR_CACHE_SIZE);
+ LogMsg("block bytes used %5d", sizeof(CacheEntity) * RR_CACHE_SIZE);
+ LogMsg("block bytes wasted %5d", 32*1024 - sizeof(CacheEntity) * RR_CACHE_SIZE);
#endif
if (0 == geteuid())
@@ -2874,8 +2884,76 @@ mDNSexport int main(int argc, char **argv)
if (!strcasecmp(argv[i], "-AlwaysAppendSearchDomains")) AlwaysAppendSearchDomains = mDNStrue;
}
+
+#if APPLE_OSX_mDNSResponder && !TARGET_OS_EMBEDDED
+/* Reads the external user's program arguments for mDNSResponder starting 10.11.x(El Capitan) on OSX. The options for external user are:
+ DebugLogging, UnicastPacketLogging, NoMulticastAdvertisements, StrictUnicastOrdering and AlwaysAppendSearchDomains
+
+ To turn ON the particular option, here is what the user should do (as an example of setting two options)
+ 1] sudo defaults write /Library/Preferences/com.apple.mDNSResponder.plist AlwaysAppendSearchDomains -bool YES
+ 2] sudo defaults write /Library/Preferences/com.apple.mDNSResponder.plist NoMulticastAdvertisements -bool YES
+ 3] sudo reboot
+
+ To turn OFF all options, here is what the user should do
+ 1] sudo defaults delete /Library/Preferences/com.apple.mDNSResponder.plist
+ 2] sudo reboot
+
+ To view the current options set, here is what the user should do
+ 1] plutil -p /Library/Preferences/com.apple.mDNSResponder.plist
+ OR
+ 1] sudo defaults read /Library/Preferences/com.apple.mDNSResponder.plist
+
+*/
+ CFBooleanRef enabled = NULL;
+
+ enabled = CFPreferencesCopyValue(kDebugLogging, kProgramArguments, kCFPreferencesCurrentUser, kCFPreferencesCurrentHost);
+ if (enabled != NULL)
+ {
+ if ((CFGetTypeID(enabled) == CFBooleanGetTypeID()) && CFBooleanGetValue(enabled))
+ mDNS_LoggingEnabled = mDNStrue;
+ CFRelease(enabled);
+ }
+
+ enabled = CFPreferencesCopyValue(kUnicastPacketLogging, kProgramArguments, kCFPreferencesCurrentUser, kCFPreferencesCurrentHost);
+ if (enabled != NULL)
+ {
+ if ((CFGetTypeID(enabled) == CFBooleanGetTypeID()) && CFBooleanGetValue(enabled))
+ mDNS_PacketLoggingEnabled = mDNStrue;
+ CFRelease(enabled);
+ }
+
+ enabled = CFPreferencesCopyValue(kNoMulticastAdvertisements, kProgramArguments, kCFPreferencesCurrentUser, kCFPreferencesCurrentHost);
+ if (enabled != NULL)
+ {
+ if ((CFGetTypeID(enabled) == CFBooleanGetTypeID()) && CFBooleanGetValue(enabled))
+ advertise = mDNS_Init_DontAdvertiseLocalAddresses;
+ CFRelease(enabled);
+ }
+
+ enabled = CFPreferencesCopyValue(kStrictUnicastOrdering, kProgramArguments, kCFPreferencesCurrentUser, kCFPreferencesCurrentHost);
+ if (enabled != NULL)
+ {
+ if ((CFGetTypeID(enabled) == CFBooleanGetTypeID()) && CFBooleanGetValue(enabled))
+ StrictUnicastOrdering = mDNStrue;
+ CFRelease(enabled);
+ }
+
+ enabled = CFPreferencesCopyValue(kAlwaysAppendSearchDomains, kProgramArguments, kCFPreferencesCurrentUser, kCFPreferencesCurrentHost);
+ if (enabled != NULL)
+ {
+ if ((CFGetTypeID(enabled) == CFBooleanGetTypeID()) && CFBooleanGetValue(enabled))
+ AlwaysAppendSearchDomains = mDNStrue;
+ CFRelease(enabled);
+ }
+#endif
+
// Note that mDNSPlatformInit will set DivertMulticastAdvertisements in the mDNS structure
- if (!advertise) LogMsg("Administratively prohibiting multicast advertisements");
+ if (!advertise)
+ LogMsg("-NoMulticastAdvertisements is set: Administratively prohibiting multicast advertisements");
+ if (AlwaysAppendSearchDomains)
+ LogMsg("-AlwaysAppendSearchDomains is set");
+ if (StrictUnicastOrdering)
+ LogMsg("-StrictUnicastOrdering is set");
#ifndef MDNSRESPONDER_USES_LIB_DISPATCH_AS_PRIMARY_EVENT_LOOP_MECHANISM
@@ -2886,7 +2964,6 @@ mDNSexport int main(int argc, char **argv)
signal(SIGINFO, HandleSIG); // (Debugging) Write state snapshot to syslog
signal(SIGUSR1, HandleSIG); // (Debugging) Enable Logging
signal(SIGUSR2, HandleSIG); // (Debugging) Enable Packet Logging
- signal(SIGURG, HandleSIG); // (Debugging) Toggle Opportunistic Caching
signal(SIGPROF, HandleSIG); // (Debugging) Toggle Multicast Logging
signal(SIGTSTP, HandleSIG); // (Debugging) Disable all Debug Logging (USR1/USR2/PROF)
@@ -2931,6 +3008,8 @@ mDNSexport int main(int argc, char **argv)
char *sandbox_msg;
uint64_t sandbox_flags = SANDBOX_NAMED;
+ (void)confstr(_CS_DARWIN_USER_CACHE_DIR, NULL, 0);
+
int sandbox_err = sandbox_init("mDNSResponder", sandbox_flags, &sandbox_msg);
if (sandbox_err)
{
@@ -2945,13 +3024,6 @@ mDNSexport int main(int argc, char **argv)
}
#endif // MDNS_NO_SANDBOX
- // We use BeginTransactionAtShutdown in the plist that ensures that we will
- // receive a SIGTERM during shutdown rather than a SIGKILL. But launchd (due to some
- // limitation) currently requires us to still start and end the transaction for
- // its proper initialization.
- vproc_transaction_t vt = vproc_transaction_begin(NULL);
- if (vt) vproc_transaction_end(NULL, vt);
-
m_port = RegisterMachService(kmDNSResponderServName);
// We should ALWAYS receive our Mach port from RegisterMachService() but sanity check before initializing daemon
if (m_port == MACH_PORT_NULL)
@@ -2960,15 +3032,17 @@ mDNSexport int main(int argc, char **argv)
return -1;
}
+#if TARGET_OS_EMBEDDED
+ status = MetricsInit();
+ if (status) { LogMsg("Daemon start: MetricsInit failed (%d)", status); }
+#endif
+
status = mDNSDaemonInitialize();
if (status) { LogMsg("Daemon start: mDNSDaemonInitialize failed"); goto exit; }
status = udsserver_init(launchd_fds, launchd_fds_count);
if (status) { LogMsg("Daemon start: udsserver_init failed"); goto exit; }
- log_client = asl_open(NULL, "mDNSResponder", 0);
- log_msg = asl_new(ASL_TYPE_MSG);
-
#if TARGET_OS_EMBEDDED
_scprefs_observer_watch(scprefs_observer_type_global, kmDNSResponderPrefIDStr, dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0),
^{
diff --git a/mDNSResponder/mDNSMacOSX/helper-error.h b/mDNSResponder/mDNSMacOSX/helper-error.h
index 2e463b0a..6465b734 100644
--- a/mDNSResponder/mDNSMacOSX/helper-error.h
+++ b/mDNSResponder/mDNSMacOSX/helper-error.h
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 4 -*-
*
- * Copyright (c) 2007 Apple Inc. All rights reserved.
+ * Copyright (c) 2007-2013 Apple Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/mDNSResponder/mDNSMacOSX/helper-main.c b/mDNSResponder/mDNSMacOSX/helper-main.c
index 52779e85..5e4d9481 100644
--- a/mDNSResponder/mDNSMacOSX/helper-main.c
+++ b/mDNSResponder/mDNSMacOSX/helper-main.c
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 4 -*-
*
- * Copyright (c) 2007 Apple Inc. All rights reserved.
+ * Copyright (c) 2007-2012 Apple Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -39,7 +39,6 @@
#include "helper-server.h"
#include "helpermsg.h"
#include "helpermsgServer.h"
-#include <vproc.h>
#if TARGET_OS_EMBEDDED
#define NO_SECURITYFRAMEWORK 1
@@ -104,7 +103,7 @@ static void handle_sigterm(int sig)
static void initialize_logging(void)
{
- logclient = asl_open(NULL, kmDNSHelperServiceName, (opt_debug ? ASL_OPT_STDERR : 0));
+ logclient = asl_open(NULL, "mDNSResponderHelper", (opt_debug ? ASL_OPT_STDERR : 0));
if (NULL == logclient) { fprintf(stderr, "Could not initialize ASL logging.\n"); fflush(stderr); return; }
if (opt_debug) asl_set_filter(logclient, ASL_FILTER_MASK_UPTO(ASL_LEVEL_DEBUG));
}
@@ -124,9 +123,10 @@ static void initialize_id(void)
static void diediedie(CFRunLoopTimerRef timer, void *context)
{
- debug("entry %p %p %d", timer, context, maxidle);
+ debug("entry %p %p %d", timer, context, actualidle);
assert(gTimer == timer);
- if (maxidle)
+ helplog(ASL_LEVEL_INFO, "mDNSResponder exiting after %d seconds", actualidle);
+ if (actualidle)
(void)proxy_mDNSExit(gPort);
}
@@ -228,6 +228,8 @@ int main(int ac, char *av[])
}
ac -= optind;
av += optind;
+ (void)ac; // Unused
+ (void)av; // Unused
initialize_logging();
helplog(ASL_LEVEL_INFO, "Starting");
@@ -246,13 +248,6 @@ int main(int ac, char *av[])
signal(SIGTERM, handle_sigterm);
- // We use BeginTransactionAtShutdown in the plist that ensures that we will
- // receive a SIGTERM during shutdown rather than a SIGKILL. But launchd (due to some
- // limitation) currently requires us to still start and end the transaction for
- // its proper initialization.
- vproc_transaction_t vt = vproc_transaction_begin(NULL);
- if (vt) vproc_transaction_end(NULL, vt);
-
if (initialize_timer()) exit(EXIT_FAILURE);
for (n=0; n<100000; n++) if (!gRunLoop) usleep(100);
if (!gRunLoop)
diff --git a/mDNSResponder/mDNSMacOSX/helper-server.h b/mDNSResponder/mDNSMacOSX/helper-server.h
index 1c391a01..eb0e6ae1 100644
--- a/mDNSResponder/mDNSMacOSX/helper-server.h
+++ b/mDNSResponder/mDNSMacOSX/helper-server.h
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 4 -*-
*
- * Copyright (c) 2007 Apple Inc. All rights reserved.
+ * Copyright (c) 2007-2011 Apple Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/mDNSResponder/mDNSMacOSX/helper-stubs.c b/mDNSResponder/mDNSMacOSX/helper-stubs.c
index 29fd9aed..e08f5050 100644
--- a/mDNSResponder/mDNSMacOSX/helper-stubs.c
+++ b/mDNSResponder/mDNSMacOSX/helper-stubs.c
@@ -1,5 +1,6 @@
-/*
- * Copyright (c) 2007-2012 Apple Inc. All rights reserved.
+/* -*- Mode: C; tab-width: 4 -*-
+ *
+ * Copyright (c) 2007-2015 Apple Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -169,26 +170,28 @@ void mDNSNotify(const char *title, const char *msg) // Both strings are UTF-8 te
if (title)
{
+ // Don’t try to call mDNSPlatformMem* routines here, because they call validatelists,
+ // which calls back into mDNSNotify, resulting an infinite loop until stack space is exhausted
int len = strlen(title);
- titleCopy = mDNSPlatformMemAllocate(len + 1);
+ titleCopy = malloc(len + 1);
if (!titleCopy)
{
LogMsg("mDNSNotify: titleCopy NULL for %s", msg);
return;
}
- mDNSPlatformMemCopy(titleCopy, title, len);
+ memcpy(titleCopy, title, len);
titleCopy[len] = 0;
}
if (msg)
{
int len = strlen(msg);
- msgCopy = mDNSPlatformMemAllocate(len + 1);
+ msgCopy = malloc(len + 1);
if (!msgCopy)
{
LogMsg("mDNSNotify: msgCopy NULL for %s", msg);
return;
}
- mDNSPlatformMemCopy(msgCopy, msg, len);
+ memcpy(msgCopy, msg, len);
msgCopy[len] = 0;
}
@@ -203,10 +206,10 @@ void mDNSNotify(const char *title, const char *msg) // Both strings are UTF-8 te
kr = proxy_mDNSNotify(getHelperPort(retry), titleCopy, msgCopy);
MACHRETRYLOOP_END(kr, retry, err, fin);
fin:
- if (titleCopy)
- mDNSPlatformMemFree(titleCopy);
- if (msgCopy)
- mDNSPlatformMemFree(msgCopy);
+ // Don’t try to call mDNSPlatformMem* routines here, because they call validatelists,
+ // which calls back into mDNSNotify, resulting an infinite loop until stack space is exhausted
+ free(titleCopy);
+ free(msgCopy);
(void)err;
});
}
@@ -231,7 +234,7 @@ int mDNSKeychainGetSecrets(CFArrayRef *result)
LogMsg("%s: CFDataCreateWithBytesNoCopy failed", __func__);
goto fin;
}
- if (NULL == (plist = CFPropertyListCreateFromXMLData(kCFAllocatorDefault, bytes, kCFPropertyListImmutable, NULL)))
+ if (NULL == (plist = CFPropertyListCreateWithData(kCFAllocatorDefault, bytes, kCFPropertyListImmutable, NULL, NULL)))
{
err = kmDNSHelperInvalidPList;
LogMsg("%s: CFPropertyListCreateFromXMLData failed", __func__);
@@ -456,7 +459,7 @@ void mDNSGetRemoteMAC(mDNS *const m, int family, v6addr_t raddr)
// the values and schedule a task to update the MAC address in the TCP Keepalive record.
if (kr == KERN_SUCCESS)
{
- addrMapping = (IPAddressMACMapping *)malloc(sizeof(IPAddressMACMapping));
+ addrMapping = mDNSPlatformMemAllocate(sizeof(IPAddressMACMapping));
snprintf(addrMapping->ethaddr, sizeof(addrMapping->ethaddr), "%02x:%02x:%02x:%02x:%02x:%02x",
eth[0], eth[1], eth[2], eth[3], eth[4], eth[5]);
if (family == AF_INET)
diff --git a/mDNSResponder/mDNSMacOSX/helper.c b/mDNSResponder/mDNSMacOSX/helper.c
index deb33e93..7cf0e523 100644
--- a/mDNSResponder/mDNSMacOSX/helper.c
+++ b/mDNSResponder/mDNSMacOSX/helper.c
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 4 -*-
*
- * Copyright (c) 2007-2012 Apple Inc. All rights reserved.
+ * Copyright (c) 2007-2015 Apple Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -61,6 +61,8 @@
#include <netinet/ip.h>
#include <netinet/tcp.h>
+#include <IOKit/pwr_mgt/IOPMLibPrivate.h>
+
#ifndef RTF_IFSCOPE
#define RTF_IFSCOPE 0x1000000
#endif
@@ -183,13 +185,24 @@ kern_return_t do_mDNSPowerRequest(__unused mach_port_t port, int key, int interv
}
else if (key > 0)
{
- CFDateRef w = CFDateCreate(NULL, CFAbsoluteTimeGetCurrent() + interval);
- if (w)
+ CFDateRef wakeTime = CFDateCreate(NULL, CFAbsoluteTimeGetCurrent() + interval);
+ if (wakeTime)
{
- IOReturn r = IOPMSchedulePowerEvent(w, CFSTR("mDNSResponderHelper"), key ? CFSTR(kIOPMAutoWake) : CFSTR(kIOPMAutoSleep));
- if (r) { usleep(100000); helplog(ASL_LEVEL_ERR, "IOPMSchedulePowerEvent(%d) %d %x", interval, r, r); }
+ CFMutableDictionaryRef scheduleDict = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
+
+ CFDictionaryAddValue(scheduleDict, CFSTR(kIOPMPowerEventTimeKey), wakeTime);
+ CFDictionaryAddValue(scheduleDict, CFSTR(kIOPMPowerEventAppNameKey), CFSTR("mDNSResponderHelper"));
+ CFDictionaryAddValue(scheduleDict, CFSTR(kIOPMPowerEventTypeKey), key ? CFSTR(kIOPMAutoWake) : CFSTR(kIOPMAutoSleep));
+
+ IOReturn r = IOPMRequestSysWake(scheduleDict);
+ if (r)
+ {
+ usleep(100000);
+ helplog(ASL_LEVEL_ERR, "IOPMRequestSysWake(%d) %d %x", interval, r, r);
+ }
*err = r;
- CFRelease(w);
+ CFRelease(wakeTime);
+ CFRelease(scheduleDict);
}
}
fin:
@@ -332,7 +345,8 @@ kern_return_t do_mDNSNotify(__unused mach_port_t port, const char *title, const
if (!authorized(&token)) return KERN_SUCCESS;
#ifndef NO_CFUSERNOTIFICATION
- static const char footer[] = "(Note: This message only appears on machines with 17.x.x.x IP addresses — i.e. at Apple — not on customer machines.)";
+ static const char footer[] = "(Note: This message only appears on machines with 17.x.x.x IP addresses"
+ " or on debugging builds with ForceAlerts set — i.e. only at Apple — not on customer machines.)";
CFStringRef alertHeader = CFStringCreateWithCString(NULL, title, kCFStringEncodingUTF8);
CFStringRef alertBody = CFStringCreateWithCString(NULL, msg, kCFStringEncodingUTF8);
CFStringRef alertFooter = CFStringCreateWithCString(NULL, footer, kCFStringEncodingUTF8);
@@ -429,7 +443,7 @@ static void ShowNameConflictNotification(CFMutableArrayRef header, CFStringRef s
CFRelease(dictionary);
}
-static CFMutableArrayRef GetHeader(const char* oldname, const char* newname, const CFStringRef msg, const char* suffix)
+static CFMutableArrayRef CreateAlertHeader(const char* oldname, const char* newname, const CFStringRef msg, const char* suffix)
{
CFMutableArrayRef alertHeader = NULL;
@@ -464,18 +478,21 @@ static CFMutableArrayRef GetHeader(const char* oldname, const char* newname, con
CFStringRef userName = SCDynamicStoreCopyConsoleUser(NULL, &uid, &gid);
if (userName)
{
- CFRelease(userName);
- CFArrayAppendValue(alertHeader, msg); // Opening phrase of message, provided by caller
- CFArrayAppendValue(alertHeader, CFS_OQ); CFArrayAppendValue(alertHeader, s1); CFArrayAppendValue(alertHeader, CFS_CQ);
- CFArrayAppendValue(alertHeader, CFSTR(" is already in use on this network. "));
- if (s2)
+ if (!CFEqual(userName, CFSTR("_mbsetupuser")))
{
- CFArrayAppendValue(alertHeader, CFSTR("The name has been changed to "));
- CFArrayAppendValue(alertHeader, CFS_OQ); CFArrayAppendValue(alertHeader, s2); CFArrayAppendValue(alertHeader, CFS_CQ);
- CFArrayAppendValue(alertHeader, CFSTR("."));
+ CFArrayAppendValue(alertHeader, msg); // Opening phrase of message, provided by caller
+ CFArrayAppendValue(alertHeader, CFS_OQ); CFArrayAppendValue(alertHeader, s1); CFArrayAppendValue(alertHeader, CFS_CQ);
+ CFArrayAppendValue(alertHeader, CFSTR(" is already in use on this network. "));
+ if (s2)
+ {
+ CFArrayAppendValue(alertHeader, CFSTR("The name has been changed to "));
+ CFArrayAppendValue(alertHeader, CFS_OQ); CFArrayAppendValue(alertHeader, s2); CFArrayAppendValue(alertHeader, CFS_CQ);
+ CFArrayAppendValue(alertHeader, CFSTR("."));
+ }
+ else
+ CFArrayAppendValue(alertHeader, CFSTR("All attempts to find an available name by adding a number to the name were also unsuccessful."));
}
- else
- CFArrayAppendValue(alertHeader, CFSTR("All attempts to find an available name by adding a number to the name were also unsuccessful."));
+ CFRelease(userName);
}
}
if (s1) CFRelease(s1);
@@ -494,16 +511,20 @@ static void update_notification(void)
debug("entry ucn=%s, uhn=%s, lcn=%s, lhn=%s", usercompname, userhostname, lastcompname, lasthostname);
if (!CFS_OQ)
{
- // Note: the "\xEF\xBB\xBF" byte sequence in the CFS_Format string is the UTF-8 encoding of the zero-width non-breaking space character.
+ // Note: The "\xEF\xBB\xBF" byte sequence (U+FEFF) in the CFS_Format string is the UTF-8 encoding of the zero-width non-breaking space character.
// By appending this invisible character on the end of literal names, we ensure the these strings cannot inadvertently match any string
// in the localization file -- since we know for sure that none of our strings in the localization file contain the ZWNBS character.
- //
- // For languages that are written right to left, when we mix English (host names could be in english with brackets etc. and the
- // rest in Arabic) we need unicode markups for proper formatting. The Unicode sequence 202C (UTF8 E2 80 AC), 200E (UTF8 E2 80 8E) and
- // 202B (UTF8 E2 80 AB) helps with the formatting. See <rdar://problem/8629082> for more details.
- CFS_OQ = CFStringCreateWithCString(NULL, "“\xE2\x80\xAB", kCFStringEncodingUTF8);
- CFS_CQ = CFStringCreateWithCString(NULL, "\xE2\x80\xAC”", kCFStringEncodingUTF8);
- CFS_Format = CFStringCreateWithCString(NULL, "%@%s\xEF\xBB\xBF\xE2\x80\x8E", kCFStringEncodingUTF8);
+ CFS_Format = CFStringCreateWithCString(NULL, "%@%s\xEF\xBB\xBF", kCFStringEncodingUTF8);
+
+ // The strings CFS_OQ, CFS_CQ and the others below are the localization keys for the “Localizable.strings” files,
+ // and MUST NOT BE CHANGED, or localization substitution will be broken.
+ // To change the text displayed to the user, edit the values in the appropriate “Localizable.strings” file, not the keys here.
+ // This includes making changes for adding appropriate directionality overrides like LRM, LRE, RLE, PDF, etc. These need to go in the values
+ // in the appropriate “Localizable.strings” entries, not in the keys here (which then won’t match *any* entry in the localization files).
+ // These localization keys here were broken in <rdar://problem/8629082> and then subsequently repaired in
+ // <rdar://problem/21071535> [mDNSResponder]: TA: Gala15A185: Incorrect punctuation marks when Change the host name to an exist one
+ CFS_OQ = CFStringCreateWithCString(NULL, "“", kCFStringEncodingUTF8); // DO NOT CHANGE THIS STRING
+ CFS_CQ = CFStringCreateWithCString(NULL, "”", kCFStringEncodingUTF8); // DO NOT CHANGE THIS STRING
CFS_ComputerName = CFStringCreateWithCString(NULL, "The name of your computer ", kCFStringEncodingUTF8);
CFS_ComputerNameMsg = CFStringCreateWithCString(NULL, "To change the name of your computer, "
"open System Preferences and click Sharing, then type the name in the Computer Name field.", kCFStringEncodingUTF8);
@@ -529,17 +550,17 @@ static void update_notification(void)
CFStringRef* subtext = NULL;
if (userhostname[0] && !lasthostname[0]) // we've given up trying to construct a name that doesn't conflict
{
- header = GetHeader(userhostname, NULL, CFS_LocalHostName, ".local");
+ header = CreateAlertHeader(userhostname, NULL, CFS_LocalHostName, ".local");
subtext = &CFS_Problem;
}
else if (usercompname[0])
{
- header = GetHeader(usercompname, lastcompname, CFS_ComputerName, "");
+ header = CreateAlertHeader(usercompname, lastcompname, CFS_ComputerName, "");
subtext = &CFS_ComputerNameMsg;
}
else
{
- header = GetHeader(userhostname, lasthostname, CFS_LocalHostName, ".local");
+ header = CreateAlertHeader(userhostname, lasthostname, CFS_LocalHostName, ".local");
subtext = &CFS_LocalHostNameMsg;
}
ShowNameConflictNotification(header, *subtext);
@@ -912,6 +933,8 @@ do_mDNSKeychainGetSecrets(__unused mach_port_t port, __unused unsigned int *nums
*err = kmDNSHelperKeychainCopyDefaultFailed;
goto fin;
}
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
if (noErr != (status = SecKeychainSearchCreateFromAttributes(skc, kSecGenericPasswordItemClass, NULL, &search)))
{
*err = kmDNSHelperKeychainSearchCreationFailed;
@@ -932,6 +955,7 @@ do_mDNSKeychainGetSecrets(__unused mach_port_t port, __unused unsigned int *nums
SecKeychainItemFreeAttributesAndData(attributes, NULL);
CFRelease(item);
}
+#pragma clang diagnostic pop
if (errSecItemNotFound != status)
helplog(ASL_LEVEL_ERR, "%s: SecKeychainSearchCopyNext failed: %d",
__func__, status);
@@ -944,8 +968,8 @@ do_mDNSKeychainGetSecrets(__unused mach_port_t port, __unused unsigned int *nums
goto fin;
}
CFWriteStreamOpen(stream);
- if (0 == CFPropertyListWriteToStream(keys, stream,
- kCFPropertyListBinaryFormat_v1_0, NULL))
+ if (0 == CFPropertyListWrite(keys, stream,
+ kCFPropertyListBinaryFormat_v1_0, 0, NULL))
{
*err = kmDNSHelperPListWriteFailed;
debug("CFPropertyListWriteToStream failed");
@@ -1017,11 +1041,16 @@ static const char g_racoon_config_dir_old[] = "/etc/racoon/remote/";
CF_EXPORT CFDictionaryRef _CFCopySystemVersionDictionary(void);
CF_EXPORT const CFStringRef _kCFSystemVersionBuildVersionKey;
-// Major version 6 is 10.2.x (Jaguar)
-// Major version 7 is 10.3.x (Panther)
-// Major version 8 is 10.4.x (Tiger)
-// Major version 9 is 10.5.x (Leopard)
-// Major version 10 is 10.6.x (SnowLeopard)
+// Major version 6 is 10.2.x (Jaguar)
+// Major version 7 is 10.3.x (Panther)
+// Major version 8 is 10.4.x (Tiger)
+// Major version 9 is 10.5.x (Leopard)
+// Major version 10 is 10.6.x (SnowLeopard)
+// Major version 11 is 10.7.x (Lion)
+// Major version 12 is 10.8.x (MountainLion)
+// Major version 13 is 10.9.x (Mavericks)
+// Major version 14 is 10.10.x (Yosemite)
+// Major version 15 is 10.11.x (ElCapitan)
static int MacOSXSystemBuildNumber(char* letter_out, int* minor_out)
{
int major = 0, minor = 0;
@@ -2332,13 +2361,15 @@ in_cksum(unsigned short *ptr,int nbytes)
* all the carry bits from the top 16 bits into the lower 16 bits.
*/
sum = 0;
- while (nbytes > 1) {
+ while (nbytes > 1)
+ {
sum += *ptr++;
nbytes -= 2;
}
/* mop up an odd byte, if necessary */
- if (nbytes == 1) {
+ if (nbytes == 1)
+ {
/* make sure top half is zero */
oddbyte = 0;
@@ -2726,20 +2757,42 @@ static int getMACAddress(int family, v6addr_t raddr, v6addr_t gaddr, int *gfamil
sin6 = (struct sockaddr_in6 *) (rtm +1);
sdl = (struct sockaddr_dl *) (sin6->sin6_len + (char *) sin6);
}
+
+ if (!sdl)
+ {
+ helplog(ASL_LEVEL_ERR, "do_mDNSGetRemoteMAC: sdl is NULL for family %d", family);
+ close(sock);
+ return -1;
+ }
+
// If the address is not on the local net, we get the IP address of the gateway.
// We would have to repeat the process to get the MAC address of the gateway
*gfamily = sdl->sdl_family;
if (sdl->sdl_family == AF_INET)
{
- struct sockaddr_in *new_sin = (struct sockaddr_in *)(sin->sin_len +(char*) sin);
- memcpy(gaddr, &new_sin->sin_addr, sizeof(struct in_addr));
+ if (sin)
+ {
+ struct sockaddr_in *new_sin = (struct sockaddr_in *)(sin->sin_len +(char*) sin);
+ memcpy(gaddr, &new_sin->sin_addr, sizeof(struct in_addr));
+ }
+ else
+ {
+ helplog(ASL_LEVEL_ERR, "do_mDNSGetRemoteMAC: sin is NULL");
+ }
close(sock);
return -1;
}
else if (sdl->sdl_family == AF_INET6)
{
- struct sockaddr_in6 *new_sin6 = (struct sockaddr_in6 *)(sin6->sin6_len +(char*) sin6);
- memcpy(gaddr, &new_sin6->sin6_addr, sizeof(struct in6_addr));
+ if (sin6)
+ {
+ struct sockaddr_in6 *new_sin6 = (struct sockaddr_in6 *)(sin6->sin6_len +(char*) sin6);
+ memcpy(gaddr, &new_sin6->sin6_addr, sizeof(struct in6_addr));
+ }
+ else
+ {
+ helplog(ASL_LEVEL_ERR, "do_mDNSGetRemoteMAC: sin6 is NULL");
+ }
close(sock);
return -1;
}
diff --git a/mDNSResponder/mDNSMacOSX/helper.h b/mDNSResponder/mDNSMacOSX/helper.h
index a2982372..04332eff 100644
--- a/mDNSResponder/mDNSMacOSX/helper.h
+++ b/mDNSResponder/mDNSMacOSX/helper.h
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 4 -*-
*
- * Copyright (c) 2007-2012 Apple Inc. All rights reserved.
+ * Copyright (c) 2007-2013 Apple Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/mDNSResponder/mDNSMacOSX/helpermsg-types.h b/mDNSResponder/mDNSMacOSX/helpermsg-types.h
index ca5b140a..88411800 100644
--- a/mDNSResponder/mDNSMacOSX/helpermsg-types.h
+++ b/mDNSResponder/mDNSMacOSX/helpermsg-types.h
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 4 -*-
*
- * Copyright (c) 2007 Apple Inc. All rights reserved.
+ * Copyright (c) 2007-2011 Apple Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/mDNSResponder/mDNSMacOSX/helpermsg.defs b/mDNSResponder/mDNSMacOSX/helpermsg.defs
index 58363082..35239967 100644
--- a/mDNSResponder/mDNSMacOSX/helpermsg.defs
+++ b/mDNSResponder/mDNSMacOSX/helpermsg.defs
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 4 -*-
*
- * Copyright (c) 2007-2012 Apple Inc. All rights reserved.
+ * Copyright (c) 2007-2013 Apple Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/mDNSResponder/mDNSMacOSX/ipsec_strerror.h b/mDNSResponder/mDNSMacOSX/ipsec_strerror.h
index ecacf3b2..b15fc28a 100644
--- a/mDNSResponder/mDNSMacOSX/ipsec_strerror.h
+++ b/mDNSResponder/mDNSMacOSX/ipsec_strerror.h
@@ -1,5 +1,6 @@
-/*
- * Copyright (c) 2003-2007 Apple Computer, Inc. All rights reserved.
+/* -*- Mode: C; tab-width: 4 -*-
+ *
+ * Copyright (c) 2003-2015 Apple Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
/* $FreeBSD: src/lib/libipsec/ipsec_strerror.h,v 1.1.2.2 2001/07/03 11:01:14 ume Exp $ */
/* $KAME: ipsec_strerror.h,v 1.8 2000/07/30 00:45:12 itojun Exp $ */
diff --git a/mDNSResponder/mDNSMacOSX/libpfkey.h b/mDNSResponder/mDNSMacOSX/libpfkey.h
index 98d192d8..24f1b085 100644
--- a/mDNSResponder/mDNSMacOSX/libpfkey.h
+++ b/mDNSResponder/mDNSMacOSX/libpfkey.h
@@ -1,5 +1,6 @@
-/*
- * Copyright (c) 2003-2007 Apple Computer, Inc. All rights reserved.
+/* -*- Mode: C; tab-width: 4 -*-
+ *
+ * Copyright (c) 2003-2015 Apple Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
/* $FreeBSD: src/lib/libipsec/libpfkey.h,v 1.1.2.2 2001/07/03 11:01:14 ume Exp $ */
/* $KAME: libpfkey.h,v 1.6 2001/03/05 18:22:17 thorpej Exp $ */
diff --git a/mDNSResponder/mDNSMacOSX/mDNSMacOSX.c b/mDNSResponder/mDNSMacOSX/mDNSMacOSX.c
index f904c8b2..deae0d1a 100644
--- a/mDNSResponder/mDNSMacOSX/mDNSMacOSX.c
+++ b/mDNSResponder/mDNSMacOSX/mDNSMacOSX.c
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 4 -*-
*
- * Copyright (c) 2002-2013 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2002-2015 Apple Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -61,7 +61,6 @@
#include <netinet/in_systm.h> // For n_long, required by <netinet/ip.h> below
#include <netinet/ip.h> // For IPTOS_LOWDELAY etc.
#include <netinet6/in6_var.h> // For IN6_IFF_NOTREADY etc.
-#include <netinet6/nd6.h> // For ND6_INFINITE_LIFETIME etc.
#include <netinet/tcp.h>
@@ -86,12 +85,20 @@
#include <asl.h>
#include <SystemConfiguration/SCPrivate.h>
+#if TARGET_OS_IPHONE
+// For WiFiManagerClientRef etc, declarations.
+#include <MobileGestalt.h>
+#include <MobileWiFi/WiFiManagerClient.h>
+#include <dlfcn.h>
+#endif // TARGET_OS_IPHONE
+
// Include definition of opaque_presence_indication for KEV_DL_NODE_PRESENCE handling logic.
#include <Kernel/IOKit/apple80211/apple80211_var.h>
#if APPLE_OSX_mDNSResponder
#include <DeviceToDeviceManager/DeviceToDeviceManager.h>
#include <AWACS.h>
+#include <ne_session.h> // for ne_session_set_socket_attributes()
#if !NO_D2D
D2DStatus D2DInitialize(CFRunLoopRef runLoop, D2DServiceCallback serviceCallback, void* userData) __attribute__((weak_import));
D2DStatus D2DRetain(D2DServiceInstance instanceHandle, D2DTransportType transportType) __attribute__((weak_import));
@@ -122,6 +129,8 @@ D2DStatus D2DTerminate() __attribute__((weak_import));
#define mDNS_IOREG_KA_KEY "mDNS_Keepalive"
#define mDNS_USER_CLIENT_CREATE_TYPE 'mDNS'
+#define DARK_WAKE_TIME 16 // Time we hold an idle sleep assertion for maintenance after a wake notification
+
// cache the InterfaceID of the AWDL interface
static mDNSInterfaceID AWDLInterfaceID;
@@ -213,9 +222,9 @@ mDNSexport void D2D_start_advertising_interface(NetworkInterfaceInfo *interface)
LogInfo("D2D_start_advertising_interface: %s", interface->ifname);
if (interface->RR_A.resrec.RecordType)
- external_start_advertising_service(&interface->RR_A.resrec, NULL);
+ external_start_advertising_service(&interface->RR_A.resrec, 0);
if (interface->RR_PTR.resrec.RecordType)
- external_start_advertising_service(&interface->RR_PTR.resrec, NULL);
+ external_start_advertising_service(&interface->RR_PTR.resrec, 0);
}
}
@@ -228,9 +237,9 @@ mDNSexport void D2D_stop_advertising_interface(NetworkInterfaceInfo *interface)
LogInfo("D2D_stop_advertising_interface: %s", interface->ifname);
if (interface->RR_A.resrec.RecordType)
- external_stop_advertising_service(&interface->RR_A.resrec, NULL);
+ external_stop_advertising_service(&interface->RR_A.resrec, 0);
if (interface->RR_PTR.resrec.RecordType)
- external_stop_advertising_service(&interface->RR_PTR.resrec, NULL);
+ external_stop_advertising_service(&interface->RR_PTR.resrec, 0);
}
}
@@ -960,8 +969,8 @@ mDNSexport void external_start_resolving_service(mDNSInterfaceID InterfaceID, co
if (AWDL_used && AWDLInterfaceID)
{
LogInfo("external_start_resolving_service: browse for TXT and SRV over AWDL");
- external_start_browsing_for_service(AWDLInterfaceID, fqdn, kDNSType_TXT, NULL);
- external_start_browsing_for_service(AWDLInterfaceID, fqdn, kDNSType_SRV, NULL);
+ external_start_browsing_for_service(AWDLInterfaceID, fqdn, kDNSType_TXT, 0);
+ external_start_browsing_for_service(AWDLInterfaceID, fqdn, kDNSType_SRV, 0);
}
}
@@ -1006,8 +1015,8 @@ mDNSexport void external_stop_resolving_service(mDNSInterfaceID InterfaceID, con
if (AWDL_used && AWDLInterfaceID)
{
LogInfo("external_stop_resolving_service: stop browse for TXT and SRV on AWDL");
- external_stop_browsing_for_service(AWDLInterfaceID, fqdn, kDNSType_TXT, NULL);
- external_stop_browsing_for_service(AWDLInterfaceID, fqdn, kDNSType_SRV, NULL);
+ external_stop_browsing_for_service(AWDLInterfaceID, fqdn, kDNSType_TXT, 0);
+ external_stop_browsing_for_service(AWDLInterfaceID, fqdn, kDNSType_SRV, 0);
}
}
@@ -1037,22 +1046,17 @@ mDNSexport void external_stop_resolving_service(const domainname *const fqdn, DN
// to run up the user's bill sending multicast traffic over a link where there's only a single device at the
// other end, and that device (e.g. a modem bank) is probably not answering Multicast DNS queries anyway.
-// We also don't want to use multicast on *any* interface on very constrained devices.
-#if TARGET_OS_NANO
-#define MulticastInterface(i) (mDNSfalse)
+// We also don't want to use multicast on *any* physical interface on very constrained devices.
+#if 0
+#define MulticastInterface(i) ((i)->ifa_flags & IFF_LOOPBACK)
+#elif TARGET_OS_WATCH
+#define MulticastInterface(i) ((i)->m->NumAllInterfaceRecords + (i)->m->NumAllInterfaceQuestions > 0 && ((i)->ifa_flags & IFF_MULTICAST) && !((i)->ifa_flags & IFF_POINTOPOINT))
#else
#define MulticastInterface(i) (((i)->ifa_flags & IFF_MULTICAST) && !((i)->ifa_flags & IFF_POINTOPOINT))
#endif
mDNSexport void NotifyOfElusiveBug(const char *title, const char *msg) // Both strings are UTF-8 text
{
- static int notifyCount = 0;
- if (notifyCount) return;
-
- // If we display our alert early in the boot process, then it vanishes once the desktop appears.
- // To avoid this, we don't try to display alerts in the first three minutes after boot.
- if ((mDNSu32)(mDNSPlatformRawTime()) < (mDNSu32)(mDNSPlatformOneSecond * 180)) return;
-
// Unless ForceAlerts is defined, we only show these bug report alerts on machines that have a 17.x.x.x address
#if !ForceAlerts
{
@@ -1065,16 +1069,54 @@ mDNSexport void NotifyOfElusiveBug(const char *title, const char *msg) // Both
}
#endif
- LogMsg("%s", title);
- LogMsg("%s", msg);
- // Display a notification to the user
- notifyCount++;
+ LogMsg("NotifyOfElusiveBug: %s", title);
+ LogMsg("NotifyOfElusiveBug: %s", msg);
+
+ // If we display our alert early in the boot process, then it vanishes once the desktop appears.
+ // To avoid this, we don't try to display alerts in the first three minutes after boot.
+ if ((mDNSu32)(mDNSPlatformRawTime()) < (mDNSu32)(mDNSPlatformOneSecond * 180))
+ { LogMsg("Suppressing notification early in boot: %d", mDNSPlatformRawTime()); return; }
#ifndef NO_CFUSERNOTIFICATION
- mDNSNotify(title, msg);
+ static int notifyCount = 0; // To guard against excessive display of warning notifications
+ if (notifyCount < 5) { notifyCount++; mDNSNotify(title, msg); }
#endif /* NO_CFUSERNOTIFICATION */
}
+// Write a syslog message and display an alert, then if ForceAlerts is set, generate a stack trace
+#if APPLE_OSX_mDNSResponder && MACOSX_MDNS_MALLOC_DEBUGGING >= 1
+mDNSexport void LogMemCorruption(const char *format, ...)
+{
+ char buffer[512];
+ va_list ptr;
+ va_start(ptr,format);
+ buffer[mDNS_vsnprintf((char *)buffer, sizeof(buffer), format, ptr)] = 0;
+ va_end(ptr);
+ LogMsg("!!!! %s !!!!", buffer);
+ NotifyOfElusiveBug("Memory Corruption", buffer);
+#if ForceAlerts
+ *(volatile long*)0 = 0; // Trick to crash and get a stack trace right here, if that's what we want
+#endif
+}
+#endif
+
+// Like LogMemCorruption above, but only display the alert if ForceAlerts is set and we're going to generate a stack trace
+#if APPLE_OSX_mDNSResponder
+mDNSexport void LogFatalError(const char *format, ...)
+{
+ char buffer[512];
+ va_list ptr;
+ va_start(ptr,format);
+ buffer[mDNS_vsnprintf((char *)buffer, sizeof(buffer), format, ptr)] = 0;
+ va_end(ptr);
+ LogMsg("!!!! %s !!!!", buffer);
+#if ForceAlerts
+ NotifyOfElusiveBug("Fatal Error. See /Library/Logs/DiagnosticReports", buffer);
+ *(volatile long*)0 = 0; // Trick to crash and get a stack trace right here, if that's what we want
+#endif
+}
+#endif
+
// Returns true if it is an AppleTV based hardware running iOS, false otherwise
mDNSlocal mDNSBool IsAppleTV(void)
{
@@ -1121,7 +1163,6 @@ mDNSlocal void DynamicStoreWrite(int key, const char* subkey, uintptr_t value, s
Boolean release_sckey = FALSE;
CFDataRef bytes = NULL;
CFPropertyListRef plist = NULL;
- SCDynamicStoreRef store = NULL;
switch ((enum mDNSDynamicStoreSetConfigKey)key)
{
@@ -1161,29 +1202,20 @@ mDNSlocal void DynamicStoreWrite(int key, const char* subkey, uintptr_t value, s
LogMsg("CFDataCreateWithBytesNoCopy of value failed");
goto fin;
}
- if (NULL == (plist = CFPropertyListCreateFromXMLData(NULL, bytes,
- kCFPropertyListImmutable, NULL)))
+ if (NULL == (plist = CFPropertyListCreateWithData(NULL, bytes, kCFPropertyListImmutable, NULL, NULL)))
{
- LogMsg("CFPropertyListCreateFromXMLData of bytes failed");
+ LogMsg("CFPropertyListCreateWithData of bytes failed");
goto fin;
}
CFRelease(bytes);
bytes = NULL;
- if (NULL == (store = SCDynamicStoreCreate(NULL,
- CFSTR(kmDNSResponderServName), NULL, NULL)))
- {
- LogMsg("SCDynamicStoreCreate failed: %s", SCErrorString(SCError()));
- goto fin;
- }
- SCDynamicStoreSetValue(store, sckey, plist);
+ SCDynamicStoreSetValue(NULL, sckey, plist);
fin:
if (NULL != bytes)
CFRelease(bytes);
if (NULL != plist)
CFRelease(plist);
- if (NULL != store)
- CFRelease(store);
if (release_sckey && sckey)
CFRelease(sckey);
}
@@ -1210,6 +1242,7 @@ mDNSexport void mDNSDynamicStoreSetConfig(int key, const char *subkey, CFPropert
if (!subkeyCopy)
{
LogMsg("mDNSDynamicStoreSetConfig: ERROR subkeyCopy NULL");
+ CFRelease(valueCopy);
return;
}
mDNSPlatformMemCopy(subkeyCopy, subkey, len);
@@ -1219,7 +1252,6 @@ mDNSexport void mDNSDynamicStoreSetConfig(int key, const char *subkey, CFPropert
dispatch_async(DynamicStoreQueue, ^{
CFWriteStreamRef stream = NULL;
CFDataRef bytes = NULL;
- CFStringRef error;
CFIndex ret;
if (NULL == (stream = CFWriteStreamCreateWithAllocatedBuffers(NULL, NULL)))
@@ -1228,7 +1260,7 @@ mDNSexport void mDNSDynamicStoreSetConfig(int key, const char *subkey, CFPropert
goto END;
}
CFWriteStreamOpen(stream);
- ret = CFPropertyListWriteToStream(valueCopy, stream, kCFPropertyListBinaryFormat_v1_0, &error);
+ ret = CFPropertyListWrite(valueCopy, stream, kCFPropertyListBinaryFormat_v1_0, 0, NULL);
if (ret == 0)
{
LogMsg("mDNSDynamicStoreSetConfig : CFPropertyListWriteToStream failed (Could not write property list to stream)");
@@ -1298,8 +1330,6 @@ mDNSlocal mDNSBool GetmDNSManagedPrefKeyVal(SCPreferencesRef prefs, CFStringRef
LogMsg("GetmDNSManagedPrefKeyVal: mDNSManagedPrefs are NULL!");
val = mDNSfalse;
}
- if (val_cf)
- CFRelease(val_cf);
return (val);
}
@@ -1702,6 +1732,8 @@ mDNSexport void mDNSPlatformSetuDNSSocktOpt(UDPSocket *src, const mDNSAddr *dst,
if (src)
{
int s;
+ char unenc_name[MAX_ESCAPED_DOMAIN_NAME];
+ ConvertDomainNameToCString(&q->qname, unenc_name);
if (dst->type == mDNSAddrType_IPv4)
s = src->ss.sktv4;
@@ -1719,6 +1751,10 @@ mDNSexport void mDNSPlatformSetuDNSSocktOpt(UDPSocket *src, const mDNSAddr *dst,
LogInfo("mDNSPlatformSetuDNSSocktOpt: Delegate UUID failed %s", strerror(errno));
}
+ // set the domain on the UDP socket
+ if (!(ne_session_set_socket_attributes(s, unenc_name, NULL)))
+ LogInfo("mDNSPlatformSetuDNSSocktOpt: ne_session_set_socket_attributes()-> setting domain failed for %s", unenc_name);
+
#if defined(SO_NOWAKEFROMSLEEP)
int nowake = 1;
if (setsockopt(s, SOL_SOCKET, SO_NOWAKEFROMSLEEP, &nowake, sizeof(nowake)) == -1)
@@ -1818,14 +1854,14 @@ mDNSexport mStatus mDNSPlatformSendUDP(const mDNS *const m, const void *const ms
{
if (errno != ENOPROTOOPT) LogInfo("mDNSPlatformSendUDP: setsockopt: IP_MUTLTICAST_IFINDEX returned %d", errno);
err = setsockopt(s, IPPROTO_IP, IP_MULTICAST_IF, &info->ifa_v4addr, sizeof(info->ifa_v4addr));
- if (err < 0 && !m->p->NetworkChanged)
+ if (err < 0 && !m->NetworkChanged)
LogMsg("setsockopt - IP_MULTICAST_IF error %.4a %d errno %d (%s)", &info->ifa_v4addr, err, errno, strerror(errno));
}
}
#else
{
err = setsockopt(s, IPPROTO_IP, IP_MULTICAST_IF, &info->ifa_v4addr, sizeof(info->ifa_v4addr));
- if (err < 0 && !m->p->NetworkChanged)
+ if (err < 0 && !m->NetworkChanged)
LogMsg("setsockopt - IP_MULTICAST_IF error %.4a %d errno %d (%s)", &info->ifa_v4addr, err, errno, strerror(errno));
}
@@ -1855,14 +1891,23 @@ mDNSexport mStatus mDNSPlatformSendUDP(const mDNS *const m, const void *const ms
LogInfo("setsockopt - IPV6_MUTLICAST_IF scopeid %d, not a valid interface", info->scope_id);
}
}
+#ifdef IPV6_BOUND_IF
+ if (info) // Specify outgoing interface for non-multicast destination
+ {
+ if (!mDNSAddrIsDNSMulticast(dst))
+ {
+ if (info->scope_id == 0)
+ LogInfo("IPV6_BOUND_IF socket option not set -- info %p (%s) scope_id is zero", info, ifa_name);
+ else
+ setsockopt(s, IPPROTO_IPV6, IPV6_BOUND_IF, &info->scope_id, sizeof(info->scope_id));
+ }
+ }
+#endif
}
else
{
- LogMsg("mDNSPlatformSendUDP: dst is not an IPv4 or IPv6 address!");
-#if ForceAlerts
- *(long*)0 = 0;
-#endif
+ LogFatalError("mDNSPlatformSendUDP: dst is not an IPv4 or IPv6 address!");
return mStatus_BadParamErr;
}
@@ -1899,7 +1944,7 @@ mDNSexport mStatus mDNSPlatformSendUDP(const mDNS *const m, const void *const ms
// but this means that sometimes it starts before configd has finished setting up the multicast routing entries.
if (errno == EHOSTUNREACH && (mDNSu32)(mDNSPlatformRawTime()) < (mDNSu32)(mDNSPlatformOneSecond * 180)) return(mStatus_TransientErr);
// Don't report EADDRNOTAVAIL ("Can't assign requested address") if we're in the middle of a network configuration change
- if (errno == EADDRNOTAVAIL && m->p->NetworkChanged) return(mStatus_TransientErr);
+ if (errno == EADDRNOTAVAIL && m->NetworkChanged) return(mStatus_TransientErr);
if (errno == EHOSTUNREACH || errno == EADDRNOTAVAIL || errno == ENETDOWN)
LogInfo("mDNSPlatformSendUDP sendto(%d) failed to send packet on InterfaceID %p %5s/%d to %#a:%d skt %d error %d errno %d (%s) %lu",
s, InterfaceID, ifa_name, dst->type, dst, mDNSVal16(dstPort), s, err, errno, strerror(errno), (mDNSu32)(m->timenow));
@@ -2006,6 +2051,7 @@ mDNSexport ssize_t myrecvfrom(const int s, void *const buffer, const size_t max,
return(n);
}
+// What is this for, and why does it use xor instead of a simple quality check? -- SC
mDNSlocal mDNSInterfaceID FindMyInterface(mDNS *const m, const mDNSAddr *addr)
{
NetworkInterfaceInfo *intf;
@@ -2043,6 +2089,12 @@ mDNSlocal mDNSInterfaceID FindMyInterface(mDNS *const m, const mDNSAddr *addr)
return(mDNSInterface_Any);
}
+// This is a stupid hack and we should get rid of it.
+// The chance of there being a second unicast UDP packet already waiting in the kernel before we’ve
+// finished processing the previous one is virtually nil, and will only happen by luck on very rare
+// occasions when running on a machine with a fast network connection and a slow or busy processor.
+// The idea that we’d rely for correctness on this random chance event occurring is ridiculous.
+// -- SC
mDNSexport mDNSBool mDNSPlatformPeekUDP(mDNS *const m, UDPSocket *src)
{
// We should have a DNSMessage header followed by the question and an answer
@@ -2165,6 +2217,15 @@ mDNSexport void myKQSocketCallBack(int s1, short filter, void *context)
if (!closed) ss->closeFlag = mDNSNULL;
}
+ // If a client application is put in the background, it's socket to us can go defunct and
+ // we'll get an ENOTCONN error on that connection. Just close the socket in that case.
+ if (err < 0 && errno == ENOTCONN)
+ {
+ LogInfo("myKQSocketCallBack: ENOTCONN, closing socket");
+ close(s1);
+ return;
+ }
+
if (err < 0 && (errno != EWOULDBLOCK || count == 0))
{
// Something is busted here.
@@ -3057,7 +3118,7 @@ mDNSlocal mStatus SetupSocket(KQSocketSet *cp, const mDNSIPPort port, u_short sa
// We want to receive packet TTL value so we can check it
err = setsockopt(skt, IPPROTO_IP, IP_RECVTTL, &on, sizeof(on));
- // We ignore errors here -- we already know Jaguar doesn't support this, but we can get by without it
+ if (err < 0) { errstr = "setsockopt - IP_RECVTTL"; goto fail; }
// Send unicast packets with TTL 255
err = setsockopt(skt, IPPROTO_IP, IP_TTL, &twofivefive, sizeof(twofivefive));
@@ -3139,7 +3200,7 @@ mDNSlocal mStatus SetupSocket(KQSocketSet *cp, const mDNSIPPort port, u_short sa
#endif
KQueueSet(*s, EV_ADD, EVFILT_READ, k);
- return(err);
+ return(mStatus_NoError);
fail:
// For "bind" failures, only write log messages for our shared mDNS port, or for binding to zero
@@ -3247,7 +3308,7 @@ mDNSexport void mDNSPlatformSetLocalAddressCacheEntry(mDNS *const m, const mDNSA
if (info == NULL) { LogMsg("mDNSPlatformSetLocalAddressCacheEntry: Invalid interface index %p", InterfaceID); return; }
// Manually inject an entry into our local ARP cache.
// (We can't do this by sending an ARP broadcast, because the kernel only pays attention to incoming ARP packets, not outgoing.)
- if (!mDNS_AddressIsLocalSubnet(m, InterfaceID, tpa, mDNSNULL))
+ if (!mDNS_AddressIsLocalSubnet(m, InterfaceID, tpa))
LogSPS("Don't need address cache entry for %s %#a %.6a", info->ifinfo.ifname, tpa, tha);
else
{
@@ -3348,20 +3409,16 @@ mDNSexport void mDNSPlatformSendKeepalive(mDNSAddr *sadd, mDNSAddr *dadd, mDNSIP
mDNSexport mStatus mDNSPlatformClearSPSMACAddr(void)
{
- SCDynamicStoreRef store = NULL;
CFStringRef entityname = NULL;
- if ((store = SCDynamicStoreCreate(NULL, CFSTR("mDNSResponder:ClearSPSMACAddress"), NULL, NULL)))
+ if ((entityname = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR("%s%s%s"), "State:/Network/Interface/", "[^/]", "/BonjourSleepProxyAddress")))
{
- if ((entityname = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR("%s%s%s"), "State:/Network/Interface/", "[^/]", "/BonjourSleepProxyAddress")))
- {
- if (SCDynamicStoreRemoveValue(store, entityname) == false)
- LogMsg("mDNSPlatformClearSPSMACAddr: Unable to remove key");
- }
+ if (SCDynamicStoreRemoveValue(NULL, entityname) == false)
+ LogSPS("mDNSPlatformClearSPSMACAddr: Unable to remove key");
}
- if (entityname) CFRelease(entityname);
- if (store) CFRelease(store);
+ if (entityname)
+ CFRelease(entityname);
return KERN_SUCCESS;
}
@@ -3578,7 +3635,7 @@ mDNSexport void mDNSPlatformUpdateProxyList(mDNS *const m, const mDNSInterfaceID
LogSPS("mDNSPlatformUpdateProxyList: No need for filter");
if (m->timenow == 0) LogMsg("mDNSPlatformUpdateProxyList: m->timenow == 0");
// Schedule check to see if we can close this BPF_fd now
- if (!m->p->NetworkChanged) m->p->NetworkChanged = NonZeroTime(m->timenow + mDNSPlatformOneSecond * 2);
+ if (!m->NetworkChanged) m->NetworkChanged = NonZeroTime(m->timenow + mDNSPlatformOneSecond * 2);
// prog.bf_len = 0; This seems to panic the kernel
if (x->BPF_fd < 0) return; // If we've already closed our BPF_fd, no need to generate an error message below
}
@@ -3671,46 +3728,48 @@ mDNSexport void mDNSPlatformReceiveBPF_fd(mDNS *const m, int fd)
#endif
#ifndef NO_SECURITYFRAMEWORK
-mDNSlocal CFArrayRef GetCertChain(SecIdentityRef identity)
+mDNSlocal CFArrayRef CopyCertChain(SecIdentityRef identity)
{
CFMutableArrayRef certChain = NULL;
- if (!identity) { LogMsg("getCertChain: identity is NULL"); return(NULL); }
+ if (!identity) { LogMsg("CopyCertChain: identity is NULL"); return(NULL); }
SecCertificateRef cert;
OSStatus err = SecIdentityCopyCertificate(identity, &cert);
- if (err || !cert) LogMsg("getCertChain: SecIdentityCopyCertificate() returned %d", (int) err);
+ if (err || !cert) LogMsg("CopyCertChain: SecIdentityCopyCertificate() returned %d", (int) err);
else
{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
SecPolicySearchRef searchRef;
err = SecPolicySearchCreate(CSSM_CERT_X_509v3, &CSSMOID_APPLE_X509_BASIC, NULL, &searchRef);
- if (err || !searchRef) LogMsg("getCertChain: SecPolicySearchCreate() returned %d", (int) err);
+ if (err || !searchRef) LogMsg("CopyCertChain: SecPolicySearchCreate() returned %d", (int) err);
else
{
SecPolicyRef policy;
err = SecPolicySearchCopyNext(searchRef, &policy);
- if (err || !policy) LogMsg("getCertChain: SecPolicySearchCopyNext() returned %d", (int) err);
+ if (err || !policy) LogMsg("CopyCertChain: SecPolicySearchCopyNext() returned %d", (int) err);
else
{
CFArrayRef wrappedCert = CFArrayCreate(NULL, (const void**) &cert, 1, &kCFTypeArrayCallBacks);
- if (!wrappedCert) LogMsg("getCertChain: wrappedCert is NULL");
+ if (!wrappedCert) LogMsg("CopyCertChain: wrappedCert is NULL");
else
{
SecTrustRef trust;
err = SecTrustCreateWithCertificates(wrappedCert, policy, &trust);
- if (err || !trust) LogMsg("getCertChain: SecTrustCreateWithCertificates() returned %d", (int) err);
+ if (err || !trust) LogMsg("CopyCertChain: SecTrustCreateWithCertificates() returned %d", (int) err);
else
{
err = SecTrustEvaluate(trust, NULL);
- if (err) LogMsg("getCertChain: SecTrustEvaluate() returned %d", (int) err);
+ if (err) LogMsg("CopyCertChain: SecTrustEvaluate() returned %d", (int) err);
else
{
CFArrayRef rawCertChain;
CSSM_TP_APPLE_EVIDENCE_INFO *statusChain = NULL;
err = SecTrustGetResult(trust, NULL, &rawCertChain, &statusChain);
- if (err || !rawCertChain || !statusChain) LogMsg("getCertChain: SecTrustGetResult() returned %d", (int) err);
+ if (err || !rawCertChain || !statusChain) LogMsg("CopyCertChain: SecTrustGetResult() returned %d", (int) err);
else
{
certChain = CFArrayCreateMutableCopy(NULL, 0, rawCertChain);
- if (!certChain) LogMsg("getCertChain: certChain is NULL");
+ if (!certChain) LogMsg("CopyCertChain: certChain is NULL");
else
{
// Replace the SecCertificateRef at certChain[0] with a SecIdentityRef per documentation for SSLSetCertificate:
@@ -3734,6 +3793,7 @@ mDNSlocal CFArrayRef GetCertChain(SecIdentityRef identity)
}
CFRelease(searchRef);
}
+#pragma clang diagnostic pop
CFRelease(cert);
}
return certChain;
@@ -3749,6 +3809,8 @@ mDNSexport mStatus mDNSPlatformTLSSetupCerts(void)
SecIdentitySearchRef srchRef = nil;
OSStatus err;
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
// search for "any" identity matching specified key use
// In this app, we expect there to be exactly one
err = SecIdentitySearchCreate(NULL, CSSM_KEYUSE_DECRYPT, &srchRef);
@@ -3756,13 +3818,14 @@ mDNSexport mStatus mDNSPlatformTLSSetupCerts(void)
err = SecIdentitySearchCopyNext(srchRef, &identity);
if (err) { LogMsg("ERROR: mDNSPlatformTLSSetupCerts: SecIdentitySearchCopyNext returned %d", (int) err); return err; }
+#pragma clang diagnostic pop
if (CFGetTypeID(identity) != SecIdentityGetTypeID())
{ LogMsg("ERROR: mDNSPlatformTLSSetupCerts: SecIdentitySearchCopyNext CFTypeID failure"); return mStatus_UnknownErr; }
- // Found one. Call getCertChain to create the correct certificate chain.
- ServerCerts = GetCertChain(identity);
- if (ServerCerts == nil) { LogMsg("ERROR: mDNSPlatformTLSSetupCerts: getCertChain error"); return mStatus_UnknownErr; }
+ // Found one. Call CopyCertChain to create the correct certificate chain.
+ ServerCerts = CopyCertChain(identity);
+ if (ServerCerts == nil) { LogMsg("ERROR: mDNSPlatformTLSSetupCerts: CopyCertChain error"); return mStatus_UnknownErr; }
return mStatus_NoError;
#endif /* NO_SECURITYFRAMEWORK */
@@ -3841,26 +3904,22 @@ mDNSlocal mStatus SetupAddr(mDNSAddr *ip, const struct sockaddr *const sa)
mDNSlocal mDNSEthAddr GetBSSID(char *ifa_name)
{
mDNSEthAddr eth = zeroEthAddr;
- SCDynamicStoreRef store = SCDynamicStoreCreate(NULL, CFSTR("mDNSResponder:GetBSSID"), NULL, NULL);
- if (!store)
- LogMsg("GetBSSID: SCDynamicStoreCreate failed: %s", SCErrorString(SCError()));
- else
+
+ CFStringRef entityname = CFStringCreateWithFormat(NULL, NULL, CFSTR("State:/Network/Interface/%s/AirPort"), ifa_name);
+ if (entityname)
{
- CFStringRef entityname = CFStringCreateWithFormat(NULL, NULL, CFSTR("State:/Network/Interface/%s/AirPort"), ifa_name);
- if (entityname)
+ CFDictionaryRef dict = SCDynamicStoreCopyValue(NULL, entityname);
+ if (dict)
{
- CFDictionaryRef dict = SCDynamicStoreCopyValue(store, entityname);
- if (dict)
- {
- CFRange range = { 0, 6 }; // Offset, length
- CFDataRef data = CFDictionaryGetValue(dict, CFSTR("BSSID"));
- if (data && CFDataGetLength(data) == 6) CFDataGetBytes(data, range, eth.b);
- CFRelease(dict);
- }
- CFRelease(entityname);
+ CFRange range = { 0, 6 }; // Offset, length
+ CFDataRef data = CFDictionaryGetValue(dict, CFSTR("BSSID"));
+ if (data && CFDataGetLength(data) == 6)
+ CFDataGetBytes(data, range, eth.b);
+ CFRelease(dict);
}
- CFRelease(store);
+ CFRelease(entityname);
}
+
return(eth);
}
@@ -4005,6 +4064,134 @@ mDNSlocal u_int64_t getExtendedFlags(char * ifa_name)
return ifr.ifr_eflags;
}
+#if TARGET_OS_IPHONE
+
+// Function pointers for the routines we use in the MobileWiFi framework.
+static WiFiManagerClientRef (*WiFiManagerClientCreate_p)(CFAllocatorRef allocator, WiFiClientType type) = mDNSNULL;
+static CFArrayRef (*WiFiManagerClientCopyDevices_p)(WiFiManagerClientRef manager) = mDNSNULL;
+static WiFiNetworkRef (*WiFiDeviceClientCopyCurrentNetwork_p)(WiFiDeviceClientRef device) = mDNSNULL;
+static bool (*WiFiNetworkIsCarPlay_p)(WiFiNetworkRef network) = mDNSNULL;
+
+mDNSlocal mDNSBool MobileWiFiLibLoad(void)
+{
+ static mDNSBool isInitialized = mDNSfalse;
+ static void *MobileWiFiLib_p = mDNSNULL;
+ static const char path[] = "/System/Library/PrivateFrameworks/MobileWiFi.framework/MobileWiFi";
+
+ if (!isInitialized)
+ {
+ if (!MobileWiFiLib_p)
+ {
+ MobileWiFiLib_p = dlopen(path, RTLD_LAZY | RTLD_LOCAL);
+ if (!MobileWiFiLib_p)
+ {
+ LogInfo("MobileWiFiLibLoad: dlopen() failed.");
+ goto exit;
+ }
+ }
+
+ if (!WiFiManagerClientCreate_p)
+ {
+ WiFiManagerClientCreate_p = dlsym(MobileWiFiLib_p, "WiFiManagerClientCreate");
+ if (!WiFiManagerClientCreate_p)
+ {
+ LogInfo("MobileWiFiLibLoad: load of WiFiManagerClientCreate symbol failed.");
+ goto exit;
+ }
+ }
+
+ if (!WiFiManagerClientCopyDevices_p)
+ {
+ WiFiManagerClientCopyDevices_p = dlsym(MobileWiFiLib_p, "WiFiManagerClientCopyDevices");
+ if (!WiFiManagerClientCopyDevices_p)
+ {
+ LogInfo("MobileWiFiLibLoad: load of WiFiManagerClientCopyDevices symbol failed.");
+ goto exit;
+ }
+ }
+
+ if (!WiFiDeviceClientCopyCurrentNetwork_p)
+ {
+ WiFiDeviceClientCopyCurrentNetwork_p = dlsym(MobileWiFiLib_p, "WiFiDeviceClientCopyCurrentNetwork");
+ if (!WiFiDeviceClientCopyCurrentNetwork_p)
+ {
+ LogInfo("MobileWiFiLibLoad: load of WiFiDeviceClientCopyCurrentNetwork symbol failed.");
+ goto exit;
+ }
+ }
+
+ if (!WiFiNetworkIsCarPlay_p)
+ {
+ WiFiNetworkIsCarPlay_p = dlsym(MobileWiFiLib_p, "WiFiNetworkIsCarPlay");
+ if (!WiFiNetworkIsCarPlay_p)
+ {
+ LogInfo("MobileWiFiLibLoad: load of WiFiNetworkIsCarPlay symbol failed.");
+ goto exit;
+ }
+ }
+
+ isInitialized = mDNStrue;
+ }
+
+exit:
+ return isInitialized;
+}
+
+// Return true if the interface is associate to a CarPlay hosted SSID.
+mDNSlocal mDNSBool IsCarPlaySSID(char *ifa_name)
+{
+ mDNSBool rvalue = mDNSfalse;
+
+ if (!MobileWiFiLibLoad())
+ return mDNSfalse;
+
+ // If we have associated with a CarPlay hosted SSID, then use the same
+ // optimizations that are used if an interface has the IFEF_DIRECTLINK flag set.
+
+ WiFiManagerClientRef manager;
+
+ manager = WiFiManagerClientCreate_p(NULL, kWiFiClientTypeNormal);
+ if (manager != NULL)
+ {
+ CFArrayRef devices;
+
+ devices = WiFiManagerClientCopyDevices_p(manager);
+ if (devices != NULL)
+ {
+ WiFiDeviceClientRef device;
+ WiFiNetworkRef network;
+
+ device = (WiFiDeviceClientRef)CFArrayGetValueAtIndex(devices, 0);
+ network = WiFiDeviceClientCopyCurrentNetwork_p(device);
+ if (network != NULL)
+ {
+ if (WiFiNetworkIsCarPlay_p(network))
+ {
+ LogInfo("%s is CarPlay hosted", ifa_name);
+ rvalue = mDNStrue;
+ }
+ CFRelease(network);
+ }
+ CFRelease(devices);
+ }
+ CFRelease(manager);
+ }
+
+ return rvalue;
+}
+
+#else // TARGET_OS_IPHONE
+
+mDNSlocal mDNSBool IsCarPlaySSID(char *ifa_name)
+{
+ (void)ifa_name; // unused
+
+ // OSX WifiManager currently does not implement WiFiNetworkIsCarPlay()
+ return mDNSfalse;;
+}
+
+#endif // TARGET_OS_IPHONE
+
// Returns pointer to newly created NetworkInterfaceInfoOSX object, or
// pointer to already-existing NetworkInterfaceInfoOSX object found in list, or
// may return NULL if out of memory (unlikely) or parameters are invalid for some reason
@@ -4050,7 +4237,7 @@ mDNSlocal NetworkInterfaceInfoOSX *AddInterfaceToList(mDNS *const m, struct ifad
{
mDNS_Lock(m);
if (NetWake) mDNS_ActivateNetWake_internal (m, &(*p)->ifinfo);
- else mDNS_DeactivateNetWake_internal(m, &(*p)->ifinfo);
+ else mDNS_DeactivateNetWake_internal(m, &(*p)->ifinfo);
mDNS_Unlock(m);
}
}
@@ -4075,7 +4262,11 @@ mDNSlocal NetworkInterfaceInfoOSX *AddInterfaceToList(mDNS *const m, struct ifad
i->ifinfo.McastTxRx = mDNSfalse; // For now; will be set up later at the end of UpdateInterfaceList
i->ifinfo.Loopback = ((ifa->ifa_flags & IFF_LOOPBACK) != 0) ? mDNStrue : mDNSfalse;
i->ifinfo.IgnoreIPv4LL = ((eflags & IFEF_ARPLL) != 0) ? mDNSfalse : mDNStrue;
- i->ifinfo.DirectLink = (eflags & IFEF_DIRECTLINK) ? mDNStrue: mDNSfalse;
+
+ if (eflags & IFEF_DIRECTLINK)
+ i->ifinfo.DirectLink = mDNStrue;
+ else
+ i->ifinfo.DirectLink = IsCarPlaySSID(ifa->ifa_name);
i->next = mDNSNULL;
i->m = m;
@@ -4085,9 +4276,17 @@ mDNSlocal NetworkInterfaceInfoOSX *AddInterfaceToList(mDNS *const m, struct ifad
i->D2DInterface = (eflags & IFEF_LOCALNET_PRIVATE) ? mDNStrue: mDNSfalse;
if (eflags & IFEF_AWDL)
{
+ // Set SupportsUnicastMDNSResponse false for the AWDL interface since unicast reserves
+ // limited AWDL resources so we don't set the kDNSQClass_UnicastResponse bit in
+ // Bonjour requests over the AWDL interface.
+ i->ifinfo.SupportsUnicastMDNSResponse = mDNSfalse;
AWDLInterfaceID = i->ifinfo.InterfaceID;
LogInfo("AddInterfaceToList: AWDLInterfaceID = %d", (int) AWDLInterfaceID);
}
+ else
+ {
+ i->ifinfo.SupportsUnicastMDNSResponse = mDNStrue;
+ }
i->AppearanceTime = utc; // Brand new interface; AppearanceTime is now
i->LastSeen = utc;
i->ifa_flags = ifa->ifa_flags;
@@ -4100,7 +4299,7 @@ mDNSlocal NetworkInterfaceInfoOSX *AddInterfaceToList(mDNS *const m, struct ifad
i->Registered = mDNSNULL;
// Do this AFTER i->BSSID has been set up
- i->ifinfo.NetWake = NetWakeInterface(i);
+ i->ifinfo.NetWake = (eflags & IFEF_EXPENSIVE)? mDNSfalse : NetWakeInterface(i);
GetMAC(&i->ifinfo.MAC, scope_id);
if (i->ifinfo.NetWake && !i->ifinfo.MAC.l[0])
LogMsg("AddInterfaceToList: Bad MAC address %.6a for %d %s %#a", &i->ifinfo.MAC, scope_id, i->ifinfo.ifname, &ip);
@@ -4203,7 +4402,6 @@ mDNSlocal void UpdateAutoTunnelDomainStatus(const mDNS *const m, const DomainAut
const NATTraversalInfo *const llq = m->LLQNAT.clientCallback ? &m->LLQNAT : mDNSNULL;
const NATTraversalInfo *const tun = m->AutoTunnelNAT.clientContext ? &m->AutoTunnelNAT : mDNSNULL;
char buffer[1024];
- mDNSu32 buflen = 0;
CFMutableDictionaryRef dict = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
CFStringRef domain = NULL;
CFStringRef tmp = NULL;
@@ -4222,7 +4420,7 @@ mDNSlocal void UpdateAutoTunnelDomainStatus(const mDNS *const m, const DomainAut
if (!dict) { LogMsg("UpdateAutoTunnelDomainStatus: Could not create CFDictionary dict"); return; }
- buflen = mDNS_snprintf(buffer, sizeof(buffer), "%##s", info->domain.c);
+ mDNS_snprintf(buffer, sizeof(buffer), "%##s", info->domain.c);
domain = CFStringCreateWithCString(NULL, buffer, kCFStringEncodingUTF8);
if (!domain) { LogMsg("UpdateAutoTunnelDomainStatus: Could not create CFString domain"); return; }
@@ -5204,6 +5402,7 @@ mDNSexport void AddNewClientTunnel(mDNS *const m, DNSQuestion *const q)
p->q.qnameOrig = mDNSNULL;
p->q.AnonInfo = mDNSNULL;
p->q.pid = mDNSPlatformGetPID();
+ p->q.euid = 0;
p->q.QuestionCallback = AutoTunnelCallback;
p->q.QuestionContext = p;
@@ -5222,7 +5421,7 @@ mDNSlocal mStatus UpdateInterfaceList(mDNS *const m, mDNSs32 utc)
{
mDNSBool foundav4 = mDNSfalse;
mDNSBool foundav6 = mDNSfalse;
- struct ifaddrs *ifa = myGetIfAddrs(1);
+ struct ifaddrs *ifa = myGetIfAddrs(0);
struct ifaddrs *v4Loopback = NULL;
struct ifaddrs *v6Loopback = NULL;
char defaultname[64];
@@ -5402,14 +5601,14 @@ mDNSlocal mStatus UpdateInterfaceList(mDNS *const m, mDNSs32 utc)
namechange = mDNStrue;
}
-#if APPLE_OSX_mDNSResponder
if (namechange) // If either name has changed, we need to tickle our AutoTunnel state machine to update its registered records
{
+#if APPLE_OSX_mDNSResponder
DomainAuthInfo *info;
for (info = m->AuthInfoList; info; info = info->next)
if (info->AutoTunnel) AutoTunnelHostNameChanged(m, info);
- }
#endif // APPLE_OSX_mDNSResponder
+ }
return(mStatus_NoError);
}
@@ -5430,7 +5629,7 @@ mDNSlocal int CountMaskBits(mDNSAddr *mask)
return(bits);
}
-// returns count of non-link local V4 addresses registered
+// Returns count of non-link local V4 addresses registered (why? -- SC)
mDNSlocal int SetupActiveInterfaces(mDNS *const m, mDNSs32 utc)
{
NetworkInterfaceInfoOSX *i;
@@ -5452,9 +5651,7 @@ mDNSlocal int SetupActiveInterfaces(mDNS *const m, mDNSs32 utc)
{
// Note: If i->Registered is set, that means we've called mDNS_RegisterInterface() for this interface,
// so we need to make sure we call mDNS_DeregisterInterface() before disposing it.
- // If i->Registered is NOT set, then we haven't registered it and we should not try to deregister it
- //
-
+ // If i->Registered is NOT set, then we haven't registered it and we should not try to deregister it.
i->Registered = primary;
// If i->LastSeen == utc, then this is a brand-new interface, just created, or an interface that never went away.
@@ -5463,7 +5660,7 @@ mDNSlocal int SetupActiveInterfaces(mDNS *const m, mDNSs32 utc)
i->Occulting = !(i->ifa_flags & IFF_LOOPBACK) && (utc - i->LastSeen > 0 && utc - i->LastSeen < 60);
// Temporary fix to handle P2P flapping. P2P reuses the scope-id, mac address and the IP address
- // everytime it creates a new interface. We think it is a duplicate and hence consider it
+ // every time it creates a new interface. We think it is a duplicate and hence consider it
// as flashing and occulting, that is, flapping. If an interface is marked as flapping,
// mDNS_RegisterInterface() changes the probe delay from 1/2 second to 5 seconds and
// logs a warning message to system.log noting frequent interface transitions.
@@ -5488,7 +5685,42 @@ mDNSlocal int SetupActiveInterfaces(mDNS *const m, mDNSs32 utc)
n->InterfaceActive ? " (Primary)" : "");
if (!n->McastTxRx)
+ {
debugf("SetupActiveInterfaces: No Tx/Rx on %5s(%lu) %.6a InterfaceID %p %#a", i->ifinfo.ifname, i->scope_id, &i->BSSID, i->ifinfo.InterfaceID, &n->ip);
+#if TARGET_OS_WATCH
+ // We join the Bonjour multicast group on the watch only when a client request is active,
+ // so we leave the multicast group here to clear any residual group membership.
+ if (i->sa_family == AF_INET)
+ {
+ struct ip_mreq imr;
+ primary->ifa_v4addr.s_addr = n->ip.ip.v4.NotAnInteger;
+ imr.imr_multiaddr.s_addr = AllDNSLinkGroup_v4.ip.v4.NotAnInteger;
+ imr.imr_interface = primary->ifa_v4addr;
+
+ if (SearchForInterfaceByName(m, i->ifinfo.ifname, AF_INET) == i)
+ {
+ LogInfo("SetupActiveInterfaces: %5s(%lu) Doing IP_DROP_MEMBERSHIP for %.4a on %.4a", i->ifinfo.ifname, i->scope_id, &imr.imr_multiaddr, &imr.imr_interface);
+ mStatus err = setsockopt(m->p->permanentsockets.sktv4, IPPROTO_IP, IP_DROP_MEMBERSHIP, &imr, sizeof(imr));
+ if (err < 0 && (errno != EADDRNOTAVAIL))
+ LogMsg("setsockopt - IP_DROP_MEMBERSHIP error %d errno %d (%s)", err, errno, strerror(errno));
+ }
+ }
+ if (i->sa_family == AF_INET6)
+ {
+ struct ipv6_mreq i6mr;
+ i6mr.ipv6mr_interface = primary->scope_id;
+ i6mr.ipv6mr_multiaddr = *(struct in6_addr*)&AllDNSLinkGroup_v6.ip.v6;
+
+ if (SearchForInterfaceByName(m, i->ifinfo.ifname, AF_INET6) == i)
+ {
+ LogInfo("SetupActiveInterfaces: %5s(%lu) Doing IPV6_LEAVE_GROUP for %.16a on %u", i->ifinfo.ifname, i->scope_id, &i6mr.ipv6mr_multiaddr, i6mr.ipv6mr_interface);
+ mStatus err = setsockopt(m->p->permanentsockets.sktv6, IPPROTO_IPV6, IPV6_LEAVE_GROUP, &i6mr, sizeof(i6mr));
+ if (err < 0 && (errno != EADDRNOTAVAIL))
+ LogMsg("setsockopt - IPV6_LEAVE_GROUP error %d errno %d (%s) group %.16a on %u", err, errno, strerror(errno), &i6mr.ipv6mr_multiaddr, i6mr.ipv6mr_interface);
+ }
+ }
+#endif // TARGET_OS_WATCH
+ }
else
{
if (i->sa_family == AF_INET)
@@ -5559,7 +5791,7 @@ mDNSlocal void MarkAllInterfacesInactive(mDNS *const m, mDNSs32 utc)
}
}
-// returns count of non-link local V4 addresses deregistered
+// Returns count of non-link local V4 addresses deregistered (why? -- SC)
mDNSlocal int ClearInactiveInterfaces(mDNS *const m, mDNSs32 utc)
{
// First pass:
@@ -5585,7 +5817,7 @@ mDNSlocal int ClearInactiveInterfaces(mDNS *const m, mDNSs32 utc)
i->ifinfo.InterfaceActive ? " (Primary)" : "");
// Temporary fix to handle P2P flapping. P2P reuses the scope-id, mac address and the IP address
- // everytime it creates a new interface. We think it is a duplicate and hence consider it
+ // every time it creates a new interface. We think it is a duplicate and hence consider it
// as flashing and occulting. The "core" does not flush the cache for this case. This leads to
// stale data returned to the application even after the interface is removed. The application
// then starts to send data but the new interface is not yet created.
@@ -5801,7 +6033,6 @@ mDNSlocal void ConfigDNSServers(mDNS *const m, dns_resolver_t *r, mDNSInterfaceI
domainname d;
int serviceID = 0;
mDNSBool cellIntf = mDNSfalse;
- mDNSBool scopedDNS = mDNSfalse;
mDNSBool reqA, reqAAAA;
if (!r->domain || !*r->domain)
@@ -5814,11 +6045,7 @@ mDNSlocal void ConfigDNSServers(mDNS *const m, dns_resolver_t *r, mDNSInterfaceI
return;
}
// Parse the resolver specific attributes that affects all the DNS servers.
- if (scope == kScopeInterfaceID)
- {
- scopedDNS = mDNStrue;
- }
- else if (scope == kScopeServiceID)
+ if (scope == kScopeServiceID)
{
serviceID = r->service_identifier;
}
@@ -6107,124 +6334,114 @@ mDNSlocal void SetupActiveDirectoryDomain(dns_config_t *config)
mDNSlocal void SetupDDNSDomains(domainname *const fqdn, DNameListElem **RegDomains, DNameListElem **BrowseDomains)
{
int i;
- char buf[MAX_ESCAPED_DOMAIN_NAME]; // Max legal C-string name, including terminating NUL
+ char buf[MAX_ESCAPED_DOMAIN_NAME]; // Max legal C-string name, including terminating NULL
domainname d;
- SCDynamicStoreRef store = SCDynamicStoreCreate(NULL, CFSTR("mDNSResponder:SetupDDNSDomains"), NULL, NULL);
- if (!store)
- {
- LogMsg("SetupDDNSDomains: SCDynamicStoreCreate failed: %s", SCErrorString(SCError()));
- }
- else
+ CFDictionaryRef ddnsdict = SCDynamicStoreCopyValue(NULL, NetworkChangedKey_DynamicDNS);
+ if (ddnsdict)
{
- CFDictionaryRef ddnsdict = SCDynamicStoreCopyValue(store, NetworkChangedKey_DynamicDNS);
- if (ddnsdict)
+ if (fqdn)
{
- if (fqdn)
+ CFArrayRef fqdnArray = CFDictionaryGetValue(ddnsdict, CFSTR("HostNames"));
+ if (fqdnArray && CFArrayGetCount(fqdnArray) > 0)
{
- CFArrayRef fqdnArray = CFDictionaryGetValue(ddnsdict, CFSTR("HostNames"));
- if (fqdnArray && CFArrayGetCount(fqdnArray) > 0)
+ // for now, we only look at the first array element. if we ever support multiple configurations, we will walk the list
+ CFDictionaryRef fqdnDict = CFArrayGetValueAtIndex(fqdnArray, 0);
+ if (fqdnDict && DictionaryIsEnabled(fqdnDict))
{
- // for now, we only look at the first array element. if we ever support multiple configurations, we will walk the list
- CFDictionaryRef fqdnDict = CFArrayGetValueAtIndex(fqdnArray, 0);
- if (fqdnDict && DictionaryIsEnabled(fqdnDict))
+ CFStringRef name = CFDictionaryGetValue(fqdnDict, CFSTR("Domain"));
+ if (name)
{
- CFStringRef name = CFDictionaryGetValue(fqdnDict, CFSTR("Domain"));
- if (name)
- {
- if (!CFStringGetCString(name, buf, sizeof(buf), kCFStringEncodingUTF8) ||
- !MakeDomainNameFromDNSNameString(fqdn, buf) || !fqdn->c[0])
- LogMsg("GetUserSpecifiedDDNSConfig SCDynamicStore bad DDNS host name: %s", buf[0] ? buf : "(unknown)");
- else debugf("GetUserSpecifiedDDNSConfig SCDynamicStore DDNS host name: %s", buf);
- }
+ if (!CFStringGetCString(name, buf, sizeof(buf), kCFStringEncodingUTF8) ||
+ !MakeDomainNameFromDNSNameString(fqdn, buf) || !fqdn->c[0])
+ LogMsg("GetUserSpecifiedDDNSConfig SCDynamicStore bad DDNS host name: %s", buf[0] ? buf : "(unknown)");
+ else
+ debugf("GetUserSpecifiedDDNSConfig SCDynamicStore DDNS host name: %s", buf);
}
}
}
-
- if (RegDomains)
+ }
+ if (RegDomains)
+ {
+ CFArrayRef regArray = CFDictionaryGetValue(ddnsdict, CFSTR("RegistrationDomains"));
+ if (regArray && CFArrayGetCount(regArray) > 0)
{
- CFArrayRef regArray = CFDictionaryGetValue(ddnsdict, CFSTR("RegistrationDomains"));
- if (regArray && CFArrayGetCount(regArray) > 0)
+ CFDictionaryRef regDict = CFArrayGetValueAtIndex(regArray, 0);
+ if (regDict && DictionaryIsEnabled(regDict))
{
- CFDictionaryRef regDict = CFArrayGetValueAtIndex(regArray, 0);
- if (regDict && DictionaryIsEnabled(regDict))
+ CFStringRef name = CFDictionaryGetValue(regDict, CFSTR("Domain"));
+ if (name)
{
- CFStringRef name = CFDictionaryGetValue(regDict, CFSTR("Domain"));
- if (name)
+ if (!CFStringGetCString(name, buf, sizeof(buf), kCFStringEncodingUTF8) ||
+ !MakeDomainNameFromDNSNameString(&d, buf) || !d.c[0])
+ LogMsg("GetUserSpecifiedDDNSConfig SCDynamicStore bad DDNS registration domain: %s", buf[0] ? buf : "(unknown)");
+ else
{
- if (!CFStringGetCString(name, buf, sizeof(buf), kCFStringEncodingUTF8) ||
- !MakeDomainNameFromDNSNameString(&d, buf) || !d.c[0])
- LogMsg("GetUserSpecifiedDDNSConfig SCDynamicStore bad DDNS registration domain: %s", buf[0] ? buf : "(unknown)");
- else
- {
- debugf("GetUserSpecifiedDDNSConfig SCDynamicStore DDNS registration domain: %s", buf);
- AppendDNameListElem(&RegDomains, 0, &d);
- }
+ debugf("GetUserSpecifiedDDNSConfig SCDynamicStore DDNS registration domain: %s", buf);
+ AppendDNameListElem(&RegDomains, 0, &d);
}
}
}
}
-
- if (BrowseDomains)
+ }
+ if (BrowseDomains)
+ {
+ CFArrayRef browseArray = CFDictionaryGetValue(ddnsdict, CFSTR("BrowseDomains"));
+ if (browseArray)
{
- CFArrayRef browseArray = CFDictionaryGetValue(ddnsdict, CFSTR("BrowseDomains"));
- if (browseArray)
+ for (i = 0; i < CFArrayGetCount(browseArray); i++)
{
- for (i = 0; i < CFArrayGetCount(browseArray); i++)
+ CFDictionaryRef browseDict = CFArrayGetValueAtIndex(browseArray, i);
+ if (browseDict && DictionaryIsEnabled(browseDict))
{
- CFDictionaryRef browseDict = CFArrayGetValueAtIndex(browseArray, i);
- if (browseDict && DictionaryIsEnabled(browseDict))
+ CFStringRef name = CFDictionaryGetValue(browseDict, CFSTR("Domain"));
+ if (name)
{
- CFStringRef name = CFDictionaryGetValue(browseDict, CFSTR("Domain"));
- if (name)
+ if (!CFStringGetCString(name, buf, sizeof(buf), kCFStringEncodingUTF8) ||
+ !MakeDomainNameFromDNSNameString(&d, buf) || !d.c[0])
+ LogMsg("GetUserSpecifiedDDNSConfig SCDynamicStore bad DDNS browsing domain: %s", buf[0] ? buf : "(unknown)");
+ else
{
- if (!CFStringGetCString(name, buf, sizeof(buf), kCFStringEncodingUTF8) ||
- !MakeDomainNameFromDNSNameString(&d, buf) || !d.c[0])
- LogMsg("GetUserSpecifiedDDNSConfig SCDynamicStore bad DDNS browsing domain: %s", buf[0] ? buf : "(unknown)");
- else
- {
- debugf("GetUserSpecifiedDDNSConfig SCDynamicStore DDNS browsing domain: %s", buf);
- AppendDNameListElem(&BrowseDomains, 0, &d);
- }
+ debugf("GetUserSpecifiedDDNSConfig SCDynamicStore DDNS browsing domain: %s", buf);
+ AppendDNameListElem(&BrowseDomains, 0, &d);
}
}
}
}
}
- CFRelease(ddnsdict);
}
-
- if (RegDomains)
+ CFRelease(ddnsdict);
+ }
+ if (RegDomains)
+ {
+ CFDictionaryRef btmm = SCDynamicStoreCopyValue(NULL, NetworkChangedKey_BackToMyMac);
+ if (btmm)
{
- CFDictionaryRef btmm = SCDynamicStoreCopyValue(store, NetworkChangedKey_BackToMyMac);
- if (btmm)
+ CFIndex size = CFDictionaryGetCount(btmm);
+ const void *key[size];
+ const void *val[size];
+ CFDictionaryGetKeysAndValues(btmm, key, val);
+ for (i = 0; i < size; i++)
{
- CFIndex size = CFDictionaryGetCount(btmm);
- const void *key[size];
- const void *val[size];
- CFDictionaryGetKeysAndValues(btmm, key, val);
- for (i = 0; i < size; i++)
+ LogInfo("BackToMyMac %d", i);
+ if (!CFStringGetCString(key[i], buf, sizeof(buf), kCFStringEncodingUTF8))
+ LogMsg("Can't read BackToMyMac %d key %s", i, buf);
+ else
{
- LogInfo("BackToMyMac %d", i);
- if (!CFStringGetCString(key[i], buf, sizeof(buf), kCFStringEncodingUTF8))
- LogMsg("Can't read BackToMyMac %d key %s", i, buf);
- else
+ mDNSu32 uid = atoi(buf);
+ if (!CFStringGetCString(val[i], buf, sizeof(buf), kCFStringEncodingUTF8))
+ LogMsg("Can't read BackToMyMac %d val %s", i, buf);
+ else if (MakeDomainNameFromDNSNameString(&d, buf) && d.c[0])
{
- mDNSu32 uid = atoi(buf);
- if (!CFStringGetCString(val[i], buf, sizeof(buf), kCFStringEncodingUTF8))
- LogMsg("Can't read BackToMyMac %d val %s", i, buf);
- else if (MakeDomainNameFromDNSNameString(&d, buf) && d.c[0])
- {
- LogInfo("BackToMyMac %d %d %##s", i, uid, d.c);
- AppendDNameListElem(&RegDomains, uid, &d);
- }
+ LogInfo("BackToMyMac %d %d %##s", i, uid, d.c);
+ AppendDNameListElem(&RegDomains, uid, &d);
}
}
- CFRelease(btmm);
}
+ CFRelease(btmm);
}
- CFRelease(store);
}
+
}
// Returns mDNSfalse, if it does not set the configuration i.e., if the DNS configuration did not change
@@ -6296,7 +6513,6 @@ mDNSexport mDNSBool mDNSPlatformSetDNSConfig(mDNS *const m, mDNSBool setservers,
dns_config_t *config = dns_configuration_copy();
if (!config)
{
- // When running on 10.3 (build 7xxx) and earlier, we don't expect dns_configuration_copy() to succeed
// On 10.4, calls to dns_configuration_copy() early in the boot process often fail.
// Apparently this is expected behaviour -- "not a bug".
// Accordingly, we suppress syslog messages for the first three minutes after boot.
@@ -6355,8 +6571,6 @@ mDNSexport mDNSBool mDNSPlatformSetDNSConfig(mDNS *const m, mDNSBool setservers,
}
dns_configuration_free(config);
if (setsearch) FinalizeSearchDomainHash(m, &sdc);
- setservers = mDNSfalse; // Done these now -- no need to fetch the same data from SCDynamicStore
- setsearch = mDNSfalse;
}
}
#endif // MDNS_NO_DNSINFO
@@ -6369,81 +6583,78 @@ mDNSexport mStatus mDNSPlatformGetPrimaryInterface(mDNS *const m, mDNSAddr *v4,
{
char buf[256];
(void)m; // Unused
-
- SCDynamicStoreRef store = SCDynamicStoreCreate(NULL, CFSTR("mDNSResponder:mDNSPlatformGetPrimaryInterface"), NULL, NULL);
- if (!store)
- LogMsg("mDNSPlatformGetPrimaryInterface: SCDynamicStoreCreate failed: %s", SCErrorString(SCError()));
- else
+
+ CFDictionaryRef dict = SCDynamicStoreCopyValue(NULL, NetworkChangedKey_IPv4);
+ if (dict)
{
- CFDictionaryRef dict = SCDynamicStoreCopyValue(store, NetworkChangedKey_IPv4);
- if (dict)
+ r->type = mDNSAddrType_IPv4;
+ r->ip.v4 = zerov4Addr;
+ CFStringRef string = CFDictionaryGetValue(dict, kSCPropNetIPv4Router);
+ if (string)
{
- r->type = mDNSAddrType_IPv4;
- r->ip.v4 = zerov4Addr;
- CFStringRef string = CFDictionaryGetValue(dict, kSCPropNetIPv4Router);
- if (string)
+ if (!CFStringGetCString(string, buf, 256, kCFStringEncodingUTF8))
+ LogMsg("Could not convert router to CString");
+ else
{
- if (!CFStringGetCString(string, buf, 256, kCFStringEncodingUTF8))
- LogMsg("Could not convert router to CString");
- else
- {
- struct sockaddr_in saddr;
- saddr.sin_len = sizeof(saddr);
- saddr.sin_family = AF_INET;
- saddr.sin_port = 0;
- inet_aton(buf, &saddr.sin_addr);
-
- *(in_addr_t *)&r->ip.v4 = saddr.sin_addr.s_addr;
- }
+ struct sockaddr_in saddr;
+ saddr.sin_len = sizeof(saddr);
+ saddr.sin_family = AF_INET;
+ saddr.sin_port = 0;
+ inet_aton(buf, &saddr.sin_addr);
+ *(in_addr_t *)&r->ip.v4 = saddr.sin_addr.s_addr;
}
+ }
+ string = CFDictionaryGetValue(dict, kSCDynamicStorePropNetPrimaryInterface);
+ if (string)
+ {
+ mDNSBool HavePrimaryGlobalv6 = mDNSfalse; // does the primary interface have a global v6 address?
+ struct ifaddrs *ifa = myGetIfAddrs(1);
+ *v4 = *v6 = zeroAddr;
- string = CFDictionaryGetValue(dict, kSCDynamicStorePropNetPrimaryInterface);
- if (string)
+ if (!CFStringGetCString(string, buf, 256, kCFStringEncodingUTF8))
+ {
+ LogMsg("Could not convert router to CString");
+ goto exit;
+ }
+ // find primary interface in list
+ while (ifa && (mDNSIPv4AddressIsZero(v4->ip.v4) || mDNSv4AddressIsLinkLocal(&v4->ip.v4) || !HavePrimaryGlobalv6))
{
- mDNSBool HavePrimaryGlobalv6 = mDNSfalse; // does the primary interface have a global v6 address?
- struct ifaddrs *ifa = myGetIfAddrs(1);
-
- *v4 = *v6 = zeroAddr;
-
- if (!CFStringGetCString(string, buf, 256, kCFStringEncodingUTF8)) { LogMsg("Could not convert router to CString"); goto exit; }
-
- // find primary interface in list
- while (ifa && (mDNSIPv4AddressIsZero(v4->ip.v4) || mDNSv4AddressIsLinkLocal(&v4->ip.v4) || !HavePrimaryGlobalv6))
+ mDNSAddr tmp6 = zeroAddr;
+ if (!strcmp(buf, ifa->ifa_name))
{
- mDNSAddr tmp6 = zeroAddr;
- if (!strcmp(buf, ifa->ifa_name))
+ if (ifa->ifa_addr->sa_family == AF_INET)
{
- if (ifa->ifa_addr->sa_family == AF_INET)
- {
- if (mDNSIPv4AddressIsZero(v4->ip.v4) || mDNSv4AddressIsLinkLocal(&v4->ip.v4)) SetupAddr(v4, ifa->ifa_addr);
- }
- else if (ifa->ifa_addr->sa_family == AF_INET6)
- {
- SetupAddr(&tmp6, ifa->ifa_addr);
- if (tmp6.ip.v6.b[0] >> 5 == 1) // global prefix: 001
- { HavePrimaryGlobalv6 = mDNStrue; *v6 = tmp6; }
- }
+ if (mDNSIPv4AddressIsZero(v4->ip.v4) || mDNSv4AddressIsLinkLocal(&v4->ip.v4))
+ SetupAddr(v4, ifa->ifa_addr);
}
- else
+ else if (ifa->ifa_addr->sa_family == AF_INET6)
{
- // We'll take a V6 address from the non-primary interface if the primary interface doesn't have a global V6 address
- if (!HavePrimaryGlobalv6 && ifa->ifa_addr->sa_family == AF_INET6 && !v6->ip.v6.b[0])
- {
- SetupAddr(&tmp6, ifa->ifa_addr);
- if (tmp6.ip.v6.b[0] >> 5 == 1) *v6 = tmp6;
+ SetupAddr(&tmp6, ifa->ifa_addr);
+ if (tmp6.ip.v6.b[0] >> 5 == 1) // global prefix: 001
+ {
+ HavePrimaryGlobalv6 = mDNStrue;
+ *v6 = tmp6;
}
}
- ifa = ifa->ifa_next;
}
-
- // Note that while we advertise v6, we still require v4 (possibly NAT'd, but not link-local) because we must use
- // V4 to communicate w/ our DNS server
+ else
+ {
+ // We'll take a V6 address from the non-primary interface if the primary interface doesn't have a global V6 address
+ if (!HavePrimaryGlobalv6 && ifa->ifa_addr->sa_family == AF_INET6 && !v6->ip.v6.b[0])
+ {
+ SetupAddr(&tmp6, ifa->ifa_addr);
+ if (tmp6.ip.v6.b[0] >> 5 == 1)
+ *v6 = tmp6;
+ }
+ }
+ ifa = ifa->ifa_next;
}
+ // Note that while we advertise v6, we still require v4 (possibly NAT'd, but not link-local) because we must use
+ // V4 to communicate w/ our DNS server
+ }
exit:
- CFRelease(dict);
- }
- CFRelease(store);
+ CFRelease(dict);
}
return mStatus_NoError;
}
@@ -6941,57 +7152,20 @@ mDNSlocal void SetLocalDomains(void)
mDNSlocal void GetCurrentPMSetting(const CFStringRef name, mDNSs32 *val)
{
-#if USE_IOPMCOPYACTIVEPMPREFERENCES
- CFTypeRef blob = NULL;
- CFStringRef str = NULL;
- CFDictionaryRef odict = NULL;
- CFDictionaryRef idict = NULL;
- CFNumberRef number = NULL;
-
- blob = IOPSCopyPowerSourcesInfo();
- if (!blob) { LogMsg("GetCurrentPMSetting: IOPSCopyPowerSourcesInfo failed!"); goto end; }
-
- odict = IOPMCopyActivePMPreferences();
- if (!odict) { LogMsg("GetCurrentPMSetting: IOPMCopyActivePMPreferences failed!"); goto end; }
-
- str = IOPSGetProvidingPowerSourceType(blob);
- if (!str) { LogMsg("GetCurrentPMSetting: IOPSGetProvidingPowerSourceType failed!"); goto end; }
-
- idict = CFDictionaryGetValue(odict, str);
- if (!idict)
+
+ CFDictionaryRef dict = SCDynamicStoreCopyValue(NULL, NetworkChangedKey_PowerSettings);
+ if (!dict)
{
- char buf[256];
- if (!CFStringGetCString(str, buf, sizeof(buf), kCFStringEncodingUTF8)) buf[0] = 0;
- LogMsg("GetCurrentPMSetting: CFDictionaryGetValue (%s) failed!", buf);
- goto end;
+ LogSPS("GetCurrentPMSetting: Could not get IOPM CurrentSettings dict");
}
-
- number = CFDictionaryGetValue(idict, name);
- if (!number || CFGetTypeID(number) != CFNumberGetTypeID() || !CFNumberGetValue(number, kCFNumberSInt32Type, val))
- *val = 0;
-end:
- if (blob) CFRelease(blob);
- if (odict) CFRelease(odict);
-
-#else
-
- SCDynamicStoreRef store = SCDynamicStoreCreate(NULL, CFSTR("mDNSResponder:GetCurrentPMSetting"), NULL, NULL);
- if (!store) LogMsg("GetCurrentPMSetting: SCDynamicStoreCreate failed: %s", SCErrorString(SCError()));
else
{
- CFDictionaryRef dict = SCDynamicStoreCopyValue(store, NetworkChangedKey_PowerSettings);
- if (!dict) LogSPS("GetCurrentPMSetting: Could not get IOPM CurrentSettings dict");
- else
- {
- CFNumberRef number = CFDictionaryGetValue(dict, name);
- if (!number || CFGetTypeID(number) != CFNumberGetTypeID() || !CFNumberGetValue(number, kCFNumberSInt32Type, val))
- *val = 0;
- CFRelease(dict);
- }
- CFRelease(store);
+ CFNumberRef number = CFDictionaryGetValue(dict, name);
+ if (!number || CFGetTypeID(number) != CFNumberGetTypeID() || !CFNumberGetValue(number, kCFNumberSInt32Type, val))
+ *val = 0;
+ CFRelease(dict);
}
-
-#endif
+
}
#if APPLE_OSX_mDNSResponder
@@ -7301,6 +7475,10 @@ mDNSlocal mDNSu32 CountProxyRecords(mDNS *const m, uint32_t *const numbytes, Net
// attempt to update the record again.
if (isKeepAliveRecord && (UpdateKeepaliveRData(m, rr, intf, mDNSfalse, mDNSNULL) != mStatus_NoError))
LogSPS("CountProxyRecords: Failed to update keepalive record - %s", ARDisplayString(m, rr));
+
+ // Offload only Valid Keepalive records
+ if (isKeepAliveRecord && !mDNSValidKeepAliveRecord(rr))
+ continue;
#else
(void) TCPKAOnly; // unused
(void) supportsTCPKA; // unused
@@ -7338,6 +7516,10 @@ mDNSlocal void GetProxyRecords(mDNS *const m, DNSMessage *const msg, uint32_t *c
// Skip over TCP KeepAlive records if the policy prohibits it or if the interface does not support TCP Keepalive
if ((TCPKAOnly && !isKeepAliveRecord) || (isKeepAliveRecord && !supportsTCPKA))
continue;
+
+ // Offload only Valid Keepalive records
+ if (isKeepAliveRecord && !mDNSValidKeepAliveRecord(rr))
+ continue;
#else
(void) TCPKAOnly; // unused
(void) supportsTCPKA; // unused
@@ -7360,29 +7542,6 @@ mDNSlocal void GetProxyRecords(mDNS *const m, DNSMessage *const msg, uint32_t *c
*numbytes = p - msg->data;
}
-// If compiling with old headers and libraries (pre 10.5) that don't include IOConnectCallStructMethod
-// then we declare a dummy version here so that the code at least compiles
-#ifndef AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER
-static kern_return_t
-IOConnectCallStructMethod(
- mach_port_t connection, // In
- uint32_t selector, // In
- const void *inputStruct, // In
- size_t inputStructCnt, // In
- void *outputStruct, // Out
- size_t *outputStructCnt) // In/Out
-{
- (void)connection;
- (void)selector;
- (void)inputStruct;
- (void)inputStructCnt;
- (void)outputStruct;
- (void)outputStructCnt;
- LogMsg("Compiled without IOConnectCallStructMethod");
- return(KERN_FAILURE);
-}
-#endif
-
mDNSexport mDNSBool SupportsInNICProxy(NetworkInterfaceInfo *const intf)
{
if(!UseInternalSleepProxy)
@@ -7393,12 +7552,12 @@ mDNSexport mDNSBool SupportsInNICProxy(NetworkInterfaceInfo *const intf)
return CheckInterfaceSupport(intf, mDNS_IOREG_KEY);
}
-mDNSexport mStatus ActivateLocalProxy(mDNS *const m, NetworkInterfaceInfo *const intf) // Called with the lock held
+mDNSexport mStatus ActivateLocalProxy(mDNS *const m, NetworkInterfaceInfo *const intf, mDNSBool *keepaliveOnly) // Called with the lock held
{
mStatus result = mStatus_UnknownErr;
mDNSBool TCPKAOnly = mDNSfalse;
mDNSBool supportsTCPKA = mDNSfalse;
- mDNSBool onbattery = mDNSfalse;
+ mDNSBool onbattery = mDNSfalse;
io_service_t service = IOServiceGetMatchingService(kIOMasterPortDefault, IOBSDNameMatching(kIOMasterPortDefault, 0, intf->ifname));
#if APPLE_OSX_mDNSResponder && !TARGET_OS_EMBEDDED
@@ -7489,6 +7648,7 @@ mDNSexport mStatus ActivateLocalProxy(mDNS *const m, NetworkInterfaceInfo *const
IOObjectRelease(parent);
}
IOObjectRelease(service);
+ *keepaliveOnly = TCPKAOnly;
return result;
}
@@ -7638,18 +7798,10 @@ mDNSlocal mDNSv6Addr IPv6AddressFromString(char* buf)
mDNSlocal CFDictionaryRef CopyConnectivityBackToMyMacDict()
{
- SCDynamicStoreRef store = NULL;
CFDictionaryRef connd = NULL;
CFDictionaryRef BTMMDict = NULL;
- store = SCDynamicStoreCreate(NULL, CFSTR("mDNSResponder:CopyConnectivityBackToMyMacDict"), NULL, NULL);
- if (!store)
- {
- LogMsg("CopyConnectivityBackToMyMacDict: SCDynamicStoreCreate failed: %s", SCErrorString(SCError()));
- goto end;
- }
-
- connd = SCDynamicStoreCopyValue(store, NetworkChangedKey_BTMMConnectivity);
+ connd = SCDynamicStoreCopyValue(NULL, NetworkChangedKey_BTMMConnectivity);
if (!connd)
{
LogInfo("CopyConnectivityBackToMyMacDict: SCDynamicStoreCopyValue failed: %s", SCErrorString(SCError()));
@@ -7675,7 +7827,6 @@ mDNSlocal CFDictionaryRef CopyConnectivityBackToMyMacDict()
end:
if (connd) CFRelease(connd);
- if (store) CFRelease(store);
return BTMMDict;
}
@@ -7844,12 +7995,76 @@ mDNSlocal mDNSBool IsAppleNetwork(mDNS *const m)
return mDNSfalse;
}
+// Called with KQueueLock & mDNS lock
+// SetNetworkChanged is allowed to shorten (but not extend) the pause while we wait for configuration changes to settle
+mDNSlocal void SetNetworkChanged(mDNS *const m, mDNSs32 delay)
+{
+ mDNS_CheckLock(m);
+ if (!m->NetworkChanged || m->NetworkChanged - NonZeroTime(m->timenow + delay) > 0)
+ {
+ m->NetworkChanged = NonZeroTime(m->timenow + delay);
+ LogInfo("SetNetworkChanged: Scheduling in %d ticks", delay);
+ }
+ else
+ LogInfo("SetNetworkChanged: *NOT* increasing delay from %d to %d", m->NetworkChanged - m->timenow, delay);
+}
+
+// Called with KQueueLock & mDNS lock
+mDNSlocal void SetKeyChainTimer(mDNS *const m, mDNSs32 delay)
+{
+ // If it's not set or it needs to happen sooner than when it's currently set
+ if (!m->p->KeyChainTimer || m->p->KeyChainTimer - NonZeroTime(m->timenow + delay) > 0)
+ {
+ m->p->KeyChainTimer = NonZeroTime(m->timenow + delay);
+ LogInfo("SetKeyChainTimer: %d", delay);
+ }
+}
+
mDNSexport void mDNSMacOSXNetworkChanged(mDNS *const m)
{
- LogInfo("*** Network Configuration Change *** (%d)%s",
- m->p->NetworkChanged ? mDNS_TimeNow(m) - m->p->NetworkChanged : 0,
- m->p->NetworkChanged ? "" : " (no scheduled configuration change)");
- m->p->NetworkChanged = 0; // If we received a network change event and deferred processing, we're now dealing with it
+ LogInfo("*** Network Configuration Change *** %d ticks late%s",
+ m->NetworkChanged ? mDNS_TimeNow(m) - m->NetworkChanged : 0,
+ m->NetworkChanged ? "" : " (no scheduled configuration change)");
+ m->NetworkChanged = 0; // If we received a network change event and deferred processing, we're now dealing with it
+
+ // If we have any NOTREADY IPv6 addresses, wait until they've finished configuring
+ int InfoSocket = socket(AF_INET6, SOCK_DGRAM, 0);
+ if (InfoSocket > 0)
+ {
+ mDNSBool notready = mDNSfalse;
+ struct ifaddrs *ifa = myGetIfAddrs(1);
+ while (ifa)
+ {
+ if (ifa->ifa_addr->sa_family == AF_INET6)
+ {
+ struct in6_ifreq ifr6;
+ mDNSPlatformMemZero((char *)&ifr6, sizeof(ifr6));
+ strlcpy(ifr6.ifr_name, ifa->ifa_name, sizeof(ifr6.ifr_name));
+ ifr6.ifr_addr = *(struct sockaddr_in6 *)ifa->ifa_addr;
+ // We need to check for IN6_IFF_TENTATIVE here, not IN6_IFF_NOTREADY, because
+ // IN6_IFF_NOTREADY includes both IN6_IFF_TENTATIVE and IN6_IFF_DUPLICATED addresses.
+ // We can expect that an IN6_IFF_TENTATIVE address will shortly become ready,
+ // but an IN6_IFF_DUPLICATED address may not.
+ if (ioctl(InfoSocket, SIOCGIFAFLAG_IN6, &ifr6) != -1)
+ if (ifr6.ifr_ifru.ifru_flags6 & IN6_IFF_TENTATIVE)
+ {
+ LogInfo("*** Network Configuration Change *** IPv6 address %.16a TENTATIVE, will retry", &ifr6.ifr_addr.sin6_addr);
+ notready = mDNStrue;
+ }
+ }
+ ifa = ifa->ifa_next;
+ }
+ close(InfoSocket);
+ if (notready)
+ {
+ mDNS_Lock(m);
+ SetNetworkChanged(m, mDNSPlatformOneSecond / 2);
+ mDNS_Unlock(m);
+ return;
+ }
+ LogInfo("*** Network Configuration Change *** No IPv6 address NOTREADY, will continue");
+ }
+
mDNSs32 utc = mDNSPlatformUTC();
m->SystemWakeOnLANEnabled = SystemWakeForNetworkAccess();
m->SystemSleepOnlyIfWakeOnLAN = SystemSleepOnlyIfWakeOnLAN();
@@ -7933,36 +8148,12 @@ mDNSexport void mDNSMacOSXNetworkChanged(mDNS *const m)
if (IsAppleNetwork(m) != mDNS_McastTracingEnabled)
{
mDNS_McastTracingEnabled = mDNS_McastTracingEnabled ? mDNSfalse : mDNStrue;
- LogMsg("mDNSMacOSXNetworkChanged: Multicast Tracing %s", mDNS_McastTracingEnabled ? "Enabled" : "Disabled");
+ LogInfo("mDNSMacOSXNetworkChanged: Multicast Tracing %s", mDNS_McastTracingEnabled ? "Enabled" : "Disabled");
UpdateDebugState();
}
}
-// Called with KQueueLock & mDNS lock
-// SetNetworkChanged is allowed to extend (but not reduce) the pause while we wait for configuration changes to settle
-mDNSlocal void SetNetworkChanged(mDNS *const m, mDNSs32 delay)
-{
- if (!m->p->NetworkChanged || m->p->NetworkChanged - NonZeroTime(m->timenow + delay) < 0)
- {
- m->p->NetworkChanged = NonZeroTime(m->timenow + delay);
- LogInfo("SetNetworkChanged: Scheduling in %d msec", delay);
- }
- else
- LogInfo("SetNetworkChanged: *NOT* reducing delay from %d to %d", m->p->NetworkChanged - m->timenow, delay);
-}
-
-// Called with KQueueLock & mDNS lock
-mDNSlocal void SetKeyChainTimer(mDNS *const m, mDNSs32 delay)
-{
- // If it's not set or it needs to happen sooner than when it's currently set
- if (!m->p->KeyChainTimer || m->p->KeyChainTimer - NonZeroTime(m->timenow + delay) > 0)
- {
- m->p->KeyChainTimer = NonZeroTime(m->timenow + delay);
- LogInfo("SetKeyChainTimer: %d", delay);
- }
-}
-
// Copy the fourth slash-delimited element from either:
// State:/Network/Interface/<bsdname>/IPv4
// or
@@ -7983,7 +8174,6 @@ mDNSlocal CFStringRef CopyNameFromKey(CFStringRef key)
// an IP service that is explicitly configured for IPv4 Link Local
mDNSlocal int ChangedKeysHaveIPv4LL(CFArrayRef inkeys)
{
- SCDynamicStoreRef store = NULL;
CFDictionaryRef dict = NULL;
CFMutableArrayRef a;
const void **keys = NULL, **vals = NULL;
@@ -7994,9 +8184,6 @@ mDNSlocal int ChangedKeysHaveIPv4LL(CFArrayRef inkeys)
jc = CFArrayGetCount(inkeys);
if (!jc) goto done;
- store = SCDynamicStoreCreate(NULL, CFSTR("mDNSResponder:ChangedKeysHaveIPv4LL"), NULL, NULL);
- if (store == NULL) goto done;
-
a = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);
if (a == NULL) goto done;
@@ -8012,7 +8199,7 @@ mDNSlocal int ChangedKeysHaveIPv4LL(CFArrayRef inkeys)
CFArrayAppendValue(a, pattern);
CFRelease(pattern);
- dict = SCDynamicStoreCopyMultiple(store, NULL, a);
+ dict = SCDynamicStoreCopyMultiple(NULL, NULL, a);
CFRelease(a);
if (!dict)
@@ -8094,7 +8281,6 @@ done:
if (vals != NULL) mDNSPlatformMemFree(vals);
if (keys != NULL) mDNSPlatformMemFree(keys);
if (dict != NULL) CFRelease(dict);
- if (store != NULL) CFRelease(store);
return found;
}
@@ -8106,20 +8292,22 @@ mDNSlocal void NetworkChanged(SCDynamicStoreRef store, CFArrayRef changedKeys, v
KQueueLock(m);
mDNS_Lock(m);
- mDNSs32 delay = mDNSPlatformOneSecond * 2; // Start off assuming a two-second delay
+ //mDNSs32 delay = mDNSPlatformOneSecond * 2; // Start off assuming a two-second delay
+ const mDNSs32 delay = (mDNSPlatformOneSecond + 39) / 40; // 25 ms delay
int c = CFArrayGetCount(changedKeys); // Count changes
CFRange range = { 0, c };
- int c1 = (CFArrayContainsValue(changedKeys, range, NetworkChangedKey_Hostnames ) != 0);
- int c2 = (CFArrayContainsValue(changedKeys, range, NetworkChangedKey_Computername) != 0);
- int c3 = (CFArrayContainsValue(changedKeys, range, NetworkChangedKey_DNS ) != 0);
- int c4 = (CFArrayContainsValue(changedKeys, range, NetworkChangedKey_DynamicDNS ) != 0);
- int c5 = (CFArrayContainsValue(changedKeys, range, NetworkChangedKey_BackToMyMac ) != 0);
- int c6 = ChangedKeysHaveIPv4LL(changedKeys);
- int c7 = 0;
-
+ int c_host = (CFArrayContainsValue(changedKeys, range, NetworkChangedKey_Hostnames ) != 0);
+ int c_comp = (CFArrayContainsValue(changedKeys, range, NetworkChangedKey_Computername) != 0);
+ int c_udns = (CFArrayContainsValue(changedKeys, range, NetworkChangedKey_DNS ) != 0);
+ int c_ddns = (CFArrayContainsValue(changedKeys, range, NetworkChangedKey_DynamicDNS ) != 0);
+ int c_btmm = (CFArrayContainsValue(changedKeys, range, NetworkChangedKey_BackToMyMac ) != 0);
+ int c_v4ll = ChangedKeysHaveIPv4LL(changedKeys);
+ int c_fast = 0;
+
// Do immediate network changed processing for "p2p*" interfaces and
- // for interfaces with the IFEF_DIRECTLINK flag set.
+ // for interfaces with the IFEF_DIRECTLINK flag set or association with a CarPlay
+ // hosted SSID.
{
CFArrayRef labels;
CFIndex n;
@@ -8149,10 +8337,10 @@ mDNSlocal void NetworkChanged(SCDynamicStoreRef store, CFArrayRef changedKeys, v
// The 4th label (index = 3) should be the interface name.
if (CFStringGetCString(CFArrayGetValueAtIndex(labels, 3), buf, sizeof(buf), kCFStringEncodingUTF8)
- && (strstr(buf, "p2p") || (getExtendedFlags(buf) & IFEF_DIRECTLINK)))
+ && (strstr(buf, "p2p") || (getExtendedFlags(buf) & IFEF_DIRECTLINK) || IsCarPlaySSID(buf)))
{
LogInfo("NetworkChanged: interface %s qualifies for reduced change handling delay", buf);
- c7++;
+ c_fast++;
CFRelease(labels);
break;
}
@@ -8161,22 +8349,8 @@ mDNSlocal void NetworkChanged(SCDynamicStoreRef store, CFArrayRef changedKeys, v
}
}
- if (c && c - c1 - c2 - c3 - c4 - c5 - c6 - c7 == 0)
- delay = mDNSPlatformOneSecond/10; // If these were the only changes, shorten delay
-
- // Immediately force a reconfig (esp. cache flush) if any of the following is true:
- // 1. DNS Settings changed.
- // 2 An interface changed that is explicitly IPv4 link local
- // 3. There are P2P/IFEF_DIRECTLINK/IsCarPlaySSID changes
- if (c3 || ChangedKeysHaveIPv4LL(changedKeys) || c7)
- {
- LogInfo("NetworkChanged: %s : Handling this change immediately",
- c3 ? "DNS Settings Changed" :
- c7 ? "P2P/IFEF_DIRECTLINK/IsCarPlaySSID Changed" :
- "An interface changed that is explicitly IPv4 link local");
- m->p->NetworkChanged = NonZeroTime(m->timenow);
- delay = 0; // for the logs below.
- }
+ //if (c && c - c_host - c_comp - c_udns - c_ddns - c_btmm - c_v4ll - c_fast == 0)
+ // delay = mDNSPlatformOneSecond/10; // If these were the only changes, shorten delay
if (mDNS_LoggingEnabled)
{
@@ -8185,19 +8359,19 @@ mDNSlocal void NetworkChanged(SCDynamicStoreRef store, CFArrayRef changedKeys, v
{
char buf[256];
if (!CFStringGetCString(CFArrayGetValueAtIndex(changedKeys, i), buf, sizeof(buf), kCFStringEncodingUTF8)) buf[0] = 0;
- LogInfo("*** NetworkChanged SC key: %s", buf);
+ LogInfo("*** Network Configuration Change *** SC key: %s", buf);
}
- LogInfo("*** NetworkChanged *** %d change%s %s%s%s%s%s%s%sdelay %d%s",
+ LogInfo("*** Network Configuration Change *** %d change%s %s%s%s%s%s%s%sdelay %d%s",
c, c>1 ? "s" : "",
- c1 ? "(Local Hostname) " : "",
- c2 ? "(Computer Name) " : "",
- c3 ? "(DNS) " : "",
- c4 ? "(DynamicDNS) " : "",
- c5 ? "(BTMM) " : "",
- c6 ? "(kSCValNetIPv4ConfigMethodLinkLocal) " : "",
- c7 ? "(P2P/IFEF_DIRECTLINK/IsCarPlaySSID) " : "",
+ c_host ? "(Local Hostname) " : "",
+ c_comp ? "(Computer Name) " : "",
+ c_udns ? "(DNS) " : "",
+ c_ddns ? "(DynamicDNS) " : "",
+ c_btmm ? "(BTMM) " : "",
+ c_v4ll ? "(kSCValNetIPv4ConfigMethodLinkLocal) " : "",
+ c_fast ? "(P2P/IFEF_DIRECTLINK/IsCarPlaySSID) " : "",
delay,
- (c4 || c5) ? " + SetKeyChainTimer" : "");
+ (c_ddns || c_btmm) ? " + SetKeyChainTimer" : "");
}
SetNetworkChanged(m, delay);
@@ -8207,11 +8381,12 @@ mDNSlocal void NetworkChanged(SCDynamicStoreRef store, CFArrayRef changedKeys, v
// setup the DomainAuthInfo before handing the network change.
// If we don't, then we will first try to register services in the clear, then later setup the
// DomainAuthInfo, which is incorrect.
- if (c4 || c5)
+ if (c_ddns || c_btmm)
SetKeyChainTimer(m, delay);
- mDNS_Unlock(m);
+ // Don't try to call mDNSMacOSXNetworkChanged() here -- we're running on the wrong thread
+ mDNS_Unlock(m);
KQueueUnlock(m, "NetworkChanged");
}
@@ -8285,7 +8460,7 @@ mDNSlocal mStatus WatchForNetworkChanges(mDNS *const m)
CFArrayAppendValue(keys, NetworkChangedKey_DNS);
CFArrayAppendValue(keys, NetworkChangedKey_DynamicDNS);
CFArrayAppendValue(keys, NetworkChangedKey_BackToMyMac);
- CFArrayAppendValue(keys, NetworkChangedKey_PowerSettings); // should remove as part of <rdar://problem/6751656>
+ CFArrayAppendValue(keys, NetworkChangedKey_PowerSettings);
CFArrayAppendValue(keys, NetworkChangedKey_BTMMConnectivity);
CFArrayAppendValue(patterns, pattern1);
CFArrayAppendValue(patterns, pattern2);
@@ -8318,33 +8493,6 @@ exit:
return(err);
}
-#if 0 // <rdar://problem/6751656>
-mDNSlocal void PMChanged(void *context)
-{
- mDNS *const m = (mDNS *const)context;
-
- KQueueLock(m);
- mDNS_Lock(m);
-
- LogSPS("PMChanged");
-
- SetNetworkChanged(m, mDNSPlatformOneSecond * 2);
-
- mDNS_Unlock(m);
- KQueueUnlock(m, "PMChanged");
-}
-
-mDNSlocal mStatus WatchForPMChanges(mDNS *const m)
-{
- m->p->PMRLS = IOPMPrefsNotificationCreateRunLoopSource(PMChanged, m);
- if (!m->p->PMRLS) { LogMsg("IOPMPrefsNotificationCreateRunLoopSource failed!"); return mStatus_UnknownErr; }
-
- CFRunLoopAddSource(CFRunLoopGetCurrent(), m->p->PMRLS, kCFRunLoopDefaultMode);
-
- return mStatus_NoError;
-}
-#endif
-
#if !TARGET_OS_EMBEDDED // don't setup packet filter rules on embedded
mDNSlocal void mDNSSetPacketFilterRules(mDNS *const m, char * ifname, const ResourceRecord *const excludeRecord)
@@ -8450,12 +8598,9 @@ mDNSlocal void newMasterElected(mDNS *const m, struct net_event_data * ptr)
LogInfo("newMasterElected: ifname = %s, interfaceIndex = %d", ifname, interfaceIndex);
infoOSX = IfindexToInterfaceInfoOSX(m, (mDNSInterfaceID)(uintptr_t)interfaceIndex);
-
- // Can get an KEV_DL_MASTER_ELECTED event prior to the interface existing
- // when it is first brought up.
if (!infoOSX)
{
- LogInfo("newMasterElected: interface not yet active");
+ LogInfo("newMasterElected: interface %s not yet active", ifname);
return;
}
InterfaceID = infoOSX->ifinfo.InterfaceID;
@@ -8516,13 +8661,18 @@ mDNSlocal void removeCachedPeerRecords(mDNS *const m, mDNSu32 ifindex, mDNSAddr
mDNSu32 slot;
CacheGroup *cg;
CacheRecord *cr;
- mDNSInterfaceID InterfaceID = mDNSPlatformInterfaceIDfromInterfaceIndex(m, ifindex);
+ NetworkInterfaceInfoOSX *infoOSX;
+ mDNSInterfaceID InterfaceID;
- if (!InterfaceID)
+ // Using mDNSPlatformInterfaceIDfromInterfaceIndex() would lead to recursive
+ // locking issues, see: <rdar://problem/21332983>
+ infoOSX = IfindexToInterfaceInfoOSX(m, (mDNSInterfaceID)(uintptr_t)ifindex);
+ if (!infoOSX)
{
- LogInfo("removeCachedPeerRecords: Invalid ifindex: %d", ifindex);
+ LogInfo("removeCachedPeerRecords: interface %d not yet active", ifindex);
return;
}
+ InterfaceID = infoOSX->ifinfo.InterfaceID;
FORALL_CACHERECORDS(slot, cg, cr)
{
@@ -8771,6 +8921,12 @@ mDNSlocal OSStatus KeychainChanged(SecKeychainEvent keychainEvent, SecKeychainCa
mDNSlocal void PowerOn(mDNS *const m)
{
mDNSCoreMachineSleep(m, false); // Will set m->SleepState = SleepState_Awake;
+
+ // Hold on to a sleep assertion to allow mDNSResponder to perform its maintenance activities.
+ // This allows for the network link to come up, DHCP to get an address, mDNS to issue queries etc.
+ // We will clear this assertion as soon as we think the mainenance activities are done.
+ mDNSPlatformPreventSleep(m, DARK_WAKE_TIME, "mDNSResponder:maintenance");
+
if (m->p->WakeAtUTC)
{
long utc = mDNSPlatformUTC();
@@ -9526,7 +9682,7 @@ mDNSlocal mDNSBool EtcHostsDeleteOldEntries(mDNS *const m, AuthHash *newhosts, m
{
AuthGroup *ag;
mDNSu32 slot;
- AuthRecord *rr, *primary, *rrnext;
+ AuthRecord *rr, *rrnext;
for (slot = 0; slot < AUTH_HASH_SLOTS; slot++)
for (ag = m->rrauth.rrauth_hash[slot]; ag; ag = ag->next)
for (rr = ag->members; rr; rr = rrnext)
@@ -9539,7 +9695,7 @@ mDNSlocal mDNSBool EtcHostsDeleteOldEntries(mDNS *const m, AuthHash *newhosts, m
ag1 = AuthGroupForRecord(newhosts, slot, &rr->resrec);
if (ag1)
{
- primary = rr1 = ag1->members;
+ rr1 = ag1->members;
while (rr1)
{
if (IdenticalResourceRecord(&rr1->resrec, &rr->resrec))
@@ -9912,14 +10068,16 @@ mDNSlocal mStatus mDNSPlatformInit_setup(mDNS *const m)
m->p->permanentsockets.sktv4 = -1;
m->p->permanentsockets.kqsv4.KQcallback = myKQSocketCallBack;
m->p->permanentsockets.kqsv4.KQcontext = &m->p->permanentsockets;
- m->p->permanentsockets.kqsv4.KQtask = "UDP packet reception";
+ m->p->permanentsockets.kqsv4.KQtask = "IPv4 UDP packet reception";
m->p->permanentsockets.sktv6 = -1;
m->p->permanentsockets.kqsv6.KQcallback = myKQSocketCallBack;
m->p->permanentsockets.kqsv6.KQcontext = &m->p->permanentsockets;
- m->p->permanentsockets.kqsv6.KQtask = "UDP packet reception";
+ m->p->permanentsockets.kqsv6.KQtask = "IPv6 UDP packet reception";
err = SetupSocket(&m->p->permanentsockets, MulticastDNSPort, AF_INET, mDNSNULL);
+ if (err) LogMsg("mDNSPlatformInit_setup: SetupSocket(AF_INET) failed error %d errno %d (%s)", err, errno, strerror(errno));
err = SetupSocket(&m->p->permanentsockets, MulticastDNSPort, AF_INET6, mDNSNULL);
+ if (err) LogMsg("mDNSPlatformInit_setup: SetupSocket(AF_INET6) failed error %d errno %d (%s)", err, errno, strerror(errno));
struct sockaddr_in s4;
socklen_t n4 = sizeof(s4);
@@ -9972,16 +10130,12 @@ mDNSlocal mStatus mDNSPlatformInit_setup(mDNS *const m)
err = WatchForNetworkChanges(m);
if (err) { LogMsg("mDNSPlatformInit_setup: WatchForNetworkChanges failed %d", err); return(err); }
-#if 0 // <rdar://problem/6751656>
- err = WatchForPMChanges(m);
- if (err) { LogMsg("mDNSPlatformInit_setup: WatchForPMChanges failed %d", err); return(err); }
-#endif
-
err = WatchForSysEvents(m);
if (err) { LogMsg("mDNSPlatformInit_setup: WatchForSysEvents failed %d", err); return(err); }
mDNSs32 utc = mDNSPlatformUTC();
m->SystemWakeOnLANEnabled = SystemWakeForNetworkAccess();
+ myGetIfAddrs(1);
UpdateInterfaceList(m, utc);
SetupActiveInterfaces(m, utc);
@@ -10069,7 +10223,6 @@ mDNSlocal mStatus mDNSPlatformInit_setup(mDNS *const m)
mDNSMacOSXUpdateEtcHosts(m);
SetupLocalHostRecords(m);
- CUPInit(m);
return(mStatus_NoError);
}
@@ -10303,6 +10456,42 @@ mDNSexport void mDNSPlatformSetAllowSleep(mDNS *const m, mDNSBool allowSleep, co
}
}
+mDNSexport void mDNSPlatformPreventSleep(mDNS *const m, mDNSu32 timeout, const char *reason)
+{
+ if (m->p->IOPMAssertion)
+ {
+ LogSPS("Sleep Assertion is already being held. Will not attempt to get it again for %d seconds for %s", timeout, reason);
+ return;
+ }
+#ifdef kIOPMAssertionTypeNoIdleSleep
+
+#if TARGET_OS_EMBEDDED
+ if (!IsAppleTV())
+ return; // No need for maintenance wakes on non-AppleTV embedded devices.
+#endif
+
+ double timeoutVal = (double)timeout;
+ CFStringRef str = CFStringCreateWithCString(NULL, reason, kCFStringEncodingUTF8);
+ CFNumberRef Timeout_num = CFNumberCreate(NULL, kCFNumberDoubleType, &timeoutVal);
+ CFMutableDictionaryRef assertionProperties = CFDictionaryCreateMutable(NULL, 0,
+ &kCFTypeDictionaryKeyCallBacks,
+ &kCFTypeDictionaryValueCallBacks);
+ if (IsAppleTV())
+ CFDictionarySetValue(assertionProperties, kIOPMAssertionTypeKey, kIOPMAssertPreventUserIdleSystemSleep);
+ else
+ CFDictionarySetValue(assertionProperties, kIOPMAssertionTypeKey, kIOPMAssertMaintenanceActivity);
+
+ CFDictionarySetValue(assertionProperties, kIOPMAssertionTimeoutKey, Timeout_num);
+ CFDictionarySetValue(assertionProperties, kIOPMAssertionNameKey, str);
+
+ IOPMAssertionCreateWithProperties(assertionProperties, (IOPMAssertionID *)&m->p->IOPMAssertion);
+ CFRelease(str);
+ CFRelease(Timeout_num);
+ CFRelease(assertionProperties);
+ LogSPS("Got an idle sleep assertion for %d seconds for %s", timeout, reason);
+#endif
+}
+
mDNSexport void mDNSPlatformSendWakeupPacket(mDNS *const m, mDNSInterfaceID InterfaceID, char *EthAddr, char *IPAddr, int iteration)
{
mDNSu32 ifindex;
@@ -10330,6 +10519,10 @@ mDNSexport mDNSBool mDNSPlatformInterfaceIsD2D(mDNSInterfaceID InterfaceID)
|| (InterfaceID == mDNSInterface_Unicast))
return mDNSfalse;
+ // Compare to cached AWDL interface ID.
+ if (AWDLInterfaceID && (InterfaceID == AWDLInterfaceID))
+ return mDNStrue;
+
info = IfindexToInterfaceInfoOSX(&mDNSStorage, InterfaceID);
if (info == NULL)
{
@@ -10458,25 +10651,24 @@ mDNSexport void mDNSPlatformDispatchAsync(mDNS *const m, void *context, AsyncDis
// definitions for device-info record construction
#define DEVINFO_MODEL "model="
-#define DEVINFO_MODEL_LEN strlen(DEVINFO_MODEL)
+#define DEVINFO_MODEL_LEN sizeof_string(DEVINFO_MODEL)
#define OSX_VER "osxvers="
-#define OSX_VER_LEN strlen(OSX_VER)
+#define OSX_VER_LEN sizeof_string(OSX_VER)
#define VER_NUM_LEN 2 // 2 digits of version number added to base string
#define MODEL_COLOR "ecolor="
-#define MODEL_COLOR_LEN strlen(MODEL_COLOR)
-#define MODEL_RGB_VALUE_LEN strlen("255,255,255") // 'r,g,b'
+#define MODEL_COLOR_LEN sizeof_string(MODEL_COLOR)
+#define MODEL_RGB_VALUE_LEN sizeof_string("255,255,255") // 'r,g,b'
-// Bytes available in TXT record for model name after subtracting space for other
+// Bytes available in TXT record for model name after subtracting space for other
// fixed size strings and their length bytes.
#define MAX_MODEL_NAME_LEN (256 - (DEVINFO_MODEL_LEN + 1) - (OSX_VER_LEN + VER_NUM_LEN + 1) - (MODEL_COLOR_LEN + MODEL_RGB_VALUE_LEN + 1))
-mDNSlocal mDNSBool getModelIconColors(char *color)
+mDNSlocal mDNSu8 getModelIconColors(char *color)
{
- mDNSBool hasColor = mDNSfalse;
mDNSPlatformMemZero(color, MODEL_RGB_VALUE_LEN + 1);
-
+
#if !TARGET_OS_EMBEDDED && defined(kIOPlatformDeviceEnclosureColorKey)
mDNSu8 red = 0;
mDNSu8 green = 0;
@@ -10487,12 +10679,11 @@ mDNSlocal mDNSBool getModelIconColors(char *color)
if (kIOReturnSuccess == rGetDeviceColor)
{
// IOKit was able to get enclosure color for the current device.
- hasColor = true;
- snprintf(color, MODEL_RGB_VALUE_LEN + 1, "%d,%d,%d", red, green, blue);
+ return snprintf(color, MODEL_RGB_VALUE_LEN + 1, "%d,%d,%d", red, green, blue);
}
#endif // !TARGET_OS_EMBEDDED && defined(kIOPlatformDeviceEnclosureColorKey)
-
- return hasColor;
+
+ return 0;
}
@@ -10518,20 +10709,21 @@ mDNSexport mDNSu32 initializeDeviceInfoTXT(mDNS *m, mDNSu8 *ptr)
mDNSPlatformMemCopy(ptr, OSX_VER, OSX_VER_LEN);
ptr += OSX_VER_LEN;
// convert version number to ASCII, add 1 for terminating null byte written by snprintf()
+ // WARNING: This code assumes that OSXVers is always exactly two digits
snprintf(ver_num, VER_NUM_LEN + 1, "%d", OSXVers);
mDNSPlatformMemCopy(ptr, ver_num, VER_NUM_LEN);
ptr += VER_NUM_LEN;
-
+
char rgb[MODEL_RGB_VALUE_LEN + 1]; // RGB value + null written by snprintf
- if (getModelIconColors(rgb))
+ len = getModelIconColors(rgb);
+ if (len)
{
- len = strlen(rgb);
*ptr = MODEL_COLOR_LEN + len; // length byte
ptr++;
-
+
mDNSPlatformMemCopy(ptr, MODEL_COLOR, MODEL_COLOR_LEN);
ptr += MODEL_COLOR_LEN;
-
+
mDNSPlatformMemCopy(ptr, rgb, len);
ptr += len;
}
diff --git a/mDNSResponder/mDNSMacOSX/mDNSMacOSX.h b/mDNSResponder/mDNSMacOSX/mDNSMacOSX.h
index eb1e1282..56c0902a 100644
--- a/mDNSResponder/mDNSMacOSX/mDNSMacOSX.h
+++ b/mDNSResponder/mDNSMacOSX/mDNSMacOSX.h
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 4 -*-
*
- * Copyright (c) 2002-2003 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2002-2015 Apple Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -51,10 +51,6 @@ extern mDNSBool GetmDNSManagedPref(CFStringRef key);
#include <Security/Security.h>
#endif /* NO_SECURITYFRAMEWORK */
-#if TARGET_OS_IPHONE
-#include "cellular_usage_policy.h"
-#endif
-
#define kmDNSResponderServName "com.apple.mDNSResponder"
enum mDNSDynamicStoreSetConfigKey
@@ -141,8 +137,6 @@ struct NetworkInterfaceInfoOSX_struct
mDNSu8 Occulting; // Set if interface vanished for less than 60 seconds and then came back
mDNSu8 D2DInterface; // IFEF_LOCALNET_PRIVATE flag indicates we should call
// D2D plugin for operations over this interface
- mDNSu8 DirectLink; // IFEF_DIRECTLINK flag is set for interface
-
mDNSs32 AppearanceTime; // Time this interface appeared most recently in getifaddrs list
// i.e. the first time an interface is seen, AppearanceTime is set.
// If an interface goes away temporarily and then comes back then
@@ -169,7 +163,7 @@ struct mDNS_PlatformSupport_struct
{
NetworkInterfaceInfoOSX *InterfaceList;
KQSocketSet permanentsockets;
- int num_mcasts; // Number of multicasts received during this CPU scheduling period (used for CPU limiting)
+ int num_mcasts; // Number of multicasts received during this CPU scheduling period (used for CPU limiting)
domainlabel userhostlabel; // The hostlabel as it was set in System Preferences the last time we looked
domainlabel usernicelabel; // The nicelabel as it was set in System Preferences the last time we looked
// Following four variables are used for optimization where the helper is not
@@ -181,7 +175,6 @@ struct mDNS_PlatformSupport_struct
domainlabel prevnewnicelabel; // Previous m->nicelabel
mDNSs32 NotifyUser;
mDNSs32 HostNameConflict; // Time we experienced conflict on our link-local host name
- mDNSs32 NetworkChanged;
mDNSs32 KeyChainTimer;
CFRunLoopRef CFRunLoop;
@@ -216,9 +209,6 @@ struct mDNS_PlatformSupport_struct
TCPSocket TCPProxy;
ProxyCallback *UDPProxyCallback;
ProxyCallback *TCPProxyCallback;
-#if TARGET_OS_IPHONE
- cellular_usage_policy_client_t handle;
-#endif
};
extern int OfferSleepProxyService;
diff --git a/mDNSResponder/mDNSMacOSX/mDNSResponder-entitlements.plist b/mDNSResponder/mDNSMacOSX/mDNSResponder-entitlements.plist
index 21a343f8..8f7f77d9 100644
--- a/mDNSResponder/mDNSMacOSX/mDNSResponder-entitlements.plist
+++ b/mDNSResponder/mDNSMacOSX/mDNSResponder-entitlements.plist
@@ -8,8 +8,6 @@
<true/>
<key>com.apple.private.network.socket-delegate</key>
<true/>
- <key>com.apple.networkd.cellular_blocked.notify</key>
- <true/>
<key>com.apple.private.SCNetworkConnection-proxy-user</key>
<true/>
<key>com.apple.private.network.reserved-port</key>
@@ -18,8 +16,6 @@
<true/>
<key>com.apple.private.snhelper</key>
<true/>
- <key>com.apple.telephony.cupolicy-monitor-access</key>
- <true/>
<key>com.apple.private.necp.match</key>
<true/>
<key>com.apple.security.network.server</key>
diff --git a/mDNSResponder/mDNSMacOSX/mDNSResponder.pbproj/project.pbxproj b/mDNSResponder/mDNSMacOSX/mDNSResponder.pbproj/project.pbxproj
deleted file mode 100644
index 3e7df115..00000000
--- a/mDNSResponder/mDNSMacOSX/mDNSResponder.pbproj/project.pbxproj
+++ /dev/null
@@ -1,2338 +0,0 @@
-// !$*UTF8*$!
-{
- archiveVersion = 1;
- classes = {
- };
- objectVersion = 38;
- objects = {
- 000753D303367C1C0CCA2C71 = {
- fileEncoding = 4;
- isa = PBXFileReference;
- path = mDNSMacOSX.h;
- refType = 4;
- };
- 00AD62A3032D799A0CCA2C71 = {
- buildPhases = (
- FFF7174A07614A8600E10551,
- 00AD62A4032D799A0CCA2C71,
- 00AD62AC032D799A0CCA2C71,
- 00AD62B3032D799A0CCA2C71,
- 00AD62B7032D799A0CCA2C71,
- );
- buildSettings = {
- FRAMEWORK_SEARCH_PATHS = "";
- GCC_TREAT_WARNINGS_AS_ERRORS = YES;
- HEADER_SEARCH_PATHS = "../mDNSShared \"${APPLE_INTERNAL_DEVELOPER_DIR}/Headers\" \"${CONFIGURATION_TEMP_DIR}\"";
- LIBRARY_SEARCH_PATHS = "\"${CONFIGURATION_TEMP_DIR}\"";
- MACOSX_DEPLOYMENT_TARGET = 10.2;
- OPTIMIZATION_CFLAGS = "-O0";
- OTHER_CFLAGS = "-no-cpp-precomp -mdynamic-no-pic -DmDNSResponderVersion=${MVERS} -DAPPLE_OSX_mDNSResponder=1 -D_LEGACY_NAT_TRAVERSAL_ -DMDNS_DEBUGMSGS=1";
- OTHER_LDFLAGS = "-ldnsinfo";
- OTHER_REZFLAGS = "";
- PRODUCT_NAME = mDNSResponder.debug;
- REZ_EXECUTABLE = YES;
- SECTORDER_FLAGS = "-sectorder __TEXT __text mDNSResponder.order";
- STRIPFLAGS = "-S";
- WARNING_CFLAGS = "-W -Wall -Wmissing-prototypes -Wno-four-char-constants -Wno-unknown-pragmas";
- };
- dependencies = (
- );
- isa = PBXToolTarget;
- name = "mDNSResponder debug";
- productName = mDNSResponder;
- productReference = 00AD62B8032D799A0CCA2C71;
- };
- 00AD62A4032D799A0CCA2C71 = {
- buildActionMask = 2147483647;
- files = (
- 00AD62A5032D799A0CCA2C71,
- F5E11B5F04A28126019798ED,
- F515E29604A37BB701CA296C,
- F515E29704A37BB801CA296C,
- F515E29904A37BBB01CA296C,
- );
- isa = PBXHeadersBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- 00AD62A5032D799A0CCA2C71 = {
- fileRef = 6575FBFF022EAFBA00000109;
- isa = PBXBuildFile;
- settings = {
- };
- };
- 00AD62AC032D799A0CCA2C71 = {
- buildActionMask = 2147483647;
- files = (
- 00AD62AD032D799A0CCA2C71,
- 00AD62AE032D799A0CCA2C71,
- 00AD62AF032D799A0CCA2C71,
- 7F18A9FB0587CEF6001880B3,
- 7F18A9FA0587CEF6001880B3,
- 7F461DB7062DBF2900672BF3,
- DBAAFE2E057E8F660085CAD0,
- DBAAFE2B057E8F4D0085CAD0,
- F525E72B04AA167A01F1CF4D,
- F5E11B5E04A28126019798ED,
- FFCB6D75075D595E00B8AF62,
- 00AD62B0032D799A0CCA2C71,
- 7FC8F9D606D14E66007E879D,
- 00AD62B1032D799A0CCA2C71,
- );
- isa = PBXSourcesBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- 00AD62AD032D799A0CCA2C71 = {
- fileRef = 6575FC00022EAFBA00000109;
- isa = PBXBuildFile;
- settings = {
- ATTRIBUTES = (
- Client,
- );
- };
- };
- 00AD62AE032D799A0CCA2C71 = {
- fileRef = 6575FC01022EAFBA00000109;
- isa = PBXBuildFile;
- settings = {
- ATTRIBUTES = (
- Server,
- Client,
- );
- };
- };
- 00AD62AF032D799A0CCA2C71 = {
- fileRef = 6575FBE9022EAF5A00000109;
- isa = PBXBuildFile;
- settings = {
- };
- };
- 00AD62B0032D799A0CCA2C71 = {
- fileRef = 6575FBEB022EAF7200000109;
- isa = PBXBuildFile;
- settings = {
- };
- };
- 00AD62B1032D799A0CCA2C71 = {
- fileRef = 6575FBEC022EAF7200000109;
- isa = PBXBuildFile;
- settings = {
- };
- };
- 00AD62B3032D799A0CCA2C71 = {
- buildActionMask = 2147483647;
- files = (
- 00AD62B4032D799A0CCA2C71,
- 00AD62B5032D799A0CCA2C71,
- 00AD62B6032D799A0CCA2C71,
- 7F869687066EE02400D2A2DC,
- );
- isa = PBXFrameworksBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- 00AD62B4032D799A0CCA2C71 = {
- fileRef = 09AB6884FE841BABC02AAC07;
- isa = PBXBuildFile;
- settings = {
- };
- };
- 00AD62B5032D799A0CCA2C71 = {
- fileRef = 65713D46025A293200000109;
- isa = PBXBuildFile;
- settings = {
- };
- };
- 00AD62B6032D799A0CCA2C71 = {
- fileRef = 00CA213D02786FC30CCA2C71;
- isa = PBXBuildFile;
- settings = {
- };
- };
- 00AD62B7032D799A0CCA2C71 = {
- buildActionMask = 2147483647;
- files = (
- );
- isa = PBXRezBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- 00AD62B8032D799A0CCA2C71 = {
- isa = PBXExecutableFileReference;
- path = mDNSResponder.debug;
- refType = 3;
- };
- 00AD62BB032D7A0C0CCA2C71 = {
- buildPhases = (
- );
- buildSettings = {
- OTHER_CFLAGS = "";
- OTHER_LDFLAGS = "";
- OTHER_REZFLAGS = "";
- PRODUCT_NAME = "Build All";
- SECTORDER_FLAGS = "";
- };
- dependencies = (
- FF25795106C9AB1D00376F7B,
- 00AD62BC032D7A160CCA2C71,
- 00AD62BD032D7A1B0CCA2C71,
- 00AD62BE032D7A1D0CCA2C71,
- FF16238F07023BD2001AB7D7,
- FFD41DDB0664169900F0C438,
- FFD41DDC0664169B00F0C438,
- FF2A870707B4481500B14068,
- );
- isa = PBXAggregateTarget;
- name = "Build All";
- productName = "Build All";
- };
- 00AD62BC032D7A160CCA2C71 = {
- isa = PBXTargetDependency;
- target = 08FB779FFE84155DC02AAC07;
- };
- 00AD62BD032D7A1B0CCA2C71 = {
- isa = PBXTargetDependency;
- target = 00AD62A3032D799A0CCA2C71;
- };
- 00AD62BE032D7A1D0CCA2C71 = {
- isa = PBXTargetDependency;
- target = 6575FC1C022EB76000000109;
- };
- 00B2AB0C032D7B220CCA2C71 = {
- buildRules = (
- );
- buildSettings = {
- CONFIGURATION_BUILD_DIR = "${BUILD_DIR}";
- CONFIGURATION_TEMP_DIR = "${BUILD_DIR}/mDNSResponder.build";
- MVERS = "\"mDNSResponder (Engineering Build)\"";
- };
- isa = PBXBuildStyle;
- name = Development;
- };
- 00CA213D02786FC30CCA2C71 = {
- isa = PBXFrameworkReference;
- name = IOKit.framework;
- path = /System/Library/Frameworks/IOKit.framework;
- refType = 0;
- };
-//000
-//001
-//002
-//003
-//004
-//030
-//031
-//032
-//033
-//034
- 034768E2FF38A6DC11DB9C8B = {
- isa = PBXExecutableFileReference;
- path = mDNSResponder;
- refType = 3;
- };
-//030
-//031
-//032
-//033
-//034
-//080
-//081
-//082
-//083
-//084
- 08FB7793FE84155DC02AAC07 = {
- buildStyles = (
- 00B2AB0C032D7B220CCA2C71,
- );
- hasScannedForEncodings = 1;
- isa = PBXProject;
- mainGroup = 08FB7794FE84155DC02AAC07;
- projectDirPath = "";
- targets = (
- 00AD62BB032D7A0C0CCA2C71,
- 08FB779FFE84155DC02AAC07,
- 00AD62A3032D799A0CCA2C71,
- 6575FC1C022EB76000000109,
- FF1C919207021C84001048AB,
- DB2CC4530662DD6800335AB3,
- DB2CC4660662DF5C00335AB3,
- FF25792906C9A70800376F7B,
- FFFB0DA907B43C9100B88D48,
- FF2609E107B440DD00CE10E5,
- );
- };
- 08FB7794FE84155DC02AAC07 = {
- children = (
- 08FB7795FE84155DC02AAC07,
- 6575FC1F022EB78C00000109,
- 6575FBFE022EAFA800000109,
- DB2CC4420662DCE500335AB3,
- FFFB0DA407B43BED00B88D48,
- 08FB779DFE84155DC02AAC07,
- 19C28FBDFE9D53C911CA2CBB,
- );
- isa = PBXGroup;
- name = mDNSResponder;
- refType = 4;
- };
- 08FB7795FE84155DC02AAC07 = {
- children = (
- 7FC8F9D406D14E66007E879D,
- 7F461DB5062DBF2900672BF3,
- F525E72804AA167501F1CF4D,
- F5E11B5A04A28126019798ED,
- F5E11B5B04A28126019798ED,
- 6575FBEC022EAF7200000109,
- 6575FBE9022EAF5A00000109,
- 6575FBEB022EAF7200000109,
- 654BE64F02B63B93000001D1,
- 654BE65002B63B93000001D1,
- DBAAFE29057E8F4D0085CAD0,
- 000753D303367C1C0CCA2C71,
- DBAAFE2C057E8F660085CAD0,
- FFCB6D73075D539900B8AF62,
- FF0E0B5D065ADC7600FE4D9C,
- FF1C919D07021D77001048AB,
- FF485D5105632E0000130380,
- FFF4F63A06CFE4DD00459EFD,
- 7F18A9F60587CEF6001880B3,
- 7F18A9F70587CEF6001880B3,
- FF25794606C9A8BF00376F7B,
- FF13FFEA0A5DA44A00897C81,
- FF13FFEC0A5DA45500897C81,
- );
- isa = PBXGroup;
- name = "mDNS Server Sources";
- path = "";
- refType = 4;
- };
- 08FB779DFE84155DC02AAC07 = {
- children = (
- 7F869685066EE02400D2A2DC,
- FFFB0DB407B43D2700B88D48,
- 09AB6884FE841BABC02AAC07,
- 65713D46025A293200000109,
- 00CA213D02786FC30CCA2C71,
- DB2CC4680662DFF500335AB3,
- FF2609FA07B4433800CE10E5,
- FF260A1F07B4436900CE10E5,
- );
- isa = PBXGroup;
- name = "External Frameworks and Libraries";
- refType = 4;
- };
- 08FB779FFE84155DC02AAC07 = {
- buildPhases = (
- FF37BE9207614059003C0420,
- 08FB77A0FE84155DC02AAC07,
- 08FB77A1FE84155DC02AAC07,
- 08FB77A3FE84155DC02AAC07,
- 08FB77A5FE84155DC02AAC07,
- FF5A0AE705632EA600743C27,
- FF5585E507790732008D1C14,
- );
- buildSettings = {
- FRAMEWORK_SEARCH_PATHS = "";
- GCC_TREAT_WARNINGS_AS_ERRORS = YES;
- HEADER_SEARCH_PATHS = "../mDNSShared \"${APPLE_INTERNAL_DEVELOPER_DIR}/Headers\" \"${CONFIGURATION_TEMP_DIR}\"";
- INSTALL_PATH = /usr/sbin;
- LIBRARY_SEARCH_PATHS = "\"${CONFIGURATION_TEMP_DIR}\"";
- MACOSX_DEPLOYMENT_TARGET = 10.2;
- OTHER_CFLAGS = "-no-cpp-precomp -mdynamic-no-pic -DmDNSResponderVersion=${MVERS} -DAPPLE_OSX_mDNSResponder=1 -D_LEGACY_NAT_TRAVERSAL_ -D__MigTypeCheck=1";
- OTHER_LDFLAGS = "-ldnsinfo";
- OTHER_REZFLAGS = "";
- PRODUCT_NAME = mDNSResponder;
- REZ_EXECUTABLE = YES;
- SECTORDER_FLAGS = "-sectorder __TEXT __text mDNSResponder.order";
- STRIPFLAGS = "-S";
- WARNING_CFLAGS = "-W -Wall -Wmissing-prototypes -Wno-four-char-constants -Wno-unknown-pragmas";
- };
- dependencies = (
- );
- isa = PBXToolTarget;
- name = mDNSResponder;
- productInstallPath = "${HOME}/bin";
- productName = mDNSResponder;
- productReference = 034768E2FF38A6DC11DB9C8B;
- };
- 08FB77A0FE84155DC02AAC07 = {
- buildActionMask = 2147483647;
- files = (
- 6575FC02022EAFBA00000109,
- F5E11B5D04A28126019798ED,
- );
- isa = PBXHeadersBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- 08FB77A1FE84155DC02AAC07 = {
- buildActionMask = 2147483647;
- files = (
- 6575FC0D022EB18700000109,
- 6575FC0E022EB18700000109,
- 6575FBEA022EAF5A00000109,
- 7F18A9F90587CEF6001880B3,
- 7F18A9F80587CEF6001880B3,
- 7F461DB6062DBF2900672BF3,
- DBAAFE2D057E8F660085CAD0,
- DBAAFE2A057E8F4D0085CAD0,
- F525E72904AA167501F1CF4D,
- F5E11B5C04A28126019798ED,
- FFCB6D74075D539900B8AF62,
- 6575FBED022EAF7200000109,
- 7FC8F9D506D14E66007E879D,
- 6575FBEE022EAF7200000109,
- );
- isa = PBXSourcesBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- 08FB77A3FE84155DC02AAC07 = {
- buildActionMask = 2147483647;
- files = (
- 09AB6885FE841BABC02AAC07,
- 65713D66025A293200000109,
- 6585DD640279A3B7000001D1,
- 7F869686066EE02400D2A2DC,
- );
- isa = PBXFrameworksBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- 08FB77A5FE84155DC02AAC07 = {
- buildActionMask = 2147483647;
- files = (
- );
- isa = PBXRezBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
-//080
-//081
-//082
-//083
-//084
-//090
-//091
-//092
-//093
-//094
- 09AB6884FE841BABC02AAC07 = {
- isa = PBXFrameworkReference;
- name = CoreFoundation.framework;
- path = /System/Library/Frameworks/CoreFoundation.framework;
- refType = 0;
- };
- 09AB6885FE841BABC02AAC07 = {
- fileRef = 09AB6884FE841BABC02AAC07;
- isa = PBXBuildFile;
- settings = {
- };
- };
-//090
-//091
-//092
-//093
-//094
-//190
-//191
-//192
-//193
-//194
- 19C28FBDFE9D53C911CA2CBB = {
- children = (
- 034768E2FF38A6DC11DB9C8B,
- 6575FC1D022EB76000000109,
- 00AD62B8032D799A0CCA2C71,
- DB2CC4670662DF5C00335AB3,
- FFD41DDA0664157900F0C438,
- FF25794406C9A70800376F7B,
- FF1C919B07021C84001048AB,
- FFFB0DAA07B43C9100B88D48,
- FF2609E207B440DD00CE10E5,
- );
- isa = PBXGroup;
- name = Products;
- refType = 4;
- };
-//190
-//191
-//192
-//193
-//194
-//650
-//651
-//652
-//653
-//654
- 654BE64F02B63B93000001D1 = {
- fileEncoding = 4;
- isa = PBXFileReference;
- name = mDNSEmbeddedAPI.h;
- path = ../mDNSCore/mDNSEmbeddedAPI.h;
- refType = 4;
- };
- 654BE65002B63B93000001D1 = {
- fileEncoding = 4;
- isa = PBXFileReference;
- name = mDNSDebug.h;
- path = ../mDNSCore/mDNSDebug.h;
- refType = 4;
- };
- 65713D46025A293200000109 = {
- isa = PBXFrameworkReference;
- name = SystemConfiguration.framework;
- path = /System/Library/Frameworks/SystemConfiguration.framework;
- refType = 0;
- };
- 65713D66025A293200000109 = {
- fileRef = 65713D46025A293200000109;
- isa = PBXBuildFile;
- settings = {
- };
- };
- 6575FBE9022EAF5A00000109 = {
- fileEncoding = 4;
- indentWidth = 4;
- isa = PBXFileReference;
- name = mDNS.c;
- path = ../mDNSCore/mDNS.c;
- refType = 4;
- tabWidth = 4;
- usesTabs = 1;
- };
- 6575FBEA022EAF5A00000109 = {
- fileRef = 6575FBE9022EAF5A00000109;
- isa = PBXBuildFile;
- settings = {
- };
- };
- 6575FBEB022EAF7200000109 = {
- fileEncoding = 4;
- indentWidth = 4;
- isa = PBXFileReference;
- path = mDNSMacOSX.c;
- refType = 4;
- tabWidth = 4;
- usesTabs = 1;
- };
- 6575FBEC022EAF7200000109 = {
- fileEncoding = 4;
- indentWidth = 4;
- isa = PBXFileReference;
- path = daemon.c;
- refType = 4;
- tabWidth = 4;
- usesTabs = 1;
- };
- 6575FBED022EAF7200000109 = {
- fileRef = 6575FBEB022EAF7200000109;
- isa = PBXBuildFile;
- settings = {
- };
- };
- 6575FBEE022EAF7200000109 = {
- fileRef = 6575FBEC022EAF7200000109;
- isa = PBXBuildFile;
- settings = {
- };
- };
- 6575FBFE022EAFA800000109 = {
- children = (
- 6575FBFF022EAFBA00000109,
- 6575FC00022EAFBA00000109,
- 6575FC01022EAFBA00000109,
- );
- isa = PBXGroup;
- name = "DNS Service Discovery MIG files";
- refType = 4;
- };
- 6575FBFF022EAFBA00000109 = {
- fileEncoding = 4;
- isa = PBXFileReference;
- path = DNSServiceDiscoveryDefines.h;
- refType = 4;
- };
- 6575FC00022EAFBA00000109 = {
- fileEncoding = 4;
- isa = PBXFileReference;
- path = DNSServiceDiscoveryReply.defs;
- refType = 4;
- };
- 6575FC01022EAFBA00000109 = {
- fileEncoding = 4;
- isa = PBXFileReference;
- path = DNSServiceDiscoveryRequest.defs;
- refType = 4;
- };
- 6575FC02022EAFBA00000109 = {
- fileRef = 6575FBFF022EAFBA00000109;
- isa = PBXBuildFile;
- settings = {
- };
- };
- 6575FC0D022EB18700000109 = {
- fileRef = 6575FC00022EAFBA00000109;
- isa = PBXBuildFile;
- settings = {
- ATTRIBUTES = (
- Client,
- );
- };
- };
- 6575FC0E022EB18700000109 = {
- fileRef = 6575FC01022EAFBA00000109;
- isa = PBXBuildFile;
- settings = {
- ATTRIBUTES = (
- Server,
- Client,
- );
- };
- };
- 6575FC18022EB76000000109 = {
- buildActionMask = 2147483647;
- files = (
- );
- isa = PBXHeadersBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- 6575FC19022EB76000000109 = {
- buildActionMask = 2147483647;
- files = (
- 6575FC21022EB7AA00000109,
- );
- isa = PBXSourcesBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- 6575FC1A022EB76000000109 = {
- buildActionMask = 2147483647;
- files = (
- 6575FC24022EBA5D00000109,
- );
- isa = PBXFrameworksBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- 6575FC1B022EB76000000109 = {
- buildActionMask = 2147483647;
- files = (
- );
- isa = PBXRezBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- 6575FC1C022EB76000000109 = {
- buildPhases = (
- 6575FC18022EB76000000109,
- 6575FC19022EB76000000109,
- 6575FC1A022EB76000000109,
- 6575FC1B022EB76000000109,
- FFF4F63C06CFE53300459EFD,
- );
- buildSettings = {
- GCC_TREAT_WARNINGS_AS_ERRORS = YES;
- INSTALL_PATH = /usr/bin;
- MACOSX_DEPLOYMENT_TARGET = 10.2;
- OTHER_CFLAGS = "-no-cpp-precomp -mdynamic-no-pic";
- OTHER_LDFLAGS = "";
- OTHER_REZFLAGS = "";
- PRODUCT_NAME = mDNS;
- REZ_EXECUTABLE = YES;
- SECTORDER_FLAGS = "";
- STRIPFLAGS = "-S";
- WARNING_CFLAGS = "-W -Wall -Wmissing-prototypes -Wno-four-char-constants -Wno-unknown-pragmas";
- };
- dependencies = (
- );
- isa = PBXToolTarget;
- name = "mDNS command-line tool";
- productInstallPath = /usr/bin;
- productName = "mDNS command-line tool";
- productReference = 6575FC1D022EB76000000109;
- };
- 6575FC1D022EB76000000109 = {
- isa = PBXExecutableFileReference;
- path = mDNS;
- refType = 3;
- };
- 6575FC1F022EB78C00000109 = {
- children = (
- 6575FC20022EB7AA00000109,
- FF1C919F07021E3F001048AB,
- );
- isa = PBXGroup;
- name = "Command-Line Clients";
- refType = 4;
- };
- 6575FC20022EB7AA00000109 = {
- fileEncoding = 4;
- indentWidth = 4;
- isa = PBXFileReference;
- path = SamplemDNSClient.c;
- refType = 2;
- tabWidth = 4;
- usesTabs = 0;
- };
- 6575FC21022EB7AA00000109 = {
- fileRef = 6575FC20022EB7AA00000109;
- isa = PBXBuildFile;
- settings = {
- };
- };
- 6575FC24022EBA5D00000109 = {
- fileRef = 09AB6884FE841BABC02AAC07;
- isa = PBXBuildFile;
- settings = {
- };
- };
- 6585DD640279A3B7000001D1 = {
- fileRef = 00CA213D02786FC30CCA2C71;
- isa = PBXBuildFile;
- settings = {
- };
- };
-//650
-//651
-//652
-//653
-//654
-//7F0
-//7F1
-//7F2
-//7F3
-//7F4
- 7F18A9F60587CEF6001880B3 = {
- fileEncoding = 4;
- isa = PBXFileReference;
- name = DNSCommon.c;
- path = ../mDNSCore/DNSCommon.c;
- refType = 2;
- };
- 7F18A9F70587CEF6001880B3 = {
- fileEncoding = 4;
- isa = PBXFileReference;
- name = uDNS.c;
- path = ../mDNSCore/uDNS.c;
- refType = 2;
- };
- 7F18A9F80587CEF6001880B3 = {
- fileRef = 7F18A9F60587CEF6001880B3;
- isa = PBXBuildFile;
- settings = {
- };
- };
- 7F18A9F90587CEF6001880B3 = {
- fileRef = 7F18A9F70587CEF6001880B3;
- isa = PBXBuildFile;
- settings = {
- };
- };
- 7F18A9FA0587CEF6001880B3 = {
- fileRef = 7F18A9F60587CEF6001880B3;
- isa = PBXBuildFile;
- settings = {
- };
- };
- 7F18A9FB0587CEF6001880B3 = {
- fileRef = 7F18A9F70587CEF6001880B3;
- isa = PBXBuildFile;
- settings = {
- };
- };
- 7F461DB5062DBF2900672BF3 = {
- fileEncoding = 4;
- isa = PBXFileReference;
- name = DNSDigest.c;
- path = ../mDNSCore/DNSDigest.c;
- refType = 2;
- };
- 7F461DB6062DBF2900672BF3 = {
- fileRef = 7F461DB5062DBF2900672BF3;
- isa = PBXBuildFile;
- settings = {
- };
- };
- 7F461DB7062DBF2900672BF3 = {
- fileRef = 7F461DB5062DBF2900672BF3;
- isa = PBXBuildFile;
- settings = {
- };
- };
- 7F869685066EE02400D2A2DC = {
- isa = PBXFrameworkReference;
- name = Security.framework;
- path = /System/Library/Frameworks/Security.framework;
- refType = 0;
- };
- 7F869686066EE02400D2A2DC = {
- fileRef = 7F869685066EE02400D2A2DC;
- isa = PBXBuildFile;
- settings = {
- };
- };
- 7F869687066EE02400D2A2DC = {
- fileRef = 7F869685066EE02400D2A2DC;
- isa = PBXBuildFile;
- settings = {
- };
- };
- 7FC8F9D406D14E66007E879D = {
- fileEncoding = 4;
- isa = PBXFileReference;
- path = LegacyNATTraversal.c;
- refType = 2;
- };
- 7FC8F9D506D14E66007E879D = {
- fileRef = 7FC8F9D406D14E66007E879D;
- isa = PBXBuildFile;
- settings = {
- };
- };
- 7FC8F9D606D14E66007E879D = {
- fileRef = 7FC8F9D406D14E66007E879D;
- isa = PBXBuildFile;
- settings = {
- };
- };
-//7F0
-//7F1
-//7F2
-//7F3
-//7F4
-//DB0
-//DB1
-//DB2
-//DB3
-//DB4
- DB2CC4420662DCE500335AB3 = {
- children = (
- DB2CC4430662DD1100335AB3,
- DB2CC4440662DD1100335AB3,
- DB2CC4450662DD1100335AB3,
- DB2CC4460662DD1100335AB3,
- DB2CC4470662DD1100335AB3,
- DB2CC4480662DD1100335AB3,
- DB2CC4490662DD1100335AB3,
- DB2CC44A0662DD1100335AB3,
- DB2CC44B0662DD1100335AB3,
- DB2CC44C0662DD1100335AB3,
- DB2CC44D0662DD1100335AB3,
- DB2CC44E0662DD1100335AB3,
- DB2CC44F0662DD1100335AB3,
- FF2C5FB00A48B8680066DA11,
- FF2C5FB20A48B86E0066DA11,
- );
- isa = PBXGroup;
- name = "Java Support";
- refType = 4;
- };
- DB2CC4430662DD1100335AB3 = {
- fileEncoding = 4;
- isa = PBXFileReference;
- name = BaseListener.java;
- path = ../mDNSShared/Java/BaseListener.java;
- refType = 2;
- };
- DB2CC4440662DD1100335AB3 = {
- fileEncoding = 4;
- isa = PBXFileReference;
- name = BrowseListener.java;
- path = ../mDNSShared/Java/BrowseListener.java;
- refType = 2;
- };
- DB2CC4450662DD1100335AB3 = {
- fileEncoding = 4;
- isa = PBXFileReference;
- name = DNSRecord.java;
- path = ../mDNSShared/Java/DNSRecord.java;
- refType = 2;
- };
- DB2CC4460662DD1100335AB3 = {
- fileEncoding = 4;
- isa = PBXFileReference;
- name = DNSSD.java;
- path = ../mDNSShared/Java/DNSSD.java;
- refType = 2;
- };
- DB2CC4470662DD1100335AB3 = {
- fileEncoding = 4;
- isa = PBXFileReference;
- name = DNSSDException.java;
- path = ../mDNSShared/Java/DNSSDException.java;
- refType = 2;
- };
- DB2CC4480662DD1100335AB3 = {
- fileEncoding = 4;
- isa = PBXFileReference;
- name = DNSSDRegistration.java;
- path = ../mDNSShared/Java/DNSSDRegistration.java;
- refType = 2;
- };
- DB2CC4490662DD1100335AB3 = {
- fileEncoding = 4;
- isa = PBXFileReference;
- name = DNSSDService.java;
- path = ../mDNSShared/Java/DNSSDService.java;
- refType = 2;
- };
- DB2CC44A0662DD1100335AB3 = {
- fileEncoding = 4;
- isa = PBXFileReference;
- name = DomainListener.java;
- path = ../mDNSShared/Java/DomainListener.java;
- refType = 2;
- };
- DB2CC44B0662DD1100335AB3 = {
- fileEncoding = 4;
- isa = PBXFileReference;
- name = JNISupport.c;
- path = ../mDNSShared/Java/JNISupport.c;
- refType = 2;
- };
- DB2CC44C0662DD1100335AB3 = {
- fileEncoding = 4;
- isa = PBXFileReference;
- name = QueryListener.java;
- path = ../mDNSShared/Java/QueryListener.java;
- refType = 2;
- };
- DB2CC44D0662DD1100335AB3 = {
- fileEncoding = 4;
- isa = PBXFileReference;
- name = RegisterListener.java;
- path = ../mDNSShared/Java/RegisterListener.java;
- refType = 2;
- };
- DB2CC44E0662DD1100335AB3 = {
- fileEncoding = 4;
- isa = PBXFileReference;
- name = ResolveListener.java;
- path = ../mDNSShared/Java/ResolveListener.java;
- refType = 2;
- };
- DB2CC44F0662DD1100335AB3 = {
- fileEncoding = 4;
- isa = PBXFileReference;
- name = TXTRecord.java;
- path = ../mDNSShared/Java/TXTRecord.java;
- refType = 2;
- };
- DB2CC4500662DD6800335AB3 = {
- buildActionMask = 2147483647;
- files = (
- DB2CC4560662DE4500335AB3,
- DB2CC4570662DE4600335AB3,
- DB2CC4580662DE4700335AB3,
- DB2CC4590662DE4700335AB3,
- DB2CC45A0662DE4800335AB3,
- DB2CC45B0662DE4900335AB3,
- DB2CC45C0662DE4900335AB3,
- DB2CC45D0662DE4A00335AB3,
- DB2CC45E0662DE4B00335AB3,
- DB2CC45F0662DE4C00335AB3,
- DB2CC4600662DE4C00335AB3,
- DB2CC4610662DE4D00335AB3,
- FF2C5FB10A48B8680066DA11,
- FF2C5FB30A48B86E0066DA11,
- );
- isa = PBXSourcesBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- DB2CC4510662DD6800335AB3 = {
- buildActionMask = 2147483647;
- files = (
- );
- isa = PBXJavaArchiveBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- DB2CC4520662DD6800335AB3 = {
- buildActionMask = 2147483647;
- files = (
- );
- isa = PBXFrameworksBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- DB2CC4530662DD6800335AB3 = {
- buildPhases = (
- DB2CC4500662DD6800335AB3,
- DB2CC4510662DD6800335AB3,
- DB2CC4520662DD6800335AB3,
- DB2CC4550662DE1700335AB3,
- FFD41DDD06641B4200F0C438,
- );
- buildSettings = {
- DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 1;
- INSTALL_PATH = "${SYSTEM_LIBRARY_DIR}/Java/Extensions";
- JAVA_ARCHIVE_CLASSES = YES;
- JAVA_ARCHIVE_COMPRESSION = YES;
- JAVA_ARCHIVE_TYPE = JAR;
- JAVA_COMPILER_DEBUGGING_SYMBOLS = NO;
- JAVA_COMPILER_SOURCE_VERSION = 1.4;
- JAVA_COMPILER_TARGET_VM_VERSION = 1.4;
- JAVA_SOURCE_SUBDIR = .;
- LIBRARY_STYLE = STATIC;
- MACOSX_DEPLOYMENT_TARGET = 10.2;
- OTHER_CFLAGS = "";
- OTHER_LDFLAGS = "";
- OTHER_LIBTOOL_FLAGS = "";
- OTHER_REZFLAGS = "";
- PRODUCT_NAME = dns_sd;
- PURE_JAVA = YES;
- REZ_EXECUTABLE = YES;
- SECTORDER_FLAGS = "";
- STRIPFLAGS = "-S";
- WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
- };
- comments = "Multiplatform .jar file that implements Java interface to DNS-SD";
- dependencies = (
- );
- isa = PBXLibraryTarget;
- name = dns_sd.jar;
- productInstallPath = /System/Library/Java/Extensions;
- productName = dns_sd.jar;
- productReference = FFD41DDA0664157900F0C438;
- };
- DB2CC4550662DE1700335AB3 = {
- buildActionMask = 12;
- files = (
- );
- generatedFileNames = (
- );
- isa = PBXShellScriptBuildPhase;
- neededFileNames = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "javah -force -J-Xbootclasspath/p:${CONFIGURATION_TEMP_DIR}/dns_sd.jar.build/JavaClasses -o ${CONFIGURATION_TEMP_DIR}/dns_sd.jar.build/DNSSD.java.h com.apple.dnssd.AppleDNSSD com.apple.dnssd.AppleBrowser com.apple.dnssd.AppleResolver com.apple.dnssd.AppleRegistration com.apple.dnssd.AppleQuery com.apple.dnssd.AppleDomainEnum com.apple.dnssd.AppleService";
- };
- DB2CC4560662DE4500335AB3 = {
- fileRef = DB2CC4430662DD1100335AB3;
- isa = PBXBuildFile;
- settings = {
- };
- };
- DB2CC4570662DE4600335AB3 = {
- fileRef = DB2CC4440662DD1100335AB3;
- isa = PBXBuildFile;
- settings = {
- };
- };
- DB2CC4580662DE4700335AB3 = {
- fileRef = DB2CC4450662DD1100335AB3;
- isa = PBXBuildFile;
- settings = {
- };
- };
- DB2CC4590662DE4700335AB3 = {
- fileRef = DB2CC4460662DD1100335AB3;
- isa = PBXBuildFile;
- settings = {
- };
- };
- DB2CC45A0662DE4800335AB3 = {
- fileRef = DB2CC4470662DD1100335AB3;
- isa = PBXBuildFile;
- settings = {
- };
- };
- DB2CC45B0662DE4900335AB3 = {
- fileRef = DB2CC4480662DD1100335AB3;
- isa = PBXBuildFile;
- settings = {
- };
- };
- DB2CC45C0662DE4900335AB3 = {
- fileRef = DB2CC4490662DD1100335AB3;
- isa = PBXBuildFile;
- settings = {
- };
- };
- DB2CC45D0662DE4A00335AB3 = {
- fileRef = DB2CC44A0662DD1100335AB3;
- isa = PBXBuildFile;
- settings = {
- };
- };
- DB2CC45E0662DE4B00335AB3 = {
- fileRef = DB2CC44C0662DD1100335AB3;
- isa = PBXBuildFile;
- settings = {
- };
- };
- DB2CC45F0662DE4C00335AB3 = {
- fileRef = DB2CC44D0662DD1100335AB3;
- isa = PBXBuildFile;
- settings = {
- };
- };
- DB2CC4600662DE4C00335AB3 = {
- fileRef = DB2CC44E0662DD1100335AB3;
- isa = PBXBuildFile;
- settings = {
- };
- };
- DB2CC4610662DE4D00335AB3 = {
- fileRef = DB2CC44F0662DD1100335AB3;
- isa = PBXBuildFile;
- settings = {
- };
- };
- DB2CC4620662DF5C00335AB3 = {
- buildActionMask = 2147483647;
- files = (
- );
- isa = PBXHeadersBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- DB2CC4630662DF5C00335AB3 = {
- buildActionMask = 2147483647;
- files = (
- DB2CC46A0662E00700335AB3,
- );
- isa = PBXSourcesBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- DB2CC4640662DF5C00335AB3 = {
- buildActionMask = 2147483647;
- files = (
- DB2CC4690662DFF500335AB3,
- );
- isa = PBXFrameworksBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- DB2CC4650662DF5C00335AB3 = {
- buildActionMask = 2147483647;
- files = (
- );
- isa = PBXRezBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- DB2CC4660662DF5C00335AB3 = {
- buildPhases = (
- DB2CC4620662DF5C00335AB3,
- DB2CC4630662DF5C00335AB3,
- DB2CC4640662DF5C00335AB3,
- DB2CC4650662DF5C00335AB3,
- );
- buildSettings = {
- DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 1;
- HEADER_SEARCH_PATHS = "../mDNSShared \"${SYSTEM_LIBRARY_DIR}/Frameworks/JavaVM.framework/Versions/A/Headers\" \"${SYSTEM_LIBRARY_DIR}/Frameworks/JavaVM.framework/Versions/1.3.1/Headers\" \"${CONFIGURATION_TEMP_DIR}/dns_sd.jar.build\"";
- INSTALL_PATH = /usr/lib/java;
- LIBRARY_STYLE = DYNAMIC;
- MACOSX_DEPLOYMENT_TARGET = 10.2;
- OTHER_CFLAGS = "";
- OTHER_LIBTOOL_FLAGS = "";
- OTHER_REZFLAGS = "";
- PRODUCT_NAME = libjdns_sd.jnilib;
- REZ_EXECUTABLE = YES;
- SECTORDER_FLAGS = "";
- STRIPFLAGS = "-S";
- WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
- };
- comments = "Platform-specific JNI library that bridges dns_sd.jar to <dns_sd.h>.";
- dependencies = (
- FFD41DDF06641BBB00F0C438,
- );
- isa = PBXLibraryTarget;
- name = libjdns_sd.jnilib;
- productInstallPath = /usr/lib/java;
- productName = libjdns_sd.jnilib;
- productReference = DB2CC4670662DF5C00335AB3;
- };
- DB2CC4670662DF5C00335AB3 = {
- isa = PBXLibraryReference;
- path = libjdns_sd.jnilib;
- refType = 3;
- };
- DB2CC4680662DFF500335AB3 = {
- isa = PBXFrameworkReference;
- name = JavaVM.framework;
- path = /System/Library/Frameworks/JavaVM.framework;
- refType = 0;
- };
- DB2CC4690662DFF500335AB3 = {
- fileRef = DB2CC4680662DFF500335AB3;
- isa = PBXBuildFile;
- settings = {
- };
- };
- DB2CC46A0662E00700335AB3 = {
- fileRef = DB2CC44B0662DD1100335AB3;
- isa = PBXBuildFile;
- settings = {
- };
- };
- DBAAFE29057E8F4D0085CAD0 = {
- fileEncoding = 4;
- isa = PBXFileReference;
- name = mDNSDebug.c;
- path = ../mDNSShared/mDNSDebug.c;
- refType = 2;
- };
- DBAAFE2A057E8F4D0085CAD0 = {
- fileRef = DBAAFE29057E8F4D0085CAD0;
- isa = PBXBuildFile;
- settings = {
- };
- };
- DBAAFE2B057E8F4D0085CAD0 = {
- fileRef = DBAAFE29057E8F4D0085CAD0;
- isa = PBXBuildFile;
- settings = {
- };
- };
- DBAAFE2C057E8F660085CAD0 = {
- fileEncoding = 4;
- isa = PBXFileReference;
- name = GenLinkedList.c;
- path = ../mDNSShared/GenLinkedList.c;
- refType = 2;
- };
- DBAAFE2D057E8F660085CAD0 = {
- fileRef = DBAAFE2C057E8F660085CAD0;
- isa = PBXBuildFile;
- settings = {
- };
- };
- DBAAFE2E057E8F660085CAD0 = {
- fileRef = DBAAFE2C057E8F660085CAD0;
- isa = PBXBuildFile;
- settings = {
- };
- };
-//DB0
-//DB1
-//DB2
-//DB3
-//DB4
-//F50
-//F51
-//F52
-//F53
-//F54
- F515E29604A37BB701CA296C = {
- fileRef = 654BE64F02B63B93000001D1;
- isa = PBXBuildFile;
- settings = {
- };
- };
- F515E29704A37BB801CA296C = {
- fileRef = 654BE65002B63B93000001D1;
- isa = PBXBuildFile;
- settings = {
- };
- };
- F515E29904A37BBB01CA296C = {
- fileRef = 000753D303367C1C0CCA2C71;
- isa = PBXBuildFile;
- settings = {
- };
- };
- F525E72804AA167501F1CF4D = {
- fileEncoding = 4;
- isa = PBXFileReference;
- name = uds_daemon.c;
- path = ../mDNSShared/uds_daemon.c;
- refType = 2;
- };
- F525E72904AA167501F1CF4D = {
- fileRef = F525E72804AA167501F1CF4D;
- isa = PBXBuildFile;
- settings = {
- };
- };
- F525E72B04AA167A01F1CF4D = {
- fileRef = F525E72804AA167501F1CF4D;
- isa = PBXBuildFile;
- settings = {
- };
- };
- F5E11B5A04A28126019798ED = {
- fileEncoding = 4;
- isa = PBXFileReference;
- name = dnssd_ipc.c;
- path = ../mDNSShared/dnssd_ipc.c;
- refType = 2;
- };
- F5E11B5B04A28126019798ED = {
- fileEncoding = 4;
- isa = PBXFileReference;
- name = dnssd_ipc.h;
- path = ../mDNSShared/dnssd_ipc.h;
- refType = 2;
- };
- F5E11B5C04A28126019798ED = {
- fileRef = F5E11B5A04A28126019798ED;
- isa = PBXBuildFile;
- settings = {
- };
- };
- F5E11B5D04A28126019798ED = {
- fileRef = F5E11B5B04A28126019798ED;
- isa = PBXBuildFile;
- settings = {
- };
- };
- F5E11B5E04A28126019798ED = {
- fileRef = F5E11B5A04A28126019798ED;
- isa = PBXBuildFile;
- settings = {
- };
- };
- F5E11B5F04A28126019798ED = {
- fileRef = F5E11B5B04A28126019798ED;
- isa = PBXBuildFile;
- settings = {
- };
- };
-//F50
-//F51
-//F52
-//F53
-//F54
-//FF0
-//FF1
-//FF2
-//FF3
-//FF4
- FF08480607CEB8E800AE6769 = {
- isa = PBXFileReference;
- name = inprogress.tiff;
- path = PreferencePane/Artwork/inprogress.tiff;
- refType = 2;
- };
- FF08480707CEB8E800AE6769 = {
- fileRef = FF08480607CEB8E800AE6769;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FF0E0B5D065ADC7600FE4D9C = {
- fileEncoding = 4;
- isa = PBXFileReference;
- name = mDNS.1;
- path = ../mDNSShared/mDNS.1;
- refType = 2;
- };
- FF13FFE90A5DA40200897C81 = {
- fileRef = 6575FBEB022EAF7200000109;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FF13FFEA0A5DA44A00897C81 = {
- fileEncoding = 4;
- isa = PBXFileReference;
- name = dnsextd_lexer.l;
- path = ../mDNSShared/dnsextd_lexer.l;
- refType = 2;
- };
- FF13FFEB0A5DA44A00897C81 = {
- fileRef = FF13FFEA0A5DA44A00897C81;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FF13FFEC0A5DA45500897C81 = {
- fileEncoding = 4;
- isa = PBXFileReference;
- name = dnsextd_parser.y;
- path = ../mDNSShared/dnsextd_parser.y;
- refType = 2;
- };
- FF13FFED0A5DA45500897C81 = {
- fileRef = FF13FFEC0A5DA45500897C81;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FF13FFEE0A5DA52700897C81 = {
- isa = PBXTargetDependency;
- target = 08FB779FFE84155DC02AAC07;
- };
- FF13FFEF0A5DA6FD00897C81 = {
- fileRef = FFCB6D73075D539900B8AF62;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FF16238F07023BD2001AB7D7 = {
- isa = PBXTargetDependency;
- target = FF1C919207021C84001048AB;
- };
- FF1C919207021C84001048AB = {
- buildPhases = (
- FF1C919307021C84001048AB,
- FF1C919407021C84001048AB,
- FF1C919607021C84001048AB,
- FF1C919807021C84001048AB,
- FF1C919907021C84001048AB,
- );
- buildSettings = {
- GCC_TREAT_WARNINGS_AS_ERRORS = YES;
- INSTALL_PATH = /usr/bin;
- MACOSX_DEPLOYMENT_TARGET = 10.2;
- OTHER_CFLAGS = "-no-cpp-precomp -mdynamic-no-pic -I../mDNSShared";
- OTHER_LDFLAGS = "";
- OTHER_REZFLAGS = "";
- PRODUCT_NAME = "dns-sd";
- REZ_EXECUTABLE = YES;
- SECTORDER_FLAGS = "";
- STRIPFLAGS = "-S";
- WARNING_CFLAGS = "-W -Wall -Wmissing-prototypes -Wno-four-char-constants -Wno-unknown-pragmas";
- };
- dependencies = (
- );
- isa = PBXToolTarget;
- name = "dns-sd command-line tool";
- productInstallPath = /usr/bin;
- productName = "dns-sd command-line tool";
- productReference = FF1C919B07021C84001048AB;
- };
- FF1C919307021C84001048AB = {
- buildActionMask = 2147483647;
- files = (
- );
- isa = PBXHeadersBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- FF1C919407021C84001048AB = {
- buildActionMask = 2147483647;
- files = (
- FF1C91A007021E40001048AB,
- );
- isa = PBXSourcesBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- FF1C919607021C84001048AB = {
- buildActionMask = 2147483647;
- files = (
- );
- isa = PBXFrameworksBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- FF1C919807021C84001048AB = {
- buildActionMask = 2147483647;
- files = (
- );
- isa = PBXRezBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- FF1C919907021C84001048AB = {
- buildActionMask = 8;
- dstPath = /usr/share/man/man1;
- dstSubfolderSpec = 0;
- files = (
- FF1C919E07021D78001048AB,
- );
- isa = PBXCopyFilesBuildPhase;
- runOnlyForDeploymentPostprocessing = 1;
- };
- FF1C919B07021C84001048AB = {
- isa = PBXExecutableFileReference;
- path = "dns-sd";
- refType = 3;
- };
- FF1C919D07021D77001048AB = {
- fileEncoding = 4;
- isa = PBXFileReference;
- name = "dns-sd.1";
- path = "../mDNSShared/dns-sd.1";
- refType = 2;
- };
- FF1C919E07021D78001048AB = {
- fileRef = FF1C919D07021D77001048AB;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FF1C919F07021E3F001048AB = {
- fileEncoding = 4;
- isa = PBXFileReference;
- name = "dns-sd.c";
- path = "../Clients/dns-sd.c";
- refType = 2;
- };
- FF1C91A007021E40001048AB = {
- fileRef = FF1C919F07021E3F001048AB;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FF25792906C9A70800376F7B = {
- buildPhases = (
- FF25792A06C9A70800376F7B,
- FF25792D06C9A70800376F7B,
- FF25793A06C9A70800376F7B,
- FF25793F06C9A70800376F7B,
- FF25794006C9A70800376F7B,
- );
- buildSettings = {
- FRAMEWORK_SEARCH_PATHS = "";
- GCC_TREAT_WARNINGS_AS_ERRORS = YES;
- HEADER_SEARCH_PATHS = "\"${APPLE_INTERNAL_DEVELOPER_DIR}/Headers\" \"${CONFIGURATION_TEMP_DIR}\"";
- INSTALL_PATH = /usr/sbin;
- LEX = /usr/bin/flex;
- LEXFLAGS = "-i";
- LIBRARY_SEARCH_PATHS = "\"${CONFIGURATION_TEMP_DIR}\"";
- MACOSX_DEPLOYMENT_TARGET = 10.2;
- OTHER_CFLAGS = "-no-cpp-precomp -mdynamic-no-pic";
- OTHER_LDFLAGS = "-ldnsinfo";
- OTHER_REZFLAGS = "";
- PRODUCT_NAME = dnsextd;
- REZ_EXECUTABLE = YES;
- SECTORDER_FLAGS = "";
- STRIPFLAGS = "-S";
- WARNING_CFLAGS = "-W -Wall -Wmissing-prototypes -Wno-four-char-constants -Wno-unknown-pragmas";
- YACC = "/usr/bin/bison -y";
- };
- dependencies = (
- FF13FFEE0A5DA52700897C81,
- );
- isa = PBXToolTarget;
- name = dnsextd;
- productInstallPath = /usr/sbin;
- productName = mDNSResponder;
- productReference = FF25794406C9A70800376F7B;
- };
- FF25792A06C9A70800376F7B = {
- buildActionMask = 2147483647;
- files = (
- FF25792B06C9A70800376F7B,
- );
- isa = PBXHeadersBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- FF25792B06C9A70800376F7B = {
- fileRef = 6575FBFF022EAFBA00000109;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FF25792D06C9A70800376F7B = {
- buildActionMask = 2147483647;
- files = (
- FF25793606C9A70800376F7B,
- FF25793806C9A70800376F7B,
- FF25794706C9A8BF00376F7B,
- FF25794A06C9A98700376F7B,
- FF25794E06C9AA3000376F7B,
- FF13FFE90A5DA40200897C81,
- FF13FFEB0A5DA44A00897C81,
- FF13FFED0A5DA45500897C81,
- FF13FFEF0A5DA6FD00897C81,
- );
- isa = PBXSourcesBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- FF25793606C9A70800376F7B = {
- fileRef = 7F18A9F60587CEF6001880B3;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FF25793806C9A70800376F7B = {
- fileRef = 7F461DB5062DBF2900672BF3;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FF25793A06C9A70800376F7B = {
- buildActionMask = 2147483647;
- files = (
- FF25793B06C9A70800376F7B,
- FF25793C06C9A70800376F7B,
- FF25793D06C9A70800376F7B,
- FF25793E06C9A70800376F7B,
- );
- isa = PBXFrameworksBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- FF25793B06C9A70800376F7B = {
- fileRef = 09AB6884FE841BABC02AAC07;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FF25793C06C9A70800376F7B = {
- fileRef = 65713D46025A293200000109;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FF25793D06C9A70800376F7B = {
- fileRef = 00CA213D02786FC30CCA2C71;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FF25793E06C9A70800376F7B = {
- fileRef = 7F869685066EE02400D2A2DC;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FF25793F06C9A70800376F7B = {
- buildActionMask = 2147483647;
- files = (
- );
- isa = PBXRezBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- FF25794006C9A70800376F7B = {
- buildActionMask = 8;
- dstPath = /usr/share/man/man8;
- dstSubfolderSpec = 0;
- files = (
- FFF4F63B06CFE4DD00459EFD,
- );
- isa = PBXCopyFilesBuildPhase;
- runOnlyForDeploymentPostprocessing = 1;
- };
- FF25794406C9A70800376F7B = {
- isa = PBXExecutableFileReference;
- path = dnsextd;
- refType = 3;
- };
- FF25794606C9A8BF00376F7B = {
- fileEncoding = 4;
- isa = PBXFileReference;
- name = dnsextd.c;
- path = ../mDNSShared/dnsextd.c;
- refType = 2;
- };
- FF25794706C9A8BF00376F7B = {
- fileRef = FF25794606C9A8BF00376F7B;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FF25794A06C9A98700376F7B = {
- fileRef = DBAAFE29057E8F4D0085CAD0;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FF25794E06C9AA3000376F7B = {
- fileRef = DBAAFE2C057E8F660085CAD0;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FF25795106C9AB1D00376F7B = {
- isa = PBXTargetDependency;
- target = FF25792906C9A70800376F7B;
- };
- FF2609DC07B440DD00CE10E5 = {
- buildActionMask = 2147483647;
- files = (
- );
- isa = PBXHeadersBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- FF2609DD07B440DD00CE10E5 = {
- buildActionMask = 2147483647;
- files = (
- FF260A2B07B4464B00CE10E5,
- FF260A2C07B4464B00CE10E5,
- FF260A2D07B4464B00CE10E5,
- FF260A2E07B4464B00CE10E5,
- FF260A2F07B4464B00CE10E5,
- FF260A3007B4464B00CE10E5,
- FF260A3107B4464B00CE10E5,
- FF260A3407B4466900CE10E5,
- FF260A3507B4466900CE10E5,
- FF260A4A07B4475600CE10E5,
- FF260A4D07B4477F00CE10E5,
- FF2A870607B447EF00B14068,
- FF08480707CEB8E800AE6769,
- FF354EB208516C63007C00E1,
- );
- isa = PBXResourcesBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- FF2609DE07B440DD00CE10E5 = {
- buildActionMask = 2147483647;
- files = (
- FF2609E407B441D400CE10E5,
- FF2609E507B441D700CE10E5,
- FF2609E607B441DB00CE10E5,
- );
- isa = PBXSourcesBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- FF2609DF07B440DD00CE10E5 = {
- buildActionMask = 2147483647;
- files = (
- FF2609F607B442BA00CE10E5,
- FF2609F707B442C000CE10E5,
- FF2609FB07B4433800CE10E5,
- FF260A2007B4436900CE10E5,
- FF260A2107B443B500CE10E5,
- );
- isa = PBXFrameworksBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- FF2609E007B440DD00CE10E5 = {
- buildActionMask = 2147483647;
- files = (
- );
- isa = PBXRezBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- FF2609E107B440DD00CE10E5 = {
- buildPhases = (
- FF2609DC07B440DD00CE10E5,
- FF2609DD07B440DD00CE10E5,
- FF2609DE07B440DD00CE10E5,
- FF2609DF07B440DD00CE10E5,
- FF2609E007B440DD00CE10E5,
- );
- buildSettings = {
- EXPORTED_SYMBOLS_FILE = "";
- INSTALL_PATH = "${SYSTEM_LIBRARY_DIR}/PreferencePanes";
- MACOSX_DEPLOYMENT_TARGET = 10.2;
- OTHER_CFLAGS = "";
- OTHER_LDFLAGS = "-twolevel_namespace";
- OTHER_REZFLAGS = "";
- PREBINDING = NO;
- PRODUCT_NAME = Bonjour;
- SECTORDER_FLAGS = "";
- STRIPFLAGS = "-S";
- WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
- WRAPPER_EXTENSION = prefPane;
- };
- dependencies = (
- FF2609E307B440EC00CE10E5,
- );
- isa = PBXBundleTarget;
- name = PreferencePane;
- productInstallPath = "${SYSTEM_LIBRARY_DIR}/PreferencePanes";
- productName = PreferencePane;
- productReference = FF2609E207B440DD00CE10E5;
- productSettingsXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
-<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
-<plist version=\"1.0\">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>English</string>
- <key>CFBundleExecutable</key>
- <string>Bonjour</string>
- <key>CFBundleGetInfoString</key>
- <string></string>
- <key>CFBundleIconFile</key>
- <string>BonjourPref</string>
- <key>CFBundleIdentifier</key>
- <string>com.apple.preference.bonjour</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleName</key>
- <string></string>
- <key>CFBundlePackageType</key>
- <string>BNDL</string>
- <key>CFBundleShortVersionString</key>
- <string></string>
- <key>CFBundleSignature</key>
- <string>????</string>
- <key>CFBundleVersion</key>
- <string>1.0</string>
- <key>NSMainNibFile</key>
- <string>DNSServiceDiscoveryPref</string>
- <key>NSPrefPaneIconFile</key>
- <string>BonjourPref.tiff</string>
- <key>NSPrefPaneIconLabel</key>
- <string>Bonjour</string>
- <key>NSPrincipalClass</key>
- <string>DNSServiceDiscoveryPref</string>
-</dict>
-</plist>
-";
- };
- FF2609E207B440DD00CE10E5 = {
- isa = PBXBundleReference;
- path = Bonjour.prefPane;
- refType = 3;
- };
- FF2609E307B440EC00CE10E5 = {
- isa = PBXTargetDependency;
- target = FFFB0DA907B43C9100B88D48;
- };
- FF2609E407B441D400CE10E5 = {
- fileRef = FFFB0DAC07B43CBA00B88D48;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FF2609E507B441D700CE10E5 = {
- fileRef = FFFB0DAD07B43CBA00B88D48;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FF2609E607B441DB00CE10E5 = {
- fileRef = FFFB0DAE07B43CBA00B88D48;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FF2609F607B442BA00CE10E5 = {
- fileRef = 65713D46025A293200000109;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FF2609F707B442C000CE10E5 = {
- fileRef = 7F869685066EE02400D2A2DC;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FF2609FA07B4433800CE10E5 = {
- isa = PBXFrameworkReference;
- name = Cocoa.framework;
- path = /System/Library/Frameworks/Cocoa.framework;
- refType = 0;
- };
- FF2609FB07B4433800CE10E5 = {
- fileRef = FF2609FA07B4433800CE10E5;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FF260A1F07B4436900CE10E5 = {
- isa = PBXFrameworkReference;
- name = PreferencePanes.framework;
- path = /System/Library/Frameworks/PreferencePanes.framework;
- refType = 0;
- };
- FF260A2007B4436900CE10E5 = {
- fileRef = FF260A1F07B4436900CE10E5;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FF260A2107B443B500CE10E5 = {
- fileRef = 09AB6884FE841BABC02AAC07;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FF260A2207B443C500CE10E5 = {
- fileRef = 09AB6884FE841BABC02AAC07;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FF260A2307B4463400CE10E5 = {
- children = (
- FF260A2407B4464B00CE10E5,
- FF260A2507B4464B00CE10E5,
- FF260A2607B4464B00CE10E5,
- FF260A2707B4464B00CE10E5,
- FF260A2907B4464B00CE10E5,
- FF260A2807B4464B00CE10E5,
- FF08480607CEB8E800AE6769,
- FF260A2A07B4464B00CE10E5,
- FF260A3207B4466900CE10E5,
- FF260A3307B4466900CE10E5,
- FF354EB108516C63007C00E1,
- FF260A4807B4475600CE10E5,
- FF260A4B07B4477F00CE10E5,
- );
- isa = PBXGroup;
- name = Resources;
- refType = 4;
- };
- FF260A2407B4464B00CE10E5 = {
- isa = PBXFileReference;
- name = remove_idle.tiff;
- path = PreferencePane/Artwork/remove_idle.tiff;
- refType = 2;
- };
- FF260A2507B4464B00CE10E5 = {
- isa = PBXFileReference;
- name = add_pressed.tiff;
- path = PreferencePane/Artwork/add_pressed.tiff;
- refType = 2;
- };
- FF260A2607B4464B00CE10E5 = {
- isa = PBXFileReference;
- name = remove_disabled.tiff;
- path = PreferencePane/Artwork/remove_disabled.tiff;
- refType = 2;
- };
- FF260A2707B4464B00CE10E5 = {
- isa = PBXFileReference;
- name = add_idle.tiff;
- path = PreferencePane/Artwork/add_idle.tiff;
- refType = 2;
- };
- FF260A2807B4464B00CE10E5 = {
- isa = PBXFileReference;
- name = success.tiff;
- path = PreferencePane/Artwork/success.tiff;
- refType = 2;
- };
- FF260A2907B4464B00CE10E5 = {
- isa = PBXFileReference;
- name = remove_pressed.tiff;
- path = PreferencePane/Artwork/remove_pressed.tiff;
- refType = 2;
- };
- FF260A2A07B4464B00CE10E5 = {
- isa = PBXFileReference;
- name = failure.tiff;
- path = PreferencePane/Artwork/failure.tiff;
- refType = 2;
- };
- FF260A2B07B4464B00CE10E5 = {
- fileRef = FF260A2407B4464B00CE10E5;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FF260A2C07B4464B00CE10E5 = {
- fileRef = FF260A2507B4464B00CE10E5;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FF260A2D07B4464B00CE10E5 = {
- fileRef = FF260A2607B4464B00CE10E5;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FF260A2E07B4464B00CE10E5 = {
- fileRef = FF260A2707B4464B00CE10E5;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FF260A2F07B4464B00CE10E5 = {
- fileRef = FF260A2807B4464B00CE10E5;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FF260A3007B4464B00CE10E5 = {
- fileRef = FF260A2907B4464B00CE10E5;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FF260A3107B4464B00CE10E5 = {
- fileRef = FF260A2A07B4464B00CE10E5;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FF260A3207B4466900CE10E5 = {
- isa = PBXFileReference;
- name = BonjourPref.icns;
- path = PreferencePane/BonjourPref.icns;
- refType = 2;
- };
- FF260A3307B4466900CE10E5 = {
- isa = PBXFileReference;
- name = BonjourPref.tiff;
- path = PreferencePane/BonjourPref.tiff;
- refType = 2;
- };
- FF260A3407B4466900CE10E5 = {
- fileRef = FF260A3207B4466900CE10E5;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FF260A3507B4466900CE10E5 = {
- fileRef = FF260A3307B4466900CE10E5;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FF260A4807B4475600CE10E5 = {
- children = (
- FF260A4907B4475600CE10E5,
- );
- isa = PBXVariantGroup;
- name = DNSServiceDiscoveryPref.nib;
- path = PreferencePane;
- refType = 2;
- };
- FF260A4907B4475600CE10E5 = {
- isa = PBXFileReference;
- name = English;
- path = PreferencePane/English.lproj/DNSServiceDiscoveryPref.nib;
- refType = 2;
- };
- FF260A4A07B4475600CE10E5 = {
- fileRef = FF260A4807B4475600CE10E5;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FF260A4B07B4477F00CE10E5 = {
- children = (
- FF260A4C07B4477F00CE10E5,
- );
- isa = PBXVariantGroup;
- name = InfoPlist.strings;
- path = PreferencePane;
- refType = 2;
- };
- FF260A4C07B4477F00CE10E5 = {
- fileEncoding = 4;
- isa = PBXFileReference;
- name = English;
- path = PreferencePane/English.lproj/InfoPlist.strings;
- refType = 2;
- };
- FF260A4D07B4477F00CE10E5 = {
- fileRef = FF260A4B07B4477F00CE10E5;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FF2A870607B447EF00B14068 = {
- fileRef = FFFB0DAA07B43C9100B88D48;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FF2A870707B4481500B14068 = {
- isa = PBXTargetDependency;
- target = FF2609E107B440DD00CE10E5;
- };
- FF2C5FB00A48B8680066DA11 = {
- fileEncoding = 4;
- isa = PBXFileReference;
- name = DNSSDRecordRegistrar.java;
- path = ../mDNSShared/Java/DNSSDRecordRegistrar.java;
- refType = 2;
- };
- FF2C5FB10A48B8680066DA11 = {
- fileRef = FF2C5FB00A48B8680066DA11;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FF2C5FB20A48B86E0066DA11 = {
- fileEncoding = 4;
- isa = PBXFileReference;
- name = RegisterRecordListener.java;
- path = ../mDNSShared/Java/RegisterRecordListener.java;
- refType = 2;
- };
- FF2C5FB30A48B86E0066DA11 = {
- fileRef = FF2C5FB20A48B86E0066DA11;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FF354EB108516C63007C00E1 = {
- fileEncoding = 4;
- isa = PBXExecutableFileReference;
- name = installtool;
- path = PreferencePane/installtool;
- refType = 2;
- };
- FF354EB208516C63007C00E1 = {
- fileRef = FF354EB108516C63007C00E1;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FF37BE9207614059003C0420 = {
- buildActionMask = 2147483647;
- files = (
- );
- generatedFileNames = (
- );
- isa = PBXShellScriptBuildPhase;
- neededFileNames = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "if [ -e /usr/local/include/dnsinfo.h ]\nthen\nrm -f \"${CONFIGURATION_TEMP_DIR}/dnsinfo.h\"\nrm -f \"${CONFIGURATION_TEMP_DIR}/libdnsinfo.a\"\nelse\necho \"#define MDNS_NO_DNSINFO 1\" > ${CONFIGURATION_TEMP_DIR}/dnsinfo.h\ntouch ${CONFIGURATION_TEMP_DIR}/empty.c\ncc ${CONFIGURATION_TEMP_DIR}/empty.c -c -o \"${CONFIGURATION_TEMP_DIR}/libdnsinfo.a\"\nrm -f ${CONFIGURATION_TEMP_DIR}/empty.c\nfi";
- };
- FF485D5105632E0000130380 = {
- fileEncoding = 4;
- isa = PBXFileReference;
- name = mDNSResponder.8;
- path = ../mDNSShared/mDNSResponder.8;
- refType = 2;
- };
- FF5585E507790732008D1C14 = {
- buildActionMask = 8;
- files = (
- );
- generatedFileNames = (
- );
- isa = PBXShellScriptBuildPhase;
- neededFileNames = (
- );
- runOnlyForDeploymentPostprocessing = 1;
- shellPath = /bin/tcsh;
- shellScript = "# Install plist to tell launchd to start mDNSResponder\nmkdir -p ${DSTROOT}${SYSTEM_LIBRARY_DIR}/LaunchDaemons\ncp ${SRCROOT}/LaunchDaemonInfo.plist ${DSTROOT}${SYSTEM_LIBRARY_DIR}/LaunchDaemons/com.apple.mDNSResponder.plist\n\n# Install mDNSResponder.bundle containing language localizations\nmkdir -p ${DSTROOT}${SYSTEM_LIBRARY_DIR}/CoreServices\ncp -R ${SRCROOT}/mDNSResponder-bundle ${DSTROOT}${SYSTEM_LIBRARY_DIR}/CoreServices/mDNSResponder.bundle\n\n# Remove unwanted CVS directories\nfind ${DSTROOT}${SYSTEM_LIBRARY_DIR}/CoreServices/mDNSResponder.bundle -depth -name CVS -exec rm -rf {} \\;\n\n# Expand UTF-8 files to UTF-16 (not necessary, but required by B&I policy)\nforeach file (`find ${DSTROOT}${SYSTEM_LIBRARY_DIR}/CoreServices/mDNSResponder.bundle -name Localizable.strings`)\niconv -f utf-8 -t utf-16 ${file} > ${file}.new\nmv -f ${file}.new ${file}\nend\n\n# Remove French localization (not wanted for Apple B&I builds)\nrm -rf ${DSTROOT}${SYSTEM_LIBRARY_DIR}/CoreServices/mDNSResponder.bundle/Resources/French.lproj\n";
- };
- FF5A0AE705632EA600743C27 = {
- buildActionMask = 8;
- dstPath = /usr/share/man/man8;
- dstSubfolderSpec = 0;
- files = (
- FF5A0AE805632EAE00743C27,
- );
- isa = PBXCopyFilesBuildPhase;
- runOnlyForDeploymentPostprocessing = 1;
- };
- FF5A0AE805632EAE00743C27 = {
- fileRef = FF485D5105632E0000130380;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FFCB6D73075D539900B8AF62 = {
- fileEncoding = 4;
- isa = PBXFileReference;
- name = PlatformCommon.c;
- path = ../mDNSShared/PlatformCommon.c;
- refType = 2;
- };
- FFCB6D74075D539900B8AF62 = {
- fileRef = FFCB6D73075D539900B8AF62;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FFCB6D75075D595E00B8AF62 = {
- fileRef = FFCB6D73075D539900B8AF62;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FFD41DDA0664157900F0C438 = {
- includeInIndex = 0;
- isa = PBXZipArchiveReference;
- path = dns_sd.jar;
- refType = 3;
- };
- FFD41DDB0664169900F0C438 = {
- isa = PBXTargetDependency;
- target = DB2CC4530662DD6800335AB3;
- };
- FFD41DDC0664169B00F0C438 = {
- isa = PBXTargetDependency;
- target = DB2CC4660662DF5C00335AB3;
- };
- FFD41DDD06641B4200F0C438 = {
- buildActionMask = 2147483647;
- files = (
- );
- generatedFileNames = (
- );
- isa = PBXShellScriptBuildPhase;
- neededFileNames = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "rm -f ${CONFIGURATION_BUILD_DIR}/dns_sd";
- };
- FFD41DDF06641BBB00F0C438 = {
- isa = PBXTargetDependency;
- target = DB2CC4530662DD6800335AB3;
- };
- FFE6935007C2CA7F00283007 = {
- fileEncoding = 4;
- isa = PBXFileReference;
- name = ConfigurationAuthority.h;
- path = PreferencePane/ConfigurationAuthority.h;
- refType = 2;
- };
- FFE6935207C2CAA400283007 = {
- fileEncoding = 4;
- isa = PBXFileReference;
- name = DNSServiceDiscoveryPref.h;
- path = PreferencePane/DNSServiceDiscoveryPref.h;
- refType = 2;
- };
- FFE6935407C2CABD00283007 = {
- fileEncoding = 4;
- isa = PBXFileReference;
- name = PrivilegedOperations.h;
- path = PreferencePane/PrivilegedOperations.h;
- refType = 2;
- };
- FFF4F63A06CFE4DD00459EFD = {
- fileEncoding = 4;
- isa = PBXFileReference;
- name = dnsextd.8;
- path = ../mDNSShared/dnsextd.8;
- refType = 2;
- };
- FFF4F63B06CFE4DD00459EFD = {
- fileRef = FFF4F63A06CFE4DD00459EFD;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FFF4F63C06CFE53300459EFD = {
- buildActionMask = 8;
- dstPath = /usr/share/man/man1;
- dstSubfolderSpec = 0;
- files = (
- FFF4F63D06CFE54300459EFD,
- );
- isa = PBXCopyFilesBuildPhase;
- runOnlyForDeploymentPostprocessing = 1;
- };
- FFF4F63D06CFE54300459EFD = {
- fileRef = FF0E0B5D065ADC7600FE4D9C;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FFF7174A07614A8600E10551 = {
- buildActionMask = 2147483647;
- files = (
- );
- generatedFileNames = (
- );
- isa = PBXShellScriptBuildPhase;
- neededFileNames = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "if [ -e /usr/local/include/dnsinfo.h ]\nthen\nrm -f \"${CONFIGURATION_TEMP_DIR}/dnsinfo.h\"\nrm -f \"${CONFIGURATION_TEMP_DIR}/libdnsinfo.a\"\nelse\necho \"#define MDNS_NO_DNSINFO 1\" > ${CONFIGURATION_TEMP_DIR}/dnsinfo.h\ntouch ${CONFIGURATION_TEMP_DIR}/empty.c\ncc ${CONFIGURATION_TEMP_DIR}/empty.c -c -o \"${CONFIGURATION_TEMP_DIR}/libdnsinfo.a\"\nrm -f ${CONFIGURATION_TEMP_DIR}/empty.c\nfi";
- };
- FFFB0DA407B43BED00B88D48 = {
- children = (
- FFE6935007C2CA7F00283007,
- FFFB0DAE07B43CBA00B88D48,
- FFE6935207C2CAA400283007,
- FFFB0DAC07B43CBA00B88D48,
- FFE6935407C2CABD00283007,
- FFFB0DAD07B43CBA00B88D48,
- FFFB0DAF07B43CBA00B88D48,
- FF260A2307B4463400CE10E5,
- );
- isa = PBXGroup;
- path = PreferencePane;
- refType = 2;
- };
- FFFB0DA507B43C9100B88D48 = {
- buildActionMask = 2147483647;
- files = (
- );
- isa = PBXHeadersBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- FFFB0DA607B43C9100B88D48 = {
- buildActionMask = 2147483647;
- files = (
- FFFB0DB307B43CBA00B88D48,
- );
- isa = PBXSourcesBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- FFFB0DA707B43C9100B88D48 = {
- buildActionMask = 2147483647;
- files = (
- FFFB0DB507B43D2700B88D48,
- FFFB0DB907B43D5F00B88D48,
- FFFB0DBD07B43D7400B88D48,
- FF260A2207B443C500CE10E5,
- );
- isa = PBXFrameworksBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- FFFB0DA807B43C9100B88D48 = {
- buildActionMask = 2147483647;
- files = (
- );
- isa = PBXRezBuildPhase;
- runOnlyForDeploymentPostprocessing = 0;
- };
- FFFB0DA907B43C9100B88D48 = {
- buildPhases = (
- FFFB0DA507B43C9100B88D48,
- FFFB0DA607B43C9100B88D48,
- FFFB0DA707B43C9100B88D48,
- FFFB0DA807B43C9100B88D48,
- );
- buildSettings = {
- INSTALL_PATH = "/Library/Application Support/Bonjour";
- MACOSX_DEPLOYMENT_TARGET = 10.2;
- OTHER_CFLAGS = "";
- OTHER_LDFLAGS = "";
- OTHER_REZFLAGS = "";
- PRODUCT_NAME = ddnswriteconfig;
- REZ_EXECUTABLE = YES;
- SECTORDER_FLAGS = "";
- STRIPFLAGS = "-S";
- WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
- };
- dependencies = (
- );
- isa = PBXToolTarget;
- name = ddnswriteconfig;
- productInstallPath = "/Library/Application Support/Bonjour";
- productName = ddnswriteconfig;
- productReference = FFFB0DAA07B43C9100B88D48;
- };
- FFFB0DAA07B43C9100B88D48 = {
- isa = PBXExecutableFileReference;
- path = ddnswriteconfig;
- refType = 3;
- };
- FFFB0DAC07B43CBA00B88D48 = {
- fileEncoding = 4;
- isa = PBXFileReference;
- path = DNSServiceDiscoveryPref.m;
- refType = 4;
- };
- FFFB0DAD07B43CBA00B88D48 = {
- fileEncoding = 4;
- isa = PBXFileReference;
- path = PrivilegedOperations.c;
- refType = 4;
- };
- FFFB0DAE07B43CBA00B88D48 = {
- fileEncoding = 4;
- isa = PBXFileReference;
- path = ConfigurationAuthority.c;
- refType = 4;
- };
- FFFB0DAF07B43CBA00B88D48 = {
- fileEncoding = 4;
- isa = PBXFileReference;
- path = ddnswriteconfig.m;
- refType = 4;
- };
- FFFB0DB307B43CBA00B88D48 = {
- fileRef = FFFB0DAF07B43CBA00B88D48;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FFFB0DB407B43D2700B88D48 = {
- isa = PBXFrameworkReference;
- name = Foundation.framework;
- path = /System/Library/Frameworks/Foundation.framework;
- refType = 0;
- };
- FFFB0DB507B43D2700B88D48 = {
- fileRef = FFFB0DB407B43D2700B88D48;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FFFB0DB907B43D5F00B88D48 = {
- fileRef = 7F869685066EE02400D2A2DC;
- isa = PBXBuildFile;
- settings = {
- };
- };
- FFFB0DBD07B43D7400B88D48 = {
- fileRef = 65713D46025A293200000109;
- isa = PBXBuildFile;
- settings = {
- };
- };
- };
- rootObject = 08FB7793FE84155DC02AAC07;
-}
diff --git a/mDNSResponder/mDNSMacOSX/mDNSResponder.sb b/mDNSResponder/mDNSMacOSX/mDNSResponder.sb
index f267f324..5c8eedd7 100644
--- a/mDNSResponder/mDNSMacOSX/mDNSResponder.sb
+++ b/mDNSResponder/mDNSMacOSX/mDNSResponder.sb
@@ -1,6 +1,6 @@
; -*- Mode: Scheme; tab-width: 4 -*-
;
-; Copyright (c) 2012 Apple Inc. All rights reserved.
+; Copyright (c) 2012-2015 Apple Inc. All rights reserved.
;
; Redistribution and use in source and binary forms, with or without
; modification, are permitted provided that the following conditions are met:
@@ -10,7 +10,7 @@
; 2. Redistributions in binary form must reproduce the above copyright notice,
; this list of conditions and the following disclaimer in the documentation
; and/or other materials provided with the distribution.
-; 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of its
+; 3. Neither the name of Apple Inc. ("Apple") nor the names of its
; contributors may be used to endorse or promote products derived from this
; software without specific prior written permission.
;
@@ -45,9 +45,12 @@
; Mach communications
; These are needed for things like getpwnam, hostname changes, & keychain
(allow mach-lookup
+ (global-name "com.apple.awdd")
(global-name "com.apple.bsd.dirhelper")
(global-name "com.apple.CoreServices.coreservicesd")
+ (global-name "com.apple.coreservices.quarantine-resolver")
(global-name "com.apple.distributed_notifications.2")
+ (global-name "com.apple.lsd.mapdb")
(global-name "com.apple.ocspd")
(global-name "com.apple.PowerManagement.control")
(global-name "com.apple.mDNSResponderHelper")
@@ -58,13 +61,13 @@
(global-name "com.apple.SystemConfiguration.NetworkInformation")
(global-name "com.apple.system.notification_center")
(global-name "com.apple.system.logger")
+ (global-name "com.apple.usymptomsd")
(global-name "com.apple.webcontentfilter.dns")
(global-name "com.apple.server.bluetooth")
(global-name "com.apple.awacs")
(global-name "com.apple.networkd")
(global-name "com.apple.securityd")
(global-name "com.apple.wifi.manager")
- (global-name "com.apple.commcenter.cupolicy.xpc")
(global-name "com.apple.blued")
(global-name "com.apple.mobilegestalt.xpc")
(global-name "com.apple.snhelper"))
@@ -99,6 +102,7 @@
(literal "/usr/sbin")
(literal "/usr/sbin/mDNSResponder")
+ (literal "/Library/Preferences/com.apple.mDNSResponder.plist")
(literal "/Library/Preferences/SystemConfiguration/preferences.plist")
(literal "/Library/Preferences/SystemConfiguration/com.apple.nat.plist")
(regex #"^/Library/Preferences/(ByHost/)?\.GlobalPreferences\.")
@@ -136,10 +140,7 @@
(regex #"^/private/var/folders/[^/]+/[^/]+/C/mds(/|$)")
; Required on 10.5 and 10.6
- (regex #"^/private/var/folders/[^/]+/[^/]+/-Caches-/mds(/|$)")
-
- ; Required on 10.10.4
- (regex #"^/private/var/folders/[^/]+/[^/]+/[0-9]+(/|$)"))
+ (regex #"^/private/var/folders/[^/]+/[^/]+/-Caches-/mds(/|$)"))
; CRL Cache for SSL/TLS connections
(allow file-read-data (literal "/private/var/db/crls/crlcache.db"))
diff --git a/mDNSResponder/mDNSMacOSX/mDNSResponder.xcodeproj/project.pbxproj b/mDNSResponder/mDNSMacOSX/mDNSResponder.xcodeproj/project.pbxproj
index 39d8a451..ef2fecbd 100644
--- a/mDNSResponder/mDNSMacOSX/mDNSResponder.xcodeproj/project.pbxproj
+++ b/mDNSResponder/mDNSMacOSX/mDNSResponder.xcodeproj/project.pbxproj
@@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
- objectVersion = 45;
+ objectVersion = 46;
objects = {
/* Begin PBXAggregateTarget section */
@@ -25,16 +25,14 @@
isa = PBXAggregateTarget;
buildConfigurationList = 03067D730C83A3CB0022BE1F /* Build configuration list for PBXAggregateTarget "Build Some" */;
buildPhases = (
- FF045B6A0C7E4AA600448140 /* ShellScript */,
);
dependencies = (
- 217A4C49138EE14C000A5BA8 /* PBXTargetDependency */,
03067D680C83A3830022BE1F /* PBXTargetDependency */,
- 03067D6A0C83A3890022BE1F /* PBXTargetDependency */,
- 03067D6C0C83A3920022BE1F /* PBXTargetDependency */,
03067D6E0C83A39C0022BE1F /* PBXTargetDependency */,
- 84C5B3411665544B00C324A8 /* PBXTargetDependency */,
+ 03067D6C0C83A3920022BE1F /* PBXTargetDependency */,
BD7833F01ABA5E3500EC51ED /* PBXTargetDependency */,
+ 84C5B3411665544B00C324A8 /* PBXTargetDependency */,
+ 217A4C49138EE14C000A5BA8 /* PBXTargetDependency */,
);
name = "Build Some";
productName = "Build Some";
@@ -57,9 +55,9 @@
buildPhases = (
);
dependencies = (
+ 215FFB19124002C100470DE1 /* PBXTargetDependency */,
215FFB1D124002CC00470DE1 /* PBXTargetDependency */,
215FFB1B124002C700470DE1 /* PBXTargetDependency */,
- 215FFB19124002C100470DE1 /* PBXTargetDependency */,
);
name = SystemLibrariesStatic;
productName = SystemLibrariesStatic;
@@ -93,23 +91,13 @@
/* Begin PBXBuildFile section */
21070E5F16486B9000A69507 /* DNSSECSupport.c in Sources */ = {isa = PBXBuildFile; fileRef = 21070E5D16486B9000A69507 /* DNSSECSupport.c */; };
- 21070E6016486B9000A69507 /* DNSSECSupport.c in Sources */ = {isa = PBXBuildFile; fileRef = 21070E5D16486B9000A69507 /* DNSSECSupport.c */; };
21070E6116486B9000A69507 /* DNSSECSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = 21070E5E16486B9000A69507 /* DNSSECSupport.h */; };
- 21070E6216486B9000A69507 /* DNSSECSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = 21070E5E16486B9000A69507 /* DNSSECSupport.h */; };
- 2120ABD516B71614007089B6 /* CUPolicy.c in Sources */ = {isa = PBXBuildFile; fileRef = 2120ABD416B71614007089B6 /* CUPolicy.c */; };
- 2120ABD616B71614007089B6 /* CUPolicy.c in Sources */ = {isa = PBXBuildFile; fileRef = 2120ABD416B71614007089B6 /* CUPolicy.c */; };
2124FA2C1471E98C0021D7BB /* nsec.h in Headers */ = {isa = PBXBuildFile; fileRef = 2124FA2B1471E98C0021D7BB /* nsec.h */; };
- 2124FA2D1471E98C0021D7BB /* nsec.h in Headers */ = {isa = PBXBuildFile; fileRef = 2124FA2B1471E98C0021D7BB /* nsec.h */; };
2124FA301471E9B50021D7BB /* dnssec.h in Headers */ = {isa = PBXBuildFile; fileRef = 2124FA2F1471E9B50021D7BB /* dnssec.h */; };
- 2124FA311471E9B50021D7BB /* dnssec.h in Headers */ = {isa = PBXBuildFile; fileRef = 2124FA2F1471E9B50021D7BB /* dnssec.h */; };
2124FA331471E9DE0021D7BB /* nsec.c in Sources */ = {isa = PBXBuildFile; fileRef = 2124FA321471E9DE0021D7BB /* nsec.c */; };
- 2124FA341471E9DE0021D7BB /* nsec.c in Sources */ = {isa = PBXBuildFile; fileRef = 2124FA321471E9DE0021D7BB /* nsec.c */; };
2127A47715C3C7B900A857FC /* nsec3.c in Sources */ = {isa = PBXBuildFile; fileRef = 2127A47515C3C7B900A857FC /* nsec3.c */; };
- 2127A47815C3C7B900A857FC /* nsec3.c in Sources */ = {isa = PBXBuildFile; fileRef = 2127A47515C3C7B900A857FC /* nsec3.c */; };
2127A47915C3C7B900A857FC /* nsec3.h in Headers */ = {isa = PBXBuildFile; fileRef = 2127A47615C3C7B900A857FC /* nsec3.h */; };
- 2127A47A15C3C7B900A857FC /* nsec3.h in Headers */ = {isa = PBXBuildFile; fileRef = 2127A47615C3C7B900A857FC /* nsec3.h */; };
213BDC6D147319F400000896 /* dnssec.c in Sources */ = {isa = PBXBuildFile; fileRef = 213BDC6C147319F400000896 /* dnssec.c */; };
- 213BDC6E147319F400000896 /* dnssec.c in Sources */ = {isa = PBXBuildFile; fileRef = 213BDC6C147319F400000896 /* dnssec.c */; };
213FB23C12028C4A002B3A08 /* BonjourEvents.c in Sources */ = {isa = PBXBuildFile; fileRef = 213FB22C12028B53002B3A08 /* BonjourEvents.c */; };
213FB23D12028C5A002B3A08 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 09AB6884FE841BABC02AAC07 /* CoreFoundation.framework */; };
215FFAEE124000F900470DE1 /* dnssd_ipc.c in Sources */ = {isa = PBXBuildFile; fileRef = F5E11B5A04A28126019798ED /* dnssd_ipc.c */; };
@@ -130,39 +118,28 @@
215FFAFD1240013400470DE1 /* DNSServiceDiscovery.c in Sources */ = {isa = PBXBuildFile; fileRef = FFA572480AF18FCC0055A0F1 /* DNSServiceDiscovery.c */; };
215FFAFE1240013400470DE1 /* DNSServiceDiscoveryRequest.defs in Sources */ = {isa = PBXBuildFile; fileRef = 6575FC01022EAFBA00000109 /* DNSServiceDiscoveryRequest.defs */; };
215FFAFF1240013400470DE1 /* DNSServiceDiscoveryReply.defs in Sources */ = {isa = PBXBuildFile; fileRef = 6575FC00022EAFBA00000109 /* DNSServiceDiscoveryReply.defs */; settings = {ATTRIBUTES = (Server, ); }; };
- 216D9ACE1720C9F5008066E1 /* VPNService.c in Sources */ = {isa = PBXBuildFile; fileRef = 216D9ACD1720C9F5008066E1 /* VPNService.c */; };
- 216D9ACF1720C9F5008066E1 /* VPNService.c in Sources */ = {isa = PBXBuildFile; fileRef = 216D9ACD1720C9F5008066E1 /* VPNService.c */; };
+ 216D9ACE1720C9F5008066E1 /* uDNSPathEvalulation.c in Sources */ = {isa = PBXBuildFile; fileRef = 216D9ACD1720C9F5008066E1 /* uDNSPathEvalulation.c */; };
218E8E51156D8C0300720DA0 /* dnsproxy.c in Sources */ = {isa = PBXBuildFile; fileRef = 218E8E4F156D8C0300720DA0 /* dnsproxy.c */; };
- 218E8E52156D8C0300720DA0 /* dnsproxy.c in Sources */ = {isa = PBXBuildFile; fileRef = 218E8E4F156D8C0300720DA0 /* dnsproxy.c */; };
218E8E53156D8C0300720DA0 /* dnsproxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 218E8E50156D8C0300720DA0 /* dnsproxy.h */; };
- 218E8E54156D8C0300720DA0 /* dnsproxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 218E8E50156D8C0300720DA0 /* dnsproxy.h */; };
- 219D5542149ED645004464AE /* libxml2.2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 219D5541149ED645004464AE /* libxml2.2.dylib */; };
- 219D5543149ED645004464AE /* libxml2.2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 219D5541149ED645004464AE /* libxml2.2.dylib */; };
+ 219D5542149ED645004464AE /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 219D5541149ED645004464AE /* libxml2.dylib */; };
21A57F4C145B2AE100939099 /* CryptoAlg.c in Sources */ = {isa = PBXBuildFile; fileRef = 21A57F4A145B2AE100939099 /* CryptoAlg.c */; };
- 21A57F4D145B2AE100939099 /* CryptoAlg.c in Sources */ = {isa = PBXBuildFile; fileRef = 21A57F4A145B2AE100939099 /* CryptoAlg.c */; };
21A57F4E145B2AE100939099 /* CryptoAlg.h in Headers */ = {isa = PBXBuildFile; fileRef = 21A57F4B145B2AE100939099 /* CryptoAlg.h */; };
- 21A57F4F145B2AE100939099 /* CryptoAlg.h in Headers */ = {isa = PBXBuildFile; fileRef = 21A57F4B145B2AE100939099 /* CryptoAlg.h */; };
21A57F53145B2B1400939099 /* CryptoSupport.c in Sources */ = {isa = PBXBuildFile; fileRef = 21A57F51145B2B1400939099 /* CryptoSupport.c */; };
- 21A57F54145B2B1400939099 /* CryptoSupport.c in Sources */ = {isa = PBXBuildFile; fileRef = 21A57F51145B2B1400939099 /* CryptoSupport.c */; };
21A57F55145B2B1400939099 /* CryptoSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = 21A57F52145B2B1400939099 /* CryptoSupport.h */; };
- 21A57F56145B2B1400939099 /* CryptoSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = 21A57F52145B2B1400939099 /* CryptoSupport.h */; };
21DCD05C1461B23700702FC8 /* CryptoAlg.c in Sources */ = {isa = PBXBuildFile; fileRef = 21A57F4A145B2AE100939099 /* CryptoAlg.c */; };
- 21DCD05D1461B23700702FC8 /* CryptoAlg.h in Sources */ = {isa = PBXBuildFile; fileRef = 21A57F4B145B2AE100939099 /* CryptoAlg.h */; };
21DD8FBF161E9A250033C8F8 /* anonymous.c in Sources */ = {isa = PBXBuildFile; fileRef = 21DD8FBD161E9A250033C8F8 /* anonymous.c */; };
- 21DD8FC0161E9A250033C8F8 /* anonymous.c in Sources */ = {isa = PBXBuildFile; fileRef = 21DD8FBD161E9A250033C8F8 /* anonymous.c */; };
21DD8FC1161E9A250033C8F8 /* anonymous.h in Headers */ = {isa = PBXBuildFile; fileRef = 21DD8FBE161E9A250033C8F8 /* anonymous.h */; };
- 21DD8FC2161E9A250033C8F8 /* anonymous.h in Headers */ = {isa = PBXBuildFile; fileRef = 21DD8FBE161E9A250033C8F8 /* anonymous.h */; };
21DED43515702C0F0060B6B9 /* DNSProxySupport.c in Sources */ = {isa = PBXBuildFile; fileRef = 21DED43415702C0F0060B6B9 /* DNSProxySupport.c */; };
- 21DED43615702C0F0060B6B9 /* DNSProxySupport.c in Sources */ = {isa = PBXBuildFile; fileRef = 21DED43415702C0F0060B6B9 /* DNSProxySupport.c */; };
+ 21F51DC11B3541940070B05C /* com.apple.mDNSResponder.plist in CopyFiles */ = {isa = PBXBuildFile; fileRef = 21F51DBF1B35412D0070B05C /* com.apple.mDNSResponder.plist */; };
+ 21F51DC31B3541F50070B05C /* com.apple.mDNSResponderHelper.plist in CopyFiles */ = {isa = PBXBuildFile; fileRef = 21F51DBE1B3541030070B05C /* com.apple.mDNSResponderHelper.plist */; };
+ 21F51DC51B3542210070B05C /* com.apple.dnsextd.plist in CopyFiles */ = {isa = PBXBuildFile; fileRef = 21F51DBD1B3540DB0070B05C /* com.apple.dnsextd.plist */; };
2E0405F50C3195F700F13B59 /* helper.c in Sources */ = {isa = PBXBuildFile; fileRef = 2E0405F40C3195F700F13B59 /* helper.c */; };
2E0405F60C31961100F13B59 /* helpermsg.defs in Sources */ = {isa = PBXBuildFile; fileRef = 2E0405EB0C3190DC00F13B59 /* helpermsg.defs */; settings = {ATTRIBUTES = (Client, Server, ); COMPILER_FLAGS = "-Wno-error"; }; };
2E0406150C3197CB00F13B59 /* libbsm.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 2E0406140C3197CB00F13B59 /* libbsm.dylib */; };
2E04061F0C3198B700F13B59 /* helpermsg.defs in Sources */ = {isa = PBXBuildFile; fileRef = 2E0405EB0C3190DC00F13B59 /* helpermsg.defs */; };
- 2E0406200C3198B700F13B59 /* helpermsg.defs in Sources */ = {isa = PBXBuildFile; fileRef = 2E0405EB0C3190DC00F13B59 /* helpermsg.defs */; };
2E04070A0C31EEEC00F13B59 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 09AB6884FE841BABC02AAC07 /* CoreFoundation.framework */; };
2E04070B0C31EEEC00F13B59 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 65713D46025A293200000109 /* SystemConfiguration.framework */; };
2E3552900C3A95C100CA1CB7 /* helper-error.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E35528F0C3A95C100CA1CB7 /* helper-error.h */; };
- 2E3552910C3A95C100CA1CB7 /* helper-error.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E35528F0C3A95C100CA1CB7 /* helper-error.h */; };
2E3552920C3A95C100CA1CB7 /* helper-error.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E35528F0C3A95C100CA1CB7 /* helper-error.h */; };
2E35529D0C3A9E7600CA1CB7 /* helper-error.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E35528F0C3A95C100CA1CB7 /* helper-error.h */; };
2E35529E0C3A9E7600CA1CB7 /* helper-stubs.c in Sources */ = {isa = PBXBuildFile; fileRef = 2E96A52D0C39C1A50087C4D2 /* helper-stubs.c */; };
@@ -174,18 +151,13 @@
2E8165F90C59838100485EB2 /* libipsec.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 2E8165F60C59835F00485EB2 /* libipsec.dylib */; };
2E96A51D0C39BDAC0087C4D2 /* helper-main.c in Sources */ = {isa = PBXBuildFile; fileRef = 2E0406CA0C31E9AD00F13B59 /* helper-main.c */; };
2E96A5260C39BE480087C4D2 /* helper.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E96A5250C39BE480087C4D2 /* helper.h */; };
- 2E96A5270C39BE480087C4D2 /* helper.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E96A5250C39BE480087C4D2 /* helper.h */; };
- 2E96A5300C39C1A50087C4D2 /* helper-stubs.c in Sources */ = {isa = PBXBuildFile; fileRef = 2E96A52D0C39C1A50087C4D2 /* helper-stubs.c */; };
2E96A5320C39C1A50087C4D2 /* helper-stubs.c in Sources */ = {isa = PBXBuildFile; fileRef = 2E96A52D0C39C1A50087C4D2 /* helper-stubs.c */; };
2EAE955A0C31F4D30021F738 /* helpermsg.defs in Sources */ = {isa = PBXBuildFile; fileRef = 2E0405EB0C3190DC00F13B59 /* helpermsg.defs */; };
2EC8F8EC0C39CCAC003C9C48 /* helper.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E96A5250C39BE480087C4D2 /* helper.h */; };
2ECC11A60C4FEC3800CB1885 /* helpermsg-types.h in Headers */ = {isa = PBXBuildFile; fileRef = 2ECC11A50C4FEC3800CB1885 /* helpermsg-types.h */; };
- 2ECC11A70C4FEC3800CB1885 /* helpermsg-types.h in Headers */ = {isa = PBXBuildFile; fileRef = 2ECC11A50C4FEC3800CB1885 /* helpermsg-types.h */; };
2ECC11A80C4FEC3800CB1885 /* helpermsg-types.h in Headers */ = {isa = PBXBuildFile; fileRef = 2ECC11A50C4FEC3800CB1885 /* helpermsg-types.h */; };
2EDC5E730C39EA640092701B /* helper-server.h in Headers */ = {isa = PBXBuildFile; fileRef = 2EDC5E720C39EA640092701B /* helper-server.h */; };
- 2EDC5E740C39EA640092701B /* helper-server.h in Headers */ = {isa = PBXBuildFile; fileRef = 2EDC5E720C39EA640092701B /* helper-server.h */; };
2EDC5E750C39EA640092701B /* helper-server.h in Headers */ = {isa = PBXBuildFile; fileRef = 2EDC5E720C39EA640092701B /* helper-server.h */; };
- 3F347CF6185D57CD00367B40 /* base.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 3F347CF5185D57CD00367B40 /* base.xcconfig */; };
4A7B9E8014FDA25000B84CC1 /* mDNSResponder.plist in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4A7B9E7E14FDA1BB00B84CC1 /* mDNSResponder.plist */; };
4A7B9E8214FDA26C00B84CC1 /* mDNSResponder.txt in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4A7B9E7C14FDA19F00B84CC1 /* mDNSResponder.txt */; };
4AAE0C9A0C68EA81003882A5 /* mDNSResponderHelper.8 in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4AAE0C7A0C68E97F003882A5 /* mDNSResponderHelper.8 */; };
@@ -195,13 +167,16 @@
8415A6571897109000BDBA26 /* libdns_services.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 8415A6561897109000BDBA26 /* libdns_services.dylib */; };
8418673E15AB8C2D00BB7F70 /* com.apple.networking.mDNSResponder in CopyFiles */ = {isa = PBXBuildFile; fileRef = 8418673A15AB8B6900BB7F70 /* com.apple.networking.mDNSResponder */; };
848DA5C7165477E000D2E8B4 /* xpc_services.c in Sources */ = {isa = PBXBuildFile; fileRef = 848DA5C6165477E000D2E8B4 /* xpc_services.c */; };
- 848DA5C8165477E000D2E8B4 /* xpc_services.c in Sources */ = {isa = PBXBuildFile; fileRef = 848DA5C6165477E000D2E8B4 /* xpc_services.c */; };
848DA5CA165477EB00D2E8B4 /* xpc_services.h in Headers */ = {isa = PBXBuildFile; fileRef = 848DA5C9165477EB00D2E8B4 /* xpc_services.h */; };
- 848DA5CB165477EB00D2E8B4 /* xpc_services.h in Headers */ = {isa = PBXBuildFile; fileRef = 848DA5C9165477EB00D2E8B4 /* xpc_services.h */; };
848DA5D616547F7200D2E8B4 /* dns_xpc.h in Headers */ = {isa = PBXBuildFile; fileRef = 848DA5D516547F7200D2E8B4 /* dns_xpc.h */; };
- 848DA5D716547F7200D2E8B4 /* dns_xpc.h in Headers */ = {isa = PBXBuildFile; fileRef = 848DA5D516547F7200D2E8B4 /* dns_xpc.h */; };
84C5B33C166553F100C324A8 /* dns_services.c in Sources */ = {isa = PBXBuildFile; fileRef = 84C5B339166553AF00C324A8 /* dns_services.c */; };
84F4C090188F050200D1E1DE /* dns_services.h in Headers */ = {isa = PBXBuildFile; fileRef = 84F4C08F188F04CF00D1E1DE /* dns_services.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ BD03E88D1AD31278005E8A81 /* SymptomReporter.c in Sources */ = {isa = PBXBuildFile; fileRef = BD03E88C1AD31278005E8A81 /* SymptomReporter.c */; };
+ BD2806081C40775600455151 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BD2806071C40775600455151 /* Foundation.framework */; };
+ BD64FE9C1C40762F0040EAB3 /* Metrics.h in Headers */ = {isa = PBXBuildFile; fileRef = BD64FE9A1C40762F0040EAB3 /* Metrics.h */; };
+ BD64FE9D1C40762F0040EAB3 /* Metrics.m in Sources */ = {isa = PBXBuildFile; fileRef = BD64FE9B1C40762F0040EAB3 /* Metrics.m */; };
+ BDA9A7881B3A924C00523835 /* dns_sd_private.h in Headers */ = {isa = PBXBuildFile; fileRef = BDA9A7871B3A923600523835 /* dns_sd_private.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ BDA9A7891B3A92A500523835 /* dns_sd_private.h in Headers */ = {isa = PBXBuildFile; fileRef = BDA9A7871B3A923600523835 /* dns_sd_private.h */; settings = {ATTRIBUTES = (Private, ); }; };
D284BE530ADD80740027CCDF /* DNSServiceDiscoveryDefines.h in Headers */ = {isa = PBXBuildFile; fileRef = 6575FBFF022EAFBA00000109 /* DNSServiceDiscoveryDefines.h */; };
D284BE540ADD80740027CCDF /* dnssd_ipc.h in Headers */ = {isa = PBXBuildFile; fileRef = F5E11B5B04A28126019798ED /* dnssd_ipc.h */; };
D284BE560ADD80740027CCDF /* DNSServiceDiscoveryReply.defs in Sources */ = {isa = PBXBuildFile; fileRef = 6575FC00022EAFBA00000109 /* DNSServiceDiscoveryReply.defs */; settings = {ATTRIBUTES = (Client, ); }; };
@@ -222,28 +197,6 @@
D284BE670ADD80740027CCDF /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00CA213D02786FC30CCA2C71 /* IOKit.framework */; };
D284BE680ADD80740027CCDF /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7F869685066EE02400D2A2DC /* Security.framework */; };
D284BE6B0ADD80740027CCDF /* mDNSResponder.8 in CopyFiles */ = {isa = PBXBuildFile; fileRef = FF485D5105632E0000130380 /* mDNSResponder.8 */; };
- D284BE780ADD80800027CCDF /* DNSServiceDiscoveryDefines.h in Headers */ = {isa = PBXBuildFile; fileRef = 6575FBFF022EAFBA00000109 /* DNSServiceDiscoveryDefines.h */; };
- D284BE790ADD80800027CCDF /* dnssd_ipc.h in Headers */ = {isa = PBXBuildFile; fileRef = F5E11B5B04A28126019798ED /* dnssd_ipc.h */; };
- D284BE7A0ADD80800027CCDF /* mDNSEmbeddedAPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 654BE64F02B63B93000001D1 /* mDNSEmbeddedAPI.h */; };
- D284BE7B0ADD80800027CCDF /* mDNSDebug.h in Headers */ = {isa = PBXBuildFile; fileRef = 654BE65002B63B93000001D1 /* mDNSDebug.h */; };
- D284BE7C0ADD80800027CCDF /* mDNSMacOSX.h in Headers */ = {isa = PBXBuildFile; fileRef = 000753D303367C1C0CCA2C71 /* mDNSMacOSX.h */; };
- D284BE7E0ADD80800027CCDF /* DNSServiceDiscoveryReply.defs in Sources */ = {isa = PBXBuildFile; fileRef = 6575FC00022EAFBA00000109 /* DNSServiceDiscoveryReply.defs */; settings = {ATTRIBUTES = (Client, ); }; };
- D284BE7F0ADD80800027CCDF /* DNSServiceDiscoveryRequest.defs in Sources */ = {isa = PBXBuildFile; fileRef = 6575FC01022EAFBA00000109 /* DNSServiceDiscoveryRequest.defs */; settings = {ATTRIBUTES = (Server, ); }; };
- D284BE800ADD80800027CCDF /* mDNS.c in Sources */ = {isa = PBXBuildFile; fileRef = 6575FBE9022EAF5A00000109 /* mDNS.c */; };
- D284BE810ADD80800027CCDF /* uDNS.c in Sources */ = {isa = PBXBuildFile; fileRef = 7F18A9F70587CEF6001880B3 /* uDNS.c */; };
- D284BE820ADD80800027CCDF /* DNSCommon.c in Sources */ = {isa = PBXBuildFile; fileRef = 7F18A9F60587CEF6001880B3 /* DNSCommon.c */; };
- D284BE830ADD80800027CCDF /* DNSDigest.c in Sources */ = {isa = PBXBuildFile; fileRef = 7F461DB5062DBF2900672BF3 /* DNSDigest.c */; };
- D284BE850ADD80800027CCDF /* mDNSDebug.c in Sources */ = {isa = PBXBuildFile; fileRef = DBAAFE29057E8F4D0085CAD0 /* mDNSDebug.c */; };
- D284BE860ADD80800027CCDF /* uds_daemon.c in Sources */ = {isa = PBXBuildFile; fileRef = F525E72804AA167501F1CF4D /* uds_daemon.c */; };
- D284BE870ADD80800027CCDF /* dnssd_ipc.c in Sources */ = {isa = PBXBuildFile; fileRef = F5E11B5A04A28126019798ED /* dnssd_ipc.c */; };
- D284BE880ADD80800027CCDF /* PlatformCommon.c in Sources */ = {isa = PBXBuildFile; fileRef = FFCB6D73075D539900B8AF62 /* PlatformCommon.c */; };
- D284BE890ADD80800027CCDF /* mDNSMacOSX.c in Sources */ = {isa = PBXBuildFile; fileRef = 6575FBEB022EAF7200000109 /* mDNSMacOSX.c */; };
- D284BE8A0ADD80800027CCDF /* LegacyNATTraversal.c in Sources */ = {isa = PBXBuildFile; fileRef = 7FC8F9D406D14E66007E879D /* LegacyNATTraversal.c */; };
- D284BE8B0ADD80800027CCDF /* daemon.c in Sources */ = {isa = PBXBuildFile; fileRef = 6575FBEC022EAF7200000109 /* daemon.c */; };
- D284BE8D0ADD80800027CCDF /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 09AB6884FE841BABC02AAC07 /* CoreFoundation.framework */; };
- D284BE8E0ADD80800027CCDF /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 65713D46025A293200000109 /* SystemConfiguration.framework */; };
- D284BE8F0ADD80800027CCDF /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00CA213D02786FC30CCA2C71 /* IOKit.framework */; };
- D284BE900ADD80800027CCDF /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7F869685066EE02400D2A2DC /* Security.framework */; };
D284BEA80ADD80920027CCDF /* dns-sd.c in Sources */ = {isa = PBXBuildFile; fileRef = FF1C919F07021E3F001048AB /* dns-sd.c */; };
D284BEAC0ADD80920027CCDF /* dns-sd.1 in CopyFiles */ = {isa = PBXBuildFile; fileRef = FF1C919D07021D77001048AB /* dns-sd.1 */; };
D284BEB70ADD809A0027CCDF /* JNISupport.c in Sources */ = {isa = PBXBuildFile; fileRef = DB2CC44B0662DD1100335AB3 /* JNISupport.c */; };
@@ -305,6 +258,7 @@
FFC22AA50B00F43000BAB070 /* DNSServiceDiscoveryReply.defs in Sources */ = {isa = PBXBuildFile; fileRef = 6575FC00022EAFBA00000109 /* DNSServiceDiscoveryReply.defs */; settings = {ATTRIBUTES = (Server, ); }; };
FFC22AA60B00F43100BAB070 /* DNSServiceDiscoveryReply.defs in Sources */ = {isa = PBXBuildFile; fileRef = 6575FC00022EAFBA00000109 /* DNSServiceDiscoveryReply.defs */; settings = {ATTRIBUTES = (Server, ); }; };
FFC22AA70B00F43100BAB070 /* DNSServiceDiscoveryReply.defs in Sources */ = {isa = PBXBuildFile; fileRef = 6575FC00022EAFBA00000109 /* DNSServiceDiscoveryReply.defs */; settings = {ATTRIBUTES = (Server, ); }; };
+ FFD52A9E1AF858DD00CAD3EC /* CryptoAlg.h in Headers */ = {isa = PBXBuildFile; fileRef = 21A57F4B145B2AE100939099 /* CryptoAlg.h */; };
FFF589B70E37F66800EF515C /* ClientCommon.c in Sources */ = {isa = PBXBuildFile; fileRef = FF5852100DD27BD300862BDF /* ClientCommon.c */; };
FFF589C10E37F67E00EF515C /* ClientCommon.c in Sources */ = {isa = PBXBuildFile; fileRef = FF5852100DD27BD300862BDF /* ClientCommon.c */; };
FFFA38630AEEDB090065B80A /* dnssd_clientlib.c in Sources */ = {isa = PBXBuildFile; fileRef = FFFA38620AEEDB090065B80A /* dnssd_clientlib.c */; };
@@ -345,13 +299,6 @@
remoteGlobalIDString = D284BE500ADD80740027CCDF;
remoteInfo = mDNSResponder;
};
- 03067D690C83A3890022BE1F /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = D284BE750ADD80800027CCDF;
- remoteInfo = "mDNSResponder debug";
- };
03067D6B0C83A3920022BE1F /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
@@ -373,6 +320,13 @@
remoteGlobalIDString = 03067D640C83A3700022BE1F;
remoteInfo = "Build Some";
};
+ 0C2AAB311B6929F300113637 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 84C5B3341665529800C324A8;
+ remoteInfo = dns_services;
+ };
2130257012400E9300AC839F /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
@@ -502,6 +456,36 @@
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
+ 21F51DC01B35418C0070B05C /* CopyFiles */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 8;
+ dstPath = /System/Library/LaunchDaemons;
+ dstSubfolderSpec = 0;
+ files = (
+ 21F51DC11B3541940070B05C /* com.apple.mDNSResponder.plist in CopyFiles */,
+ );
+ runOnlyForDeploymentPostprocessing = 1;
+ };
+ 21F51DC21B3541F30070B05C /* CopyFiles */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 8;
+ dstPath = /System/Library/LaunchDaemons;
+ dstSubfolderSpec = 0;
+ files = (
+ 21F51DC31B3541F50070B05C /* com.apple.mDNSResponderHelper.plist in CopyFiles */,
+ );
+ runOnlyForDeploymentPostprocessing = 1;
+ };
+ 21F51DC41B35421A0070B05C /* CopyFiles */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 8;
+ dstPath = /System/Library/LaunchDaemons;
+ dstSubfolderSpec = 0;
+ files = (
+ 21F51DC51B3542210070B05C /* com.apple.dnsextd.plist in CopyFiles */,
+ );
+ runOnlyForDeploymentPostprocessing = 1;
+ };
4A7B9E7F14FDA21B00B84CC1 /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 8;
@@ -599,7 +583,6 @@
09AB6884FE841BABC02AAC07 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; };
21070E5D16486B9000A69507 /* DNSSECSupport.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = DNSSECSupport.c; sourceTree = "<group>"; };
21070E5E16486B9000A69507 /* DNSSECSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DNSSECSupport.h; sourceTree = "<group>"; };
- 2120ABD416B71614007089B6 /* CUPolicy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = CUPolicy.c; sourceTree = "<group>"; };
2124FA2B1471E98C0021D7BB /* nsec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = nsec.h; path = ../mDNSCore/nsec.h; sourceTree = "<group>"; };
2124FA2F1471E9B50021D7BB /* dnssec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = dnssec.h; path = ../mDNSCore/dnssec.h; sourceTree = "<group>"; };
2124FA321471E9DE0021D7BB /* nsec.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = nsec.c; path = ../mDNSCore/nsec.c; sourceTree = "<group>"; };
@@ -612,10 +595,10 @@
2141DD1D123FFCDB0086D23E /* libdns_sd.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libdns_sd.a; sourceTree = BUILT_PRODUCTS_DIR; };
2141DD24123FFD0F0086D23E /* libdns_sd_debug.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libdns_sd_debug.a; sourceTree = BUILT_PRODUCTS_DIR; };
2141DD2A123FFD2C0086D23E /* libdns_sd_profile.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libdns_sd_profile.a; sourceTree = BUILT_PRODUCTS_DIR; };
- 216D9ACD1720C9F5008066E1 /* VPNService.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = VPNService.c; sourceTree = "<group>"; };
+ 216D9ACD1720C9F5008066E1 /* uDNSPathEvalulation.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = uDNSPathEvalulation.c; sourceTree = "<group>"; };
218E8E4F156D8C0300720DA0 /* dnsproxy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = dnsproxy.c; path = ../mDNSCore/dnsproxy.c; sourceTree = "<group>"; };
218E8E50156D8C0300720DA0 /* dnsproxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = dnsproxy.h; path = ../mDNSCore/dnsproxy.h; sourceTree = "<group>"; };
- 219D5541149ED645004464AE /* libxml2.2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.2.dylib; path = SDKs/MacOSX10.8.sdk/usr/lib/libxml2.2.dylib; sourceTree = DEVELOPER_DIR; };
+ 219D5541149ED645004464AE /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = /usr/lib/libxml2.dylib; sourceTree = "<absolute>"; };
21A57F4A145B2AE100939099 /* CryptoAlg.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = CryptoAlg.c; path = ../mDNSCore/CryptoAlg.c; sourceTree = "<group>"; };
21A57F4B145B2AE100939099 /* CryptoAlg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CryptoAlg.h; path = ../mDNSCore/CryptoAlg.h; sourceTree = "<group>"; };
21A57F51145B2B1400939099 /* CryptoSupport.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = CryptoSupport.c; sourceTree = "<group>"; };
@@ -624,6 +607,9 @@
21DD8FBE161E9A250033C8F8 /* anonymous.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = anonymous.h; path = ../mDNSCore/anonymous.h; sourceTree = "<group>"; };
21DED43415702C0F0060B6B9 /* DNSProxySupport.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = DNSProxySupport.c; sourceTree = "<group>"; };
21F432971134AA6800581B69 /* WebFilterDNS.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebFilterDNS.framework; path = /System/Library/PrivateFrameworks/WebFilterDNS.framework; sourceTree = "<absolute>"; };
+ 21F51DBD1B3540DB0070B05C /* com.apple.dnsextd.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = com.apple.dnsextd.plist; sourceTree = "<group>"; };
+ 21F51DBE1B3541030070B05C /* com.apple.mDNSResponderHelper.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = com.apple.mDNSResponderHelper.plist; sourceTree = "<group>"; };
+ 21F51DBF1B35412D0070B05C /* com.apple.mDNSResponder.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = com.apple.mDNSResponder.plist; sourceTree = "<group>"; };
2E0405EB0C3190DC00F13B59 /* helpermsg.defs */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.mig; path = helpermsg.defs; sourceTree = "<group>"; };
2E0405F00C31955500F13B59 /* mDNSResponderHelper */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = mDNSResponderHelper; sourceTree = BUILT_PRODUCTS_DIR; };
2E0405F40C3195F700F13B59 /* helper.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = helper.c; sourceTree = "<group>"; };
@@ -635,7 +621,6 @@
2E96A52D0C39C1A50087C4D2 /* helper-stubs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "helper-stubs.c"; sourceTree = "<group>"; };
2ECC11A50C4FEC3800CB1885 /* helpermsg-types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "helpermsg-types.h"; sourceTree = "<group>"; };
2EDC5E720C39EA640092701B /* helper-server.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = "helper-server.h"; sourceTree = "<group>"; };
- 3F347CF5185D57CD00367B40 /* base.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = base.xcconfig; sourceTree = "<group>"; };
4A2E69DD0F5475A3004A87B0 /* uds_daemon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = uds_daemon.h; path = ../mDNSShared/uds_daemon.h; sourceTree = SOURCE_ROOT; };
4A3600DF0F34F8CD00453EFB /* DeviceToDeviceManager.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DeviceToDeviceManager.framework; path = /System/Library/PrivateFrameworks/DeviceToDeviceManager.framework; sourceTree = "<absolute>"; };
4A7B9E7C14FDA19F00B84CC1 /* mDNSResponder.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = mDNSResponder.txt; sourceTree = "<group>"; };
@@ -656,7 +641,6 @@
6575FBFF022EAFBA00000109 /* DNSServiceDiscoveryDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DNSServiceDiscoveryDefines.h; sourceTree = "<group>"; };
6575FC00022EAFBA00000109 /* DNSServiceDiscoveryReply.defs */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.mig; path = DNSServiceDiscoveryReply.defs; sourceTree = "<group>"; };
6575FC01022EAFBA00000109 /* DNSServiceDiscoveryRequest.defs */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.mig; path = DNSServiceDiscoveryRequest.defs; sourceTree = "<group>"; };
- 6575FC20022EB7AA00000109 /* SamplemDNSClient.c */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = SamplemDNSClient.c; sourceTree = SOURCE_ROOT; tabWidth = 4; usesTabs = 0; };
72FB545A166D5F960090B2D9 /* dnsctl.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = dnsctl.c; path = ../Clients/dnsctl.c; sourceTree = "<group>"; };
72FB545F166D5FB00090B2D9 /* dnsctl */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = dnsctl; sourceTree = BUILT_PRODUCTS_DIR; };
7F18A9F60587CEF6001880B3 /* DNSCommon.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = DNSCommon.c; path = ../mDNSCore/DNSCommon.c; sourceTree = SOURCE_ROOT; };
@@ -664,7 +648,7 @@
7F461DB5062DBF2900672BF3 /* DNSDigest.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = DNSDigest.c; path = ../mDNSCore/DNSDigest.c; sourceTree = SOURCE_ROOT; };
7F869685066EE02400D2A2DC /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = /System/Library/Frameworks/Security.framework; sourceTree = "<absolute>"; };
7FC8F9D406D14E66007E879D /* LegacyNATTraversal.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = LegacyNATTraversal.c; sourceTree = SOURCE_ROOT; };
- 8415A6561897109000BDBA26 /* libdns_services.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libdns_services.dylib; path = ../../../../../../../usr/lib/libdns_services.dylib; sourceTree = "<group>"; };
+ 8415A6561897109000BDBA26 /* libdns_services.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libdns_services.dylib; path = /usr/lib/libdns_services.dylib; sourceTree = "<absolute>"; };
8418673A15AB8B6900BB7F70 /* com.apple.networking.mDNSResponder */ = {isa = PBXFileReference; lastKnownFileType = text; path = com.apple.networking.mDNSResponder; sourceTree = "<group>"; };
8418673C15AB8B8000BB7F70 /* mDNSResponderLogging.mobileconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = mDNSResponderLogging.mobileconfig; sourceTree = "<group>"; };
848DA5C6165477E000D2E8B4 /* xpc_services.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = xpc_services.c; path = Private/xpc_services.c; sourceTree = "<group>"; };
@@ -673,14 +657,18 @@
84C5B3351665529800C324A8 /* libdns_services.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libdns_services.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
84C5B339166553AF00C324A8 /* dns_services.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = dns_services.c; path = Private/dns_services.c; sourceTree = "<group>"; };
84F4C08F188F04CF00D1E1DE /* dns_services.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = dns_services.h; path = Private/dns_services.h; sourceTree = "<group>"; };
+ BD03E88C1AD31278005E8A81 /* SymptomReporter.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SymptomReporter.c; sourceTree = "<group>"; };
+ BD2806071C40775600455151 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ BD64FE9A1C40762F0040EAB3 /* Metrics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Metrics.h; sourceTree = "<group>"; };
+ BD64FE9B1C40762F0040EAB3 /* Metrics.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Metrics.m; sourceTree = "<group>"; };
+ BD64FE9E1C4076B40040EAB3 /* WirelessDiagnostics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WirelessDiagnostics.framework; path = System/Library/PrivateFrameworks/WirelessDiagnostics.framework; sourceTree = SDKROOT; };
+ BDA9A7871B3A923600523835 /* dns_sd_private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = dns_sd_private.h; path = Private/dns_sd_private.h; sourceTree = "<group>"; };
D284BE730ADD80740027CCDF /* mDNSResponder */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = mDNSResponder; sourceTree = BUILT_PRODUCTS_DIR; };
- D284BE950ADD80800027CCDF /* mDNSResponder.debug */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = mDNSResponder.debug; sourceTree = BUILT_PRODUCTS_DIR; };
D284BEB00ADD80920027CCDF /* dns-sd */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "dns-sd"; sourceTree = BUILT_PRODUCTS_DIR; };
D284BEBE0ADD809A0027CCDF /* libjdns_sd.jnilib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libjdns_sd.jnilib; sourceTree = BUILT_PRODUCTS_DIR; };
D284BED90ADD80A20027CCDF /* dnsextd */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = dnsextd; sourceTree = BUILT_PRODUCTS_DIR; };
D284BEE80ADD80A70027CCDF /* ddnswriteconfig */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = ddnswriteconfig; sourceTree = BUILT_PRODUCTS_DIR; };
D284BF0C0ADD80B00027CCDF /* Bonjour.prefPane */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Bonjour.prefPane; sourceTree = BUILT_PRODUCTS_DIR; };
- D284C04D0ADD95D30027CCDF /* Info-PreferencePane.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "Info-PreferencePane.plist"; path = "PreferencePane/Info-PreferencePane.plist"; sourceTree = "<group>"; };
DB2CC4430662DD1100335AB3 /* BaseListener.java */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.java; name = BaseListener.java; path = ../mDNSShared/Java/BaseListener.java; sourceTree = SOURCE_ROOT; };
DB2CC4440662DD1100335AB3 /* BrowseListener.java */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.java; name = BrowseListener.java; path = ../mDNSShared/Java/BrowseListener.java; sourceTree = SOURCE_ROOT; };
DB2CC4450662DD1100335AB3 /* DNSRecord.java */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.java; name = DNSRecord.java; path = ../mDNSShared/Java/DNSRecord.java; sourceTree = SOURCE_ROOT; };
@@ -808,22 +796,11 @@
buildActionMask = 2147483647;
files = (
D284BE650ADD80740027CCDF /* CoreFoundation.framework in Frameworks */,
- D284BE660ADD80740027CCDF /* SystemConfiguration.framework in Frameworks */,
+ BD2806081C40775600455151 /* Foundation.framework in Frameworks */,
D284BE670ADD80740027CCDF /* IOKit.framework in Frameworks */,
D284BE680ADD80740027CCDF /* Security.framework in Frameworks */,
- 219D5542149ED645004464AE /* libxml2.2.dylib in Frameworks */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- D284BE8C0ADD80800027CCDF /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- D284BE8D0ADD80800027CCDF /* CoreFoundation.framework in Frameworks */,
- D284BE8E0ADD80800027CCDF /* SystemConfiguration.framework in Frameworks */,
- D284BE8F0ADD80800027CCDF /* IOKit.framework in Frameworks */,
- D284BE900ADD80800027CCDF /* Security.framework in Frameworks */,
- 219D5543149ED645004464AE /* libxml2.2.dylib in Frameworks */,
+ D284BE660ADD80740027CCDF /* SystemConfiguration.framework in Frameworks */,
+ 219D5542149ED645004464AE /* libxml2.dylib in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -904,8 +881,6 @@
08FB7794FE84155DC02AAC07 /* mDNSResponder */ = {
isa = PBXGroup;
children = (
- 8415A6561897109000BDBA26 /* libdns_services.dylib */,
- 3F347CF5185D57CD00367B40 /* base.xcconfig */,
08FB7795FE84155DC02AAC07 /* mDNS Server Sources */,
6575FC1F022EB78C00000109 /* Command-Line Clients */,
213FB20912028902002B3A08 /* Bonjour Events Plugin */,
@@ -921,79 +896,83 @@
08FB7795FE84155DC02AAC07 /* mDNS Server Sources */ = {
isa = PBXGroup;
children = (
- 84F4C08F188F04CF00D1E1DE /* dns_services.h */,
- 216D9ACD1720C9F5008066E1 /* VPNService.c */,
- 2120ABD416B71614007089B6 /* CUPolicy.c */,
- 72FB545A166D5F960090B2D9 /* dnsctl.c */,
- 84C5B339166553AF00C324A8 /* dns_services.c */,
- 848DA5D516547F7200D2E8B4 /* dns_xpc.h */,
- 848DA5C9165477EB00D2E8B4 /* xpc_services.h */,
- 848DA5C6165477E000D2E8B4 /* xpc_services.c */,
- 21070E5D16486B9000A69507 /* DNSSECSupport.c */,
- 21070E5E16486B9000A69507 /* DNSSECSupport.h */,
21DD8FBD161E9A250033C8F8 /* anonymous.c */,
21DD8FBE161E9A250033C8F8 /* anonymous.h */,
- 2127A47515C3C7B900A857FC /* nsec3.c */,
- 2127A47615C3C7B900A857FC /* nsec3.h */,
- 8418673C15AB8B8000BB7F70 /* mDNSResponderLogging.mobileconfig */,
+ 21F51DBD1B3540DB0070B05C /* com.apple.dnsextd.plist */,
+ 21F51DBF1B35412D0070B05C /* com.apple.mDNSResponder.plist */,
+ 21F51DBE1B3541030070B05C /* com.apple.mDNSResponderHelper.plist */,
8418673A15AB8B6900BB7F70 /* com.apple.networking.mDNSResponder */,
- 21DED43415702C0F0060B6B9 /* DNSProxySupport.c */,
+ 21A57F4A145B2AE100939099 /* CryptoAlg.c */,
+ 21A57F4B145B2AE100939099 /* CryptoAlg.h */,
+ 21A57F51145B2B1400939099 /* CryptoSupport.c */,
+ 21A57F52145B2B1400939099 /* CryptoSupport.h */,
+ 6575FBEC022EAF7200000109 /* daemon.c */,
+ FFA572630AF190C20055A0F1 /* dns_sd.h */,
+ BDA9A7871B3A923600523835 /* dns_sd_private.h */,
+ 84C5B339166553AF00C324A8 /* dns_services.c */,
+ 84F4C08F188F04CF00D1E1DE /* dns_services.h */,
+ 848DA5D516547F7200D2E8B4 /* dns_xpc.h */,
+ 7F18A9F60587CEF6001880B3 /* DNSCommon.c */,
+ 7F461DB5062DBF2900672BF3 /* DNSDigest.c */,
+ FF13FFEA0A5DA44A00897C81 /* dnsextd_lexer.l */,
+ FF13FFEC0A5DA45500897C81 /* dnsextd_parser.y */,
+ FFF4F63A06CFE4DD00459EFD /* dnsextd.8 */,
+ FF25794606C9A8BF00376F7B /* dnsextd.c */,
+ FFFF8F800C3307AC00722979 /* dnsextd.conf */,
218E8E4F156D8C0300720DA0 /* dnsproxy.c */,
218E8E50156D8C0300720DA0 /* dnsproxy.h */,
+ 21DED43415702C0F0060B6B9 /* DNSProxySupport.c */,
+ FFFA38620AEEDB090065B80A /* dnssd_clientlib.c */,
+ FFFA38640AEEDB130065B80A /* dnssd_clientstub.c */,
+ F5E11B5A04A28126019798ED /* dnssd_ipc.c */,
+ F5E11B5B04A28126019798ED /* dnssd_ipc.h */,
213BDC6C147319F400000896 /* dnssec.c */,
- 2124FA321471E9DE0021D7BB /* nsec.c */,
2124FA2F1471E9B50021D7BB /* dnssec.h */,
- 2124FA2B1471E98C0021D7BB /* nsec.h */,
- 21A57F51145B2B1400939099 /* CryptoSupport.c */,
- 21A57F52145B2B1400939099 /* CryptoSupport.h */,
- 21A57F4A145B2AE100939099 /* CryptoAlg.c */,
- 21A57F4B145B2AE100939099 /* CryptoAlg.h */,
+ 21070E5D16486B9000A69507 /* DNSSECSupport.c */,
+ 21070E5E16486B9000A69507 /* DNSSECSupport.h */,
+ FFA572480AF18FCC0055A0F1 /* DNSServiceDiscovery.c */,
+ FFA572600AF1908D0055A0F1 /* DNSServiceDiscovery.h */,
+ DBAAFE2C057E8F660085CAD0 /* GenLinkedList.c */,
4ADB5F230F6AB9F400B95BF3 /* helper-entitlements.plist */,
- 4A2E69DD0F5475A3004A87B0 /* uds_daemon.h */,
- 4AAE0C7A0C68E97F003882A5 /* mDNSResponderHelper.8 */,
- 2ECC11A50C4FEC3800CB1885 /* helpermsg-types.h */,
2E35528F0C3A95C100CA1CB7 /* helper-error.h */,
- 2E96A52D0C39C1A50087C4D2 /* helper-stubs.c */,
+ 2E0406CA0C31E9AD00F13B59 /* helper-main.c */,
2EDC5E720C39EA640092701B /* helper-server.h */,
- 2E96A5250C39BE480087C4D2 /* helper.h */,
+ 2E96A52D0C39C1A50087C4D2 /* helper-stubs.c */,
2E0405F40C3195F700F13B59 /* helper.c */,
- 2E0406CA0C31E9AD00F13B59 /* helper-main.c */,
+ 2E96A5250C39BE480087C4D2 /* helper.h */,
+ 2ECC11A50C4FEC3800CB1885 /* helpermsg-types.h */,
4A8202510C56C36500DDFD48 /* ipsec_strerror.h */,
- 4A8202520C56C36500DDFD48 /* libpfkey.h */,
- 4A8202530C56C36600DDFD48 /* pfkey.c */,
7FC8F9D406D14E66007E879D /* LegacyNATTraversal.c */,
- 7F461DB5062DBF2900672BF3 /* DNSDigest.c */,
- F525E72804AA167501F1CF4D /* uds_daemon.c */,
- F5E11B5A04A28126019798ED /* dnssd_ipc.c */,
- F5E11B5B04A28126019798ED /* dnssd_ipc.h */,
- 6575FBEC022EAF7200000109 /* daemon.c */,
+ 4A8202520C56C36500DDFD48 /* libpfkey.h */,
6575FBE9022EAF5A00000109 /* mDNS.c */,
- 6575FBEB022EAF7200000109 /* mDNSMacOSX.c */,
- 654BE64F02B63B93000001D1 /* mDNSEmbeddedAPI.h */,
- 654BE65002B63B93000001D1 /* mDNSDebug.h */,
DBAAFE29057E8F4D0085CAD0 /* mDNSDebug.c */,
+ 654BE65002B63B93000001D1 /* mDNSDebug.h */,
+ 654BE64F02B63B93000001D1 /* mDNSEmbeddedAPI.h */,
+ 6575FBEB022EAF7200000109 /* mDNSMacOSX.c */,
000753D303367C1C0CCA2C71 /* mDNSMacOSX.h */,
- DBAAFE2C057E8F660085CAD0 /* GenLinkedList.c */,
- FFCB6D73075D539900B8AF62 /* PlatformCommon.c */,
- FF1C919D07021D77001048AB /* dns-sd.1 */,
FF485D5105632E0000130380 /* mDNSResponder.8 */,
- FFF4F63A06CFE4DD00459EFD /* dnsextd.8 */,
- FFFF8F800C3307AC00722979 /* dnsextd.conf */,
+ 4A7B9E7E14FDA1BB00B84CC1 /* mDNSResponder.plist */,
FF85880B0BD599F40080D89F /* mDNSResponder.sb */,
4A7B9E7C14FDA19F00B84CC1 /* mDNSResponder.txt */,
- 4A7B9E7E14FDA1BB00B84CC1 /* mDNSResponder.plist */,
- 7F18A9F60587CEF6001880B3 /* DNSCommon.c */,
- 7F18A9F70587CEF6001880B3 /* uDNS.c */,
- FF25794606C9A8BF00376F7B /* dnsextd.c */,
- FF13FFEA0A5DA44A00897C81 /* dnsextd_lexer.l */,
- FF13FFEC0A5DA45500897C81 /* dnsextd_parser.y */,
- FFFA38620AEEDB090065B80A /* dnssd_clientlib.c */,
- FFFA38640AEEDB130065B80A /* dnssd_clientstub.c */,
- FFA572600AF1908D0055A0F1 /* DNSServiceDiscovery.h */,
- FFA572480AF18FCC0055A0F1 /* DNSServiceDiscovery.c */,
- FFA572630AF190C20055A0F1 /* dns_sd.h */,
+ 4AAE0C7A0C68E97F003882A5 /* mDNSResponderHelper.8 */,
+ 8418673C15AB8B8000BB7F70 /* mDNSResponderLogging.mobileconfig */,
+ BD64FE9A1C40762F0040EAB3 /* Metrics.h */,
+ BD64FE9B1C40762F0040EAB3 /* Metrics.m */,
+ 2124FA321471E9DE0021D7BB /* nsec.c */,
+ 2124FA2B1471E98C0021D7BB /* nsec.h */,
+ 2127A47515C3C7B900A857FC /* nsec3.c */,
+ 2127A47615C3C7B900A857FC /* nsec3.h */,
4BD2B638134FE09F002B96D5 /* P2PPacketFilter.c */,
4BD2B639134FE09F002B96D5 /* P2PPacketFilter.h */,
+ 4A8202530C56C36600DDFD48 /* pfkey.c */,
+ FFCB6D73075D539900B8AF62 /* PlatformCommon.c */,
+ BD03E88C1AD31278005E8A81 /* SymptomReporter.c */,
+ 7F18A9F70587CEF6001880B3 /* uDNS.c */,
+ 216D9ACD1720C9F5008066E1 /* uDNSPathEvalulation.c */,
+ F525E72804AA167501F1CF4D /* uds_daemon.c */,
+ 4A2E69DD0F5475A3004A87B0 /* uds_daemon.h */,
+ 848DA5C6165477E000D2E8B4 /* xpc_services.c */,
+ 848DA5C9165477EB00D2E8B4 /* xpc_services.h */,
);
name = "mDNS Server Sources";
sourceTree = "<group>";
@@ -1001,19 +980,22 @@
08FB779DFE84155DC02AAC07 /* External Frameworks and Libraries */ = {
isa = PBXGroup;
children = (
- 219D5541149ED645004464AE /* libxml2.2.dylib */,
+ FF2609FA07B4433800CE10E5 /* Cocoa.framework */,
+ 09AB6884FE841BABC02AAC07 /* CoreFoundation.framework */,
4A3600DF0F34F8CD00453EFB /* DeviceToDeviceManager.framework */,
- 2E8165F60C59835F00485EB2 /* libipsec.dylib */,
- 65713D46025A293200000109 /* SystemConfiguration.framework */,
- 2E0406140C3197CB00F13B59 /* libbsm.dylib */,
- 7F869685066EE02400D2A2DC /* Security.framework */,
FFFB0DB407B43D2700B88D48 /* Foundation.framework */,
- 09AB6884FE841BABC02AAC07 /* CoreFoundation.framework */,
+ BD2806071C40775600455151 /* Foundation.framework */,
00CA213D02786FC30CCA2C71 /* IOKit.framework */,
DB2CC4680662DFF500335AB3 /* JavaVM.framework */,
- FF2609FA07B4433800CE10E5 /* Cocoa.framework */,
+ 2E0406140C3197CB00F13B59 /* libbsm.dylib */,
+ 8415A6561897109000BDBA26 /* libdns_services.dylib */,
+ 2E8165F60C59835F00485EB2 /* libipsec.dylib */,
+ 219D5541149ED645004464AE /* libxml2.dylib */,
FF260A1F07B4436900CE10E5 /* PreferencePanes.framework */,
+ 7F869685066EE02400D2A2DC /* Security.framework */,
+ 65713D46025A293200000109 /* SystemConfiguration.framework */,
21F432971134AA6800581B69 /* WebFilterDNS.framework */,
+ BD64FE9E1C4076B40040EAB3 /* WirelessDiagnostics.framework */,
);
name = "External Frameworks and Libraries";
sourceTree = "<group>";
@@ -1021,24 +1003,22 @@
19C28FBDFE9D53C911CA2CBB /* Products */ = {
isa = PBXGroup;
children = (
- D284C04D0ADD95D30027CCDF /* Info-PreferencePane.plist */,
- D284BE730ADD80740027CCDF /* mDNSResponder */,
- D284BE950ADD80800027CCDF /* mDNSResponder.debug */,
- D284BEB00ADD80920027CCDF /* dns-sd */,
- D284BEBE0ADD809A0027CCDF /* libjdns_sd.jnilib */,
- D284BED90ADD80A20027CCDF /* dnsextd */,
- D284BEE80ADD80A70027CCDF /* ddnswriteconfig */,
D284BF0C0ADD80B00027CCDF /* Bonjour.prefPane */,
- FFB765840AEED9C700583A2C /* libsystem_dnssd.dylib */,
- FFA572390AF18F1C0055A0F1 /* libsystem_dnssd_debug.dylib */,
- FFA572450AF18F450055A0F1 /* libsystem_dnssd_profile.dylib */,
- 2E0405F00C31955500F13B59 /* mDNSResponderHelper */,
213FB21812028A7A002B3A08 /* BonjourEvents.plugin */,
+ D284BEE80ADD80A70027CCDF /* ddnswriteconfig */,
+ D284BEB00ADD80920027CCDF /* dns-sd */,
+ 72FB545F166D5FB00090B2D9 /* dnsctl */,
+ D284BED90ADD80A20027CCDF /* dnsextd */,
2141DD1D123FFCDB0086D23E /* libdns_sd.a */,
2141DD24123FFD0F0086D23E /* libdns_sd_debug.a */,
2141DD2A123FFD2C0086D23E /* libdns_sd_profile.a */,
84C5B3351665529800C324A8 /* libdns_services.dylib */,
- 72FB545F166D5FB00090B2D9 /* dnsctl */,
+ D284BEBE0ADD809A0027CCDF /* libjdns_sd.jnilib */,
+ FFB765840AEED9C700583A2C /* libsystem_dnssd.dylib */,
+ FFA572390AF18F1C0055A0F1 /* libsystem_dnssd_debug.dylib */,
+ FFA572450AF18F450055A0F1 /* libsystem_dnssd_profile.dylib */,
+ D284BE730ADD80740027CCDF /* mDNSResponder */,
+ 2E0405F00C31955500F13B59 /* mDNSResponderHelper */,
);
name = Products;
sourceTree = "<group>";
@@ -1066,8 +1046,9 @@
6575FC1F022EB78C00000109 /* Command-Line Clients */ = {
isa = PBXGroup;
children = (
- 6575FC20022EB7AA00000109 /* SamplemDNSClient.c */,
+ FF1C919D07021D77001048AB /* dns-sd.1 */,
FF1C919F07021E3F001048AB /* dns-sd.c */,
+ 72FB545A166D5F960090B2D9 /* dnsctl.c */,
FF5852100DD27BD300862BDF /* ClientCommon.c */,
);
name = "Command-Line Clients";
@@ -1137,6 +1118,7 @@
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
+ BDA9A7891B3A92A500523835 /* dns_sd_private.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1180,6 +1162,7 @@
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
+ BD64FE9C1C40762F0040EAB3 /* Metrics.h in Headers */,
D284BE530ADD80740027CCDF /* DNSServiceDiscoveryDefines.h in Headers */,
D284BE540ADD80740027CCDF /* dnssd_ipc.h in Headers */,
2E96A5260C39BE480087C4D2 /* helper.h in Headers */,
@@ -1199,32 +1182,6 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
- D284BE770ADD80800027CCDF /* Headers */ = {
- isa = PBXHeadersBuildPhase;
- buildActionMask = 2147483647;
- files = (
- D284BE780ADD80800027CCDF /* DNSServiceDiscoveryDefines.h in Headers */,
- D284BE790ADD80800027CCDF /* dnssd_ipc.h in Headers */,
- D284BE7A0ADD80800027CCDF /* mDNSEmbeddedAPI.h in Headers */,
- D284BE7B0ADD80800027CCDF /* mDNSDebug.h in Headers */,
- D284BE7C0ADD80800027CCDF /* mDNSMacOSX.h in Headers */,
- 2E96A5270C39BE480087C4D2 /* helper.h in Headers */,
- 2EDC5E740C39EA640092701B /* helper-server.h in Headers */,
- 2E3552910C3A95C100CA1CB7 /* helper-error.h in Headers */,
- 2ECC11A70C4FEC3800CB1885 /* helpermsg-types.h in Headers */,
- 21A57F4F145B2AE100939099 /* CryptoAlg.h in Headers */,
- 21A57F56145B2B1400939099 /* CryptoSupport.h in Headers */,
- 2124FA2D1471E98C0021D7BB /* nsec.h in Headers */,
- 2124FA311471E9B50021D7BB /* dnssec.h in Headers */,
- 218E8E54156D8C0300720DA0 /* dnsproxy.h in Headers */,
- 2127A47A15C3C7B900A857FC /* nsec3.h in Headers */,
- 21DD8FC2161E9A250033C8F8 /* anonymous.h in Headers */,
- 21070E6216486B9000A69507 /* DNSSECSupport.h in Headers */,
- 848DA5CB165477EB00D2E8B4 /* xpc_services.h in Headers */,
- 848DA5D716547F7200D2E8B4 /* dns_xpc.h in Headers */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
D284BEA60ADD80920027CCDF /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
@@ -1245,6 +1202,7 @@
files = (
2E35529D0C3A9E7600CA1CB7 /* helper-error.h in Headers */,
2E35529F0C3A9E7600CA1CB7 /* helper.h in Headers */,
+ FFD52A9E1AF858DD00CAD3EC /* CryptoAlg.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1280,6 +1238,7 @@
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
+ BDA9A7881B3A924C00523835 /* dns_sd_private.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1382,6 +1341,7 @@
2E0405ED0C31955500F13B59 /* Sources */,
2E0405EE0C31955500F13B59 /* Frameworks */,
4AAE0C5A0C68E6EC003882A5 /* CopyFiles */,
+ 21F51DC21B3541F30070B05C /* CopyFiles */,
);
buildRules = (
);
@@ -1403,6 +1363,7 @@
buildRules = (
);
dependencies = (
+ 0C2AAB321B6929F300113637 /* PBXTargetDependency */,
);
name = dnsctl;
productName = dnsctl;
@@ -1434,12 +1395,12 @@
D284BE520ADD80740027CCDF /* Headers */,
D284BE550ADD80740027CCDF /* Sources */,
D284BE640ADD80740027CCDF /* Frameworks */,
- D284BE690ADD80740027CCDF /* Rez */,
D284BE6A0ADD80740027CCDF /* CopyFiles */,
4A7B9E7F14FDA21B00B84CC1 /* CopyFiles */,
4A7B9E8114FDA25500B84CC1 /* CopyFiles */,
- D284BE6C0ADD80740027CCDF /* ShellScript */,
+ D284BE6C0ADD80740027CCDF /* Run Script */,
8418673D15AB8BFF00BB7F70 /* CopyFiles */,
+ 21F51DC01B35418C0070B05C /* CopyFiles */,
);
buildRules = (
);
@@ -1451,25 +1412,6 @@
productReference = D284BE730ADD80740027CCDF /* mDNSResponder */;
productType = "com.apple.product-type.tool";
};
- D284BE750ADD80800027CCDF /* mDNSResponder debug */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = D284BE920ADD80800027CCDF /* Build configuration list for PBXNativeTarget "mDNSResponder debug" */;
- buildPhases = (
- D284BE760ADD80800027CCDF /* ShellScript */,
- D284BE770ADD80800027CCDF /* Headers */,
- D284BE7D0ADD80800027CCDF /* Sources */,
- D284BE8C0ADD80800027CCDF /* Frameworks */,
- D284BE910ADD80800027CCDF /* Rez */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = "mDNSResponder debug";
- productName = mDNSResponder;
- productReference = D284BE950ADD80800027CCDF /* mDNSResponder.debug */;
- productType = "com.apple.product-type.tool";
- };
D284BEA50ADD80920027CCDF /* dns-sd tool */ = {
isa = PBXNativeTarget;
buildConfigurationList = D284BEAD0ADD80920027CCDF /* Build configuration list for PBXNativeTarget "dns-sd tool" */;
@@ -1477,7 +1419,6 @@
D284BEA60ADD80920027CCDF /* Headers */,
D284BEA70ADD80920027CCDF /* Sources */,
D284BEA90ADD80920027CCDF /* Frameworks */,
- D284BEAA0ADD80920027CCDF /* Rez */,
D284BEAB0ADD80920027CCDF /* CopyFiles */,
);
buildRules = (
@@ -1497,7 +1438,6 @@
D284BEB50ADD809A0027CCDF /* Headers */,
D284BEB60ADD809A0027CCDF /* Sources */,
D284BEB80ADD809A0027CCDF /* Frameworks */,
- D284BEBA0ADD809A0027CCDF /* Rez */,
);
buildRules = (
);
@@ -1521,7 +1461,7 @@
D284BECE0ADD80A20027CCDF /* Frameworks */,
D284BED40ADD80A20027CCDF /* CopyFiles */,
FFFF8F770C32F0FD00722979 /* CopyFiles */,
- FF37FAAD0BC581780044A5CF /* ShellScript */,
+ 21F51DC41B35421A0070B05C /* CopyFiles */,
);
buildRules = (
D284BFB80ADD8E510027CCDF /* PBXBuildRule */,
@@ -1542,7 +1482,6 @@
D284BEDC0ADD80A70027CCDF /* Headers */,
D284BEDD0ADD80A70027CCDF /* Sources */,
D284BEDF0ADD80A70027CCDF /* Frameworks */,
- D284BEE40ADD80A70027CCDF /* Rez */,
);
buildRules = (
);
@@ -1562,7 +1501,6 @@
D284BEEE0ADD80B00027CCDF /* Resources */,
D284BEFD0ADD80B00027CCDF /* Sources */,
D284BF010ADD80B00027CCDF /* Frameworks */,
- D284BF070ADD80B00027CCDF /* Rez */,
);
buildRules = (
);
@@ -1633,9 +1571,10 @@
08FB7793FE84155DC02AAC07 /* Project object */ = {
isa = PBXProject;
attributes = {
+ LastUpgradeCheck = 0700;
};
buildConfigurationList = D284BE2B0ADD78180027CCDF /* Build configuration list for PBXProject "mDNSResponder" */;
- compatibilityVersion = "Xcode 3.1";
+ compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
@@ -1652,26 +1591,25 @@
03067D640C83A3700022BE1F /* Build Some */,
FFB7657B0AEED96B00583A2C /* Build All */,
D284BE500ADD80740027CCDF /* mDNSResponder */,
- D284BE750ADD80800027CCDF /* mDNSResponder debug */,
2E0405EF0C31955500F13B59 /* mDNSResponderHelper */,
D284BEA50ADD80920027CCDF /* dns-sd tool */,
- 4AE471670EAFF81900A6C5AD /* dns_sd.jar */,
- D284BEB20ADD809A0027CCDF /* libjdns_sd.jnilib */,
+ 72FB545E166D5FB00090B2D9 /* dnsctl */,
D284BEBF0ADD80A20027CCDF /* dnsextd */,
D284BEDB0ADD80A70027CCDF /* ddnswriteconfig */,
D284BEEA0ADD80B00027CCDF /* PreferencePane */,
- FFB765830AEED9C700583A2C /* libdns_sd_dynamic */,
- FFA572300AF18F1C0055A0F1 /* libdns_sd_debug_dynamic */,
- FFA5723C0AF18F450055A0F1 /* libdns_sd_profile_dynamic */,
- FFA572650AF190F10055A0F1 /* SystemLibrariesDynamic */,
213FB21712028A7A002B3A08 /* BonjourEvents */,
2141DCF8123FFB5D0086D23E /* SystemLibraries */,
2141DD0B123FFC7F0086D23E /* SystemLibrariesStatic */,
+ FFA572650AF190F10055A0F1 /* SystemLibrariesDynamic */,
2141DD1C123FFCDB0086D23E /* libdns_sd_static */,
2141DD23123FFD0F0086D23E /* libdns_sd_debug_static */,
2141DD29123FFD2C0086D23E /* libdns_sd_profile_static */,
+ FFB765830AEED9C700583A2C /* libdns_sd_dynamic */,
+ FFA572300AF18F1C0055A0F1 /* libdns_sd_debug_dynamic */,
+ FFA5723C0AF18F450055A0F1 /* libdns_sd_profile_dynamic */,
84C5B3341665529800C324A8 /* dns_services */,
- 72FB545E166D5FB00090B2D9 /* dnsctl */,
+ D284BEB20ADD809A0027CCDF /* libjdns_sd.jnilib */,
+ 4AE471670EAFF81900A6C5AD /* dns_sd.jar */,
);
};
/* End PBXProject section */
@@ -1688,7 +1626,6 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- 3F347CF6185D57CD00367B40 /* base.xcconfig in Resources */,
D284BEEF0ADD80B00027CCDF /* remove_idle.tiff in Resources */,
D284BEF00ADD80B00027CCDF /* add_pressed.tiff in Resources */,
D284BEF10ADD80B00027CCDF /* remove_disabled.tiff in Resources */,
@@ -1708,51 +1645,6 @@
};
/* End PBXResourcesBuildPhase section */
-/* Begin PBXRezBuildPhase section */
- D284BE690ADD80740027CCDF /* Rez */ = {
- isa = PBXRezBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- D284BE910ADD80800027CCDF /* Rez */ = {
- isa = PBXRezBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- D284BEAA0ADD80920027CCDF /* Rez */ = {
- isa = PBXRezBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- D284BEBA0ADD809A0027CCDF /* Rez */ = {
- isa = PBXRezBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- D284BEE40ADD80A70027CCDF /* Rez */ = {
- isa = PBXRezBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- D284BF070ADD80B00027CCDF /* Rez */ = {
- isa = PBXRezBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXRezBuildPhase section */
-
/* Begin PBXShellScriptBuildPhase section */
030BBED60CE11EEC00472F0C /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
@@ -1791,7 +1683,7 @@
);
runOnlyForDeploymentPostprocessing = 1;
shellPath = "/bin/bash -e -x";
- shellScript = "DSTROOT=${DSTROOT}\nmkdir -p \"$DSTROOT/usr/include\"\nsed 's/\\(^#define _DNS_SD_LIBDISPATCH \\)0$/\\1 1/' \"$SRCROOT/../mDNSShared/dns_sd.h\" > \"$DSTROOT/usr/include/dns_sd.h\"\n\nif [[ \"${ACTION}\" == \"installhdrs\" ]]; then\n exit 0\nfi\n\nif [[ \"${PLATFORM_NAME}\" =~ \"simulator\" ]]; then\n ln -s libsystem_dnssd.dylib ${DSTROOT}${INSTALL_PATH}/libsystem_sim_dnssd.dylib\nfi\n";
+ shellScript = "DSTROOT=${DSTROOT}\nmkdir -p \"$DSTROOT/usr/include\"\nsed 's/\\(^#define _DNS_SD_LIBDISPATCH \\)0$/\\1 1/' \"$SRCROOT/../mDNSShared/dns_sd.h\" > \"$DSTROOT/usr/include/dns_sd.h\"\n\nif [[ \"${ACTION}\" == \"installhdrs\" ]]; then\n DSTROOT=${DSTROOT}\n mkdir -p \"$DSTROOT/usr/local/include\"\n sed 's/\\(^#define _DNS_SD_LIBDISPATCH \\)0$/\\1 1/' \"$SRCROOT/../mDNSMacOSX/Private/dns_services.h\" > \"$DSTROOT/usr/local/include/dns_services.h\"\n exit 0\nfi\n\nif [[ \"${PLATFORM_NAME}\" =~ \"simulator\" ]]; then\n ln -s libsystem_dnssd.dylib ${DSTROOT}${INSTALL_PATH}/libsystem_sim_dnssd.dylib\nfi\n";
};
4A4EE3A413CB8E82005C624B /* Build yacc file into derived source files */ = {
isa = PBXShellScriptBuildPhase;
@@ -1819,45 +1711,15 @@
shellPath = /bin/sh;
shellScript = "if [ -e \"${SDKROOT}/usr/local/include/dnsinfo.h\" ]\nthen\nrm -f \"${CONFIGURATION_TEMP_DIR}/dnsinfo.h\"\nrm -f \"${CONFIGURATION_TEMP_DIR}/libdnsinfo.a\"\nelse\necho \"#define MDNS_NO_DNSINFO 1\" > ${CONFIGURATION_TEMP_DIR}/dnsinfo.h\ntouch \"${CONFIGURATION_TEMP_DIR}/empty.c\"\nfor i in ${ARCHS}\ndo\nccflags=\"-arch $i $ccflags\"\ndone\ncc ${ccflags} \"${CONFIGURATION_TEMP_DIR}/empty.c\" -c -o \"${CONFIGURATION_TEMP_DIR}/libdnsinfo.a\"\nrm -f \"${CONFIGURATION_TEMP_DIR}/empty.c\"\nfi\n\nif [ -e \"${SDKROOT}/usr/include/sandbox.h\" ]\nthen\nrm -f \"${CONFIGURATION_TEMP_DIR}/sandbox.h\"\nelse\necho \"#define MDNS_NO_SANDBOX 1\" > \"${CONFIGURATION_TEMP_DIR}/sandbox.h\"\nfi\n\nif [ -e \"${SDKROOT}/usr/local/include/vproc.h\" -o -e \"${SDKROOT}/usr/include/vproc.h\" ]\nthen\nrm -f \"${CONFIGURATION_TEMP_DIR}/vproc.h\"\nelse\ntouch \"${CONFIGURATION_TEMP_DIR}/vproc.h\"\nfi\n\nif [ -e \"${SDKROOT}/System/Library/Frameworks/IOKit.framework/PrivateHeaders/pwr_mgt/IOPMLibPrivate.h\" ]\nthen\nrm -rf \"${CONFIGURATION_TEMP_DIR}/IOKit\"\nelse\nmkdir -p \"${CONFIGURATION_TEMP_DIR}/IOKit/pwr_mgt\"\ntouch \"${CONFIGURATION_TEMP_DIR}/IOKit/pwr_mgt/IOPMLibPrivate.h\"\nfi\n\nif [ -e \"${SDKROOT}/System/Library/PrivateFrameworks/DeviceToDeviceManager.framework/Headers/DeviceToDeviceManager.h\" ]\nthen\nrm -rf \"${CONFIGURATION_TEMP_DIR}/DeviceToDeviceManager\"\nelse\nmkdir -p \"${CONFIGURATION_TEMP_DIR}/DeviceToDeviceManager\"\necho \"#define NO_D2D 1\" > \"${CONFIGURATION_TEMP_DIR}/DeviceToDeviceManager/DeviceToDeviceManager.h\"\nfi\n\nif [ -e \"${SDKROOT}/System/Library/PrivateFrameworks/WebFilterDNS.framework/Headers/WebFilterDNS.h\" ]\nthen\nrm -rf \"${CONFIGURATION_TEMP_DIR}/WebFilterDNS\"\nelse\nmkdir -p \"${CONFIGURATION_TEMP_DIR}/WebFilterDNS\"\necho \"#define NO_WCF 1\" > \"${CONFIGURATION_TEMP_DIR}/WebFilterDNS/WebFilterDNS.h\"\nfi\n\nif [ -e \"${SDKROOT}/usr/local/include/AWACS.h\" ]\nthen\nrm -f \"${CONFIGURATION_TEMP_DIR}/AWACS.h\"\nrm -f \"${CONFIGURATION_TEMP_DIR}/libAWACS.a\"\nelse\necho \"#define NO_AWACS 1\" > \"${CONFIGURATION_TEMP_DIR}/AWACS.h\"\ntouch \"${CONFIGURATION_TEMP_DIR}/AWACSempty.c\"\nfor i in ${ARCHS}\ndo\nccflags=\"-arch $i $ccflags\"\ndone\ncc ${ccflags} \"${CONFIGURATION_TEMP_DIR}/AWACSempty.c\" -c -o \"${CONFIGURATION_TEMP_DIR}/libAWACS.a\"\nrm -f \"${CONFIGURATION_TEMP_DIR}/AWACSempty.c\"\nfi\n";
};
- D284BE6C0ADD80740027CCDF /* ShellScript */ = {
+ D284BE6C0ADD80740027CCDF /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 8;
files = (
);
+ name = "Run Script";
runOnlyForDeploymentPostprocessing = 1;
shellPath = /bin/bash;
- shellScript = "# Install mDNSResponder.bundle containing language localizations\nmkdir -p ${DSTROOT}${SYSTEM_LIBRARY_DIR}/CoreServices\ncp -R ${SRCROOT}/mDNSResponder-bundle ${DSTROOT}${SYSTEM_LIBRARY_DIR}/CoreServices/mDNSResponder.bundle\n\n# Remove unwanted CVS directories\nfind ${DSTROOT}${SYSTEM_LIBRARY_DIR}/CoreServices/mDNSResponder.bundle -depth -name CVS -exec rm -rf {} \\;\n\n# Expand UTF-8 files to UTF-16 (at one time this appeared to be necessary, but it's not, so we don't do it any more)\n#foreach file (`find ${DSTROOT}${SYSTEM_LIBRARY_DIR}/CoreServices/mDNSResponder.bundle -name Localizable.strings`)\n#iconv -f utf-8 -t utf-16 ${file} > ${file}.new\n#mv -f ${file}.new ${file}\n#end\n\n# Remove French localization (not wanted for Apple B&I builds)\nrm -rf ${DSTROOT}${SYSTEM_LIBRARY_DIR}/CoreServices/mDNSResponder.bundle/Resources/French.lproj\n\n# Copy Sandbox profile\nif [ -z \"${IPHONEOS_DEPLOYMENT_TARGET}\" -a -z \"${TVOS_DEPLOYMENT_TARGET}\" ] ; then\n SANDBOXDST=\"${DSTROOT}/usr/share/sandbox\"\nelse\n SANDBOXDST=\"${DSTROOT}/usr/local/share/sandbox/profiles/embedded/builtin\"\nfi\n(umask 022; mkdir -p -m 0755 \"$SANDBOXDST\")\ncp \"${SRCROOT}/mDNSResponder.sb\" \"${SANDBOXDST}/mDNSResponder.sb\"\n";
- };
- D284BE760ADD80800027CCDF /* ShellScript */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "if [ -e \"${SDKROOT}/usr/local/include/dnsinfo.h\" ]\nthen\nrm -f \"${CONFIGURATION_TEMP_DIR}/dnsinfo.h\"\nrm -f \"${CONFIGURATION_TEMP_DIR}/libdnsinfo.a\"\nelse\necho \"#define MDNS_NO_DNSINFO 1\" > ${CONFIGURATION_TEMP_DIR}/dnsinfo.h\ntouch \"${CONFIGURATION_TEMP_DIR}/empty.c\"\nfor i in ${ARCHS}\ndo\nccflags=\"-arch $i $ccflags\"\ndone\ncc ${ccflags} \"${CONFIGURATION_TEMP_DIR}/empty.c\" -c -o \"${CONFIGURATION_TEMP_DIR}/libdnsinfo.a\"\nrm -f \"${CONFIGURATION_TEMP_DIR}/empty.c\"\nfi\n\nif [ -e \"${SDKROOT}/usr/include/sandbox.h\" ]\nthen\nrm -f \"${CONFIGURATION_TEMP_DIR}/sandbox.h\"\nelse\necho \"#define MDNS_NO_SANDBOX 1\" > \"${CONFIGURATION_TEMP_DIR}/sandbox.h\"\nfi\n\nif [ -e \"${SDKROOT}/usr/local/include/vproc.h\" -o -e \"${SDKROOT}/usr/include/vproc.h\" ]\nthen\nrm -f \"${CONFIGURATION_TEMP_DIR}/vproc.h\"\nelse\ntouch \"${CONFIGURATION_TEMP_DIR}/vproc.h\"\nfi\n\nif [ -e \"${SDKROOT}/System/Library/Frameworks/IOKit.framework/PrivateHeaders/pwr_mgt/IOPMLibPrivate.h\" ]\nthen\nrm -rf \"${CONFIGURATION_TEMP_DIR}/IOKit\"\nelse\nmkdir -p \"${CONFIGURATION_TEMP_DIR}/IOKit/pwr_mgt\"\ntouch \"${CONFIGURATION_TEMP_DIR}/IOKit/pwr_mgt/IOPMLibPrivate.h\"\nfi\n\nif [ -e \"${SDKROOT}/System/Library/PrivateFrameworks/DeviceToDeviceManager.framework/Headers/DeviceToDeviceManager.h\" ]\nthen\nrm -rf \"${CONFIGURATION_TEMP_DIR}/DeviceToDeviceManager\"\nelse\nmkdir -p \"${CONFIGURATION_TEMP_DIR}/DeviceToDeviceManager\"\necho \"#define NO_D2D 1\" > \"${CONFIGURATION_TEMP_DIR}/DeviceToDeviceManager/DeviceToDeviceManager.h\"\nfi\n\nif [ -e \"${SDKROOT}/System/Library/PrivateFrameworks/WebFilterDNS.framework/Headers/WebFilterDNS.h\" ]\nthen\nrm -rf \"${CONFIGURATION_TEMP_DIR}/WebFilterDNS\"\nelse\nmkdir -p \"${CONFIGURATION_TEMP_DIR}/WebFilterDNS\"\necho \"#define NO_WCF 1\" > \"${CONFIGURATION_TEMP_DIR}/WebFilterDNS/WebFilterDNS.h\"\nfi\n\nif [ -e \"${SDKROOT}/usr/local/include/AWACS.h\" ]\nthen\nrm -f \"${CONFIGURATION_TEMP_DIR}/AWACS.h\"\nrm -f \"${CONFIGURATION_TEMP_DIR}/libAWACS.a\"\nelse\necho \"#define NO_AWACS 1\" > \"${CONFIGURATION_TEMP_DIR}/AWACS.h\"\ntouch \"${CONFIGURATION_TEMP_DIR}/AWACSempty.c\"\nfor i in ${ARCHS}\ndo\nccflags=\"-arch $i $ccflags\"\ndone\ncc ${ccflags} \"${CONFIGURATION_TEMP_DIR}/AWACSempty.c\" -c -o \"${CONFIGURATION_TEMP_DIR}/libAWACS.a\"\nrm -f \"${CONFIGURATION_TEMP_DIR}/AWACSempty.c\"\nfi";
- };
- FF045B6A0C7E4AA600448140 /* ShellScript */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 8;
- files = (
- );
- inputPaths = (
- );
- outputPaths = (
- );
- runOnlyForDeploymentPostprocessing = 1;
- shellPath = /bin/sh;
- shellScript = "# Install plists to tell launchd how to start mDNSResponder and mDNSResponderHelper\nmkdir -p ${DSTROOT}${SYSTEM_LIBRARY_DIR}/LaunchDaemons\n\nif [ \"${MACOSX_DEPLOYMENT_TARGET}\" == \"10.4\" ] ; then\ncp ${SRCROOT}/LaunchDaemonInfo-Tiger.plist ${DSTROOT}${SYSTEM_LIBRARY_DIR}/LaunchDaemons/com.apple.mDNSResponder.plist\ncp ${SRCROOT}/LaunchDaemonInfo-Tiger.helper.plist ${DSTROOT}${SYSTEM_LIBRARY_DIR}/LaunchDaemons/com.apple.mDNSResponderHelper.plist\nelse\ncp ${SRCROOT}/LaunchDaemonInfo.plist ${DSTROOT}${SYSTEM_LIBRARY_DIR}/LaunchDaemons/com.apple.mDNSResponder.plist\ncp ${SRCROOT}/LaunchDaemonInfo.helper.plist ${DSTROOT}${SYSTEM_LIBRARY_DIR}/LaunchDaemons/com.apple.mDNSResponderHelper.plist\nfi\n\nif [ ! -z \"${IPHONEOS_DEPLOYMENT_TARGET}\" ] ; then\nplutil -convert binary1 ${DSTROOT}${SYSTEM_LIBRARY_DIR}/LaunchDaemons/com.apple.mDNSResponder.plist\nplutil -convert binary1 ${DSTROOT}${SYSTEM_LIBRARY_DIR}/LaunchDaemons/com.apple.mDNSResponderHelper.plist\nfi\n";
- };
- FF37FAAD0BC581780044A5CF /* ShellScript */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 8;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 1;
- shellPath = /bin/tcsh;
- shellScript = "# Install plist to tell launchd how to start dnsextd\nmkdir -p ${DSTROOT}${SYSTEM_LIBRARY_DIR}/LaunchDaemons\ncp ${SRCROOT}/LaunchDaemonInfo.dnsextd.plist ${DSTROOT}${SYSTEM_LIBRARY_DIR}/LaunchDaemons/com.apple.dnsextd.plist\n";
+ shellScript = "# Install mDNSResponder.bundle containing language localizations\nmkdir -p ${DSTROOT}${SYSTEM_LIBRARY_DIR}/CoreServices\ncp -R ${SRCROOT}/mDNSResponder-bundle ${DSTROOT}${SYSTEM_LIBRARY_DIR}/CoreServices/mDNSResponder.bundle\n\n# Remove unwanted CVS directories\nfind ${DSTROOT}${SYSTEM_LIBRARY_DIR}/CoreServices/mDNSResponder.bundle -depth -name CVS -exec rm -rf {} \\;\n\n# Expand UTF-8 files to UTF-16 (at one time this appeared to be necessary, but it's not, so we don't do it any more)\n#foreach file (`find ${DSTROOT}${SYSTEM_LIBRARY_DIR}/CoreServices/mDNSResponder.bundle -name Localizable.strings`)\n#iconv -f utf-8 -t utf-16 ${file} > ${file}.new\n#mv -f ${file}.new ${file}\n#end\n\n# Remove French localization (not wanted for Apple B&I builds)\nrm -rf ${DSTROOT}${SYSTEM_LIBRARY_DIR}/CoreServices/mDNSResponder.bundle/Resources/French.lproj\n\n# Copy Sandbox profile\nif [ -z \"${IPHONEOS_DEPLOYMENT_TARGET}\" -a -z \"${TVOS_DEPLOYMENT_TARGET}\" -a -z \"${WATCHOS_DEPLOYMENT_TARGET}\" ] ; then\n SANDBOXDST=\"${DSTROOT}/usr/share/sandbox\"\nelse\n SANDBOXDST=\"${DSTROOT}/usr/local/share/sandbox/profiles/embedded/builtin\"\nfi\n(umask 022; mkdir -p -m 0755 \"$SANDBOXDST\")\ncp \"${SRCROOT}/mDNSResponder.sb\" \"${SANDBOXDST}/mDNSResponder.sb\"\n";
};
/* End PBXShellScriptBuildPhase section */
@@ -1960,48 +1822,15 @@
21A57F53145B2B1400939099 /* CryptoSupport.c in Sources */,
2124FA331471E9DE0021D7BB /* nsec.c in Sources */,
213BDC6D147319F400000896 /* dnssec.c in Sources */,
+ BD64FE9D1C40762F0040EAB3 /* Metrics.m in Sources */,
218E8E51156D8C0300720DA0 /* dnsproxy.c in Sources */,
21DED43515702C0F0060B6B9 /* DNSProxySupport.c in Sources */,
- 216D9ACE1720C9F5008066E1 /* VPNService.c in Sources */,
+ 216D9ACE1720C9F5008066E1 /* uDNSPathEvalulation.c in Sources */,
+ BD03E88D1AD31278005E8A81 /* SymptomReporter.c in Sources */,
2127A47715C3C7B900A857FC /* nsec3.c in Sources */,
21DD8FBF161E9A250033C8F8 /* anonymous.c in Sources */,
21070E5F16486B9000A69507 /* DNSSECSupport.c in Sources */,
848DA5C7165477E000D2E8B4 /* xpc_services.c in Sources */,
- 2120ABD516B71614007089B6 /* CUPolicy.c in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- D284BE7D0ADD80800027CCDF /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- D284BE7E0ADD80800027CCDF /* DNSServiceDiscoveryReply.defs in Sources */,
- D284BE7F0ADD80800027CCDF /* DNSServiceDiscoveryRequest.defs in Sources */,
- D284BE800ADD80800027CCDF /* mDNS.c in Sources */,
- D284BE810ADD80800027CCDF /* uDNS.c in Sources */,
- D284BE820ADD80800027CCDF /* DNSCommon.c in Sources */,
- D284BE830ADD80800027CCDF /* DNSDigest.c in Sources */,
- D284BE850ADD80800027CCDF /* mDNSDebug.c in Sources */,
- D284BE860ADD80800027CCDF /* uds_daemon.c in Sources */,
- D284BE870ADD80800027CCDF /* dnssd_ipc.c in Sources */,
- D284BE880ADD80800027CCDF /* PlatformCommon.c in Sources */,
- D284BE890ADD80800027CCDF /* mDNSMacOSX.c in Sources */,
- D284BE8A0ADD80800027CCDF /* LegacyNATTraversal.c in Sources */,
- D284BE8B0ADD80800027CCDF /* daemon.c in Sources */,
- 2E0406200C3198B700F13B59 /* helpermsg.defs in Sources */,
- 2E96A5300C39C1A50087C4D2 /* helper-stubs.c in Sources */,
- 21A57F4D145B2AE100939099 /* CryptoAlg.c in Sources */,
- 21A57F54145B2B1400939099 /* CryptoSupport.c in Sources */,
- 2124FA341471E9DE0021D7BB /* nsec.c in Sources */,
- 213BDC6E147319F400000896 /* dnssec.c in Sources */,
- 218E8E52156D8C0300720DA0 /* dnsproxy.c in Sources */,
- 21DED43615702C0F0060B6B9 /* DNSProxySupport.c in Sources */,
- 216D9ACF1720C9F5008066E1 /* VPNService.c in Sources */,
- 2127A47815C3C7B900A857FC /* nsec3.c in Sources */,
- 21DD8FC0161E9A250033C8F8 /* anonymous.c in Sources */,
- 21070E6016486B9000A69507 /* DNSSECSupport.c in Sources */,
- 848DA5C8165477E000D2E8B4 /* xpc_services.c in Sources */,
- 2120ABD616B71614007089B6 /* CUPolicy.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -2027,7 +1856,6 @@
buildActionMask = 2147483647;
files = (
21DCD05C1461B23700702FC8 /* CryptoAlg.c in Sources */,
- 21DCD05D1461B23700702FC8 /* CryptoAlg.h in Sources */,
D284BEC50ADD80A20027CCDF /* DNSCommon.c in Sources */,
D284BEC60ADD80A20027CCDF /* DNSDigest.c in Sources */,
D284BEC70ADD80A20027CCDF /* dnsextd.c in Sources */,
@@ -2108,11 +1936,6 @@
target = D284BE500ADD80740027CCDF /* mDNSResponder */;
targetProxy = 03067D670C83A3830022BE1F /* PBXContainerItemProxy */;
};
- 03067D6A0C83A3890022BE1F /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = D284BE750ADD80800027CCDF /* mDNSResponder debug */;
- targetProxy = 03067D690C83A3890022BE1F /* PBXContainerItemProxy */;
- };
03067D6C0C83A3920022BE1F /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = D284BEA50ADD80920027CCDF /* dns-sd tool */;
@@ -2128,6 +1951,11 @@
target = 03067D640C83A3700022BE1F /* Build Some */;
targetProxy = 03067D850C849CC30022BE1F /* PBXContainerItemProxy */;
};
+ 0C2AAB321B6929F300113637 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 84C5B3341665529800C324A8 /* dns_services */;
+ targetProxy = 0C2AAB311B6929F300113637 /* PBXContainerItemProxy */;
+ };
2130257112400E9300AC839F /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = FFA572650AF190F10055A0F1 /* SystemLibrariesDynamic */;
@@ -2245,9 +2073,6 @@
03067D740C83A3CB0022BE1F /* Development */ = {
isa = XCBuildConfiguration;
buildSettings = {
- COPY_PHASE_STRIP = NO;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_OPTIMIZATION_LEVEL = s;
PRODUCT_NAME = "Build Some";
};
@@ -2259,12 +2084,8 @@
ALWAYS_SEARCH_USER_PATHS = NO;
BUNDLE_LOADER = /usr/libexec/UserEventAgent;
CODE_SIGN_IDENTITY = "-";
- COPY_PHASE_STRIP = NO;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_MODEL_TUNING = G5;
INFOPLIST_FILE = "BonjourEvents-Info.plist";
INSTALL_PATH = /System/Library/UserEventPlugins/;
- PREBINDING = NO;
PRODUCT_NAME = BonjourEvents;
PROVISIONING_PROFILE = "";
WRAPPER_EXTENSION = plugin;
@@ -2274,8 +2095,6 @@
2141DCF9123FFB5D0086D23E /* Development */ = {
isa = XCBuildConfiguration;
buildSettings = {
- COPY_PHASE_STRIP = NO;
- GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
PRODUCT_NAME = SystemLibraries;
};
@@ -2284,8 +2103,6 @@
2141DD0C123FFC7F0086D23E /* Development */ = {
isa = XCBuildConfiguration;
buildSettings = {
- COPY_PHASE_STRIP = NO;
- GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = s;
PRODUCT_NAME = SystemLibrariesStatic;
};
@@ -2294,11 +2111,6 @@
2141DD1E123FFCDB0086D23E /* Development */ = {
isa = XCBuildConfiguration;
buildSettings = {
- CONFIGURATION_BUILD_DIR = "${BUILD_DIR}";
- CONFIGURATION_TEMP_DIR = "${BUILD_DIR}/mDNSResponder.build";
- COPY_PHASE_STRIP = NO;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_PREPROCESSOR_DEFINITIONS = (
"$(inherited)",
"__DARWIN_NON_CANCELABLE=1",
@@ -2307,7 +2119,6 @@
INSTALLHDRS_COPY_PHASE = YES;
INSTALLHDRS_SCRIPT_PHASE = YES;
INSTALL_PATH = /usr/local/lib/system;
- PREBINDING = NO;
PRODUCT_NAME = dns_sd;
"SKIP_INSTALL[sdk=iphonesimulator*]" = YES;
};
@@ -2316,18 +2127,12 @@
2141DD25123FFD100086D23E /* Development */ = {
isa = XCBuildConfiguration;
buildSettings = {
- CONFIGURATION_BUILD_DIR = "${BUILD_DIR}";
- CONFIGURATION_TEMP_DIR = "${BUILD_DIR}/mDNSResponder.build";
- COPY_PHASE_STRIP = NO;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_PREPROCESSOR_DEFINITIONS = (
"$(inherited)",
"__DARWIN_NON_CANCELABLE=1",
);
HEADER_SEARCH_PATHS = "$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders/";
INSTALL_PATH = /usr/local/lib/system;
- PREBINDING = NO;
PRODUCT_NAME = dns_sd_debug;
"SKIP_INSTALL[sdk=iphonesimulator*]" = YES;
};
@@ -2336,18 +2141,14 @@
2141DD2B123FFD2C0086D23E /* Development */ = {
isa = XCBuildConfiguration;
buildSettings = {
- CONFIGURATION_BUILD_DIR = "${BUILD_DIR}";
- CONFIGURATION_TEMP_DIR = "${BUILD_DIR}/mDNSResponder.build";
- COPY_PHASE_STRIP = NO;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GCC_PREPROCESSOR_DEFINITIONS = (
"$(inherited)",
"__DARWIN_NON_CANCELABLE=1",
);
+ GENERATE_PROFILING_CODE = YES;
HEADER_SEARCH_PATHS = "$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders/";
INSTALL_PATH = /usr/local/lib/system;
- PREBINDING = NO;
PRODUCT_NAME = dns_sd_profile;
"SKIP_INSTALL[sdk=iphonesimulator*]" = YES;
};
@@ -2356,33 +2157,23 @@
2E0405F20C31955500F13B59 /* Development */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ "APPLY_RULES_IN_COPY_FILES[sdk=appletvos*]" = YES;
+ "APPLY_RULES_IN_COPY_FILES[sdk=iphoneos*]" = YES;
+ "APPLY_RULES_IN_COPY_FILES[sdk=watchos*]" = YES;
"CODE_SIGN_ENTITLEMENTS[sdk=iphoneos*]" = "helper-entitlements.plist";
CODE_SIGN_IDENTITY = "-";
- CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)";
- CONFIGURATION_TEMP_DIR = "$(PROJECT_TEMP_DIR)";
- COPY_PHASE_STRIP = NO;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_TREAT_WARNINGS_AS_ERRORS = NO;
- GCC_WARN_CHECK_SWITCH_STATEMENTS = NO;
HEADER_SEARCH_PATHS = (
"${CONFIGURATION_TEMP_DIR}",
"$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders",
"$(SDKROOT)/usr/local/include",
);
INSTALL_PATH = /usr/sbin;
- LD_MAP_FILE_PATH = "$(TARGET_TEMP_DIR)/$(PRODUCT_NAME)-LinkMap-$(CURRENT_VARIANT)-$(CURRENT_ARCH).txt";
LIBRARY_SEARCH_PATHS = "\"${CONFIGURATION_TEMP_DIR}\"";
- MACOSX_DEPLOYMENT_TARGET = 10.5;
- "OTHER_CFLAGS[sdk=iphoneos*][arch=*]" = "$(inherited)";
- OTHER_LDFLAGS = (
- "$(inherited)",
- "-lipsec",
- );
- "OTHER_LDFLAGS[sdk=macosx*][arch=*]" = (
- "-lipsec",
- "-Wl,-pie",
- );
- PREBINDING = NO;
+ MACOSX_DEPLOYMENT_TARGET = 10.10;
+ OTHER_LDFLAGS = "-lipsec";
+ "PLIST_FILE_OUTPUT_FORMAT[sdk=appletvos*]" = binary;
+ "PLIST_FILE_OUTPUT_FORMAT[sdk=iphoneos*]" = binary;
+ "PLIST_FILE_OUTPUT_FORMAT[sdk=watchos*]" = binary;
PRODUCT_NAME = mDNSResponderHelper;
PROVISIONING_PROFILE = "";
};
@@ -2391,8 +2182,6 @@
4AE471680EAFF81900A6C5AD /* Development */ = {
isa = XCBuildConfiguration;
buildSettings = {
- COPY_PHASE_STRIP = NO;
- GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
PRODUCT_NAME = dns_sd.jar;
};
@@ -2402,7 +2191,6 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
- ARCHS = "$(ARCHS_STANDARD_64_BIT)";
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
@@ -2411,11 +2199,9 @@
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- "CODE_SIGN_ENTITLEMENTS[sdk=*]" = "dnsctl-entitlements.plist";
+ CODE_SIGN_ENTITLEMENTS = "dnsctl-entitlements.plist";
CODE_SIGN_IDENTITY = "-";
- COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_OPTIMIZATION_LEVEL = s;
GCC_PREPROCESSOR_DEFINITIONS = (
@@ -2424,14 +2210,12 @@
);
GCC_STRICT_ALIASING = YES;
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
- GCC_TREAT_WARNINGS_AS_ERRORS = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
INSTALL_PATH = /usr/local/bin;
MACOSX_DEPLOYMENT_TARGET = 10.9;
- ONLY_ACTIVE_ARCH = NO;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
SDKROOT = macosx;
@@ -2442,15 +2226,12 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
- ARCHS = "$(ARCHS_STANDARD_64_BIT)";
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- COPY_PHASE_STRIP = NO;
EXECUTABLE_PREFIX = lib;
GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_OPTIMIZATION_LEVEL = s;
GCC_PREPROCESSOR_DEFINITIONS = (
@@ -2458,7 +2239,6 @@
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
- GCC_TREAT_WARNINGS_AS_ERRORS = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
@@ -2474,23 +2254,16 @@
D284BE290ADD78180027CCDF /* Development */ = {
isa = XCBuildConfiguration;
buildSettings = {
- CONFIGURATION_BUILD_DIR = "${BUILD_DIR}";
- CONFIGURATION_TEMP_DIR = "${BUILD_DIR}/mDNSResponder.build";
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
- OTHER_CFLAGS = "";
- OTHER_LDFLAGS = "";
- OTHER_REZFLAGS = "";
PRODUCT_NAME = "Build All";
- SECTORDER_FLAGS = "";
};
name = Development;
};
D284BE2C0ADD78180027CCDF /* Development */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = 3F347CF5185D57CD00367B40 /* base.xcconfig */;
buildSettings = {
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)";
+ CONFIGURATION_TEMP_DIR = "$(PROJECT_TEMP_DIR)";
+ COPY_PHASE_STRIP = NO;
DEAD_CODE_STRIPPING = YES;
GCC_PREPROCESSOR_DEFINITIONS = (
"__APPLE_USE_RFC_3542=1",
@@ -2508,7 +2281,7 @@
"-DUSE_SYSTEMCONFIGURATION_PRIVATE_HEADERS",
"-fwrapv",
);
- PREBINDING = NO;
+ SDKROOT = macosx.internal;
STRIP_STYLE = debugging;
WARNING_CFLAGS = (
"-W",
@@ -2525,16 +2298,16 @@
D284BE6E0ADD80740027CCDF /* Development */ = {
isa = XCBuildConfiguration;
buildSettings = {
- "CODE_SIGN_ENTITLEMENTS[sdk=*]" = "mDNSResponder-entitlements.plist";
+ "APPLY_RULES_IN_COPY_FILES[sdk=appletvos*]" = YES;
+ "APPLY_RULES_IN_COPY_FILES[sdk=iphoneos*]" = YES;
+ "APPLY_RULES_IN_COPY_FILES[sdk=watchos*]" = YES;
+ CODE_SIGN_ENTITLEMENTS = "mDNSResponder-entitlements.plist";
CODE_SIGN_IDENTITY = "-";
- CONFIGURATION_BUILD_DIR = "${BUILD_DIR}";
- CONFIGURATION_TEMP_DIR = "${BUILD_DIR}/mDNSResponder.build";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(SDKROOT)/$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks",
+ "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks",
);
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_TREAT_WARNINGS_AS_ERRORS = NO;
HEADER_SEARCH_PATHS = (
"$(SDKROOT)/$(SYSTEM_LIBRARY_DIR)/Frameworks/Security.framework/PrivateHeaders",
@@ -2547,129 +2320,48 @@
);
INSTALL_PATH = /usr/sbin;
LIBRARY_SEARCH_PATHS = "\"${CONFIGURATION_TEMP_DIR}\"";
- MACOSX_DEPLOYMENT_TARGET = 10.5;
+ MACOSX_DEPLOYMENT_TARGET = 10.10;
ORDER_FILE = "${SRCROOT}/mDNSResponder.order";
- OTHER_CFLAGS = (
- "$(inherited)",
- "-no-cpp-precomp",
- );
- "OTHER_CFLAGS[sdk=iphoneos*][arch=*]" = "$(inherited)";
OTHER_LDFLAGS = "";
"OTHER_LDFLAGS[sdk=iphoneos*][arch=*]" = (
- "-Wl,-pie",
"-weak_framework",
DeviceToDeviceManager,
"-lMobileGestalt",
- "-lcupolicy",
);
"OTHER_LDFLAGS[sdk=macosx*][arch=*]" = (
- "-Wl,-pie",
"-lAWACS",
"-weak_framework",
WebFilterDNS,
"-weak_framework",
DeviceToDeviceManager,
);
- "OTHER_LDFLAGS[sdk=macosx10.6][arch=*]" = "-lAWACS";
- OTHER_REZFLAGS = "";
+ "PLIST_FILE_OUTPUT_FORMAT[sdk=appletvos*]" = binary;
+ "PLIST_FILE_OUTPUT_FORMAT[sdk=iphoneos*]" = binary;
+ "PLIST_FILE_OUTPUT_FORMAT[sdk=watchos*]" = binary;
PRODUCT_NAME = mDNSResponder;
PROVISIONING_PROFILE = "";
- REZ_EXECUTABLE = YES;
- };
- name = Development;
- };
- D284BE930ADD80800027CCDF /* Development */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- CONFIGURATION_BUILD_DIR = "${BUILD_DIR}";
- CONFIGURATION_TEMP_DIR = "${BUILD_DIR}/mDNSResponder.build";
- FRAMEWORK_SEARCH_PATHS = (
- "$(inherited)",
- "$(SDKROOT)/$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks",
- );
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
- GCC_OPTIMIZATION_LEVEL = s;
- GCC_PREPROCESSOR_DEFINITIONS = (
- "$(inherited)",
- "MDNS_DEBUGMSGS=1",
- );
- HEADER_SEARCH_PATHS = (
- "$(SDKROOT)/$(SYSTEM_LIBRARY_DIR)/Frameworks/Security.framework/PrivateHeaders",
- ../mDNSShared,
- "${SYSTEM_LIBRARY_DIR}/Frameworks/System.framework/PrivateHeaders",
- "${APPLE_INTERNAL_DEVELOPER_DIR}/Headers",
- "${CONFIGURATION_TEMP_DIR}",
- "$(SDKROOT)/usr/include/libxml2",
- "$(SDKROOT)/usr/local/include",
- );
- LIBRARY_SEARCH_PATHS = "\"${CONFIGURATION_TEMP_DIR}\"";
- MACOSX_DEPLOYMENT_TARGET = 10.5;
- OTHER_CFLAGS = (
- "$(inherited)",
- "-no-cpp-precomp",
- );
- OTHER_LDFLAGS = "";
- "OTHER_LDFLAGS[sdk=iphoneos*][arch=*]" = (
- "-Wl,-pie",
- "-weak_framework",
- DeviceToDeviceManager,
- "-lMobileGestalt",
- "-lcupolicy",
- );
- "OTHER_LDFLAGS[sdk=macosx*][arch=*]" = (
- "-Wl,-pie",
- "-lAWACS",
- "-weak_framework",
- WebFilterDNS,
- "-weak_framework",
- DeviceToDeviceManager,
- );
- "OTHER_LDFLAGS[sdk=macosx10.6][arch=*]" = "-lAWACS";
- OTHER_REZFLAGS = "";
- PRODUCT_NAME = mDNSResponder.debug;
- REZ_EXECUTABLE = YES;
- SECTORDER_FLAGS = (
- "-sectorder",
- __TEXT,
- __text,
- mDNSResponder.order,
- );
- SKIP_INSTALL = YES;
+ SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
};
name = Development;
};
D284BEAE0ADD80920027CCDF /* Development */ = {
isa = XCBuildConfiguration;
buildSettings = {
- CONFIGURATION_BUILD_DIR = "${BUILD_DIR}";
- CONFIGURATION_TEMP_DIR = "${BUILD_DIR}/mDNSResponder.build";
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
HEADER_SEARCH_PATHS = (
../mDNSShared,
"${SYSTEM_LIBRARY_DIR}/Frameworks/System.framework/PrivateHeaders",
);
INSTALL_PATH = /usr/bin;
- OTHER_CFLAGS = "-no-cpp-precomp";
- OTHER_LDFLAGS = "";
- OTHER_REZFLAGS = "";
PRODUCT_NAME = "dns-sd";
- REZ_EXECUTABLE = YES;
- SECTORDER_FLAGS = "";
};
name = Development;
};
D284BEBC0ADD809A0027CCDF /* Development */ = {
isa = XCBuildConfiguration;
buildSettings = {
- CONFIGURATION_BUILD_DIR = "${BUILD_DIR}";
- CONFIGURATION_TEMP_DIR = "${BUILD_DIR}/mDNSResponder.build";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
EXECUTABLE_EXTENSION = jnilib;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
HEADER_SEARCH_PATHS = (
../mDNSShared,
@@ -2682,9 +2374,7 @@
MACH_O_TYPE = mh_dylib;
OTHER_CFLAGS = "";
OTHER_LIBTOOL_FLAGS = "";
- OTHER_REZFLAGS = "";
PRODUCT_NAME = libjdns_sd;
- REZ_EXECUTABLE = YES;
SECTORDER_FLAGS = "";
};
name = Development;
@@ -2692,11 +2382,6 @@
D284BED70ADD80A20027CCDF /* Development */ = {
isa = XCBuildConfiguration;
buildSettings = {
- CONFIGURATION_BUILD_DIR = "${BUILD_DIR}";
- CONFIGURATION_TEMP_DIR = "${BUILD_DIR}/mDNSResponder.build";
- FRAMEWORK_SEARCH_PATHS = "";
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
HEADER_SEARCH_PATHS = (
"${SYSTEM_LIBRARY_DIR}/Frameworks/System.framework/PrivateHeaders",
"${APPLE_INTERNAL_DEVELOPER_DIR}/Headers",
@@ -2705,57 +2390,32 @@
);
INSTALL_PATH = /usr/sbin;
LIBRARY_SEARCH_PATHS = "\"${CONFIGURATION_TEMP_DIR}\"";
- MACOSX_DEPLOYMENT_TARGET = 10.5;
- OTHER_CFLAGS = (
- "-no-cpp-precomp",
- "-UAPPLE_OSX_mDNSResponder",
- );
- OTHER_LDFLAGS = "";
- "OTHER_LDFLAGS[sdk=macosx*][arch=*]" = "-Wl,-pie";
+ MACOSX_DEPLOYMENT_TARGET = 10.10;
+ OTHER_CFLAGS = "-UAPPLE_OSX_mDNSResponder";
PRODUCT_NAME = dnsextd;
- SECTORDER_FLAGS = "";
};
name = Development;
};
D284BEE60ADD80A70027CCDF /* Development */ = {
isa = XCBuildConfiguration;
buildSettings = {
- ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
- CONFIGURATION_BUILD_DIR = "${BUILD_DIR}";
- CONFIGURATION_TEMP_DIR = "${BUILD_DIR}/mDNSResponder.build";
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
INSTALL_PATH = "/Library/Application Support/Bonjour";
- MACOSX_DEPLOYMENT_TARGET = 10.5;
- OTHER_CFLAGS = "";
- OTHER_LDFLAGS = "";
- "OTHER_LDFLAGS[sdk=macosx*]" = "-Wl,-pie";
- OTHER_REZFLAGS = "";
+ MACOSX_DEPLOYMENT_TARGET = 10.6;
+ OTHER_LDFLAGS = "-Wl,-pie";
PRODUCT_NAME = ddnswriteconfig;
- REZ_EXECUTABLE = YES;
- SECTORDER_FLAGS = "";
};
name = Development;
};
D284BF090ADD80B00027CCDF /* Development */ = {
isa = XCBuildConfiguration;
buildSettings = {
- ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
- CONFIGURATION_BUILD_DIR = "${BUILD_DIR}";
- CONFIGURATION_TEMP_DIR = "${BUILD_DIR}/mDNSResponder.build";
- EXPORTED_SYMBOLS_FILE = "";
- GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_GC = supported;
- GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
INFOPLIST_FILE = "PreferencePane/Info-PreferencePane.plist";
INSTALL_PATH = /AppleInternal/Library/PreferencePanes;
- MACOSX_DEPLOYMENT_TARGET = 10.5;
- OTHER_CFLAGS = "";
+ MACOSX_DEPLOYMENT_TARGET = 10.6;
OTHER_LDFLAGS = "-twolevel_namespace";
- OTHER_REZFLAGS = "";
PRODUCT_NAME = Bonjour;
- SECTORDER_FLAGS = "";
WRAPPER_EXTENSION = prefPane;
};
name = Development;
@@ -2763,13 +2423,8 @@
FFA572380AF18F1C0055A0F1 /* Development */ = {
isa = XCBuildConfiguration;
buildSettings = {
- CONFIGURATION_BUILD_DIR = "${BUILD_DIR}";
- CONFIGURATION_TEMP_DIR = "${BUILD_DIR}/mDNSResponder.build";
- COPY_PHASE_STRIP = NO;
DYLIB_CURRENT_VERSION = "$(RC_ProjectSourceVersion)";
EXECUTABLE_EXTENSION = dylib;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_PREPROCESSOR_DEFINITIONS = (
"$(inherited)",
"__DARWIN_NON_CANCELABLE=1",
@@ -2801,12 +2456,8 @@
FFA572440AF18F450055A0F1 /* Development */ = {
isa = XCBuildConfiguration;
buildSettings = {
- CONFIGURATION_BUILD_DIR = "${BUILD_DIR}";
- CONFIGURATION_TEMP_DIR = "${BUILD_DIR}/mDNSResponder.build";
- COPY_PHASE_STRIP = NO;
DYLIB_CURRENT_VERSION = "$(RC_ProjectSourceVersion)";
EXECUTABLE_EXTENSION = dylib;
- GCC_DYNAMIC_NO_PIC = NO;
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GCC_PREPROCESSOR_DEFINITIONS = (
"$(inherited)",
@@ -2840,9 +2491,6 @@
FFA5726F0AF191200055A0F1 /* Development */ = {
isa = XCBuildConfiguration;
buildSettings = {
- COPY_PHASE_STRIP = NO;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
PRODUCT_NAME = SystemLibrariesDynamic;
};
name = Development;
@@ -2850,11 +2498,6 @@
FFB7657F0AEED99D00583A2C /* Development */ = {
isa = XCBuildConfiguration;
buildSettings = {
- CONFIGURATION_BUILD_DIR = "${BUILD_DIR}";
- CONFIGURATION_TEMP_DIR = "${BUILD_DIR}/mDNSResponder.build";
- COPY_PHASE_STRIP = NO;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
PRODUCT_NAME = "Build All";
};
name = Development;
@@ -2862,18 +2505,12 @@
FFB7658A0AEED9FB00583A2C /* Development */ = {
isa = XCBuildConfiguration;
buildSettings = {
- CONFIGURATION_BUILD_DIR = "${BUILD_DIR}";
- CONFIGURATION_TEMP_DIR = "${BUILD_DIR}/mDNSResponder.build";
- COPY_PHASE_STRIP = NO;
DYLIB_CURRENT_VERSION = "$(RC_ProjectSourceVersion)";
EXECUTABLE_EXTENSION = dylib;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_PREPROCESSOR_DEFINITIONS = (
"$(inherited)",
"__DARWIN_NON_CANCELABLE=1",
);
- GCC_TREAT_WARNINGS_AS_ERRORS = NO;
HEADER_SEARCH_PATHS = "$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders/";
INSTALLHDRS_COPY_PHASE = YES;
INSTALLHDRS_SCRIPT_PHASE = YES;
@@ -3015,14 +2652,6 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Development;
};
- D284BE920ADD80800027CCDF /* Build configuration list for PBXNativeTarget "mDNSResponder debug" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- D284BE930ADD80800027CCDF /* Development */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Development;
- };
D284BEAD0ADD80920027CCDF /* Build configuration list for PBXNativeTarget "dns-sd tool" */ = {
isa = XCConfigurationList;
buildConfigurations = (
diff --git a/mDNSResponder/mDNSMacOSX/mDNSResponderHelper.8 b/mDNSResponder/mDNSMacOSX/mDNSResponderHelper.8
index 6e959dbd..7f5836c7 100644
--- a/mDNSResponder/mDNSMacOSX/mDNSResponderHelper.8
+++ b/mDNSResponder/mDNSMacOSX/mDNSResponderHelper.8
@@ -1,6 +1,6 @@
.\" -*- tab-width: 4 -*-
.\"
-.\" Copyright (c) 2007 Apple Computer, Inc. All Rights Reserved.
+.\" Copyright (c) 2007-2009 Apple Inc. All Rights Reserved.
.\"
.\" Licensed under the Apache License, Version 2.0 (the "License");
.\" you may not use this file except in compliance with the License.
diff --git a/mDNSResponder/mDNSMacOSX/pfkey.c b/mDNSResponder/mDNSMacOSX/pfkey.c
index 839c8d71..6e95a6b5 100644
--- a/mDNSResponder/mDNSMacOSX/pfkey.c
+++ b/mDNSResponder/mDNSMacOSX/pfkey.c
@@ -1,5 +1,6 @@
-/*
- * Copyright (c) 2003-2007 Apple Computer, Inc. All rights reserved.
+/* -*- Mode: C; tab-width: 4 -*-
+ *
+ * Copyright (c) 2003-2011 Apple Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
/* $FreeBSD: src/lib/libipsec/pfkey.c,v 1.1.2.2 2001/07/03 11:01:14 ume Exp $ */
/* $KAME: pfkey.c,v 1.39 2001/03/05 18:22:17 thorpej Exp $ */
diff --git a/mDNSResponder/mDNSMacOSX/uDNSPathEvalulation.c b/mDNSResponder/mDNSMacOSX/uDNSPathEvalulation.c
new file mode 100644
index 00000000..1314584d
--- /dev/null
+++ b/mDNSResponder/mDNSMacOSX/uDNSPathEvalulation.c
@@ -0,0 +1,155 @@
+/* -*- Mode: C; tab-width: 4 -*-
+ *
+ * Copyright (c) 2013, 2015 Apple Inc. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "mDNSMacOSX.h"
+#include <libproc.h>
+#include <network/private.h>
+
+//Gets the DNSPolicy from NW PATH EVALUATOR
+mDNSexport void mDNSPlatformGetDNSRoutePolicy(mDNS *const m, DNSQuestion *q, mDNSBool *isCellBlocked)
+{
+ (void) m;
+ q->ServiceID = -1; // initialize the ServiceID to default value of -1
+
+ // Return for non-unicast DNS queries, invalid pid, if NWPathEvaluation is already done by the client, or NWPathEvaluation not available on this OS
+ if (mDNSOpaque16IsZero(q->TargetQID) || (q->pid < 0) || (q->flags & kDNSServiceFlagsPathEvaluationDone) || !nw_endpoint_create_host)
+ {
+ *isCellBlocked = mDNSfalse;
+ return;
+ }
+
+ mDNSs32 service_id;
+ mDNSu32 client_ifindex, dnspol_ifindex;
+ int retval;
+ struct proc_uniqidentifierinfo info;
+ mDNSBool isUUIDSet;
+
+ char unenc_name[MAX_ESCAPED_DOMAIN_NAME];
+ ConvertDomainNameToCString(&q->qname, unenc_name);
+
+ nw_endpoint_t host = nw_endpoint_create_host(unenc_name, "0");
+ if (host == NULL)
+ LogMsg("mDNSPlatformGetDNSRoutePolicy: DNS Route Policy: Query for %##s (%s), PID[%d], EUID[%d], ServiceID[%d] nw_endpoint_t host is NULL", q->qname.c,
+ DNSTypeName(q->qtype), q->pid, q->euid, q->ServiceID);
+
+ nw_parameters_t parameters = nw_parameters_create();
+ if (parameters == NULL)
+ LogMsg("mDNSPlatformGetDNSRoutePolicy: DNS Route Policy: Query for %##s (%s), PID[%d], EUID[%d], ServiceID[%d] nw_endpoint_t parameters is NULL", q->qname.c,
+ DNSTypeName(q->qtype), q->pid, q->euid, q->ServiceID);
+
+ // Check for all the special (negative) internal value interface indices before initializing client_ifindex
+ if ( (q->InterfaceID == mDNSInterface_Any)
+ || (q->InterfaceID == mDNSInterface_Unicast)
+ || (q->InterfaceID == mDNSInterface_LocalOnly)
+ || (q->InterfaceID == mDNSInterfaceMark)
+ || (q->InterfaceID == mDNSInterface_P2P)
+ || (q->InterfaceID == uDNSInterfaceMark))
+ {
+ client_ifindex = 0;
+ }
+ else
+ {
+ client_ifindex = (mDNSu32)(uintptr_t)q->InterfaceID;
+ }
+
+
+ if (client_ifindex > 0)
+ {
+ nw_interface_t client_intf = nw_interface_create_with_index(client_ifindex);
+ nw_parameters_require_interface(parameters, client_intf);
+ if (client_intf != NULL)
+ network_release(client_intf);
+ else
+ LogInfo("mDNSPlatformGetDNSRoutePolicy: DNS Route Policy: client_intf returned by nw_interface_create_with_index() is NULL");
+ }
+
+ nw_parameters_set_uid(parameters,(uid_t)q->euid);
+
+ if (q->pid != 0)
+ {
+ nw_parameters_set_pid(parameters, q->pid);
+ retval = proc_pidinfo(q->pid, PROC_PIDUNIQIDENTIFIERINFO, 1, &info, sizeof(info));
+ if (retval == (int)sizeof(info))
+ {
+ nw_parameters_set_e_proc_uuid(parameters, info.p_uuid);
+ isUUIDSet = mDNStrue;
+ }
+ else
+ {
+ debugf("mDNSPlatformGetDNSRoutePolicy: proc_pidinfo returned %d", retval);
+ isUUIDSet = mDNSfalse;
+ }
+ }
+ else
+ {
+ nw_parameters_set_e_proc_uuid(parameters, q->uuid);
+ isUUIDSet = mDNStrue;
+ }
+
+ nw_path_evaluator_t evaluator = nw_path_create_evaluator_for_endpoint(host, parameters);
+ if (evaluator == NULL)
+ LogMsg("mDNSPlatformGetDNSRoutePolicy: DNS Route Policy: Query for %##s (%s), PID[%d], EUID[%d], ServiceID[%d] nw_path_evaluator_t evaluator is NULL", q->qname.c,
+ DNSTypeName(q->qtype), q->pid, q->euid, q->ServiceID);
+
+ if (host != NULL)
+ network_release(host);
+ if (parameters != NULL)
+ network_release(parameters);
+
+ nw_path_t path = nw_path_evaluator_copy_path(evaluator);
+ if (path == NULL)
+ LogMsg("mDNSPlatformGetDNSRoutePolicy: DNS Route Policy: Query for %##s (%s), PID[%d], EUID[%d], ServiceID[%d] nw_path_t path is NULL", q->qname.c,
+ DNSTypeName(q->qtype), q->pid, q->euid, q->ServiceID);
+
+ service_id = nw_path_get_flow_divert_unit(path);
+ if (service_id != 0)
+ {
+ q->ServiceID = service_id;
+ LogInfo("mDNSPlatformGetDNSRoutePolicy: DNS Route Policy: Query for %##s service ID is set ->service_ID:[%d] ", q->qname.c, service_id);
+ }
+ else
+ {
+ nw_interface_t nwpath_intf = nw_path_copy_scoped_interface(path);
+ if (nwpath_intf != NULL)
+ {
+ // Use the new scoped interface given by NW PATH EVALUATOR
+ dnspol_ifindex = nw_interface_get_index(nwpath_intf);
+ q->InterfaceID = (mDNSInterfaceID)(uintptr_t)dnspol_ifindex;
+
+ network_release(nwpath_intf);
+
+ if (dnspol_ifindex != client_ifindex)
+ LogInfo("mDNSPlatformGetDNSRoutePolicy: DNS Route Policy has changed the scoped ifindex from [%d] to [%d]",
+ client_ifindex, dnspol_ifindex);
+ }
+ else
+ {
+ debugf("mDNSPlatformGetDNSRoutePolicy: Query for %##s (%s), PID[%d], EUID[%d], ServiceID[%d] nw_interface_t nwpath_intf is NULL ", q->qname.c, DNSTypeName(q->qtype), q->pid, q->euid, q->ServiceID);
+ }
+ }
+
+ if (isUUIDSet && TARGET_OS_IPHONE && nw_path_get_status(path) == nw_path_status_unsatisfied && nw_path_get_reason(path) == nw_path_reason_policy_drop)
+ *isCellBlocked = mDNStrue;
+ else
+ *isCellBlocked = mDNSfalse;
+
+ if (path != NULL)
+ network_release(path);
+ if (evaluator != NULL)
+ network_release(evaluator);
+
+}