Guest User

Untitled

a guest
Sep 24th, 2021
525
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.65 KB | None | 0 0
  1. In new MacOS, sending SIGINFO to mDNSResponder does not work:
  2. $ log stream --predicate 'process == "mDNSResponder"' --info
  3. ...
  4. Responder: [com.apple.mDNSResponder:Default] Sending SIGINFO to mDNSResponder daemon is deprecated. To trigger state dump, please use 'dns-sd -O', enter 'dns-sd -h' for more information
  5.  
  6. So as messages states, we can try dns-sd -O:
  7. $ sudo dns-sd -O
  8. XPC service returns error, description: State dump is only enabled in internal builds
  9.  
  10. I tried to check when this error occurs by looking into source code:
  11. https://opensource.apple.com/source/mDNSResponder/mDNSResponder-1310.80.1/mDNSMacOSX/xpc_services/xpc_service_log_utility.c.auto.html
  12.  
  13. This error occurs when IsAppleInternalBuild() method is returning false. There is also comment:
  14. // We do not dump state in the customer build due to privacy consideration.
  15.  
  16. After looking at this method it looks like it can be changed.
  17. This is how methods are being invoked:
  18. handle_requests() -> IsAppleInternalBuild() -> os_variant_has_internal_diagnostics()
  19.  
  20. So we need to make sure that os_variant_has_internal_diagnostics() is returning true.
  21. This method is in file:
  22. https://opensource.apple.com/source/Libc/Libc-1244.1.7/libdarwin/variant.c.auto.html
  23.  
  24. After looking into this file it seems like to make it work, we need to:
  25. 1. Make file named /var/db/os_variant_override and make sure it is not empty (one space should be enough)
  26. 2. Make file named /System/Library/CoreServices/AppleInternalVariant.plist and copy content from here: https://opensource.apple.com/source/Libc/Libc-1244.1.7/libdarwin/AppleInternalVariant.plist.auto.html
  27. 3. Reboot system
  28. 4. Try running sudo dns-sd -O
  29.  
  30.  
Advertisement
Add Comment
Please, Sign In to add comment