s3:libsmb: Use cli_cm_force_encryption() instead of cli_force_encryption()
[samba.git] / source3 / libsmb / libsmb_server.c
index 438b7e6e9742f2a3e46ca081afbcd56dee6255d2..e0cdc97eeb68c0e4fbfc0c76d15f600206c5b92f 100644 (file)
@@ -587,11 +587,13 @@ SMBC_server_internal(TALLOC_CTX *ctx,
         }
 
        if (context->internal->smb_encryption_level) {
-               /* Attempt UNIX smb encryption. */
-               if (!NT_STATUS_IS_OK(cli_force_encryption(c,
-                                                          username_used,
-                                                          password_used,
-                                                          *pp_workgroup))) {
+               /* Attempt encryption. */
+               status = cli_cm_force_encryption(c,
+                                                username_used,
+                                                password_used,
+                                                *pp_workgroup,
+                                                share);
+               if (!NT_STATUS_IS_OK(status)) {
 
                        /*
                         * context->smb_encryption_level == 1
@@ -787,11 +789,13 @@ SMBC_attr_server(TALLOC_CTX *ctx,
                 }
 
                if (context->internal->smb_encryption_level) {
-                       /* Attempt UNIX smb encryption. */
-                       if (!NT_STATUS_IS_OK(cli_force_encryption(ipc_cli,
-                                                                  *pp_username,
-                                                                  *pp_password,
-                                                                  *pp_workgroup))) {
+                       /* Attempt encryption. */
+                       nt_status = cli_cm_force_encryption(ipc_cli,
+                                                           *pp_username,
+                                                           *pp_password,
+                                                           *pp_workgroup,
+                                                           "IPC$");
+                       if (!NT_STATUS_IS_OK(nt_status)) {
 
                                /*
                                 * context->smb_encryption_level ==