From 4245278ca3fea4a6b79daf58a8712a2774811c58 Mon Sep 17 00:00:00 2001 From: Luke Leighton Date: Thu, 18 Nov 1999 22:03:47 +0000 Subject: set "key does not exist" response to reg_query_val() (win32 status code of 0x2). [p.s. getting REALLY bored of this nt5rc2->samba domain stuff]. (This used to be commit a8801942f72b2394a54e4a46546029fac70efeed) --- source3/lib/util_hnd.c | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) (limited to 'source3/lib') diff --git a/source3/lib/util_hnd.c b/source3/lib/util_hnd.c index dabc5520ff..d53264a73e 100644 --- a/source3/lib/util_hnd.c +++ b/source3/lib/util_hnd.c @@ -271,9 +271,10 @@ BOOL set_lsa_policy_reg_name(POLICY_HND *hnd, fstring name) { struct policy *p = find_lsa_policy(hnd); - if (p && p->open) { - DEBUG(3,("Setting policy pnum=%x name=%s\n", - p->pnum, name)); + if (p && p->open) + { + DEBUG(3,("Getting policy pnum=%x\n", + p->pnum)); fstrcpy(p->dev.reg.name, name); return True; @@ -283,6 +284,27 @@ BOOL set_lsa_policy_reg_name(POLICY_HND *hnd, fstring name) return False; } +/**************************************************************************** + set reg name +****************************************************************************/ +BOOL get_lsa_policy_reg_name(POLICY_HND *hnd, fstring name) +{ + struct policy *p = find_lsa_policy(hnd); + + if (p && p->open) + { + DEBUG(3,("Setting policy pnum=%x name=%s\n", + p->pnum, name)); + + fstrcpy(name, p->dev.reg.name); + DEBUG(5,("getting policy reg name=%s\n", name)); + return True; + } + + DEBUG(3,("Error getting policy reg name\n")); + return False; +} + /**************************************************************************** close an lsa policy ****************************************************************************/ -- cgit