]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Try to use kerberos in libnetapi.
authorGünther Deschner <gd@samba.org>
Tue, 8 Apr 2008 17:42:26 +0000 (19:42 +0200)
committerGünther Deschner <gd@samba.org>
Tue, 8 Apr 2008 17:42:26 +0000 (19:42 +0200)
Guenther

source/lib/netapi/getdc.c
source/lib/netapi/joindomain.c
source/lib/netapi/serverinfo.c

index 9ad935efd82e9a92c43d85c0d616033bc03c0e3d..a865474019fa302304d2996b37dd907145a80e1c 100644 (file)
@@ -50,7 +50,10 @@ WERROR NetGetDCName_r(struct libnetapi_ctx *ctx,
                                     ctx->username,
                                     ctx->workgroup,
                                     ctx->password,
-                                    0, Undefined, NULL);
+                                    CLI_FULL_CONNECTION_USE_KERBEROS |
+                                    CLI_FULL_CONNECTION_FALLBACK_AFTER_KERBEROS |
+                                    CLI_FULL_CONNECTION_ANONYMOUS_FALLBACK,
+                                    Undefined, NULL);
 
        if (!NT_STATUS_IS_OK(status)) {
                werr = ntstatus_to_werror(status);
@@ -103,7 +106,10 @@ WERROR NetGetAnyDCName_r(struct libnetapi_ctx *ctx,
                                     ctx->username,
                                     ctx->workgroup,
                                     ctx->password,
-                                    0, Undefined, NULL);
+                                    CLI_FULL_CONNECTION_USE_KERBEROS |
+                                    CLI_FULL_CONNECTION_FALLBACK_AFTER_KERBEROS |
+                                    CLI_FULL_CONNECTION_ANONYMOUS_FALLBACK,
+                                    Undefined, NULL);
 
        if (!NT_STATUS_IS_OK(status)) {
                werr = ntstatus_to_werror(status);
@@ -174,7 +180,10 @@ WERROR DsGetDcName_r(struct libnetapi_ctx *ctx,
                                     ctx->username,
                                     ctx->workgroup,
                                     ctx->password,
-                                    0, Undefined, NULL);
+                                    CLI_FULL_CONNECTION_USE_KERBEROS |
+                                    CLI_FULL_CONNECTION_FALLBACK_AFTER_KERBEROS |
+                                    CLI_FULL_CONNECTION_ANONYMOUS_FALLBACK,
+                                    Undefined, NULL);
 
        if (!NT_STATUS_IS_OK(status)) {
                werr = ntstatus_to_werror(status);
index 468360f1467271ae5ac76212b392a9b8003f8bf9..48a6a91888d0c8d66e3aca4e4270a182c756c6e1 100644 (file)
@@ -108,7 +108,9 @@ WERROR NetJoinDomain_r(struct libnetapi_ctx *ctx,
                                     ctx->username,
                                     ctx->workgroup,
                                     ctx->password,
-                                    0, Undefined, NULL);
+                                    CLI_FULL_CONNECTION_USE_KERBEROS |
+                                    CLI_FULL_CONNECTION_FALLBACK_AFTER_KERBEROS,
+                                    Undefined, NULL);
 
        if (!NT_STATUS_IS_OK(status)) {
                werr = ntstatus_to_werror(status);
@@ -248,7 +250,9 @@ WERROR NetUnjoinDomain_r(struct libnetapi_ctx *ctx,
                                     ctx->username,
                                     ctx->workgroup,
                                     ctx->password,
-                                    0, Undefined, NULL);
+                                    CLI_FULL_CONNECTION_USE_KERBEROS |
+                                    CLI_FULL_CONNECTION_FALLBACK_AFTER_KERBEROS,
+                                    Undefined, NULL);
 
        if (!NT_STATUS_IS_OK(status)) {
                werr = ntstatus_to_werror(status);
@@ -308,7 +312,9 @@ WERROR NetGetJoinInformation_r(struct libnetapi_ctx *ctx,
                                     ctx->username,
                                     ctx->workgroup,
                                     ctx->password,
-                                    0, Undefined, NULL);
+                                    CLI_FULL_CONNECTION_USE_KERBEROS |
+                                    CLI_FULL_CONNECTION_FALLBACK_AFTER_KERBEROS,
+                                    Undefined, NULL);
 
        if (!NT_STATUS_IS_OK(status)) {
                werr = ntstatus_to_werror(status);
@@ -450,7 +456,9 @@ WERROR NetGetJoinableOUs_r(struct libnetapi_ctx *ctx,
                                     ctx->username,
                                     ctx->workgroup,
                                     ctx->password,
-                                    0, Undefined, NULL);
+                                    CLI_FULL_CONNECTION_USE_KERBEROS |
+                                    CLI_FULL_CONNECTION_FALLBACK_AFTER_KERBEROS,
+                                    Undefined, NULL);
 
        if (!NT_STATUS_IS_OK(status)) {
                werr = ntstatus_to_werror(status);
index e2a458cdc1835f52b655f1677363a7c62ea489a9..7cc84f5367b4a06a41f75c6453d3428263a9855d 100644 (file)
@@ -75,7 +75,9 @@ WERROR NetServerGetInfo_r(struct libnetapi_ctx *ctx,
                                     ctx->username,
                                     ctx->workgroup,
                                     ctx->password,
-                                    0, Undefined, NULL);
+                                    CLI_FULL_CONNECTION_USE_KERBEROS |
+                                    CLI_FULL_CONNECTION_FALLBACK_AFTER_KERBEROS,
+                                    Undefined, NULL);
 
        if (!NT_STATUS_IS_OK(status)) {
                werr = ntstatus_to_werror(status);
@@ -189,7 +191,9 @@ WERROR NetServerSetInfo_r(struct libnetapi_ctx *ctx,
                                     ctx->username,
                                     ctx->workgroup,
                                     ctx->password,
-                                    0, Undefined, NULL);
+                                    CLI_FULL_CONNECTION_USE_KERBEROS |
+                                    CLI_FULL_CONNECTION_FALLBACK_AFTER_KERBEROS,
+                                    Undefined, NULL);
 
        if (!NT_STATUS_IS_OK(status)) {
                werr = ntstatus_to_werror(status);