summaryrefslogtreecommitdiff
path: root/source3/lib/util_hnd.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/util_hnd.c')
-rw-r--r--source3/lib/util_hnd.c28
1 files changed, 25 insertions, 3 deletions
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;
@@ -284,6 +285,27 @@ BOOL set_lsa_policy_reg_name(POLICY_HND *hnd, fstring name)
}
/****************************************************************************
+ 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
****************************************************************************/
BOOL close_lsa_policy_hnd(POLICY_HND *hnd)