Blob Blame History Raw
From 5913cd056fae4d3a147326a30182a2d30bfe7857 Mon Sep 17 00:00:00 2001
From: Andrew Bartlett <abartlet@samba.org>
Date: Fri, 16 Aug 2019 14:22:42 +1200
Subject: [PATCH 097/187] s3-librpc: Remove unused init_netr_CryptPassword()

Unused since 38d4dba37406515181e4d6f1a1faffc18e652e27 in 2013

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit 1aa249e7f4a1c4222b4cc79bac64c8b95c89d868)
---
 source3/rpc_client/cli_netlogon.c  |  1 -
 source3/rpc_client/init_netlogon.c | 50 ------------------------------
 source3/rpc_client/init_netlogon.h | 29 -----------------
 source3/wscript_build              |  5 ---
 4 files changed, 85 deletions(-)
 delete mode 100644 source3/rpc_client/init_netlogon.c
 delete mode 100644 source3/rpc_client/init_netlogon.h

diff --git a/source3/rpc_client/cli_netlogon.c b/source3/rpc_client/cli_netlogon.c
index 505a1d015bc..ea9cb757048 100644
--- a/source3/rpc_client/cli_netlogon.c
+++ b/source3/rpc_client/cli_netlogon.c
@@ -30,7 +30,6 @@
 #include "../librpc/gen_ndr/ndr_netlogon_c.h"
 #include "../librpc/gen_ndr/schannel.h"
 #include "rpc_client/cli_netlogon.h"
-#include "rpc_client/init_netlogon.h"
 #include "rpc_client/util_netlogon.h"
 #include "../libcli/security/security.h"
 #include "lib/param/param.h"
diff --git a/source3/rpc_client/init_netlogon.c b/source3/rpc_client/init_netlogon.c
deleted file mode 100644
index 26deaba8065..00000000000
--- a/source3/rpc_client/init_netlogon.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- *  Unix SMB/CIFS implementation.
- *  RPC Pipe client / server routines
- *  Copyright (C) Guenther Deschner                  2008,2012
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 3 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "includes.h"
-#include "../libcli/auth/libcli_auth.h"
-#include "../lib/crypto/crypto.h"
-#include "rpc_client/init_netlogon.h"
-
-/*************************************************************************
- inits a netr_CryptPassword structure
- *************************************************************************/
-
-void init_netr_CryptPassword(const char *pwd,
-			     struct netlogon_creds_CredentialState *creds,
-			     struct netr_CryptPassword *pwd_buf)
-{
-	struct samr_CryptPassword password_buf;
-	NTSTATUS status;
-
-	encode_pw_buffer(password_buf.data, pwd, STR_UNICODE);
-
-	if (creds->negotiate_flags & NETLOGON_NEG_SUPPORTS_AES) {
-		netlogon_creds_aes_encrypt(creds, password_buf.data, 516);
-	} else {
-		status = netlogon_creds_arcfour_crypt(creds,
-						      password_buf.data,
-						      516);
-		if (!NT_STATUS_IS_OK(status)) {
-			return;
-		}
-	}
-	memcpy(pwd_buf->data, password_buf.data, 512);
-	pwd_buf->length = IVAL(password_buf.data, 512);
-}
diff --git a/source3/rpc_client/init_netlogon.h b/source3/rpc_client/init_netlogon.h
deleted file mode 100644
index bb4496b4cd9..00000000000
--- a/source3/rpc_client/init_netlogon.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- *  Unix SMB/CIFS implementation.
- *  RPC Pipe client / server routines
- *  Copyright (C) Guenther Deschner                  2008.
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 3 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef _RPC_CLIENT_INIT_NETLOGON_H_
-#define _RPC_CLIENT_INIT_NETLOGON_H_
-
-/* The following definitions come from rpc_client/init_netlogon.c  */
-
-void init_netr_CryptPassword(const char *pwd,
-			     struct netlogon_creds_CredentialState *creds,
-			     struct netr_CryptPassword *pwd_buf);
-
-#endif /* _RPC_CLIENT_INIT_NETLOGON_H_ */
diff --git a/source3/wscript_build b/source3/wscript_build
index b73f6dc0664..ce3fa362bc2 100644
--- a/source3/wscript_build
+++ b/source3/wscript_build
@@ -1024,7 +1024,6 @@ bld.SAMBA3_LIBRARY('libcli_netlogon3',
                    deps='''
                         msrpc3
                         RPC_NDR_NETLOGON
-                        INIT_NETLOGON
                         cliauth
                         smbconf
                         NETLOGON_CREDS_CLI''',
@@ -1057,10 +1056,6 @@ bld.SAMBA3_SUBSYSTEM('INIT_LSA',
                     source='rpc_client/init_lsa.c',
                     deps='samba-util')
 
-bld.SAMBA3_SUBSYSTEM('INIT_NETLOGON',
-                    source='rpc_client/init_netlogon.c',
-                    deps='samba-util')
-
 bld.SAMBA3_SUBSYSTEM('INIT_SAMR',
                     source='rpc_client/init_samr.c',
                     deps='samba-util GNUTLS_HELPERS')
-- 
2.23.0