summaryrefslogtreecommitdiff
path: root/source4/auth/credentials/credentials.i
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2008-03-28 21:57:15 +1100
committerAndrew Bartlett <abartlet@samba.org>2008-03-28 21:57:15 +1100
commit142fbfb3c1f9f8cda7f0edaa801f8345f23d805f (patch)
tree8471bcd9a25ee25f7323fe4af7b8fb70ac31b211 /source4/auth/credentials/credentials.i
parent8f8c56bfbcbfe8f80afb09eb1d481a108b252bee (diff)
downloadsamba-142fbfb3c1f9f8cda7f0edaa801f8345f23d805f.tar.gz
samba-142fbfb3c1f9f8cda7f0edaa801f8345f23d805f.tar.bz2
samba-142fbfb3c1f9f8cda7f0edaa801f8345f23d805f.zip
Fix and test python scripts and kerberos
This fixes up the python credentials interface in a number of areas, with the aim of supporting '-k yes' as a command line option. (This enables the use of kerberos). As such, I've had to change the get_credentials call to take a loadparm context, so that the credentials can be initialised correctly. The test_kinit script has been modified to prove that this continues to work, as well as to provide greater code coverage of the kerberos paths. Andrew Bartlett (This used to be commit 727ef40c2b56910028ef3c1092b8eab1bfa6ce63)
Diffstat (limited to 'source4/auth/credentials/credentials.i')
-rw-r--r--source4/auth/credentials/credentials.i13
1 files changed, 11 insertions, 2 deletions
diff --git a/source4/auth/credentials/credentials.i b/source4/auth/credentials/credentials.i
index 41ec67580e..0a604cf002 100644
--- a/source4/auth/credentials/credentials.i
+++ b/source4/auth/credentials/credentials.i
@@ -39,6 +39,10 @@ typedef struct cli_credentials cli_credentials;
$1 = NULL;
}
+%constant int AUTO_USE_KERBEROS = CRED_AUTO_USE_KERBEROS;
+%constant int DONT_USE_KERBEROS = CRED_DONT_USE_KERBEROS;
+%constant int MUST_USE_KERBEROS = CRED_MUST_USE_KERBEROS;
+
%{
#include "librpc/gen_ndr/samr.h" /* for struct samr_Password */
%}
@@ -52,7 +56,7 @@ typedef struct cli_credentials cli_credentials;
typedef struct cli_credentials {
%extend {
cli_credentials(void) {
- return cli_credentials_init_anon(NULL);
+ return cli_credentials_init(NULL);
}
/* username */
const char *get_username(void);
@@ -74,13 +78,18 @@ typedef struct cli_credentials {
bool set_realm(const char *val,
enum credentials_obtained=CRED_SPECIFIED);
+ /* Kerberos */
+ void set_kerberos_state(enum credentials_use_kerberos use_kerberos);
+
void parse_string(const char *text,
- enum credentials_obtained=CRED_SPECIFIED);
+ enum credentials_obtained=CRED_SPECIFIED);
/* bind dn */
const char *get_bind_dn(void);
bool set_bind_dn(const char *bind_dn);
+ void set_anonymous();
+
/* workstation name */
const char *get_workstation(void);
bool set_workstation(const char *workstation,