svn commit: samba r26057 - in branches/4.0-python: . source/auth
source/auth/credentials source/auth/credentials/tests
jelmer at samba.org
jelmer at samba.org
Tue Nov 20 11:40:34 GMT 2007
Author: jelmer
Date: 2007-11-20 11:40:34 +0000 (Tue, 20 Nov 2007)
New Revision: 26057
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=26057
Log:
Support parse_string.
Modified:
branches/4.0-python/
branches/4.0-python/source/auth/auth_sam.c
branches/4.0-python/source/auth/credentials/credentials.i
branches/4.0-python/source/auth/credentials/tests/bindings.py
Changeset:
Property changes on: branches/4.0-python
___________________________________________________________________
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...
Modified: branches/4.0-python/source/auth/auth_sam.c
===================================================================
--- branches/4.0-python/source/auth/auth_sam.c 2007-11-20 11:40:31 UTC (rev 26056)
+++ branches/4.0-python/source/auth/auth_sam.c 2007-11-20 11:40:34 UTC (rev 26057)
@@ -28,6 +28,7 @@
#include "auth/auth_util.h"
#include "auth/auth_sam.h"
#include "dsdb/samdb/samdb.h"
+#include "dsdb/samdb/util.h"
#include "libcli/security/security.h"
#include "libcli/ldap/ldap.h"
#include "param/param.h"
Modified: branches/4.0-python/source/auth/credentials/credentials.i
===================================================================
--- branches/4.0-python/source/auth/credentials/credentials.i 2007-11-20 11:40:31 UTC (rev 26056)
+++ branches/4.0-python/source/auth/credentials/credentials.i 2007-11-20 11:40:34 UTC (rev 26057)
@@ -64,5 +64,8 @@
const char *get_realm(void);
bool set_realm(const char *val,
enum credentials_obtained=CRED_SPECIFIED);
+
+ void parse_string(const char *text,
+ enum credentials_obtained=CRED_SPECIFIED);
}
} cli_credentials;
Modified: branches/4.0-python/source/auth/credentials/tests/bindings.py
===================================================================
--- branches/4.0-python/source/auth/credentials/tests/bindings.py 2007-11-20 11:40:31 UTC (rev 26056)
+++ branches/4.0-python/source/auth/credentials/tests/bindings.py 2007-11-20 11:40:34 UTC (rev 26057)
@@ -39,3 +39,14 @@
def test_set_realm(self):
self.creds.set_realm("myrealm")
self.assertEquals("MYREALM", self.creds.get_realm())
+
+ def test_parse_string_anon(self):
+ self.creds.parse_string("%")
+ self.assertEquals("", self.creds.get_username())
+ self.assertEquals(None, self.creds.get_password())
+
+ def test_parse_string_user_pw_domain(self):
+ self.creds.parse_string("dom\\someone%secr")
+ self.assertEquals("someone", self.creds.get_username())
+ self.assertEquals("secr", self.creds.get_password())
+ self.assertEquals("DOM", self.creds.get_domain())
More information about the samba-cvs
mailing list