summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1998-10-21 22:36:26 +0000
committerLuke Leighton <lkcl@samba.org>1998-10-21 22:36:26 +0000
commiteadc5b8c6ecdd6892647d391e1976b2c708d1ea0 (patch)
tree8aa495516461fd94ddbafcb6a52e0a4825de1ae6 /source3/lib
parent21e107fd42eb953affac28239588458c6c0ee323 (diff)
downloadsamba-eadc5b8c6ecdd6892647d391e1976b2c708d1ea0.tar.gz
samba-eadc5b8c6ecdd6892647d391e1976b2c708d1ea0.tar.bz2
samba-eadc5b8c6ecdd6892647d391e1976b2c708d1ea0.zip
domain aliases added a bit better: does local aliases if you query
for sid S-1-5-20 and does (nothing at the moment) if you query for your own sid. (This used to be commit da40f26f4b2f7ce286076b4e39dffd76aa2ef8e6)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/util_hnd.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/source3/lib/util_hnd.c b/source3/lib/util_hnd.c
index b1e695360f..b807c40604 100644
--- a/source3/lib/util_hnd.c
+++ b/source3/lib/util_hnd.c
@@ -225,7 +225,28 @@ BOOL set_lsa_policy_samr_sid(POLICY_HND *hnd, DOM_SID *sid)
}
/****************************************************************************
- set samr rid
+ get samr sid
+****************************************************************************/
+BOOL get_lsa_policy_samr_sid(POLICY_HND *hnd, DOM_SID *sid)
+{
+ struct policy *p = find_lsa_policy(hnd);
+
+ if (p != NULL && p->open)
+ {
+ pstring sidstr;
+ memcpy(sid, &p->dev.samr.sid, sizeof(*sid));
+ DEBUG(3,("Getting policy sid=%s pnum=%x\n",
+ sid_to_string(sidstr, sid), p->pnum));
+
+ return True;
+ }
+
+ DEBUG(3,("Error getting policy\n"));
+ return False;
+}
+
+/****************************************************************************
+ get samr rid
****************************************************************************/
uint32 get_lsa_policy_samr_rid(POLICY_HND *hnd)
{