<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://dreness.com/wikimedia/index.php?feed=atom&amp;namespace=0&amp;title=Special%3ANewPages</id>
		<title>Wikifications - New pages [en]</title>
		<link rel="self" type="application/atom+xml" href="https://dreness.com/wikimedia/index.php?feed=atom&amp;namespace=0&amp;title=Special%3ANewPages"/>
		<link rel="alternate" type="text/html" href="https://dreness.com/wikimedia/index.php?title=Special:NewPages"/>
		<updated>2026-05-23T14:29:03Z</updated>
		<subtitle>From Wikifications</subtitle>
		<generator>MediaWiki 1.26.3</generator>

	<entry>
		<id>https://dreness.com/wikimedia/index.php?title=Gnuplot</id>
		<title>Gnuplot</title>
		<link rel="alternate" type="text/html" href="https://dreness.com/wikimedia/index.php?title=Gnuplot"/>
				<updated>2009-09-08T18:20:53Z</updated>
		
		<summary type="html">&lt;p&gt;Dre: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Basic x / y plot of data from a file in the form:&lt;br /&gt;
&lt;br /&gt;
 x1 y1&lt;br /&gt;
 x2 y2&lt;br /&gt;
 x3 y3&lt;br /&gt;
&lt;br /&gt;
 set ytic auto&lt;br /&gt;
 set xtic auto&lt;br /&gt;
 set title &amp;quot;iCal Server Queue Depth / Latency&amp;quot;&lt;br /&gt;
 set xlabel &amp;quot;Queue Depth&amp;quot;&lt;br /&gt;
 set ylabel &amp;quot;Latency&amp;quot;&lt;br /&gt;
 plot &amp;quot;ical-queues.txt&amp;quot; using 1:1 title &amp;quot;Queue Depth&amp;quot; with lines&lt;br /&gt;
 plot &amp;quot;ical-queues.txt&amp;quot; using 1:2 title &amp;quot;Latency&amp;quot; with lines&lt;/div&gt;</summary>
		<author><name>Dre</name></author>	</entry>

	<entry>
		<id>https://dreness.com/wikimedia/index.php?title=How_to_compile_other_software_using_Macports_libraries</id>
		<title>How to compile other software using Macports libraries</title>
		<link rel="alternate" type="text/html" href="https://dreness.com/wikimedia/index.php?title=How_to_compile_other_software_using_Macports_libraries"/>
				<updated>2009-07-16T18:12:20Z</updated>
		
		<summary type="html">&lt;p&gt;Dre: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=How to compile other software using Macports libraries=&lt;br /&gt;
Audience: Beginner / Intermediate&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
This document will attempt to illustrate how to use Macports to fulfill library dependencies of other software that has not been incorporated into Macports. Two examples will be covered here, representing two of the most common way that software is compiled. The first example will demonstrate how to compile a single C source file using gcc directly, linking and including the Macports libraries via the -L and -I gcc command line options. The second example will demonstrate how to link against Macports libraries when compiling software that uses the GNU autoconf system, in which case you do not run gcc directly, but instead pass arguments to the &amp;#039;configure&amp;#039; script.&lt;br /&gt;
&lt;br /&gt;
==Executive Summary and Cheat Sheet==&lt;br /&gt;
&lt;br /&gt;
When using gcc, usually you want to add the following to the list of gcc command line arguments:&lt;br /&gt;
 -I/opt/local/include -L/opt/local/lib&lt;br /&gt;
&lt;br /&gt;
When using autoconf, you usually have a couple options:&lt;br /&gt;
&lt;br /&gt;
1) populate the following environment variables with Macports paths, e.g.&lt;br /&gt;
&lt;br /&gt;
 export LDFLAGS=&amp;#039;-L/opt/local/lib&amp;#039;&lt;br /&gt;
 export CPPFLAGS=&amp;#039;-I/opt/local/include&amp;#039;&lt;br /&gt;
 export LD_LIBRARY_PATH=/opt/local/lib&lt;br /&gt;
 export LD_INCLUDE_PATH=/opt/local/include&lt;br /&gt;
&lt;br /&gt;
2) Pass the required paths as arguments to the configure script. Most configure scripts have specific options for defining the location of dependent libraries; run ./configure --help to see a list of the available options.&lt;br /&gt;
&lt;br /&gt;
==Using Macports libraries with gcc==&lt;br /&gt;
&lt;br /&gt;
In this first example, we will be compiling a simple program that exercises some basic functions of the GMP library, available here: http://gmplib.org/. Since gmp is available via Macports, begin by installing gmp:&lt;br /&gt;
&lt;br /&gt;
 sudo port install gmp&lt;br /&gt;
&lt;br /&gt;
Next, we&amp;#039;ll make a working directory and download the C source file we&amp;#039;ll be compiling, located at http://silassewell.googlecode.com/svn/trunk/2008/10/18/gmp_hello_world/gmp_hello_world.c&lt;br /&gt;
&lt;br /&gt;
 mkdir ~/gmp-test&lt;br /&gt;
 curl -O &lt;br /&gt;
&lt;br /&gt;
Copy the code&lt;br /&gt;
&lt;br /&gt;
Configuration&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
Optional Parts&lt;br /&gt;
&lt;br /&gt;
TODO: What else can be done?&lt;/div&gt;</summary>
		<author><name>Dre</name></author>	</entry>

	<entry>
		<id>https://dreness.com/wikimedia/index.php?title=LKDC</id>
		<title>LKDC</title>
		<link rel="alternate" type="text/html" href="https://dreness.com/wikimedia/index.php?title=LKDC"/>
				<updated>2008-05-13T00:05:39Z</updated>
		
		<summary type="html">&lt;p&gt;Dre: typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The local KDC in Leopard is pretty rad. In the absence of any real documentation, this page exists as a jumble of observations and theories.&lt;br /&gt;
&lt;br /&gt;
==Positioning and Use in Leoaprd==&lt;br /&gt;
The Local KDC (LKDC) is a Kerberos implementation that extends &amp;quot;single sign-on&amp;quot; capabilities into ad-hoc networks. The LKDC supports the AFP, CIFS, and VNC services included in Mac OS X and Mac OS X Server. At the surface, the LKDC looks pretty much just like a regular Kerberos setup... you can log into one of the above named services and get Kerberos tickets, use standard tools like klist to manage tickets, use kadmin to administer the KDC, etc, etc. Some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;{3} andre@donk [~] % sudo klist -k &lt;br /&gt;
Keytab name: FILE:/etc/krb5.keytab&lt;br /&gt;
KVNO Principal&lt;br /&gt;
---- --------------------------------------------------------------------------&lt;br /&gt;
   3 afpserver/LKDC:SHA1.8B0FBACC08E3152A473A68D303E297A13CAA3AFD@LKDC:SHA1.8B0FBACC08E3152A473A68D303E297A13CAA3AFD&lt;br /&gt;
   3 afpserver/LKDC:SHA1.8B0FBACC08E3152A473A68D303E297A13CAA3AFD@LKDC:SHA1.8B0FBACC08E3152A473A68D303E297A13CAA3AFD&lt;br /&gt;
   3 afpserver/LKDC:SHA1.8B0FBACC08E3152A473A68D303E297A13CAA3AFD@LKDC:SHA1.8B0FBACC08E3152A473A68D303E297A13CAA3AFD&lt;br /&gt;
   3 cifs/LKDC:SHA1.8B0FBACC08E3152A473A68D303E297A13CAA3AFD@LKDC:SHA1.8B0FBACC08E3152A473A68D303E297A13CAA3AFD&lt;br /&gt;
   3 cifs/LKDC:SHA1.8B0FBACC08E3152A473A68D303E297A13CAA3AFD@LKDC:SHA1.8B0FBACC08E3152A473A68D303E297A13CAA3AFD&lt;br /&gt;
   3 cifs/LKDC:SHA1.8B0FBACC08E3152A473A68D303E297A13CAA3AFD@LKDC:SHA1.8B0FBACC08E3152A473A68D303E297A13CAA3AFD&lt;br /&gt;
   3 vnc/LKDC:SHA1.8B0FBACC08E3152A473A68D303E297A13CAA3AFD@LKDC:SHA1.8B0FBACC08E3152A473A68D303E297A13CAA3AFD&lt;br /&gt;
   3 vnc/LKDC:SHA1.8B0FBACC08E3152A473A68D303E297A13CAA3AFD@LKDC:SHA1.8B0FBACC08E3152A473A68D303E297A13CAA3AFD&lt;br /&gt;
   3 vnc/LKDC:SHA1.8B0FBACC08E3152A473A68D303E297A13CAA3AFD@LKDC:SHA1.8B0FBACC08E3152A473A68D303E297A13CAA3AFD&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;{10} andre@donk [~] % sudo kadmin.local -q listprincs&lt;br /&gt;
