[CalendarServer-changes] [6656] PyOpenDirectory/trunk

source_changes at macosforge.org source_changes at macosforge.org
Mon Nov 29 10:52:48 PST 2010


Revision: 6656
          http://trac.macosforge.org/projects/calendarserver/changeset/6656
Author:   wsanchez at apple.com
Date:     2010-11-29 10:52:44 -0800 (Mon, 29 Nov 2010)
Log Message:
-----------
Remove ActiveDirectory methods.

Modified Paths:
--------------
    PyOpenDirectory/trunk/pysrc/opendirectory.py
    PyOpenDirectory/trunk/src/PythonWrapper.cpp

Modified: PyOpenDirectory/trunk/pysrc/opendirectory.py
===================================================================
--- PyOpenDirectory/trunk/pysrc/opendirectory.py	2010-11-19 22:05:52 UTC (rev 6655)
+++ PyOpenDirectory/trunk/pysrc/opendirectory.py	2010-11-29 18:52:44 UTC (rev 6656)
@@ -166,27 +166,7 @@
     @param method: C{str} the HTTP method being used.
     @return: C{True} if the user was found, C{False} otherwise.
     """
-def authenticateUserDigestToActiveDirectory(obj, nodename, user, response):
-    """
-    Authenticate using HTTP Digest credentials to an Active Directory node, 
-    exported by Open Diretory
-    
-    @param obj: C{object} the object obtained from an odInit call.
-    @param nodename: C{str} the directory nodename for the record to check.
-    @param user: C{str} the user identifier/directory record name to check.
-    @param response: C{str} the HTTP response sent from the client.
-    @return: C{True} if the user was found, C{False} otherwise.
-    """
 
-def getDigestMD5ChallengeFromActiveDirectory(obj, nodename):
-    """
-    Get an DigestMD5 challenge from Active Directory
-    
-    @param obj: C{object} the object obtained from an odInit call.
-    @param nodename: C{str} the directory nodename for the record to check.
-    @return: C{string} containing the challenge
-    """
-
 class ODError(Exception):
     """
     Exceptions from DirectoryServices errors.

Modified: PyOpenDirectory/trunk/src/PythonWrapper.cpp
===================================================================
--- PyOpenDirectory/trunk/src/PythonWrapper.cpp	2010-11-19 22:05:52 UTC (rev 6655)
+++ PyOpenDirectory/trunk/src/PythonWrapper.cpp	2010-11-29 18:52:44 UTC (rev 6656)
@@ -957,92 +957,6 @@
     return NULL;
 }
 
-/*
-def authenticateUserDigestToActiveDirectory(obj, nodename, user, challenge, response):
-    """
-    Authenticate using HTTP Digest credentials to an Active Directory node (exported by Open Directory).
-
-    @param obj: C{object} the object obtained from an odInit call.
-    @param nodename: C{str} the directory nodename for the record to check.
-    @param user: C{str} the user identifier/directory record name to check.
-    @param response: C{str} the HTTP response sent from the client.
-    @return: C{True} if the user was found, C{False} otherwise.
-    """
- */
-extern "C" PyObject *authenticateUserDigestToActiveDirectory(PyObject *self, PyObject *args)
-{
-    PyObject* pyds;
-    const char* nodename;
-    const char* user;
-    const char* response;
-    if (!PyArg_ParseTuple(args, "Osss", &pyds, &nodename, &user, &response) || !PyCObject_Check(pyds))
-    {
-        PyErr_SetObject(ODException_class, Py_BuildValue("((s:i))", "DirectoryServices authenticateUserDigestToActiveDirectory: could not parse arguments", 0));
-        return NULL;
-    }
-
-    CDirectoryServiceManager* dsmgr = static_cast<CDirectoryServiceManager*>(PyCObject_AsVoidPtr(pyds));
-    if (dsmgr != NULL)
-    {
-        CDirectoryServiceAuth* ds = dsmgr->GetAuthService();
-        bool result = false;
-        bool authresult = false;
-        result = ds->AuthenticateUserDigestToActiveDirectory(nodename, user, response, authresult);
-        if (result)
-        {
-            if (authresult)
-                Py_RETURN_TRUE;
-            else
-                Py_RETURN_FALSE;
-        }
-    }
-    else
-        PyErr_SetObject(ODException_class, Py_BuildValue("((s:i))", "DirectoryServices authenticateUserDigestToActiveDirectory: invalid directory service argument", 0));
-
-    return NULL;
-}
-
-/*
-def getDigestMD5ChallengeFromActiveDirectory(obj, nodename, user ):
-    """
-    Get the Digest MD5 challenge (a.k.a. a nonce) from an Active Directory node (exported by Open Directory).
-
-    @param obj: C{object} the object obtained from an odInit call.
-    @param nodename: C{str} the directory nodename for the record to check.
-    @param user: C{str} the user identifier/directory record name to check.
-    @return: C{string} containing the AD server-generated challange.
-    """
- */
-extern "C" PyObject *getDigestMD5ChallengeFromActiveDirectory(PyObject *self, PyObject *args)
-{
-    PyObject* pyds;
-    const char* nodename;
-    if (!PyArg_ParseTuple(args, "Os", &pyds, &nodename) || !PyCObject_Check(pyds))
-    {
-        PyErr_SetObject(ODException_class, Py_BuildValue("((s:i))", "DirectoryServices authenticateUserDigestToActiveDirectory: could not parse arguments", 0));
-        return NULL;
-    }
-
-    CDirectoryServiceManager* dsmgr = static_cast<CDirectoryServiceManager*>(PyCObject_AsVoidPtr(pyds));
-    if (dsmgr != NULL)
-    {
-        CDirectoryServiceAuth* ds = dsmgr->GetAuthService();
-        CFStringRef challenge = NULL;
-        challenge = ds->GetDigestMD5ChallengeFromActiveDirectory(nodename);
-        if (challenge != NULL)
-        {
-			PyObject* result = CFStringToPyStr(challenge);
-            CFRelease(challenge);
-
-            return result;
-        }
-    }
-    else
-        PyErr_SetObject(ODException_class, Py_BuildValue("((s:i))", "DirectoryServices authenticateUserDigestToActiveDirectory: invalid directory service argument", 0));
-
-    return NULL;
-}
-
 static PyMethodDef ODMethods[] = {
     {"odInit",  odInit, METH_VARARGS,
         "Initialize the Open Directory system."},
@@ -1066,10 +980,6 @@
         "Authenticate a user with a password to Open Directory using plain text authentication."},
     {"authenticateUserDigest",  authenticateUserDigest, METH_VARARGS,
         "Authenticate a user with a password to Open Directory using HTTP DIGEST authentication."},
-    {"authenticateUserDigestToActiveDirectory",  authenticateUserDigestToActiveDirectory, METH_VARARGS,
-        "Authenticate a user with a password to an Active Directory node (exported by Open Directory) using HTTP DIGEST authentication."},
-    {"getDigestMD5ChallengeFromActiveDirectory",  getDigestMD5ChallengeFromActiveDirectory, METH_VARARGS,
-        "Get a Digest MD5 challange (a.k.a. a nonce) from an Active Directory node (exported by Open Directory)."},
     {NULL, NULL, 0, NULL}        /* Sentinel */
 };
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20101129/aacf93b5/attachment.html>


More information about the calendarserver-changes mailing list