[CalendarServer-changes] [218] PyKerberos/trunk/test.py
source_changes at macosforge.org
source_changes at macosforge.org
Thu Sep 28 11:59:53 PDT 2006
Revision: 218
http://trac.macosforge.org/projects/calendarserver/changeset/218
Author: wsanchez at apple.com
Date: 2006-09-28 11:59:53 -0700 (Thu, 28 Sep 2006)
Log Message:
-----------
Allow use of non APPLECONNECT.APPLE.COM realm in test.py.
Submitted by agx at honk.sigxcpu.org
Fixes #67
Modified Paths:
--------------
PyKerberos/trunk/test.py
Modified: PyKerberos/trunk/test.py
===================================================================
--- PyKerberos/trunk/test.py 2006-09-28 18:47:50 UTC (rev 217)
+++ PyKerberos/trunk/test.py 2006-09-28 18:59:53 UTC (rev 218)
@@ -28,10 +28,11 @@
pswd = ""
service = "http at caldav.apple.com"
host = "localhost"
+ realm ="APPLECONNECT.APPLE.COM"
port = 8008
ssl = False
- options, args = getopt.getopt(sys.argv[1:], "u:p:s:h:i:")
+ options, args = getopt.getopt(sys.argv[1:], "u:p:s:h:i:r:")
for option, value in options:
if option == "-u":
@@ -44,11 +45,13 @@
host = value
elif option == "-i":
port = value
+ elif option == "-r":
+ realm = value
# Run tests
if (len(user) != 0) and (len(pswd) != 0):
print "\n*** Running basic test"
- testCheckpassword(user, pswd)
+ testCheckpassword(user, pswd, service, realm)
else:
print "\n*** Skipping basic test: no user or password specified"
@@ -60,8 +63,8 @@
print "\n*** Done\n"
-def testCheckpassword(user, pswd):
- result = kerberos.checkPassword(user, pswd, "http/web.apple.com", "APPLECONNECT.APPLE.COM")
+def testCheckpassword(user, pswd, service, realm):
+ result = kerberos.checkPassword(user, pswd, service, realm)
if result:
print "Kerberos authentication for %s succeeded" % user
else:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20060928/13a94065/attachment.html
More information about the calendarserver-changes
mailing list