Authenticating as principal andre/admin@LKDC:SHA1.C81B8D1A890D4D4DD079059A54594AA53B9A1A2B with password.&lt;br /&gt;
K/M@LKDC:SHA1.8B0FBACC08E3152A473A68D303E297A13CAA3AFD&lt;br /&gt;
afpserver/LKDC:SHA1.8B0FBACC08E3152A473A68D303E297A13CAA3AFD@LKDC:SHA1.8B0FBACC08E3152A473A68D303E297A13CAA3AFD&lt;br /&gt;
andre@LKDC:SHA1.8B0FBACC08E3152A473A68D303E297A13CAA3AFD&lt;br /&gt;
cifs/LKDC:SHA1.8B0FBACC08E3152A473A68D303E297A13CAA3AFD@LKDC:SHA1.8B0FBACC08E3152A473A68D303E297A13CAA3AFD&lt;br /&gt;
kadmin/admin@LKDC:SHA1.8B0FBACC08E3152A473A68D303E297A13CAA3AFD&lt;br /&gt;
kadmin/changepw@LKDC:SHA1.8B0FBACC08E3152A473A68D303E297A13CAA3AFD&lt;br /&gt;
kadmin/donk.local@LKDC:SHA1.8B0FBACC08E3152A473A68D303E297A13CAA3AFD&lt;br /&gt;
kadmin/history@LKDC:SHA1.8B0FBACC08E3152A473A68D303E297A13CAA3AFD&lt;br /&gt;
krbtgt/LKDC:SHA1.8B0FBACC08E3152A473A68D303E297A13CAA3AFD@LKDC:SHA1.8B0FBACC08E3152A473A68D303E297A13CAA3AFD&lt;br /&gt;
vnc/LKDC:SHA1.8B0FBACC08E3152A473A68D303E297A13CAA3AFD@LKDC:SHA1.8B0FBACC08E3152A473A68D303E297A13CAA3AFD&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;{13} andre@donk [~] % sudo kadmin.local -q &amp;#039;get_principal andre&amp;#039;&lt;br /&gt;
Authenticating as principal andre/admin@LKDC:SHA1.C81B8D1A890D4D4DD079059A54594AA53B9A1A2B with password.&lt;br /&gt;
Principal: andre@LKDC:SHA1.8B0FBACC08E3152A473A68D303E297A13CAA3AFD&lt;br /&gt;
Expiration date: [never]&lt;br /&gt;
Last password change: Sat May 10 21:43:57 PDT 2008&lt;br /&gt;
Password expiration date: [none]&lt;br /&gt;
Maximum ticket life: 0 days 10:00:00&lt;br /&gt;
Maximum renewable life: 7 days 00:00:00&lt;br /&gt;
Last modified: Sat May 10 21:43:57 PDT 2008 (root/admin@LKDC:SHA1.8B0FBACC08E3152A473A68D303E297A13CAA3AFD)&lt;br /&gt;
Last successful authentication: [never]&lt;br /&gt;
Last failed authentication: [never]&lt;br /&gt;
Failed password attempts: 0&lt;br /&gt;
Number of keys: 4&lt;br /&gt;
Key: vno 1, Triple DES cbc mode with HMAC/sha1, no salt&lt;br /&gt;
Key: vno 1, ArcFour with HMAC/md5, no salt&lt;br /&gt;
Key: vno 1, DES cbc mode with CRC-32, no salt&lt;br /&gt;
Key: vno 1, DES cbc mode with CRC-32, Version 4&lt;br /&gt;
Attributes: REQUIRES_PRE_AUTH&lt;br /&gt;
Policy: [none]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;{106} andre@donk [~] % klist&lt;br /&gt;
Kerberos 5 ticket cache: &amp;#039;API:Initial default ccache&amp;#039;&lt;br /&gt;
Default principal: andre@LKDC:SHA1.C81B8D1A890D4D4DD079059A54594AA53B9A1A2B&lt;br /&gt;
&lt;br /&gt;
Valid Starting     Expires            Service Principal&lt;br /&gt;
05/13/08 00:35:00  05/13/08 10:34:58  krbtgt/LKDC:SHA1.C81B8D1A890D4D4DD079059A54594AA53B9A1A2B@LKDC:SHA1.C81B8D1A890D4D4DD079059A54594AA53B9A1A2B&lt;br /&gt;
	renew until 05/20/08 00:34:58&lt;br /&gt;
05/13/08 00:35:00  05/13/08 10:34:58  vnc/LKDC:SHA1.C81B8D1A890D4D4DD079059A54594AA53B9A1A2B@LKDC:SHA1.C81B8D1A890D4D4DD079059A54594AA53B9A1A2B&lt;br /&gt;
	renew until 05/20/08 00:34:58&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Standard Deviation==&lt;br /&gt;
The crux of the LKDC implementation is the use of a SHA1 hash in place of the server name portion of a kerberos service principal, effectively insulating Kerberos from dynamic network conditions. This significant re-definition of a kerberos principal is really cool, but also not standard. The Kerberos v5 spec (rfc 1510) assumes and requires that the server name portion of a kerberos principal be just that: a server name (or address). To wit:&lt;br /&gt;
&amp;lt;pre&amp;gt;7.2.1. Name of server principals&lt;br /&gt;
&lt;br /&gt;
   The principal identifier for a server on a host will generally be&lt;br /&gt;
   composed of two parts: (1) the realm of the KDC with which the server&lt;br /&gt;
   is registered, and (2) a two-component name of type NT-SRV-HST if the&lt;br /&gt;
   host name is an Internet domain name or a multi-component name of&lt;br /&gt;
   type NT-SRV-XHST if the name of the host is of a form such as X.500&lt;br /&gt;
   that allows slash (/) separators.  The first component of the two- or&lt;br /&gt;
   multi-component name will identify the service and the latter&lt;br /&gt;
   components will identify the host.  Where the name of the host is not&lt;br /&gt;
   case sensitive (for example, with Internet domain names) the name of&lt;br /&gt;
   the host must be lower case.  For services such as telnet and the&lt;br /&gt;
   Berkeley R commands which run with system privileges, the first&lt;br /&gt;
   component will be the string &amp;quot;host&amp;quot; instead of a service specific&lt;br /&gt;
   identifier.&amp;lt;/pre&amp;gt;&lt;br /&gt;
