diff --git a/pysrc/kerberos.py b/pysrc/kerberos.py index 78b411d..f40f4e9 100644 --- a/pysrc/kerberos.py +++ b/pysrc/kerberos.py @@ -55,6 +55,16 @@ def checkPassword(user, pswd, service, default_realm): @return: True if authentication succeeds, False otherwise. """ +def getServerPrincipalDetails(service, hostname): + """ + This function returns the service principal for the server given a service type + and hostname. Details are looked up via the /etc/keytab file. + + @param service: a string containing the Kerberos service type for the server. + @param hostname: a string containing the hostname of the server. + @return: a string containing the service principal. + """ + """ GSSAPI Function Result Codes: diff --git a/src/kerberos.c b/src/kerberos.c index 0e2adf6..f73e65a 100644 --- a/src/kerberos.c +++ b/src/kerberos.c @@ -16,7 +16,7 @@ * DRI: Cyrus Daboo, cdaboo@apple.com **/ -#include +#include #include "kerberosbasic.h" #include "kerberosgss.h" @@ -44,6 +44,27 @@ static PyObject *checkPassword(PyObject *self, PyObject *args) return NULL; } +static PyObject *getServerPrincipalDetails(PyObject *self, PyObject *args) +{ + const char *service; + const char *hostname; + char* result; + + if (!PyArg_ParseTuple(args, "ss", &service, &hostname)) + return NULL; + + result = server_principal_details(service, hostname); + + if (result != NULL) + { + PyObject* pyresult = Py_BuildValue("s", result); + free(result); + return pyresult; + } + else + return NULL; +} + static PyObject *authGSSClientInit(PyObject *self, PyObject *args) { const char *service; @@ -231,6 +252,8 @@ static PyObject *authGSSServerUserName(PyObject *self, PyObject *args) static PyMethodDef KerberosMethods[] = { {"checkPassword", checkPassword, METH_VARARGS, "Check the supplied user/password against Kerberos KDC."}, + {"getServerPrincipalDetails", getServerPrincipalDetails, METH_VARARGS, + "Return the service principal for a given service and hostname."}, {"authGSSClientInit", authGSSClientInit, METH_VARARGS, "Initialize client-side GSSAPI operations."}, {"authGSSClientClean", authGSSClientClean, METH_VARARGS, diff --git a/src/kerberosgss.c b/src/kerberosgss.c index d85d3eb..c445caa 100644 --- a/src/kerberosgss.c +++ b/src/kerberosgss.c @@ -16,7 +16,7 @@ * DRI: Cyrus Daboo, cdaboo@apple.com **/ -#include +#include #include "kerberosgss.h" #include "base64.h" @@ -30,6 +30,76 @@ static void set_gss_error(OM_uint32 err_maj, OM_uint32 err_min); extern PyObject *GssException_class; extern PyObject *KrbException_class; +char* server_principal_details(const char* service, const char* hostname) +{ + char match[1024]; + int match_len = 0; + char* result = NULL; + + int code; + krb5_context kcontext; + krb5_keytab kt = NULL; + krb5_kt_cursor cursor = NULL; + krb5_keytab_entry entry; + char* pname = NULL; + + // Generate the principal prefix we want to match + snprintf(match, 1024, "%s/%s@", service, hostname); + match_len = strlen(match); + + code = krb5_init_context(&kcontext); + if (code) + { + PyErr_SetObject(KrbException_class, Py_BuildValue("((s:i))", + "Cannot initialize Kerberos5 context", code)); + return NULL; + } + + if ((code = krb5_kt_default(kcontext, &kt))) + { + PyErr_SetObject(KrbException_class, Py_BuildValue("((s:i))", + "Cannot get default keytab", code)); + goto end; + } + + if ((code = krb5_kt_start_seq_get(kcontext, kt, &cursor))) + { + PyErr_SetObject(KrbException_class, Py_BuildValue("((s:i))", + "Cannot get sequence cursor from keytab", code)); + goto end; + } + + while ((code = krb5_kt_next_entry(kcontext, kt, &entry, &cursor)) == 0) + { + if ((code = krb5_unparse_name(kcontext, entry.principal, &pname))) + { + PyErr_SetObject(KrbException_class, Py_BuildValue("((s:i))", + "Cannot parse principal name from keytab", code)); + goto end; + } + + if (strncmp(pname, match, match_len) == 0) + { + result = malloc(strlen(pname) + 1); + strcpy(result, pname); + krb5_free_unparsed_name(kcontext, pname); + break; + } + + krb5_free_unparsed_name(kcontext, pname); + krb5_free_keytab_entry_contents(kcontext, &entry); + } + +end: + if (cursor) + krb5_kt_end_seq_get(kcontext, kt, &cursor); + if (kt) + krb5_kt_close(kcontext, kt); + krb5_free_context(kcontext); + + return result; +} + int authenticate_gss_client_init(const char* service, gss_client_state *state) { OM_uint32 maj_stat; diff --git a/src/kerberosgss.h b/src/kerberosgss.h index bd6d9d1..118e634 100644 --- a/src/kerberosgss.h +++ b/src/kerberosgss.h @@ -43,6 +43,8 @@ typedef struct { char* response; } gss_server_state; +char* server_principal_details(const char* service, const char* hostname); + int authenticate_gss_client_init(const char* service, gss_client_state *state); int authenticate_gss_client_clean(gss_client_state *state); int authenticate_gss_client_step(gss_client_state *state, const char *challenge); diff --git a/support/PyKerberos.xcodeproj/cyrusdaboo.mode1v3 b/support/PyKerberos.xcodeproj/cyrusdaboo.mode1v3 new file mode 100644 index 0000000..20864d3 --- /dev/null +++ b/support/PyKerberos.xcodeproj/cyrusdaboo.mode1v3 @@ -0,0 +1,1370 @@ + + + + + ActivePerspectiveName + Project + AllowedModules + + + BundleLoadPath + + MaxInstances + n + Module + PBXSmartGroupTreeModule + Name + Groups and Files Outline View + + + BundleLoadPath + + MaxInstances + n + Module + PBXNavigatorGroup + Name + Editor + + + BundleLoadPath + + MaxInstances + n + Module + XCTaskListModule + Name + Task List + + + BundleLoadPath + + MaxInstances + n + Module + XCDetailModule + Name + File and Smart Group Detail Viewer + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXBuildResultsModule + Name + Detailed Build Results Viewer + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXProjectFindModule + Name + Project Batch Find Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXBookmarksModule + Name + Bookmarks Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXClassBrowserModule + Name + Class Browser + + + BundleLoadPath + + MaxInstances + n + Module + PBXCVSModule + Name + Source Code Control Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXDebugBreakpointsModule + Name + Debug Breakpoints Tool + + + BundleLoadPath + + MaxInstances + n + Module + XCDockableInspector + Name + Inspector + + + BundleLoadPath + + MaxInstances + n + Module + PBXOpenQuicklyModule + Name + Open Quickly Tool + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXDebugSessionModule + Name + Debugger + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXDebugCLIModule + Name + Debug Console + + + BundleLoadPath + + MaxInstances + n + Module + XCSnapshotModule + Name + Snapshots Tool + + + Description + DefaultDescriptionKey + DockingSystemVisible + + Extension + mode1v3 + FavBarConfig + + PBXProjectModuleGUID + AFDE37F40BB41E00008C037E + XCBarModuleItemNames + + XCBarModuleItems + + + FirstTimeWindowDisplayed + + Identifier + com.apple.perspectives.project.mode1v3 + MajorVersion + 32 + MinorVersion + 1 + Name + Default + Notifications + + OpenEditors + + PerspectiveWidths + + -1 + -1 + + Perspectives + + + ChosenToolbarItems + + active-target-popup + active-buildstyle-popup + action + NSToolbarFlexibleSpaceItem + buildOrClean + build-and-goOrGo + com.apple.ide.PBXToolbarStopButton + get-info + toggle-editor + NSToolbarFlexibleSpaceItem + com.apple.pbx.toolbar.searchfield + + ControllerClassBaseName + + IconName + WindowOfProjectWithEditor + Identifier + perspective.project + IsVertical + + Layout + + + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C37FBAC04509CD000000102 + 1C37FAAC04509CD000000102 + 1C08E77C0454961000C914BD + 1C37FABC05509CD000000102 + 1C37FABC05539CD112110102 + E2644B35053B69B200211256 + 1C37FABC04509CD000100104 + 1CC0EA4004350EF90044410B + 1CC0EA4004350EF90041110B + + PBXProjectModuleGUID + 1CE0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + yes + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 186 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 08FB7794FE84155DC02AAC07 + 08FB7795FE84155DC02AAC07 + AFDE38300BB41F71008C037E + 1C37FABC05509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 1 + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {186, 901}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + + XCSharingToken + com.apple.Xcode.GFSharingToken + + GeometryConfiguration + + Frame + {{0, 0}, {203, 919}} + GroupTreeTableConfiguration + + MainColumn + 186 + + RubberWindowFrame + 14 208 1260 960 0 0 1920 1178 + + Module + PBXSmartGroupTreeModule + Proportion + 203pt + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CE0B20306471E060097A5F4 + PBXProjectModuleLabel + main.c + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1CE0B20406471E060097A5F4 + PBXProjectModuleLabel + main.c + _historyCapacity + 0 + bookmark + AF4480DF0BB42E3C00408822 + history + + AFDE38870BB42287008C037E + AF4480AD0BB42BFD00408822 + AF4480CF0BB42D1700408822 + + prevStack + + AFDE38700BB420B1008C037E + AFDE388A0BB42287008C037E + AFDE388E0BB42287008C037E + AF4480AF0BB42BFD00408822 + AF4480B00BB42BFD00408822 + + + SplitCount + 1 + + StatusBarVisibility + + + GeometryConfiguration + + Frame + {{0, 0}, {1052, 556}} + RubberWindowFrame + 14 208 1260 960 0 0 1920 1178 + + Module + PBXNavigatorGroup + Proportion + 556pt + + + BecomeActive + + ContentConfiguration + + PBXProjectModuleGUID + 1CE0B20506471E060097A5F4 + PBXProjectModuleLabel + Detail + + GeometryConfiguration + + Frame + {{0, 561}, {1052, 358}} + RubberWindowFrame + 14 208 1260 960 0 0 1920 1178 + + Module + XCDetailModule + Proportion + 358pt + + + Proportion + 1052pt + + + Name + Project + ServiceClasses + + XCModuleDock + PBXSmartGroupTreeModule + XCModuleDock + PBXNavigatorGroup + XCDetailModule + + TableOfContents + + AF4480B20BB42BFD00408822 + 1CE0B1FE06471DED0097A5F4 + AF4480B30BB42BFD00408822 + 1CE0B20306471E060097A5F4 + 1CE0B20506471E060097A5F4 + + ToolbarConfiguration + xcode.toolbar.config.defaultV3 + + + ControllerClassBaseName + + IconName + WindowOfProject + Identifier + perspective.morph + IsVertical + 0 + Layout + + + BecomeActive + 1 + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C37FBAC04509CD000000102 + 1C37FAAC04509CD000000102 + 1C08E77C0454961000C914BD + 1C37FABC05509CD000000102 + 1C37FABC05539CD112110102 + E2644B35053B69B200211256 + 1C37FABC04509CD000100104 + 1CC0EA4004350EF90044410B + 1CC0EA4004350EF90041110B + + PBXProjectModuleGUID + 11E0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + yes + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 186 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 29B97314FDCFA39411CA2CEA + 1C37FABC05509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {186, 337}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + 1 + XCSharingToken + com.apple.Xcode.GFSharingToken + + GeometryConfiguration + + Frame + {{0, 0}, {203, 355}} + GroupTreeTableConfiguration + + MainColumn + 186 + + RubberWindowFrame + 373 269 690 397 0 0 1440 878 + + Module + PBXSmartGroupTreeModule + Proportion + 100% + + + Name + Morph + PreferredWidth + 300 + ServiceClasses + + XCModuleDock + PBXSmartGroupTreeModule + + TableOfContents + + 11E0B1FE06471DED0097A5F4 + + ToolbarConfiguration + xcode.toolbar.config.default.shortV3 + + + PerspectivesBarVisible + + ShelfIsVisible + + SourceDescription + file at '/System/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecificationMode1.xcperspec' + StatusbarIsVisible + + TimeStamp + 0.0 + ToolbarDisplayMode + 1 + ToolbarIsVisible + + ToolbarSizeMode + 1 + Type + Perspectives + UpdateMessage + The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the "Metro-Morph" feature). You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature. Do you wish to update to the latest Workspace defaults for project '%@'? + WindowJustification + 5 + WindowOrderList + + AF4480DB0BB42D9C00408822 + AF4480C70BB42CA000408822 + AF4480CA0BB42CA000408822 + AF4480B40BB42BFD00408822 + AF4480B70BB42BFD00408822 + AF4480B80BB42BFD00408822 + AF4480BA0BB42BFD00408822 + AF4480BB0BB42BFD00408822 + AF4480BC0BB42BFD00408822 + 1C78EAAD065D492600B07095 + AFDE38090BB41EA7008C037E + 1CD10A99069EF8BA00B06720 + AF4480BD0BB42BFD00408822 + AF4480BE0BB42BFD00408822 + /Users/cyrusdaboo/Documents/Development/Apple/eclipse/PyKerberos/support/PyKerberos.xcodeproj + + WindowString + 14 208 1260 960 0 0 1920 1178 + WindowToolsV3 + + + FirstTimeWindowDisplayed + + Identifier + windowTool.build + IsVertical + + Layout + + + Dock + + + BecomeActive + + ContentConfiguration + + PBXProjectModuleGUID + 1CD0528F0623707200166675 + PBXProjectModuleLabel + main.c + StatusBarVisibility + + + GeometryConfiguration + + Frame + {{0, 0}, {993, 324}} + RubberWindowFrame + 506 511 993 606 0 0 1920 1178 + + Module + PBXNavigatorGroup + Proportion + 324pt + + + ContentConfiguration + + PBXProjectModuleGUID + XCMainBuildResultsModuleGUID + PBXProjectModuleLabel + Build + XCBuildResultsTrigger_Collapse + 1021 + XCBuildResultsTrigger_Open + 1011 + + GeometryConfiguration + + Frame + {{0, 329}, {993, 236}} + RubberWindowFrame + 506 511 993 606 0 0 1920 1178 + + Module + PBXBuildResultsModule + Proportion + 236pt + + + Proportion + 565pt + + + Name + Build Results + ServiceClasses + + PBXBuildResultsModule + + StatusbarIsVisible + + TableOfContents + + AFDE38090BB41EA7008C037E + AF44809A0BB428F200408822 + 1CD0528F0623707200166675 + XCMainBuildResultsModuleGUID + + ToolbarConfiguration + xcode.toolbar.config.buildV3 + WindowString + 506 511 993 606 0 0 1920 1178 + WindowToolGUID + AFDE38090BB41EA7008C037E + WindowToolIsVisible + + + + FirstTimeWindowDisplayed + + Identifier + windowTool.debugger + IsVertical + + Layout + + + Dock + + + ContentConfiguration + + Debugger + + HorizontalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {477, 385}} + {{477, 0}, {568, 385}} + + + VerticalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {1045, 385}} + {{0, 385}, {1045, 371}} + + + + LauncherConfigVersion + 8 + PBXProjectModuleGUID + 1C162984064C10D400B95A72 + PBXProjectModuleLabel + Debug - GLUTExamples (Underwater) + + GeometryConfiguration + + DebugConsoleVisible + None + DebugConsoleWindowFrame + {{200, 200}, {500, 300}} + DebugSTDIOWindowFrame + {{200, 200}, {500, 300}} + Frame + {{0, 0}, {1045, 756}} + PBXDebugSessionStackFrameViewKey + + DebugVariablesTableConfiguration + + Name + 187 + Value + 85 + Summary + 271 + + Frame + {{477, 0}, {568, 385}} + RubberWindowFrame + 469 256 1045 797 0 0 1920 1178 + + RubberWindowFrame + 469 256 1045 797 0 0 1920 1178 + + Module + PBXDebugSessionModule + Proportion + 756pt + + + Proportion + 756pt + + + Name + Debugger + ServiceClasses + + PBXDebugSessionModule + + StatusbarIsVisible + + TableOfContents + + 1CD10A99069EF8BA00B06720 + AF44809B0BB428F200408822 + 1C162984064C10D400B95A72 + AF44809C0BB428F200408822 + AF44809D0BB428F200408822 + AF44809E0BB428F200408822 + AF44809F0BB428F200408822 + AF4480A00BB428F200408822 + + ToolbarConfiguration + xcode.toolbar.config.debugV3 + WindowString + 469 256 1045 797 0 0 1920 1178 + WindowToolGUID + 1CD10A99069EF8BA00B06720 + WindowToolIsVisible + + + + Identifier + windowTool.find + Layout + + + Dock + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CDD528C0622207200134675 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1CD0528D0623707200166675 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {781, 167}} + RubberWindowFrame + 62 385 781 470 0 0 1440 878 + + Module + PBXNavigatorGroup + Proportion + 781pt + + + Proportion + 50% + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1CD0528E0623707200166675 + PBXProjectModuleLabel + Project Find + + GeometryConfiguration + + Frame + {{8, 0}, {773, 254}} + RubberWindowFrame + 62 385 781 470 0 0 1440 878 + + Module + PBXProjectFindModule + Proportion + 50% + + + Proportion + 428pt + + + Name + Project Find + ServiceClasses + + PBXProjectFindModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C530D57069F1CE1000CFCEE + 1C530D58069F1CE1000CFCEE + 1C530D59069F1CE1000CFCEE + 1CDD528C0622207200134675 + 1C530D5A069F1CE1000CFCEE + 1CE0B1FE06471DED0097A5F4 + 1CD0528E0623707200166675 + + WindowString + 62 385 781 470 0 0 1440 878 + WindowToolGUID + 1C530D57069F1CE1000CFCEE + WindowToolIsVisible + 0 + + + Identifier + MENUSEPARATOR + + + FirstTimeWindowDisplayed + + Identifier + windowTool.debuggerConsole + IsVertical + + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1C78EAAC065D492600B07095 + PBXProjectModuleLabel + Debugger Console + + GeometryConfiguration + + Frame + {{0, 0}, {650, 358}} + RubberWindowFrame + 35 895 650 250 0 0 1920 1178 + + Module + PBXDebugCLIModule + Proportion + 358pt + + + Proportion + 209pt + + + Name + Debugger Console + ServiceClasses + + PBXDebugCLIModule + + StatusbarIsVisible + + TableOfContents + + 1C78EAAD065D492600B07095 + AF4480A10BB428F200408822 + 1C78EAAC065D492600B07095 + + ToolbarConfiguration + xcode.toolbar.config.consoleV3 + WindowString + 35 895 650 250 0 0 1920 1178 + WindowToolGUID + 1C78EAAD065D492600B07095 + WindowToolIsVisible + + + + Identifier + windowTool.snapshots + Layout + + + Dock + + + Module + XCSnapshotModule + Proportion + 100% + + + Proportion + 100% + + + Name + Snapshots + ServiceClasses + + XCSnapshotModule + + StatusbarIsVisible + Yes + ToolbarConfiguration + xcode.toolbar.config.snapshots + WindowString + 315 824 300 550 0 0 1440 878 + WindowToolIsVisible + Yes + + + Identifier + windowTool.scm + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1C78EAB2065D492600B07095 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1C78EAB3065D492600B07095 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {452, 0}} + RubberWindowFrame + 743 379 452 308 0 0 1280 1002 + + Module + PBXNavigatorGroup + Proportion + 0pt + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1CD052920623707200166675 + PBXProjectModuleLabel + SCM + + GeometryConfiguration + + ConsoleFrame + {{0, 259}, {452, 0}} + Frame + {{0, 7}, {452, 259}} + RubberWindowFrame + 743 379 452 308 0 0 1280 1002 + TableConfiguration + + Status + 30 + FileName + 199 + Path + 197.09500122070312 + + TableFrame + {{0, 0}, {452, 250}} + + Module + PBXCVSModule + Proportion + 262pt + + + Proportion + 266pt + + + Name + SCM + ServiceClasses + + PBXCVSModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C78EAB4065D492600B07095 + 1C78EAB5065D492600B07095 + 1C78EAB2065D492600B07095 + 1CD052920623707200166675 + + ToolbarConfiguration + xcode.toolbar.config.scm + WindowString + 743 379 452 308 0 0 1280 1002 + + + Identifier + windowTool.breakpoints + IsVertical + 0 + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C77FABC04509CD000000102 + + PBXProjectModuleGUID + 1CE0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + no + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 168 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 1C77FABC04509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {168, 350}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + 0 + + GeometryConfiguration + + Frame + {{0, 0}, {185, 368}} + GroupTreeTableConfiguration + + MainColumn + 168 + + RubberWindowFrame + 315 424 744 409 0 0 1440 878 + + Module + PBXSmartGroupTreeModule + Proportion + 185pt + + + ContentConfiguration + + PBXProjectModuleGUID + 1CA1AED706398EBD00589147 + PBXProjectModuleLabel + Detail + + GeometryConfiguration + + Frame + {{190, 0}, {554, 368}} + RubberWindowFrame + 315 424 744 409 0 0 1440 878 + + Module + XCDetailModule + Proportion + 554pt + + + Proportion + 368pt + + + MajorVersion + 3 + MinorVersion + 0 + Name + Breakpoints + ServiceClasses + + PBXSmartGroupTreeModule + XCDetailModule + + StatusbarIsVisible + 1 + TableOfContents + + 1CDDB66807F98D9800BB5817 + 1CDDB66907F98D9800BB5817 + 1CE0B1FE06471DED0097A5F4 + 1CA1AED706398EBD00589147 + + ToolbarConfiguration + xcode.toolbar.config.breakpointsV3 + WindowString + 315 424 744 409 0 0 1440 878 + WindowToolGUID + 1CDDB66807F98D9800BB5817 + WindowToolIsVisible + 1 + + + Identifier + windowTool.debugAnimator + Layout + + + Dock + + + Module + PBXNavigatorGroup + Proportion + 100% + + + Proportion + 100% + + + Name + Debug Visualizer + ServiceClasses + + PBXNavigatorGroup + + StatusbarIsVisible + 1 + ToolbarConfiguration + xcode.toolbar.config.debugAnimatorV3 + WindowString + 100 100 700 500 0 0 1280 1002 + + + Identifier + windowTool.bookmarks + Layout + + + Dock + + + Module + PBXBookmarksModule + Proportion + 100% + + + Proportion + 100% + + + Name + Bookmarks + ServiceClasses + + PBXBookmarksModule + + StatusbarIsVisible + 0 + WindowString + 538 42 401 187 0 0 1280 1002 + + + Identifier + windowTool.classBrowser + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + OptionsSetName + Hierarchy, all classes + PBXProjectModuleGUID + 1CA6456E063B45B4001379D8 + PBXProjectModuleLabel + Class Browser - NSObject + + GeometryConfiguration + + ClassesFrame + {{0, 0}, {374, 96}} + ClassesTreeTableConfiguration + + PBXClassNameColumnIdentifier + 208 + PBXClassBookColumnIdentifier + 22 + + Frame + {{0, 0}, {630, 331}} + MembersFrame + {{0, 105}, {374, 395}} + MembersTreeTableConfiguration + + PBXMemberTypeIconColumnIdentifier + 22 + PBXMemberNameColumnIdentifier + 216 + PBXMemberTypeColumnIdentifier + 97 + PBXMemberBookColumnIdentifier + 22 + + PBXModuleWindowStatusBarHidden2 + 1 + RubberWindowFrame + 385 179 630 352 0 0 1440 878 + + Module + PBXClassBrowserModule + Proportion + 332pt + + + Proportion + 332pt + + + Name + Class Browser + ServiceClasses + + PBXClassBrowserModule + + StatusbarIsVisible + 0 + TableOfContents + + 1C0AD2AF069F1E9B00FABCE6 + 1C0AD2B0069F1E9B00FABCE6 + 1CA6456E063B45B4001379D8 + + ToolbarConfiguration + xcode.toolbar.config.classbrowser + WindowString + 385 179 630 352 0 0 1440 878 + WindowToolGUID + 1C0AD2AF069F1E9B00FABCE6 + WindowToolIsVisible + 0 + + + Identifier + windowTool.refactoring + IncludeInToolsMenu + 0 + Layout + + + Dock + + + BecomeActive + 1 + GeometryConfiguration + + Frame + {0, 0}, {500, 335} + RubberWindowFrame + {0, 0}, {500, 335} + + Module + XCRefactoringModule + Proportion + 100% + + + Proportion + 100% + + + Name + Refactoring + ServiceClasses + + XCRefactoringModule + + WindowString + 200 200 500 356 0 0 1920 1200 + + + + diff --git a/support/PyKerberos.xcodeproj/cyrusdaboo.pbxuser b/support/PyKerberos.xcodeproj/cyrusdaboo.pbxuser new file mode 100644 index 0000000..47b4feb --- /dev/null +++ b/support/PyKerberos.xcodeproj/cyrusdaboo.pbxuser @@ -0,0 +1,323 @@ +// !$*UTF8*$! +{ + 08FB7793FE84155DC02AAC07 /* Project object */ = { + activeArchitecture = i386; + activeBuildConfigurationName = Debug; + activeExecutable = AFDE37EE0BB41DF9008C037E /* PyKerberos */; + activeTarget = 8DD76F620486A84900D96B5E /* PyKerberos */; + addToTargets = ( + 8DD76F620486A84900D96B5E /* PyKerberos */, + ); + breakpoints = ( + AF4480A50BB4292300408822 /* kerberosbasic.c:35 */, + AF4480C10BB42C1E00408822 /* kerberosbasic.c:92 */, + AF4480CD0BB42CFF00408822 /* main.c:18 */, + AF4480D80BB42D6100408822 /* kerberosgss.c:253 */, + ); + codeSenseManager = AFDE37F60BB41E00008C037E /* Code sense */; + executables = ( + AFDE37EE0BB41DF9008C037E /* PyKerberos */, + ); + perUserDictionary = { + PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = { + PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; + PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; + PBXFileTableDataSourceColumnWidthsKey = ( + 20, + 813, + 20, + 48, + 43, + 43, + 20, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXFileDataSource_FiletypeID, + PBXFileDataSource_Filename_ColumnID, + PBXFileDataSource_Built_ColumnID, + PBXFileDataSource_ObjectSize_ColumnID, + PBXFileDataSource_Errors_ColumnID, + PBXFileDataSource_Warnings_ColumnID, + PBXFileDataSource_Target_ColumnID, + ); + }; + PBXPerProjectTemplateStateSaveDate = 196357790; + PBXWorkspaceStateSaveDate = 196357790; + }; + perUserProjectItems = { + AF4480AD0BB42BFD00408822 = AF4480AD0BB42BFD00408822 /* PBXTextBookmark */; + AF4480AF0BB42BFD00408822 = AF4480AF0BB42BFD00408822 /* PBXTextBookmark */; + AF4480B00BB42BFD00408822 = AF4480B00BB42BFD00408822 /* PBXTextBookmark */; + AF4480CF0BB42D1700408822 = AF4480CF0BB42D1700408822 /* PBXTextBookmark */; + AF4480DF0BB42E3C00408822 = AF4480DF0BB42E3C00408822 /* PBXTextBookmark */; + AFDE38700BB420B1008C037E = AFDE38700BB420B1008C037E /* PBXTextBookmark */; + AFDE38870BB42287008C037E = AFDE38870BB42287008C037E /* PBXTextBookmark */; + AFDE388A0BB42287008C037E = AFDE388A0BB42287008C037E /* PBXTextBookmark */; + AFDE388E0BB42287008C037E = AFDE388E0BB42287008C037E /* PBXTextBookmark */; + }; + sourceControlManager = AFDE37F50BB41E00008C037E /* Source Control */; + userBuildSettings = { + }; + }; + 08FB7796FE84155DC02AAC07 /* main.c */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {984, 322}}"; + sepNavSelRange = "{420, 0}"; + sepNavVisRect = "{{0, 0}, {984, 308}}"; + sepNavWindowFrame = "{{485, -20}, {1395, 1160}}"; + }; + }; + 8DD76F620486A84900D96B5E /* PyKerberos */ = { + activeExec = 0; + executables = ( + AFDE37EE0BB41DF9008C037E /* PyKerberos */, + ); + }; + AF4480A50BB4292300408822 /* kerberosbasic.c:35 */ = { + isa = PBXFileBreakpoint; + actions = ( + ); + breakpointStyle = 0; + continueAfterActions = 0; + countType = 0; + delayBeforeContinue = 0; + fileReference = AFDE37FA0BB41E1D008C037E /* kerberosbasic.c */; + functionName = "authenticate_user_krb5pwd(const char *user, const char *pswd, const char *service, const char *default_realm)"; + hitCount = 0; + ignoreCount = 0; + lineNumber = 35; + location = kerberosbasic.ob; + modificationTime = 196358061.544823; + state = 1; + }; + AF4480AD0BB42BFD00408822 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = AFDE37FC0BB41E1D008C037E /* kerberosgss.c */; + name = "kerberosgss.c: 47"; + rLen = 0; + rLoc = 1285; + rType = 0; + vrLen = 930; + vrLoc = 867; + }; + AF4480AF0BB42BFD00408822 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 08FB7796FE84155DC02AAC07 /* main.c */; + name = "main.c: 4"; + rLen = 0; + rLoc = 45; + rType = 0; + vrLen = 405; + vrLoc = 0; + }; + AF4480B00BB42BFD00408822 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = AFDE37FC0BB41E1D008C037E /* kerberosgss.c */; + name = "kerberosgss.c: 47"; + rLen = 0; + rLoc = 1285; + rType = 0; + vrLen = 930; + vrLoc = 867; + }; + AF4480C10BB42C1E00408822 /* kerberosbasic.c:92 */ = { + isa = PBXFileBreakpoint; + actions = ( + ); + breakpointStyle = 0; + continueAfterActions = 0; + countType = 0; + delayBeforeContinue = 0; + fileReference = AFDE37FA0BB41E1D008C037E /* kerberosbasic.c */; + functionName = "authenticate_user_krb5pwd(const char *user, const char *pswd, const char *service, const char *default_realm)"; + hitCount = 0; + ignoreCount = 0; + lineNumber = 92; + location = kerberosbasic.ob; + modificationTime = 196358061.544839; + state = 1; + }; + AF4480CD0BB42CFF00408822 /* main.c:18 */ = { + isa = PBXFileBreakpoint; + actions = ( + ); + breakpointStyle = 0; + continueAfterActions = 0; + countType = 0; + delayBeforeContinue = 0; + fileReference = 08FB7796FE84155DC02AAC07 /* main.c */; + functionName = "main (int argc, char * const argv[])"; + hitCount = 1; + ignoreCount = 0; + lineNumber = 18; + location = main.ob; + modificationTime = 196358037.390216; + state = 1; + }; + AF4480CF0BB42D1700408822 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + comments = "error: syntax error before 'gss_server_state'"; + fRef = 08FB7796FE84155DC02AAC07 /* main.c */; + rLen = 1; + rLoc = 17; + rType = 1; + }; + AF4480D80BB42D6100408822 /* kerberosgss.c:253 */ = { + isa = PBXFileBreakpoint; + actions = ( + ); + breakpointStyle = 0; + continueAfterActions = 0; + countType = 0; + delayBeforeContinue = 0; + fileReference = AFDE37FC0BB41E1D008C037E /* kerberosgss.c */; + functionName = "authenticate_gss_server_init(const char* service, gss_server_state *state)"; + hitCount = 0; + ignoreCount = 0; + lineNumber = 253; + location = kerberosgss.ob; + modificationTime = 196358037.343018; + state = 1; + }; + AF4480DF0BB42E3C00408822 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 08FB7796FE84155DC02AAC07 /* main.c */; + name = "main.c: 18"; + rLen = 0; + rLoc = 511; + rType = 0; + vrLen = 584; + vrLoc = 0; + }; + AFDE37EE0BB41DF9008C037E /* PyKerberos */ = { + isa = PBXExecutable; + activeArgIndex = 2147483647; + activeArgIndices = ( + ); + argumentStrings = ( + ); + autoAttachOnCrash = 1; + breakpointsEnabled = 1; + configStateDict = { + }; + customDataFormattersEnabled = 1; + debuggerPlugin = GDBDebugging; + disassemblyDisplayState = 0; + dylibVariantSuffix = ""; + enableDebugStr = 1; + environmentEntries = ( + ); + executableSystemSymbolLevel = 0; + executableUserSymbolLevel = 0; + libgmallocEnabled = 0; + name = PyKerberos; + savedGlobals = { + }; + sourceDirectories = ( + ); + variableFormatDictionary = { + }; + }; + AFDE37F50BB41E00008C037E /* Source Control */ = { + isa = PBXSourceControlManager; + fallbackIsa = XCSourceControlManager; + isSCMEnabled = 0; + scmConfiguration = { + }; + }; + AFDE37F60BB41E00008C037E /* Code sense */ = { + isa = PBXCodeSenseManager; + indexTemplatePath = ""; + }; + AFDE37F80BB41E1D008C037E /* base64.c */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {991, 1316}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRect = "{{0, 437}, {991, 524}}"; + }; + }; + AFDE37FA0BB41E1D008C037E /* kerberosbasic.c */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {984, 2142}}"; + sepNavSelRange = "{1171, 0}"; + sepNavVisRect = "{{0, 325}, {984, 316}}"; + }; + }; + AFDE37FB0BB41E1D008C037E /* kerberosbasic.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {1336, 1031}}"; + sepNavSelRange = "{824, 115}"; + sepNavVisRect = "{{0, 0}, {1336, 1031}}"; + sepNavWindowFrame = "{{15, 13}, {1395, 1160}}"; + }; + }; + AFDE37FC0BB41E1D008C037E /* kerberosgss.c */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {984, 4550}}"; + sepNavSelRange = "{7491, 0}"; + sepNavVisRect = "{{0, 2485}, {984, 308}}"; + }; + }; + AFDE37FD0BB41E1D008C037E /* kerberosgss.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {1336, 1031}}"; + sepNavSelRange = "{1553, 140}"; + sepNavVisRect = "{{0, 0}, {1336, 1031}}"; + sepNavWindowFrame = "{{15, 13}, {1395, 1160}}"; + }; + }; + AFDE383A0BB41FFA008C037E /* kerberos.c */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {932, 2282}}"; + sepNavSelRange = "{690, 0}"; + sepNavVisRect = "{{0, 0}, {932, 292}}"; + }; + }; + AFDE38700BB420B1008C037E /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 08FB7796FE84155DC02AAC07 /* main.c */; + name = "main.cpp: 9"; + rLen = 0; + rLoc = 155; + rType = 0; + vrLen = 249; + vrLoc = 0; + }; + AFDE38720BB420B1008C037E /* iostream */ = { + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.h; + name = iostream; + path = "/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/iostream"; + sourceTree = ""; + }; + AFDE38870BB42287008C037E /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = AFDE38720BB420B1008C037E /* iostream */; + name = "iostream: 76"; + rLen = 0; + rLoc = 2873; + rType = 0; + vrLen = 1307; + vrLoc = 1651; + }; + AFDE388A0BB42287008C037E /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = AFDE38720BB420B1008C037E /* iostream */; + name = "iostream: 76"; + rLen = 0; + rLoc = 2873; + rType = 0; + vrLen = 1307; + vrLoc = 1651; + }; + AFDE388E0BB42287008C037E /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = AFDE37FC0BB41E1D008C037E /* kerberosgss.c */; + name = "kerberosgss.c: 47"; + rLen = 0; + rLoc = 1290; + rType = 0; + vrLen = 1144; + vrLoc = 1097; + }; +} diff --git a/support/PyKerberos.xcodeproj/project.pbxproj b/support/PyKerberos.xcodeproj/project.pbxproj new file mode 100644 index 0000000..d878e92 --- /dev/null +++ b/support/PyKerberos.xcodeproj/project.pbxproj @@ -0,0 +1,245 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 42; + objects = { + +/* Begin PBXBuildFile section */ + 8DD76F650486A84900D96B5E /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = 08FB7796FE84155DC02AAC07 /* main.c */; settings = {ATTRIBUTES = (); }; }; + 8DD76F6A0486A84900D96B5E /* PyKerberos.1 in CopyFiles */ = {isa = PBXBuildFile; fileRef = C6859E8B029090EE04C91782 /* PyKerberos.1 */; }; + AFDE37FE0BB41E1D008C037E /* base64.c in Sources */ = {isa = PBXBuildFile; fileRef = AFDE37F80BB41E1D008C037E /* base64.c */; }; + AFDE37FF0BB41E1D008C037E /* kerberosbasic.c in Sources */ = {isa = PBXBuildFile; fileRef = AFDE37FA0BB41E1D008C037E /* kerberosbasic.c */; }; + AFDE38000BB41E1D008C037E /* kerberosgss.c in Sources */ = {isa = PBXBuildFile; fileRef = AFDE37FC0BB41E1D008C037E /* kerberosgss.c */; }; + AFDE380C0BB41EB7008C037E /* Python.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AFDE380B0BB41EB7008C037E /* Python.framework */; }; + AFDE38340BB41FCE008C037E /* Kerberos.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AFDE38330BB41FCE008C037E /* Kerberos.framework */; }; + AFDE383B0BB41FFA008C037E /* kerberos.c in Sources */ = {isa = PBXBuildFile; fileRef = AFDE383A0BB41FFA008C037E /* kerberos.c */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 8DD76F690486A84900D96B5E /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 8; + dstPath = /usr/share/man/man1/; + dstSubfolderSpec = 0; + files = ( + 8DD76F6A0486A84900D96B5E /* PyKerberos.1 in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 1; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 08FB7796FE84155DC02AAC07 /* main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = ""; }; + 8DD76F6C0486A84900D96B5E /* PyKerberos */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = PyKerberos; sourceTree = BUILT_PRODUCTS_DIR; }; + AFDE37F80BB41E1D008C037E /* base64.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = base64.c; path = ../src/base64.c; sourceTree = SOURCE_ROOT; }; + AFDE37F90BB41E1D008C037E /* base64.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = base64.h; path = ../src/base64.h; sourceTree = SOURCE_ROOT; }; + AFDE37FA0BB41E1D008C037E /* kerberosbasic.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = kerberosbasic.c; path = ../src/kerberosbasic.c; sourceTree = SOURCE_ROOT; }; + AFDE37FB0BB41E1D008C037E /* kerberosbasic.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = kerberosbasic.h; path = ../src/kerberosbasic.h; sourceTree = SOURCE_ROOT; }; + AFDE37FC0BB41E1D008C037E /* kerberosgss.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = kerberosgss.c; path = ../src/kerberosgss.c; sourceTree = SOURCE_ROOT; }; + AFDE37FD0BB41E1D008C037E /* kerberosgss.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = kerberosgss.h; path = ../src/kerberosgss.h; sourceTree = SOURCE_ROOT; }; + AFDE380B0BB41EB7008C037E /* Python.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Python.framework; path = /System/Library/Frameworks/Python.framework; sourceTree = ""; }; + AFDE38330BB41FCE008C037E /* Kerberos.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Kerberos.framework; path = /System/Library/Frameworks/Kerberos.framework; sourceTree = ""; }; + AFDE383A0BB41FFA008C037E /* kerberos.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = kerberos.c; path = ../src/kerberos.c; sourceTree = SOURCE_ROOT; }; + C6859E8B029090EE04C91782 /* PyKerberos.1 */ = {isa = PBXFileReference; lastKnownFileType = text.man; path = PyKerberos.1; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8DD76F660486A84900D96B5E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + AFDE380C0BB41EB7008C037E /* Python.framework in Frameworks */, + AFDE38340BB41FCE008C037E /* Kerberos.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 08FB7794FE84155DC02AAC07 /* PyKerberos */ = { + isa = PBXGroup; + children = ( + 08FB7795FE84155DC02AAC07 /* Source */, + AFDE38300BB41F71008C037E /* Frameworks */, + C6859E8C029090F304C91782 /* Documentation */, + 1AB674ADFE9D54B511CA2CBB /* Products */, + ); + name = PyKerberos; + sourceTree = ""; + }; + 08FB7795FE84155DC02AAC07 /* Source */ = { + isa = PBXGroup; + children = ( + AFDE383A0BB41FFA008C037E /* kerberos.c */, + AFDE37F80BB41E1D008C037E /* base64.c */, + AFDE37F90BB41E1D008C037E /* base64.h */, + AFDE37FA0BB41E1D008C037E /* kerberosbasic.c */, + AFDE37FB0BB41E1D008C037E /* kerberosbasic.h */, + AFDE37FC0BB41E1D008C037E /* kerberosgss.c */, + AFDE37FD0BB41E1D008C037E /* kerberosgss.h */, + 08FB7796FE84155DC02AAC07 /* main.c */, + ); + name = Source; + sourceTree = ""; + }; + 1AB674ADFE9D54B511CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8DD76F6C0486A84900D96B5E /* PyKerberos */, + ); + name = Products; + sourceTree = ""; + }; + AFDE38300BB41F71008C037E /* Frameworks */ = { + isa = PBXGroup; + children = ( + AFDE38330BB41FCE008C037E /* Kerberos.framework */, + AFDE380B0BB41EB7008C037E /* Python.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + C6859E8C029090F304C91782 /* Documentation */ = { + isa = PBXGroup; + children = ( + C6859E8B029090EE04C91782 /* PyKerberos.1 */, + ); + name = Documentation; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8DD76F620486A84900D96B5E /* PyKerberos */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "PyKerberos" */; + buildPhases = ( + 8DD76F640486A84900D96B5E /* Sources */, + 8DD76F660486A84900D96B5E /* Frameworks */, + 8DD76F690486A84900D96B5E /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = PyKerberos; + productInstallPath = "$(HOME)/bin"; + productName = PyKerberos; + productReference = 8DD76F6C0486A84900D96B5E /* PyKerberos */; + productType = "com.apple.product-type.tool"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 08FB7793FE84155DC02AAC07 /* Project object */ = { + isa = PBXProject; + buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "PyKerberos" */; + compatibilityVersion = "Xcode 3.0"; + hasScannedForEncodings = 1; + mainGroup = 08FB7794FE84155DC02AAC07 /* PyKerberos */; + projectDirPath = ""; + projectRoot = ""; + shouldCheckCompatibility = 1; + targets = ( + 8DD76F620486A84900D96B5E /* PyKerberos */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 8DD76F640486A84900D96B5E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8DD76F650486A84900D96B5E /* main.c in Sources */, + AFDE37FE0BB41E1D008C037E /* base64.c in Sources */, + AFDE37FF0BB41E1D008C037E /* kerberosbasic.c in Sources */, + AFDE38000BB41E1D008C037E /* kerberosgss.c in Sources */, + AFDE383B0BB41FFA008C037E /* kerberos.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 1DEB923208733DC60010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "_GLIBCXX_DEBUG=1", + "_GLIBCXX_DEBUG_PEDANTIC=1", + ); + INSTALL_PATH = /usr/local/bin; + PRODUCT_NAME = PyKerberos; + ZERO_LINK = YES; + }; + name = Debug; + }; + 1DEB923308733DC60010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + ppc, + i386, + ); + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_MODEL_TUNING = G5; + INSTALL_PATH = /usr/local/bin; + PRODUCT_NAME = PyKerberos; + }; + name = Release; + }; + 1DEB923608733DC60010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PREBINDING = NO; + SDKROOT = /Developer/SDKs/MacOSX10.5.sdk; + }; + name = Debug; + }; + 1DEB923708733DC60010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ""; + PREBINDING = NO; + SDKROOT = /Developer/SDKs/MacOSX10.5.sdk; + USER_HEADER_SEARCH_PATHS = ..src; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "PyKerberos" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB923208733DC60010E9CD /* Debug */, + 1DEB923308733DC60010E9CD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "PyKerberos" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB923608733DC60010E9CD /* Debug */, + 1DEB923708733DC60010E9CD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; +} diff --git a/support/main.c b/support/main.c new file mode 100644 index 0000000..2a656ba --- /dev/null +++ b/support/main.c @@ -0,0 +1,22 @@ + +#include "kerberosgss.h" + +#include "stdio.h" + +int main (int argc, char * const argv[]) { + + int code = 0; + char* service = 0L; + gss_server_state state; + + service = server_principal_details("http", "caldav.corp.apple.com"); + + //printf("Got service principal: %s\n", result); + + //code = authenticate_user_krb5pwd("x", "x", "http/caldav.corp.apple.com@CALDAV.CORP.APPLE.COM", "CALDAV.CORP.APPLE.COM"); + + code = authenticate_gss_server_init("http@CALDAV.CORP.APPLE.COM", &state); + code = authenticate_gss_server_clean(&state); + + return 0; +} diff --git a/test.py b/test.py index 34ff7cf..33b135e 100644 --- a/test.py +++ b/test.py @@ -26,9 +26,9 @@ def main(): # Extract arguments user = "" pswd = "" - service = "http@caldav.apple.com" - host = "localhost" - realm ="APPLECONNECT.APPLE.COM" + service = "http@CALDAV.CORP.APPLE.COM" + host = "caldav.corp.apple.com" + realm ="CALDAV.CORP.APPLE.COM" port = 8008 ssl = False @@ -48,6 +48,10 @@ def main(): elif option == "-r": realm = value + # Get service principal + print "\n*** Running Service Principal test" + testServicePrincipal("http", "caldav.corp.apple.com"); + # Run tests if (len(user) != 0) and (len(pswd) != 0): print "\n*** Running basic test" @@ -63,6 +67,14 @@ def main(): print "\n*** Done\n" +def testServicePrincipal(service, hostname): + try: + result = kerberos.getServerPrincipalDetails(service, hostname) + except kerberos.KrbError, e: + print "Kerberos service principal for %s/%s failed: %s" % (service, hostname, e[0]) + else: + print "Kerberos service principal for %s/%s succeeded: %s" % (service, hostname, result) + def testCheckpassword(user, pswd, service, realm): try: kerberos.checkPassword(user, pswd, service, realm) @@ -80,12 +92,12 @@ def statusText(r): else: return "Error" - rc, vc = kerberos.authGSSClientInit(service); + rc, vc = kerberos.authGSSClientInit("http/caldav.corp.apple.com@CALDAV.CORP.APPLE.COM"); print "Status for authGSSClientInit = %s" % statusText(rc); if rc != 1: return - rs, vs = kerberos.authGSSServerInit(service); + rs, vs = kerberos.authGSSServerInit("http@CALDAV.CORP.APPLE.COM"); print "Status for authGSSServerInit = %s" % statusText(rs); if rs != 1: return