2 Unix SMB/Netbios implementation.
4 NT Domain Authentication SMB / MSRPC client
5 Copyright (C) Andrew Tridgell 1994-1999
6 Copyright (C) Luke Kenneth Casson Leighton 1996-1999
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
31 extern int DEBUGLEVEL;
35 /****************************************************************************
37 ****************************************************************************/
38 BOOL msrpc_lsa_query_secret(const char* srv_name,
39 const char* secret_name,
50 /* lookup domain controller; receive a policy handle */
51 res = res ? lsa_open_policy2( srv_name,
52 &lsa_pol, False) : False;
54 /* lookup domain controller; receive a policy handle */
55 res1 = res ? lsa_open_secret( &lsa_pol,
56 secret_name, 0x02000000, &pol_sec) : False;
58 res2 = res1 ? lsa_query_secret(&pol_sec, secret, last_update) : False;
60 res1 = res1 ? lsa_close(&pol_sec) : False;
62 res = res ? lsa_close(&lsa_pol) : False;