Also unlike most Kerberos deployments, the clients are not expected to maintain hard-coded references to other LKDCs, or any Kerberos client configuration at all for that matter (although it does continue to work if you have existing configuration).&lt;br /&gt;
&lt;br /&gt;
This presents two primary challenges:&lt;br /&gt;
* Advertising and discovering LKDC realm information in an ad-hoc, peer to peer context&lt;br /&gt;
* Harnessing the authentication process to construct the special kerberos principal and then handing it off to Kerberos&lt;br /&gt;
&lt;br /&gt;
Apple has overcome both of these challenges rather well, although the vast majority of the LKDC implementation should be considered &amp;#039;private&amp;#039; - don&amp;#039;t go building apps around this. The discovery portion of the LKDC implementation only barely extends into the Kerberos layer. How far does it extend? Consider the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;{15} andre@donk [~] % klist&lt;br /&gt;
klist: No Kerberos 5 tickets in credentials cache&lt;br /&gt;
{16} andre@donk [~] % cat /Library/Preferences/edu.mit.Kerberos&lt;br /&gt;
cat: /Library/Preferences/edu.mit.Kerberos: No such file or directory&lt;br /&gt;
{17} andre@donk [~] % cat /etc/krb5.conf&lt;br /&gt;
cat: /etc/krb5.conf: No such file or directory&lt;br /&gt;
{18} andre@donk [~] % kinit andre@LKDC:SHA1.C81B8D1A890D4D4DD079059A54594AA53B9A1A2B&lt;br /&gt;
Please enter the password for andre@LKDC:SHA1.C81B8D1A890D4D4DD079059A54594AA53B9A1A2B: &lt;br /&gt;
{19} andre@donk [~] % klist&lt;br /&gt;
Kerberos 5 ticket cache: &amp;#039;API:Initial default ccache&amp;#039;&lt;br /&gt;
Default principal: andre@LKDC:SHA1.C81B8D1A890D4D4DD079059A54594AA53B9A1A2B&lt;br /&gt;
&lt;br /&gt;
Valid Starting     Expires            Service Principal&lt;br /&gt;
05/13/08 13:32:39  05/13/08 23:32:37  krbtgt/LKDC:SHA1.C81B8D1A890D4D4DD079059A54594AA53B9A1A2B@LKDC:SHA1.C81B8D1A890D4D4DD079059A54594AA53B9A1A2B&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The take-home point here is that as long as you know the realm / principal name, it&amp;#039;s business as usual. The &amp;quot;look up KDC for realm&amp;quot; and &amp;quot;look up realm for KDC&amp;quot; functionality is integrated into the system&amp;#039;s kerberos frameworks (via the private KerberosHelper framework). It is important to note that all of the secure aspects of the authentication are performed in the standard Kerberos manner.&lt;br /&gt;
&lt;br /&gt;
==Advertising and Discovering==&lt;br /&gt;
The mechanism used to advertise and discover LKDC information is multicast DNS, as it is very well suited to ad-hoc networks. In other more standard Kerberos deployments, it is not unusual to use (regular ol&amp;#039; unicast) DNS to discover Kerberos information in the absence of local configuration (see references at the bottom of the page), but with standard kerberos, the discovery is limited to realm name or KDC name. From the krb5.conf man page [libdefaults] section:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;       dns_lookup_kdc&lt;br /&gt;
              Indicate whether DNS SRV records shoud be used to locate the KDCs and&lt;br /&gt;
              other  servers for a realm, if they are not listed in the information&lt;br /&gt;
              for the realm.  The default is to use these records.&lt;br /&gt;
&lt;br /&gt;
       dns_lookup_realm&lt;br /&gt;
              Indicate whether DNS TXT records should be used to determine the Ker-&lt;br /&gt;
              beros realm of a host.  The default is not to use these records.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each Mac OS X system advertises its own LKDC. At some point during or after startup, the LKDC realm name is read from Directory Services, e.g.&lt;br /&gt;
 dscl . -read /Config/KerberosKDC RealName&lt;br /&gt;
The LKDC realm name is then advertised in the txt portion of a multicast DNS record called _kerberos in the .local name space. This record may be manually queried as follows:&lt;br /&gt;
&lt;br /&gt;
 dns-sd -Q &amp;quot;_kerberos.donk.local&amp;quot; txt&lt;br /&gt;
&lt;br /&gt;
Replace &amp;quot;donk&amp;quot; with the bonjour name of a Leopard machine on your local network (can test on yourself if needed).&lt;br /&gt;
&lt;br /&gt;
The result is a string of hex characters. This command does not terminate, so control-C to stop it. Now take the hex and run it through xxd -r -c 256.&lt;br /&gt;
&lt;br /&gt;
 xxd -r -c 256&lt;br /&gt;
&lt;br /&gt;
&amp;lt;paste in the hex string, press return&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The result is the LKDC realm name, such as LKDC:SHA1.8B0FBACC08E3152A473A68D303E297A13CAA3AFD&lt;br /&gt;
&lt;br /&gt;
==Harnessing Authentication==&lt;br /&gt;
The notion of using a unique hash as the sever name portion of a service principal name is a new idea, so we cannot rely on standard methods for constructing the correct principal name based on the LKDC&amp;#039;s realm name. Accordingly, the authentication process is brokered for supported service clients, in order to perform the LKDC realm name discovery and then construct a kerberos service principal name that is correct for the remote LKDC. Once the correct service principal name is obtained, it is handed off to Kerberos and works normally.&lt;br /&gt;
&lt;br /&gt;
The client-side authentication broker (for supported services!) is called NetAuthAgent, and you&amp;#039;ll see it running whenever you use vnc, afp, cifs. Think of this as a session manager, of sorts.&lt;br /&gt;
&lt;br /&gt;
On the service configuration end, AppleFileServer and smbd have their service principal names written into their respective configuration files, while the vnc service does not (VNCPrivilegeProxy?).&lt;br /&gt;
&lt;br /&gt;
Most of the advertisement, discovery, and management functions involving the LKDC are provided by a private framework called KerberosHelper, and a Kerberos framework plugin called LKDCLocate.&lt;br /&gt;
&lt;br /&gt;
==Using KerberosHelper==&lt;br /&gt;
Some of the basic methods provided by KerberosHelper might be exercised as follows (big ups to landonf!)&lt;br /&gt;
&lt;br /&gt;
krb.c contains the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdint.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
extern int LKDCGetLocalRealm(char **realm);&lt;br /&gt;
extern int LKDCDiscoverRealm(const char *host, char **realm);&lt;br /&gt;
&lt;br /&gt;
// XXX arg1 - 1 seems to trigger the dump to syslog.&lt;br /&gt;
extern int LKDCDumpStatus(int32_t arg1);&lt;br /&gt;
&lt;br /&gt;
void find_realm (const char *host) {&lt;br /&gt;
    char *realm;&lt;br /&gt;
    char *kdc;&lt;br /&gt;
    uint32_t arg3;&lt;br /&gt;
&lt;br /&gt;
    /* Find the realm */&lt;br /&gt;
    if (LKDCDiscoverRealm(host, &amp;amp;realm) == 0) {&lt;br /&gt;
        printf(&amp;quot;Disovered Realm (%s): %s\n&amp;quot;, host, realm);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    free(realm);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char *argv[]) {&lt;br /&gt;
    char *local_realm;&lt;br /&gt;
&lt;br /&gt;
    if (LKDCGetLocalRealm(&amp;amp;local_realm) == 0) {&lt;br /&gt;
        printf(&amp;quot;Local Realm: %s\n&amp;quot;, local_realm);&lt;br /&gt;
        free(local_realm);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /* Dump to syslog. XXX argument &amp;#039;1&amp;#039; is a guess */&lt;br /&gt;
    LKDCDumpStatus(1);&lt;br /&gt;
&lt;br /&gt;
    if (argc &amp;lt; 2) {&lt;br /&gt;
        printf(&amp;quot;Usage: %s &amp;lt;hostname&amp;gt;\n&amp;quot;, argv[0]);&lt;br /&gt;
        return 1;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    find_realm(argv[1]);&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Compile with:&lt;br /&gt;
&lt;br /&gt;
 gcc krb.c -o krb -F/System/Library/PrivateFrameworks -framework KerberosHelper&lt;br /&gt;
&lt;br /&gt;
Run it with one argument: a bonjour name of a leopard machine on your network. e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;{33} andre@donk [work/krb] % ./krb dude.local&lt;br /&gt;
Local Realm: LKDC:SHA1.8B0FBACC08E3152A473A68D303E297A13CAA3AFD&lt;br /&gt;
Disovered Realm (dude.local): LKDC:SHA1.C81B8D1A890D4D4DD079059A54594AA53B9A1A2B&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also, check your system.log. LKDCDumpStatus produces something like:&lt;br /&gt;
&amp;lt;pre&amp;gt;May 13 02:38:56 donk LKDCHelper[30484]:     LKDCDumpCacheStatus: Cache root node = 0x1034f0&lt;br /&gt;
May 13 02:38:56 donk LKDCHelper[30484]:     LKDCDumpCacheStatus: node = 0x1034f0 {&lt;br /&gt;
May 13 02:38:56 donk LKDCHelper[30484]:     LKDCDumpCacheStatus:                  realmName   = (0x1059d0) LKDC:SHA1.8B0FBACC08E3152A473A68D303E297A13CAA3AFD&lt;br /&gt;
May 13 02:38:56 donk LKDCHelper[30484]:     LKDCDumpCacheStatus:                  serviceHost = (0x104d50) donk.local&lt;br /&gt;
May 13 02:38:56 donk LKDCHelper[30484]:     LKDCDumpCacheStatus:                  servicePort = 88&lt;br /&gt;
May 13 02:38:56 donk LKDCHelper[30484]:     LKDCDumpCacheStatus:                  TTL         = 7200&lt;br /&gt;
May 13 02:38:56 donk LKDCHelper[30484]:     LKDCDumpCacheStatus:                 }&lt;br /&gt;
May 13 02:38:56 donk LKDCHelper[30484]:     LKDCDumpCacheStatus: node = 0x106030 {&lt;br /&gt;
May 13 02:38:56 donk LKDCHelper[30484]:     LKDCDumpCacheStatus:                  realmName   = (0x106460) LKDC:SHA1.C81B8D1A890D4D4DD079059A54594AA53B9A1A2B&lt;br /&gt;
May 13 02:38:56 donk LKDCHelper[30484]:     LKDCDumpCacheStatus:                  serviceHost = (0x105fd0) dude.local&lt;br /&gt;
May 13 02:38:56 donk LKDCHelper[30484]:     LKDCDumpCacheStatus:                  servicePort = 88&lt;br /&gt;
May 13 02:38:56 donk LKDCHelper[30484]:     LKDCDumpCacheStatus:                  TTL         = 7200&lt;br /&gt;
May 13 02:38:56 donk LKDCHelper[30484]:     LKDCDumpCacheStatus:                 }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Interesting Files==&lt;br /&gt;
====NetAuthAgent====&lt;br /&gt;
This appears to be a service client helper that manages the authentication process at a high level on behalf of various clients included with Mac OS X. A string dump reveals the following chunk of kerberos service names:&lt;br /&gt;
&amp;lt;pre&amp;gt;vncserver&lt;br /&gt;
webdaveserver&lt;br /&gt;
ftpsserver&lt;br /&gt;
ftpserver&lt;br /&gt;
cifs&lt;br /&gt;
afpserver&amp;lt;/pre&amp;gt;&lt;br /&gt;
vncserver, cifs, and afpserver are the only 3 services that are kerberized in the LKDC by default, though NetAuthAgent appears to support others as well. Looking at all strings matching &amp;#039;kerb&amp;#039;, we see:&lt;br /&gt;
&amp;lt;pre&amp;gt;{5} andre@donk [~] % strings /System/Library/CoreServices/NetAuthAgent.app/Contents/MacOS/NetAuthAgent | grep -i kerb  &lt;br /&gt;
KerberosSession&lt;br /&gt;
BypassKerberos&lt;br /&gt;
kerberosClientPrincipalCredentials&lt;br /&gt;
kerberosRelease&lt;br /&gt;
kerberosClientPrincipal&lt;br /&gt;
kerberosKeychainRealm&lt;br /&gt;
kerberosPrincipalInfo&lt;br /&gt;
MountedByKerberos&lt;br /&gt;
SupportsKerberos&lt;br /&gt;
/System/Library/CoreServices/Kerberos.app&lt;br /&gt;
mInvalidKerberosUserName&lt;br /&gt;
checkForKerberosUserName:&lt;br /&gt;
isValidKerberosUserName:&lt;br /&gt;
useKerberos&lt;br /&gt;
kerberosServiceName&lt;br /&gt;
kerberosServicePrincipalHint&lt;br /&gt;
kerberosSession&lt;br /&gt;
kerberosServicePrincipal&lt;br /&gt;
kerberosAcquireTicket&lt;br /&gt;
Kerberos&lt;br /&gt;
AllowKerberosUI&lt;br /&gt;
KerberosInfo&lt;br /&gt;
kerberosUIOption&lt;br /&gt;
kerberosHostDisplayName&lt;br /&gt;
kerberosHostAddress&lt;br /&gt;
kerberosAlreadyHasTicket&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;{14} andre@donk [~] % otool -L /System/Library/CoreServices/NetAuthAgent.app/Contents/MacOS/NetAuthAgent | cut -d &amp;#039; &amp;#039; -f1&lt;br /&gt;
/System/Library/CoreServices/NetAuthAgent.app/Contents/MacOS/NetAuthAgent:&lt;br /&gt;
	/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa&lt;br /&gt;
	/System/Library/Frameworks/Security.framework/Versions/A/Security&lt;br /&gt;
	/System/Library/PrivateFrameworks/URLMount.framework/Versions/A/URLMount&lt;br /&gt;
	/System/Library/Frameworks/SecurityInterface.framework/Versions/A/SecurityInterface&lt;br /&gt;
	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices&lt;br /&gt;
	/System/Library/PrivateFrameworks/KerberosHelper.framework/Versions/A/KerberosHelper&lt;br /&gt;
	/usr/lib/libgcc_s.1.dylib&lt;br /&gt;
	/usr/lib/libSystem.B.dylib&lt;br /&gt;
	/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices&lt;br /&gt;
	/usr/lib/libobjc.A.dylib&lt;br /&gt;
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation&lt;br /&gt;
	/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit&lt;br /&gt;
	/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NetAuthAgent.app also includes NetAuthSysAgent, which appears to be a variant of NetAuthAgent for handling system-level operations that do not require user interface. It contains lots of filesystem semantics, and also appears to deal with certificates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;{108} andre@donk [~] % otool -L /System/Library/CoreServices/NetAuthAgent.app/Contents/Resources/NetAuthSysAgent | cut -d &amp;#039; &amp;#039; -f1&lt;br /&gt;
/System/Library/CoreServices/NetAuthAgent.app/Contents/Resources/NetAuthSysAgent:&lt;br /&gt;
	/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation&lt;br /&gt;
	/System/Library/PrivateFrameworks/URLMount.framework/Versions/A/URLMount&lt;br /&gt;
	/System/Library/PrivateFrameworks/KerberosHelper.framework/Versions/A/KerberosHelper&lt;br /&gt;
	/System/Library/Frameworks/SecurityInterface.framework/Versions/A/SecurityInterface&lt;br /&gt;
	/System/Library/Frameworks/Security.framework/Versions/A/Security&lt;br /&gt;
	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices&lt;br /&gt;
	/usr/lib/libgcc_s.1.dylib&lt;br /&gt;
	/usr/lib/libSystem.B.dylib&lt;br /&gt;
	/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices&lt;br /&gt;
	/usr/lib/libobjc.A.dylib&lt;br /&gt;
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====LKDCLocate====&lt;br /&gt;
This (non-private?) Kerberos framework plugin looks like it&amp;#039;s able to perform DNS queries to retrieve LKDC info. It also seems to interact with a mach service created by LKDCHelper called com.apple.KerberosHelper.LKDCHelper.&lt;br /&gt;
&amp;lt;pre&amp;gt;{14} andre@donk [~] % strings /System/Library/KerberosPlugins/KerberosFrameworkPlugins/LKDCLocate.bundle/Contents/MacOS/LKDCLocate       &lt;br /&gt;
%s: &lt;br /&gt;
LKDCLookup&lt;br /&gt;
Declined to handle address family %d&lt;br /&gt;
svc = %d, realm = %s, family= %d, socktype = %d&lt;br /&gt;
KDC|MasterKDC&lt;br /&gt;
LKDC:&lt;br /&gt;
getaddrinfo () == %d&lt;br /&gt;
0x%08p: family = %d, socktype = %d, protocol = %d&lt;br /&gt;
Running callback 0x%08p&lt;br /&gt;
Unexpected address family %d&lt;br /&gt;
Callback done 0x%08p, err=%d&lt;br /&gt;
inet_ntop failed: %s&lt;br /&gt;
addr = %s, port = %d&lt;br /&gt;
failed %d&lt;br /&gt;
LKDCGetHelperPort&lt;br /&gt;
com.apple.KerberosHelper.LKDCHelper&lt;br /&gt;
%s: cannot contact helper&lt;br /&gt;
LKDCHelperExit&lt;br /&gt;
Mach communication failed: %s&lt;br /&gt;
LKDCDumpStatus&lt;br /&gt;
LKDCSetLogLevel&lt;br /&gt;
LKDCGetLocalRealm&lt;br /&gt;
[[[ %s&lt;br /&gt;
Local realm = %s&lt;br /&gt;
]]] %s = %d (%s)&lt;br /&gt;
LKDCDiscoverRealm&lt;br /&gt;
No place to store discovered realm.&lt;br /&gt;
realm = %s&lt;br /&gt;
LKDCFindKDCForRealm&lt;br /&gt;
No place to store discovered KDC hostname.&lt;br /&gt;
KDC Hostname = %s:%u&lt;br /&gt;
Communication to the helper failed&lt;br /&gt;
Not authorized&lt;br /&gt;
Input parameter error&lt;br /&gt;
Serializing object failed&lt;br /&gt;
Unserializing object failed&lt;br /&gt;
Object passed is not a dictionary&lt;br /&gt;
A Local KDC was not found&lt;br /&gt;
Lookup of the KDC for the requested realm failed&lt;br /&gt;
    %s: &lt;br /&gt;
Success&lt;br /&gt;
&amp;lt;unknown error&amp;gt;&lt;br /&gt;
[...]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;{112} andre@donk [~] % otool -L /System/Library/KerberosPlugins/KerberosFrameworkPlugins/LKDCLocate.bundle/Contents/MacOS/LKDCLocate          &lt;br /&gt;
/System/Library/KerberosPlugins/KerberosFrameworkPlugins/LKDCLocate.bundle/Contents/MacOS/LKDCLocate:&lt;br /&gt;
	/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.0.0)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====KerberosHelper====&lt;br /&gt;
This private framework appears to provide API that can be used on behalf of service clients (or their agents) to discover the LKDC information of a remote realm.&lt;br /&gt;
&amp;lt;pre&amp;gt;{6} root@donk [~] # strings /System/Library/PrivateFrameworks/KerberosHelper.framework/Versions/A/KerberosHelper &lt;br /&gt;
LKDCGetHelperPort&lt;br /&gt;
com.apple.KerberosHelper.LKDCHelper&lt;br /&gt;
%s: cannot contact helper&lt;br /&gt;
LKDCHelperExit&lt;br /&gt;
Mach communication failed: %s&lt;br /&gt;
LKDCDumpStatus&lt;br /&gt;
LKDCSetLogLevel&lt;br /&gt;
LKDCGetLocalRealm&lt;br /&gt;
[[[ %s&lt;br /&gt;
Local realm = %s&lt;br /&gt;
]]] %s = %d (%s)&lt;br /&gt;
LKDCDiscoverRealm&lt;br /&gt;
No place to store discovered realm.&lt;br /&gt;
realm = %s&lt;br /&gt;
LKDCFindKDCForRealm&lt;br /&gt;
No place to store discovered KDC hostname.&lt;br /&gt;
KDC Hostname = %s:%u&lt;br /&gt;
LKDC:&lt;br /&gt;
    %s: krb5 call got %d (%s) on %s:%d&lt;br /&gt;
realm_for_host&lt;br /&gt;
(null)&lt;br /&gt;
[[[ %s: hostname=%s hintrealm=%s&lt;br /&gt;
/SourceCache/KerberosHelper/KerberosHelper-31/Source/KerberosHelper.c&lt;br /&gt;
    %s: krb5_get_host_realm success&lt;br /&gt;
    %s: krb5_get_host_realm returned unusable realm!&lt;br /&gt;
    %s: LKDCDiscoverRealm success&lt;br /&gt;
]]] %s: returning realm=%s&lt;br /&gt;
]]] %s: failed to determine realm&lt;br /&gt;
[[[ KRBCopyRealm () - required parameters okay&lt;br /&gt;
]]] KRBCopyRealm () = %d&lt;br /&gt;
[[[ KRBCopyKeychainLookupInfo () - required parameters okay&lt;br /&gt;
Username&lt;br /&gt;
KeychainAccountName&lt;br /&gt;
DisableSaveToKeychain&lt;br /&gt;
edu.mit.Kerberos.KerberosAgent&lt;br /&gt;
SavePasswordDisabled&lt;br /&gt;
    KRBCopyKeychainLookupInfo: DisableSaveToKeychainKey = TRUE&lt;br /&gt;
    KRBCopyKeychainLookupInfo: CFPreferencesCopyAppValue == NULL&lt;br /&gt;
]]] KRBCopyKeychainLookupInfo () = %d&lt;br /&gt;
[[[ KRBCopyServicePrincipal () - required parameters okay&lt;br /&gt;
    KRBCopyServicePrincipal: svcName mismatch inService = &amp;quot;%s&amp;quot;, svcName = &amp;quot;%s&amp;quot;&lt;br /&gt;
    KRBCopyServicePrincipal: useName = &amp;quot;%s&amp;quot;&lt;br /&gt;
LKDC:&lt;br /&gt;
    KRBCopyServicePrincipal: realm is Local KDC.&lt;br /&gt;
    KRBCopyServicePrincipal: Bad inHostName, using svcInstance = &amp;quot;%s&amp;quot;&lt;br /&gt;
    KRBCopyServicePrincipal: useInstance = &amp;quot;%s&amp;quot;&lt;br /&gt;
    KRBCopyServicePrincipal: Fatal - Bad inHostName &amp;amp; no inAdvertisedPrincipal&lt;br /&gt;
%s/%s@%s&lt;br /&gt;
    KRBCopyServicePrincipal: principal = &amp;quot;%s/%s@%s&amp;quot;&lt;br /&gt;
]]] KRBCopyServicePrincipal () = %d&lt;br /&gt;
KRBCopyClientPrincipalInfo&lt;br /&gt;
[[[ KRBCopyClientPrincipalInfo () - required parameters okay&lt;br /&gt;
Certificate&lt;br /&gt;
    KRBCopyClientPrincipalInfo: Certificate information in dictionary&lt;br /&gt;
    KRBCopyClientPrincipalInfo: Certificate not present in dictionary&lt;br /&gt;
.Mac Sharing Certificate&lt;br /&gt;
%@@%@&lt;br /&gt;
    KRBCopyClientPrincipalInfo: Using login name = &amp;quot;%s&amp;quot;&lt;br /&gt;
    KRBCopyClientPrincipalInfo: principal guess = &amp;quot;%s&amp;quot;&lt;br /&gt;
    KRBCopyClientPrincipalInfo: ccache principal match = &amp;quot;%s&amp;quot;&lt;br /&gt;
    KRBCopyClientPrincipalInfo: found a single ticket for realm, replacing principal &amp;amp; username&lt;br /&gt;
    KRBCopyClientPrincipalInfo: Setting found Username to = &amp;quot;%s&amp;quot;&lt;br /&gt;
    KRBCopyClientPrincipalInfo: using principal = &amp;quot;%s&amp;quot;&lt;br /&gt;
ClientPrincipal&lt;br /&gt;
    KRBCopyClientPrincipalInfo: usingCertificate == %d&lt;br /&gt;
UsingCertificate&lt;br /&gt;
CetificateHash&lt;br /&gt;
CertificateInferredLabel&lt;br /&gt;
    KRBCopyClientPrincipalInfo: InferredLabel = &amp;quot;%s&amp;quot;&lt;br /&gt;
]]] KRBCopyClientPrincipalInfo () = %d&lt;br /&gt;
%@@%s&lt;br /&gt;
[[[ KRBTestForExistingTicket () - required parameters okay&lt;br /&gt;
    KRBTestForExistingTicket: principal = &amp;quot;%s&amp;quot;&lt;br /&gt;
    KRBTestForExistingTicket: Valid Ticket, ccacheName = &amp;quot;%s&amp;quot;&lt;br /&gt;
]]] KRBTestForExistingTicket () = %d&lt;br /&gt;
KRBAcquireTicket&lt;br /&gt;
[[[ KRBAcquireTicket () - required parameters okay&lt;br /&gt;
    KRBAcquireTicket: Using a certificate&lt;br /&gt;
Password&lt;br /&gt;
]]] KRBAcquireTicket () = %d&lt;br /&gt;
[[[ KRBCloseSession () - required parameters okay&lt;br /&gt;
]]] KRBCloseSession () = %d&lt;br /&gt;
parse_principal_name&lt;br /&gt;
KRBCreateSession&lt;br /&gt;
[[[ %s () - required parameters okay&lt;br /&gt;
    %s: LocalKDC realm lookup only&lt;br /&gt;
    %s: __KRBCreateUTF8StringFromCFString failed&lt;br /&gt;
[[[ %s () decomposing %s&lt;br /&gt;
]]] %s () - %d&lt;br /&gt;
    %s: processed host name = %s&lt;br /&gt;
%s.local&lt;br /&gt;
    %s: last char of host name = 0x%02x&lt;br /&gt;
success&lt;br /&gt;
    %s: getaddrinfo = %s (%d)&lt;br /&gt;
    %s: canonical host name = %s&lt;br /&gt;
    %s: secondary match = %s&lt;br /&gt;
    %s: primary match = %s&lt;br /&gt;
    %s: could not find a suitable host/realm mapping&lt;br /&gt;
    %s: Using host name = %s, realm = %s&lt;br /&gt;
]]] %s () = %d&lt;br /&gt;
KerberosKDC&lt;br /&gt;
dsRecTypeStandard:Config&lt;br /&gt;
realname&lt;br /&gt;
Communication to the helper failed&lt;br /&gt;
Not authorized&lt;br /&gt;
Input parameter error&lt;br /&gt;
Serializing object failed&lt;br /&gt;
Unserializing object failed&lt;br /&gt;
Object passed is not a dictionary&lt;br /&gt;
A Local KDC was not found&lt;br /&gt;
Lookup of the KDC for the requested realm failed&lt;br /&gt;
    %s: &lt;br /&gt;
Success&lt;br /&gt;
&amp;lt;unknown error&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====LKDCHelper====&lt;br /&gt;
This executable is part of the KerberosHelper framework and is a launch agent that runs in the user&amp;#039;s namespace. This appears to fire up a mach service called com.apple.KerberosHelper.LKDCHelper that is used for IPC with other interested parties (see: elsewhere on this page).&lt;br /&gt;
&amp;lt;pre&amp;gt;{34} andre@donk [~] % strings /System/Library/PrivateFrameworks/KerberosHelper.framework/Versions/A/Resources/LKDCHelper&lt;br /&gt;
Idle exit&lt;br /&gt;
do_LKDCDumpStatus&lt;br /&gt;
[[[ %s&lt;br /&gt;
do_LKDCSetLogLevel&lt;br /&gt;
do_LKDCGetLocalRealm&lt;br /&gt;
Cached lookup&lt;br /&gt;
LocalKDCRealm = %s&lt;br /&gt;
do_LKDCDiscoverRealm&lt;br /&gt;
Looking up realm for %s&lt;br /&gt;
do_LKDCFindKDCForRealm&lt;br /&gt;
Looking up host for %s&lt;br /&gt;
%s: &lt;br /&gt;
Unauthorized access by euid=%lu pid=%lu&lt;br /&gt;
update_idle_timer&lt;br /&gt;
0 == gettimeofday(&amp;amp;last_message, NULL)&lt;br /&gt;
/SourceCache/KerberosHelper/KerberosHelper-31/Source/LKDCHelper-main.c&lt;br /&gt;
idletimer_main&lt;br /&gt;
0 == gettimeofday(&amp;amp;now, NULL)&lt;br /&gt;
Invalid idle timeout: %s&lt;br /&gt;
Usage: [-d] [-t maxidle]&lt;br /&gt;
Could not initialize ASL logging.&lt;br /&gt;
Starting (uid=%ul)&lt;br /&gt;
mach_port_allocate: %s&lt;br /&gt;
mach_port_insert_right: %s&lt;br /&gt;
com.apple.KerberosHelper.LKDCHelper&lt;br /&gt;
bootstrap_register2 failed: %s&lt;br /&gt;
CheckIn&lt;br /&gt;
Could not create checkin message for launchd.&lt;br /&gt;
Could not message launchd.&lt;br /&gt;
Launchd checkin failed: %s.&lt;br /&gt;
MachServices&lt;br /&gt;
Launchd reply does not contain %s dictionary.&lt;br /&gt;
Launchd reply does not contain %s Mach port.&lt;br /&gt;
Launchd gave me a null Mach port.&lt;br /&gt;
Failed to start idletimer thread: %s&lt;br /&gt;
mach_msg_server: %s&lt;br /&gt;
KerberosKDC&lt;br /&gt;
dsRecTypeStandard:Config&lt;br /&gt;
realname&lt;br /&gt;
_kerberos&lt;br /&gt;
LookupRealmCallBack&lt;br /&gt;
mDNSError = %d&lt;br /&gt;
More than one record, last one wins!!!&lt;br /&gt;
LKDCAddLocatorDetails&lt;br /&gt;
New entry for (realm=%s host=%s)&lt;br /&gt;
Replacing existing entry (realm=%s host=%s) with (realm=%s host=%s)&lt;br /&gt;
]]] %s = %d (%s)&lt;br /&gt;
LKDCHostnameForRealm&lt;br /&gt;
Cache hit&lt;br /&gt;
Cache miss&lt;br /&gt;
HandleEvents&lt;br /&gt;
LKDCLookupRealm&lt;br /&gt;
LKDCRealmForHostname&lt;br /&gt;
%s.%s&lt;br /&gt;
mDNSResult&lt;br /&gt;
CallbackError = %d&lt;br /&gt;
Timeout!&lt;br /&gt;
LKDCDumpCacheStatus&lt;br /&gt;
Cache root node = %08p&lt;br /&gt;
node = %08p {&lt;br /&gt;
                 realmName   = (%08p) %s&lt;br /&gt;
                 serviceHost = (%08p) %s&lt;br /&gt;
                 servicePort = %u&lt;br /&gt;
                 TTL         = %u&lt;br /&gt;
                }&lt;br /&gt;
Communication to the helper failed&lt;br /&gt;
Not authorized&lt;br /&gt;
Input parameter error&lt;br /&gt;
Serializing object failed&lt;br /&gt;
Unserializing object failed&lt;br /&gt;
Object passed is not a dictionary&lt;br /&gt;
A Local KDC was not found&lt;br /&gt;
Lookup of the KDC for the requested realm failed&lt;br /&gt;
    %s: &lt;br /&gt;
Success&lt;br /&gt;
&amp;lt;unknown error&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====configureLocalKDC====&lt;br /&gt;
/usr/libexec/configureLocalKDC is a perl script that creates the LKDC at installation time (using kdcsetup, which also creates the directory services record), creates service principals and their corresponding keytabs, edits service config files for supported services, and installs a kerberos certificate into the system keychain. This is a pretty nice script, and is certainly worth a look. To give you an idea, consider the following data structure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;        my %afp_config = (service =&amp;gt; &amp;#039;afpserver&amp;#039;, realm =&amp;gt; $LKDC_realm,&lt;br /&gt;
                          prefs =&amp;gt; &amp;#039;/Library/Preferences/com.apple.AppleFileServer&amp;#039;,&lt;br /&gt;
                          key =&amp;gt; &amp;#039;kerberosPrincipal&amp;#039;, format =&amp;gt; &amp;#039;%s/%s@%2$s&amp;#039;);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== VNCPrivilegeProxy====&lt;br /&gt;
/System/Library/CoreServices/RemoteManagement/AppleVNCServer.bundle/Contents/Support/VNCPrivilegeProxy - unsure exactly what this does.&lt;br /&gt;
&amp;lt;pre&amp;gt;{9} root@donk [Default/config] # strings /System/Library/CoreServices/RemoteManagement/AppleVNCServer.bundle/Contents/Support/VNCPrivilegeProxy&lt;br /&gt;
__dyld_make_delayed_module_initializer_calls&lt;br /&gt;
__dyld_mod_term_funcs&lt;br /&gt;
Starting Privilege Proxy&lt;br /&gt;
com.apple.RemoteDesktop.PrivilegeProxy&lt;br /&gt;
&amp;#039;%s&amp;#039; server already starting&lt;br /&gt;
bootstrap_check_in bootstrap_create_service() failed: status=%d&lt;br /&gt;
&amp;#039;%s&amp;#039; server already active&lt;br /&gt;
server_init bootstrap_check_in() failed: status=%d&lt;br /&gt;
server_init bootstrap_unprivileged() failed: status=%d&lt;br /&gt;
server_init task_set_bootstrap_port(): %s&lt;br /&gt;
mach_msg_server:&lt;br /&gt;
/Library/Preferences/com.apple.VNCSettings.txt&lt;br /&gt;
&amp;#039;2, /+0&amp;amp;7!4-)1#&lt;br /&gt;
80( &lt;br /&gt;
91)!&lt;br /&gt;
:2*&amp;quot;&lt;br /&gt;
;3+#&amp;gt;6.&amp;amp;&lt;br /&gt;
=5-%&lt;br /&gt;
&amp;lt;4,$&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Resources==&lt;br /&gt;
* http://www.felipe-alfaro.org/blog/2007/12/07/kerberizing-leopards-ssh/ This documents how to kerberize ssh / sshd, in Leopard, but uses a static configuration instead of dynamically discovering the remote realm name, as is done by the services kerberized in the LKDC by default.&lt;br /&gt;
&lt;br /&gt;
* http://www.mactech.com/articles/mactech/Vol.23/23.11/ExploringLeopardwithDTrace/index.html Exploring Leopard with DTrace - was useful in determining how some of the service clients interact with Kerberos.&lt;br /&gt;
&lt;br /&gt;
* http://developer.apple.com/technotes/tn2005/tn2083.html Daemons and Agents. Fantastic technote by Quinn. This helped me understand a bit more about the mach service that is provided by LKDCHelper.&lt;br /&gt;
&lt;br /&gt;
* http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/129443 Multicast DNS libraries for Ruby&lt;br /&gt;
&lt;br /&gt;
* http://www.ldap.com/1/commentary/wahl/20070511_01.shtml Discovering local identity services. Outlines several methods for dynamic discovery of how to bootstrap authentication sessions with a remote system.&lt;br /&gt;
&lt;br /&gt;
* http://www.cybersafe.ltd.uk/docs_standards/draft-ietf-krb-wg-krb-dns-locate-03.txt This expired draft documents how kerberos realm information might be discovered using dns.&lt;br /&gt;
&lt;br /&gt;
* http://www.dns-sd.org/ServiceTypes.html multicast DNS service types&lt;br /&gt;
&lt;br /&gt;
* http://files.multicastdns.org/draft-cheshire-dnsext-multicastdns.txt This expired draft documents multicast DNS in general&lt;br /&gt;
&lt;br /&gt;
* http://web.mit.edu/kerberos/www/krb5-1.2/krb5-1.2.6/doc/install.html#SEC9 Kerberos install document; this section documents how Kerberos finds realm information.&lt;br /&gt;
&lt;br /&gt;
* http://www.gnu.org/software/shishi/manual/html_node/Realm-and-Principal-Naming.html Nice detail on realm and principal names from a Kerberos implementation called Shishi (complaint with the Kerberos v5 spec).&lt;br /&gt;
&lt;br /&gt;
* http://crpit.com/confpapers/CRPITV26Pirzada2.pdf Kerberos assisted Authentication in Mobile Ad-hoc Networks. Here is an example of a Kerberos implementation designed for ad-hoc networks. Strangely enough, this is not a fully peer-to-peer implementation, and requires the existence of authentication servers other than the one hosting the service you wish to use. It also seems quite a bit more complex than apple&amp;#039;s LKDC implementation.&lt;br /&gt;
&lt;br /&gt;
* http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.28.383 Distributed Authentication in Kerberos Using Public Key Cryptography. This document from 1997 describes how a PKI might be used to perform distributed authentication using Kerberos. This implementation eliminates the need for a centralized KDC (instead relying on a centralized certificate authority), although does not deal with dynamic peer discovery in an ad hoc networking context.&lt;/div&gt;</summary>
		<author><name>Dre</name></author>	</entry>

	<entry>
		<id>https://dreness.com/wikimedia/index.php?title=Iphone_terminal_bootstrap</id>
		<title>Iphone terminal bootstrap</title>
		<link rel="alternate" type="text/html" href="https://dreness.com/wikimedia/index.php?title=Iphone_terminal_bootstrap"/>
				<updated>2008-04-24T22:04:28Z</updated>
		
		<summary type="html">&lt;p&gt;Dre: New page: # mkdir -p /usr/local/arm-apple-darwin/lib # ln -sf /usr/lib/libgcc_s.1.dylib /usr/local/arm-apple-darwin/lib/libgcc_s.1.dylib # chmod +s /Applications/Term-vt100.app/Term-vt100&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;# mkdir -p /usr/local/arm-apple-darwin/lib&lt;br /&gt;
# ln -sf /usr/lib/libgcc_s.1.dylib /usr/local/arm-apple-darwin/lib/libgcc_s.1.dylib&lt;br /&gt;
# chmod +s /Applications/Term-vt100.app/Term-vt100&lt;/div&gt;</summary>
		<author><name>Dre</name></author>	</entry>

	<entry>
		<id>https://dreness.com/wikimedia/index.php?title=Iphone_commands</id>
		<title>Iphone commands</title>
		<link rel="alternate" type="text/html" href="https://dreness.com/wikimedia/index.php?title=Iphone_commands"/>
				<updated>2008-04-24T20:20:58Z</updated>
		
		<summary type="html">&lt;p&gt;Dre: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pre&amp;gt;BTServer&lt;br /&gt;
BlueTool&lt;br /&gt;
[&lt;br /&gt;
ac&lt;br /&gt;
alias&lt;br /&gt;
apply&lt;br /&gt;
arp&lt;br /&gt;
awk&lt;br /&gt;
banner&lt;br /&gt;
basename&lt;br /&gt;
bash&lt;br /&gt;
bzip2&lt;br /&gt;
cap_mkdb&lt;br /&gt;
cat&lt;br /&gt;
chflags&lt;br /&gt;
chgrp&lt;br /&gt;
chmod&lt;br /&gt;
chown&lt;br /&gt;
chown&lt;br /&gt;
chroot&lt;br /&gt;
cksum&lt;br /&gt;
col&lt;br /&gt;
colrm&lt;br /&gt;
column&lt;br /&gt;
comm&lt;br /&gt;
compress&lt;br /&gt;
configd&lt;br /&gt;
cp&lt;br /&gt;
cron&lt;br /&gt;
crontab&lt;br /&gt;
csh&lt;br /&gt;
csplit&lt;br /&gt;
curl&lt;br /&gt;
cut&lt;br /&gt;
cut&lt;br /&gt;
daily&lt;br /&gt;
date&lt;br /&gt;
dd&lt;br /&gt;
df&lt;br /&gt;
dirname&lt;br /&gt;
ditto&lt;br /&gt;
domainname&lt;br /&gt;
du&lt;br /&gt;
echo&lt;br /&gt;
ed&lt;br /&gt;
env&lt;br /&gt;
expand&lt;br /&gt;
expr&lt;br /&gt;
false&lt;br /&gt;
fdisk&lt;br /&gt;
find&lt;br /&gt;
finger&lt;br /&gt;
fmt&lt;br /&gt;
fold&lt;br /&gt;
fsck&lt;br /&gt;
fsck_hfs&lt;br /&gt;
fstyp&lt;br /&gt;
fstyp_hfs&lt;br /&gt;
funzip&lt;br /&gt;
getopt&lt;br /&gt;
getty&lt;br /&gt;
grep&lt;br /&gt;
groups&lt;br /&gt;
gunzip&lt;br /&gt;
gzexe&lt;br /&gt;
gzip&lt;br /&gt;
head&lt;br /&gt;
hexdump&lt;br /&gt;
hostinfo&lt;br /&gt;
hostname&lt;br /&gt;
id&lt;br /&gt;
ifconfig&lt;br /&gt;
ifconfig&lt;br /&gt;
install&lt;br /&gt;
ioreg&lt;br /&gt;
iostat&lt;br /&gt;
ipcrm&lt;br /&gt;
join&lt;br /&gt;
jot&lt;br /&gt;
kextload&lt;br /&gt;
kextstat&lt;br /&gt;
kextunload&lt;br /&gt;
kextunload&lt;br /&gt;
kill&lt;br /&gt;
killall&lt;br /&gt;
lam&lt;br /&gt;
last&lt;br /&gt;
lastcomm&lt;br /&gt;
launchctl&lt;br /&gt;
launchd&lt;br /&gt;
less&lt;br /&gt;
libgzip.a&lt;br /&gt;
link&lt;br /&gt;
ln&lt;br /&gt;
locate&lt;br /&gt;
login&lt;br /&gt;
logname&lt;br /&gt;
look&lt;br /&gt;
ls&lt;br /&gt;
lsvfs&lt;br /&gt;
mDNSResponder&lt;br /&gt;
mDNSResponderHelper&lt;br /&gt;
makedbm&lt;br /&gt;
makekey&lt;br /&gt;
md&lt;br /&gt;
md5&lt;br /&gt;
md5&lt;br /&gt;
mediaserverd&lt;br /&gt;
mesg&lt;br /&gt;
minicom&lt;br /&gt;
mkdir&lt;br /&gt;
mkfifo&lt;br /&gt;
mkfile&lt;br /&gt;
mknod&lt;br /&gt;
mknod&lt;br /&gt;
mktemp&lt;br /&gt;
more&lt;br /&gt;
mount&lt;br /&gt;
mount_hfs&lt;br /&gt;
mtree&lt;br /&gt;
mv&lt;br /&gt;
nano&lt;br /&gt;
nc&lt;br /&gt;
netstat&lt;br /&gt;
nice&lt;br /&gt;
nl&lt;br /&gt;
nohup&lt;br /&gt;
notifyd&lt;br /&gt;
nvram&lt;br /&gt;
nvram&lt;br /&gt;
od&lt;br /&gt;
passwd&lt;br /&gt;
paste&lt;br /&gt;
pathchk&lt;br /&gt;
pax&lt;br /&gt;
pico&lt;br /&gt;
ping&lt;br /&gt;
ping&lt;br /&gt;
pppd&lt;br /&gt;
pr&lt;br /&gt;
printenv&lt;br /&gt;
printf&lt;br /&gt;
printf&lt;br /&gt;
ps&lt;br /&gt;
pt_chown&lt;br /&gt;
pwd&lt;br /&gt;
racoon&lt;br /&gt;
racoonctl&lt;br /&gt;
readlink&lt;br /&gt;
reboot&lt;br /&gt;
reboot&lt;br /&gt;
reboot&lt;br /&gt;
renice&lt;br /&gt;
rev&lt;br /&gt;
rm&lt;br /&gt;
rmdir&lt;br /&gt;
rmt&lt;br /&gt;
route&lt;br /&gt;
route&lt;br /&gt;
rs&lt;br /&gt;
rsync&lt;br /&gt;
sar&lt;br /&gt;
scp&lt;br /&gt;
screen&lt;br /&gt;
script&lt;br /&gt;
sed&lt;br /&gt;
sftp&lt;br /&gt;
sh&lt;br /&gt;
shlock&lt;br /&gt;
showPic&lt;br /&gt;
simulatecrash&lt;br /&gt;
sleep&lt;br /&gt;
snap&lt;br /&gt;
sort&lt;br /&gt;
split&lt;br /&gt;
srelay&lt;br /&gt;
ssh&lt;br /&gt;
ssh-add&lt;br /&gt;
ssh-agent&lt;br /&gt;
ssh-keygen&lt;br /&gt;
ssh-keyscan&lt;br /&gt;
sshd&lt;br /&gt;
stat&lt;br /&gt;
stty&lt;br /&gt;
su&lt;br /&gt;
sum&lt;br /&gt;
sync&lt;br /&gt;
sysctl&lt;br /&gt;
syslogd&lt;br /&gt;
tabs&lt;br /&gt;
tail&lt;br /&gt;
tar&lt;br /&gt;
tcopy&lt;br /&gt;
tcpdump&lt;br /&gt;
tcsh&lt;br /&gt;
tee&lt;br /&gt;
telnet&lt;br /&gt;
test&lt;br /&gt;
tftp&lt;br /&gt;
time&lt;br /&gt;
top&lt;br /&gt;
touch&lt;br /&gt;
tr&lt;br /&gt;
traceroute&lt;br /&gt;
true&lt;br /&gt;
true&lt;br /&gt;
tsort&lt;br /&gt;
tty&lt;br /&gt;
ul&lt;br /&gt;
umount&lt;br /&gt;
uname&lt;br /&gt;
unexpand&lt;br /&gt;
uniq&lt;br /&gt;
unlink&lt;br /&gt;
unvis&lt;br /&gt;
unzip&lt;br /&gt;
unzip&lt;br /&gt;
unzipsfx&lt;br /&gt;
update&lt;br /&gt;
uptime&lt;br /&gt;
users&lt;br /&gt;
vi&lt;br /&gt;
vim&lt;br /&gt;
vipw&lt;br /&gt;
vis&lt;br /&gt;
vmstat&lt;br /&gt;
vpnd&lt;br /&gt;
wall&lt;br /&gt;
wc&lt;br /&gt;
whereis&lt;br /&gt;
which&lt;br /&gt;
who&lt;br /&gt;
whoami&lt;br /&gt;
whois&lt;br /&gt;
xargs&lt;br /&gt;
yes&lt;br /&gt;
zcat&lt;br /&gt;
zcmp&lt;br /&gt;
zdiff&lt;br /&gt;
zdump&lt;br /&gt;
zegrep&lt;br /&gt;
zfgrep&lt;br /&gt;
zforce&lt;br /&gt;
zgrep&lt;br /&gt;
zic&lt;br /&gt;
zless&lt;br /&gt;
zmore&lt;br /&gt;
znew&lt;br /&gt;
zprint&lt;br /&gt;
zsh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dre</name></author>	</entry>

	<entry>
		<id>https://dreness.com/wikimedia/index.php?title=Iphone</id>
		<title>Iphone</title>
		<link rel="alternate" type="text/html" href="https://dreness.com/wikimedia/index.php?title=Iphone"/>
				<updated>2008-04-24T20:20:50Z</updated>
		
		<summary type="html">&lt;p&gt;Dre: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[iphone_terminal_bootstrap]]&lt;br /&gt;
&lt;br /&gt;
[[iphone commands]]&lt;/div&gt;</summary>
		<author><name>Dre</name></author>	</entry>

	<entry>
		<id>https://dreness.com/wikimedia/index.php?title=How_to_make_and_apply_patches</id>
		<title>How to make and apply patches</title>
		<link rel="alternate" type="text/html" href="https://dreness.com/wikimedia/index.php?title=How_to_make_and_apply_patches"/>
				<updated>2007-07-01T03:40:00Z</updated>
		
		<summary type="html">&lt;p&gt;Dre: page created&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Once you have the needed changes, apply them (pre autoconf) to a copy of a fresh source directory. You should now have a &amp;#039;patched&amp;#039; directory sitting alongside an unpatched direcetory. Now generate the patch...&lt;br /&gt;
&lt;br /&gt;
 diff -ruN old new &amp;gt; my_patch&lt;br /&gt;
&lt;br /&gt;
To apply this patch to a fresh source directory, place the patch alongside the source dir:&lt;br /&gt;
 patch -p0 &amp;lt; my_patch&lt;/div&gt;</summary>
		<author><name>Dre</name></author>	</entry>

	<entry>
		<id>https://dreness.com/wikimedia/index.php?title=Installing_and_using_unix_software_in_userland</id>
		<title>Installing and using unix software in userland</title>
		<link rel="alternate" type="text/html" href="https://dreness.com/wikimedia/index.php?title=Installing_and_using_unix_software_in_userland"/>
				<updated>2007-07-01T03:39:15Z</updated>
		
		<summary type="html">&lt;p&gt;Dre: page created&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In your shell init file, set the following (for bash / zsh compatible shells):&lt;br /&gt;
&lt;br /&gt;
 export LDFLAGS=&amp;#039;-L/path/to/your/home/lib&amp;#039;&lt;br /&gt;
 export CPPFLAGS=&amp;#039;-I/path/to/your/home/include&amp;#039;&lt;br /&gt;
 export PATH=&amp;#039;/path/to/your/home:$PATH&amp;#039;&lt;br /&gt;
 export LD_LIBRARY_PATH=/path/to/your/home/lib&lt;br /&gt;
 export LD_INCLUDE_PATH=/path/to/your/home/include&lt;br /&gt;
&lt;br /&gt;
Log out / in, so that the above takes effect.&lt;br /&gt;
&lt;br /&gt;
* Configure any dependencies with --prefix=/path/to/your/home, and make / make install as usual. They will be installed into your home directory (~/lib, ~/include, ~/bin)&lt;br /&gt;
* Configure your desired software with --prefix=/path/to/your/home and make /make install as usual. It should pick up all your new libs / includes due to the environment variables.&lt;br /&gt;
&lt;br /&gt;
When you execute your new binaries, they will be able to find your userland libraries thanks to LD_LIBRARY_PATH.&lt;/div&gt;</summary>
		<author><name>Dre</name></author>	</entry>

	<entry>
		<id>https://dreness.com/wikimedia/index.php?title=Net_SNMP</id>
		<title>Net SNMP</title>
		<link rel="alternate" type="text/html" href="https://dreness.com/wikimedia/index.php?title=Net_SNMP"/>
				<updated>2007-06-29T23:07:57Z</updated>
		
		<summary type="html">&lt;p&gt;Btimby: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In investigating how to dynamically produce data that I could plumb via snmp, it became quickly apparent that the snmpd shipped on Intel macs in 10.4.* is pretty well busted. It only supports a very small subset of the functionality provided by the net-snmp daemon in general (i.e. on other platforms). This can be observed by running snmpd with the -H switch. Notable omissions include &amp;#039;exec&amp;#039; and &amp;#039;extend&amp;#039;, for example, which are typically used to easily fork off arbitrary sub processes tasked with collecting data for the targeted OID or range of OIDs.&lt;br /&gt;
&lt;br /&gt;
It was quickly obvious that we&amp;#039;d have to use the macports snmpd. That version does have support for more functionality than the one shipped with Mac OS X, but it&amp;#039;s *missing* exec and extend! But wait! What&amp;#039;s this about &amp;#039;pass&amp;#039; and &amp;#039;pass_persist&amp;#039;? They are similar to &amp;#039;exec&amp;#039; except that pass and pass_persist allow the script to dynamically define the OID hierarchy. This is different from exec; with exec you call out the specific OID to script mappings in the config file. With pass_persist, the script takes control of an entire &amp;#039;tree&amp;#039;, and is responsible for responding for any OIDs under that tree.&lt;br /&gt;
&lt;br /&gt;
To use pass_persist, we need a script that can speak the net-snmp pass_persist protocol, which is described in the snmpd.conf(5) man page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;       pass_persist [-p priority] MIBOID PROG&lt;br /&gt;
              will also pass control of the subtree rooted at  MIBOID  to  the&lt;br /&gt;
              specified  PROG  command.  However this command will continue to&lt;br /&gt;
              run after the initial request has been answered,  so  subsequent&lt;br /&gt;
              requests can be processed without the startup overheads.&lt;br /&gt;
&lt;br /&gt;
              Upon  initialization, PROG will be passed the string &amp;quot;PING\n&amp;quot; on&lt;br /&gt;
              stdin, and should respond by printing &amp;quot;PONG\n&amp;quot; to stdout.&lt;br /&gt;
&lt;br /&gt;
              For GET and GETNEXT requests, PROG will be passed two  lines  on&lt;br /&gt;
              stdin,  the  command (get or getnext) and the requested OID.  It&lt;br /&gt;
              should respond by printing three lines to stdout - the  OID  for&lt;br /&gt;
              the  result  varbind, the TYPE and the VALUE itself - exactly as&lt;br /&gt;
              for the pass directive above.  If the command cannot  return  an&lt;br /&gt;
              appropriate  varbind,  it  should print print &amp;quot;NONE\n&amp;quot; to stdout&lt;br /&gt;
              (but continue running).&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
One bit of information that is missing from the man page is the shutdown sequence employed. For example, when snmpd is stopping, how does it inform the pass-persist agents of that? Well, it sends a blank line to the agent, this signals that the agent should shut down. A sample script might look something like this - note, this is just proof of concept (does not implement getnext, for example):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/usr/bin/python -u&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;This is a python backend for snmp&amp;#039;s &amp;quot;pass_persist&amp;quot; function. It is critical&lt;br /&gt;
that the python interpreter be invoked with unbuffered STDIN and STDOUT by use&lt;br /&gt;
of the -u switch in the shebang line.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
import sys&lt;br /&gt;
from select import select&lt;br /&gt;
&lt;br /&gt;
def readStdin () :&lt;br /&gt;
  &amp;#039;&amp;#039;&amp;#039;Read from standard input. Use &amp;quot;select&amp;quot; to wait for new data&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
  (rr, wr, er) = select([sys.stdin], [], [])&lt;br /&gt;
  for fd in rr:&lt;br /&gt;
    line = fd.readline()&lt;br /&gt;
    processInput(line)&lt;br /&gt;
&lt;br /&gt;
def processInput (line) :&lt;br /&gt;
  &amp;#039;&amp;#039;&amp;#039;Examine input, call subroutines&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
  if line.strip() == &amp;#039;&amp;#039;:&lt;br /&gt;
    sys.exit(0)&lt;br /&gt;
  if &amp;#039;PING&amp;#039; in line :&lt;br /&gt;
    playPingPong()&lt;br /&gt;
  if &amp;#039;get&amp;#039; in line :&lt;br /&gt;
    target = sys.stdin.readline()&lt;br /&gt;
    doGet(target)&lt;br /&gt;
&lt;br /&gt;
def playPingPong () :&lt;br /&gt;
  &amp;#039;&amp;#039;&amp;#039;Perform the snmpd secret handshake&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
  print &amp;#039;PONG&amp;#039;&lt;br /&gt;
&lt;br /&gt;
def doGet(target) :&lt;br /&gt;
  &amp;#039;&amp;#039;&amp;#039;Process a &amp;quot;get&amp;quot; request&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
  print target,&lt;br /&gt;
  print &amp;#039;integer&amp;#039;&lt;br /&gt;
  print &amp;#039;42&amp;#039;&lt;br /&gt;
&lt;br /&gt;
# loop&lt;br /&gt;
while 1 : readStdin()&amp;lt;/pre&amp;gt;&lt;br /&gt;
Next, we add an entry in the snmpd config file, associating an SNMP OID tree with our script:&lt;br /&gt;
&amp;lt;pre&amp;gt;pass_persist .1.3.6.1.4.1.2021.255 /path/to/persist_test.py&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now let&amp;#039;s start snmpd in a debug mode, asking for details about the pass_persist backend:&lt;br /&gt;
&amp;lt;pre&amp;gt;snmpd -c /etc/snmpd.conf --logTimeStamp=true -f -Lf /tmp/snmpd.log \&lt;br /&gt;
-Ducd-snmp/pass_persist,ucd-snmp/pass,snmpd,output,helper:debug&amp;lt;/pre&amp;gt;&lt;br /&gt;
Tail that log file in one window, and make an snmp request in another.&lt;br /&gt;
&amp;lt;pre&amp;gt;snmpget -v 1 -c &amp;lt;community&amp;gt; localhost .1.3.6.1.4.1.2021.255.2&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the snmpd debug log, we see:&lt;br /&gt;
&amp;lt;pre&amp;gt;2007-06-29 16:06:09 ucd-snmp/pass_persist: open_persist_pipe(1,&amp;#039;/path/to/persist_test.py&amp;#039;)&lt;br /&gt;
2007-06-29 16:06:09 ucd-snmp/pass_persist: persistpass-sending:&lt;br /&gt;
get&lt;br /&gt;
.1.3.6.1.4.1.2021.255.2&amp;lt;/pre&amp;gt;&lt;br /&gt;
... and then a response to our snmp query:&lt;br /&gt;
&amp;lt;pre&amp;gt;UCD-SNMP-MIB::ucdavis.255.2 = INTEGER: 42&amp;lt;/pre&amp;gt;&lt;br /&gt;
Sweet!&lt;/div&gt;</summary>
		<author><name>Dre</name></author>	</entry>

	<entry>
		<id>https://dreness.com/wikimedia/index.php?title=Wow</id>
		<title>Wow</title>
		<link rel="alternate" type="text/html" href="https://dreness.com/wikimedia/index.php?title=Wow"/>
				<updated>2007-02-04T20:57:31Z</updated>
		
		<summary type="html">&lt;p&gt;Dre: /* Macros */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Macros=&lt;br /&gt;
(many of these are outdated)&lt;br /&gt;
&lt;br /&gt;
==Druid==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;innervate&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 #showtooltip&lt;br /&gt;
 /cast Innervate&lt;br /&gt;
 /script s, d, e = GetSpellCooldown(&amp;quot;Innervate&amp;quot;);&lt;br /&gt;
 /script if (s==0) then if (d==0) then SendChatMessage(&amp;quot;Innervate on %t!&amp;quot;, nil); end; else print(&amp;#039;cooldown?&amp;#039;); end&lt;br /&gt;
&lt;br /&gt;
==Offensive==&lt;br /&gt;
&lt;br /&gt;
&amp;quot;castsequence&amp;quot; is a great new addition to the macro language that lets you assign a sequence of things to a single key. Each press (after the global cooldown) gets you the next item in the list. When you hit the end, it automatically wraps back around. I also add a reset timer so that it jumps back to the beginning, because mana spring doesn&amp;#039;t last as long as the others, so I typically have to re-cast it more often. Also, the /shift means that reset is triggered after 25 seconds, or if I shift-click the macro button (allowing me to bypass the 25 second timer if I need to).&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;cast&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 /castsequence reset=25/shift Mana Spring Totem, Wrath of Air Totem, Totem of Wrath, Strength of Earth Totem&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;mele&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 /castsequence reset=25/shift Grace of Air Totem, Strength of Earth Totem, Healing Stream Totem, Totem of Wrath&lt;br /&gt;
&lt;br /&gt;
Adding a [button:2] clause acts as a conditional that is only true if the macro was invoked with (in this case) a right-click. Depending on your mouse, you may also have additional buttons (3, 4, 5). I right-click for a rank 1 when I  want to do is get the secondary effect of the spell (e.g. slow target, prevent stealth, interrupt spells, reveal stealthed players in mele range) without spending a lot of mana.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;chain&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 /cast [help, combat, button:2] Chain Heal; [help, nocombat, button:2] Chain Heal;&lt;br /&gt;
 [target=targettarget, help, combat, button:2] Chain Heal;&lt;br /&gt;
 [target=player, button:2] Chain Heal; Chain Lightning&lt;br /&gt;
&lt;br /&gt;
This is used for either a chain lightning or a chain heal. Normal click is chain lightning, but a right click gives it a hw like behavior (see below), but with chain heal instead of healing wave.&lt;br /&gt;
&lt;br /&gt;
==Defensive==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;hw&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 /cast [button:2] Nature&amp;#039;s Swiftness; [help, combat] Healing Wave; [help, nocombat] Healing Wave;&lt;br /&gt;
 [target=targettarget, help, combat] Healing Wave; [target=player] Healing Wave&lt;br /&gt;
I like this one a lot, but can&amp;#039;t take credit for writing it, though I did add the NS bit. Right click it to proc Nature&amp;#039;s Swiftness; left-click does one of the following: If your target is friendly, heal it (whether in combat or not). If your target&amp;#039;s target is friendly and you are in combat, heal your target&amp;#039;s target. This is the key clause here; it allows you to dps a target and also heal the target&amp;#039;s target (e.g. your tank or yourself) without changing your own target first. Finally, if none of the above is true, heal yourself. To get a fast heal, do a rapid right-click left-click... works great, and is so fast that nobody would have time to dispell the NS before the big heal pops.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;lhw&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 /cast [help, combat] Lesser Healing Wave; [help, nocombat] Lesser Healing Wave;&lt;br /&gt;
 [target=targettarget, help, combat] Lesser Healing Wave; [target=player] Lesser Healing Wave&lt;br /&gt;
&lt;br /&gt;
Same as above, but with lesser healing wave and without NS.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;st-hl&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 /cast War Stomp&lt;br /&gt;
 /target Jindi&lt;br /&gt;
 /cast Healing Wave&lt;br /&gt;
Normally I just use this for war stomp, but if I want a big heal after that, just keep pressing...&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;t-heal&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
This is a big insta-heal with both trinkets&lt;br /&gt;
 /use 13 &lt;br /&gt;
 /use 14 &lt;br /&gt;
 /cast Nature&amp;#039;s Swiftness &lt;br /&gt;
 /cast Healing Wave&lt;br /&gt;
&lt;br /&gt;
=Videography=&lt;br /&gt;
&lt;br /&gt;
==Camera Control==&lt;br /&gt;
&lt;br /&gt;
Nice camera moves are best achieved by the game itself, as it&amp;#039;s basically impossible to match the smooth motion curves with any sort of human input device. One way to do this is to use the camera presets. By default, the speed at which the camera moves between presets is pretty quick - good for in-game use, but not good for cinematic purposes. You can adjust the camera movement speed by altering the time duration of the transition, using a couple of cvars. They are:&lt;br /&gt;
&lt;br /&gt;
 cameraSmoothTimeMax&lt;br /&gt;
 cameraSmoothTimeMin&lt;br /&gt;
&lt;br /&gt;
* in a slash command context:&lt;br /&gt;
 /console SET cameraSmoothTimeMax 15.0&lt;br /&gt;
 /console SET cameraSmoothTimeMin 15.0&lt;br /&gt;
&lt;br /&gt;
* in a script context:&lt;br /&gt;
 SetCVar(&amp;quot;cameraSmoothTimeMax&amp;quot;,&amp;quot;15&amp;quot;)&lt;br /&gt;
 SetCVar(&amp;quot;cameraSmoothTimeMin&amp;quot;,&amp;quot;15&amp;quot;) &lt;br /&gt;
&lt;br /&gt;
* or you can set both at once using a function for ease-of-use. You&amp;#039;d need to slap this in a macro (or some existing mod) then execute it once to declare the function before you can use it. This function will let you more easily adjust the camera speed (less typing).&lt;br /&gt;
 /script function cam(s) SetCVar(&amp;quot;cameraSmoothTimeMax&amp;quot;,s) SetCVar(&amp;quot;cameraSmoothTimeMin&amp;quot;,s) end&lt;br /&gt;
&lt;br /&gt;
After running the above to declare the function, use the function as shown below. 10 is the duration of the camera preset transition in seconds, but it can be whatever you want. Awesome for videos :)&lt;br /&gt;
 /script cam(10)&lt;/div&gt;</summary>
		<author><name>Dre</name></author>	</entry>

	<entry>
		<id>https://dreness.com/wikimedia/index.php?title=Vi</id>
		<title>Vi</title>
		<link rel="alternate" type="text/html" href="https://dreness.com/wikimedia/index.php?title=Vi"/>
				<updated>2006-10-14T22:26:07Z</updated>
		
		<summary type="html">&lt;p&gt;Dre: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;range-based stuff:&lt;br /&gt;
&lt;br /&gt;
ma - sets marker a on current line&lt;br /&gt;
&lt;br /&gt;
mb - sets marker b on current line&lt;br /&gt;
&lt;br /&gt;
&amp;#039;a,&amp;#039;bs/foo/bar   sub foo to bar between marker a and b&lt;/div&gt;</summary>
		<author><name>Dre</name></author>	</entry>

	</feed>