summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-07-21 00:32:09 +0000
committerLuke Leighton <lkcl@samba.org>1999-07-21 00:32:09 +0000
commit6a5a4e818684a616306d2954d1a2612113b314a6 (patch)
treee1900e634df995f0a1d36c063645cd4997a9529f /source3/lib
parent46ce0d4619839f40f910eb4a0d2c3da01436bc88 (diff)
downloadsamba-6a5a4e818684a616306d2954d1a2612113b314a6.tar.gz
samba-6a5a4e818684a616306d2954d1a2612113b314a6.tar.bz2
samba-6a5a4e818684a616306d2954d1a2612113b314a6.zip
BDC support.
(This used to be commit 2331aa32ab36c3ee5fd8cfbe972e57299939e33d)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/domain_namemap.c2
-rw-r--r--source3/lib/sids.c2
-rw-r--r--source3/lib/util.c27
-rw-r--r--source3/lib/util_pwdb.c11
4 files changed, 40 insertions, 2 deletions
diff --git a/source3/lib/domain_namemap.c b/source3/lib/domain_namemap.c
index fb6ecf2acf..ed4325a4d7 100644
--- a/source3/lib/domain_namemap.c
+++ b/source3/lib/domain_namemap.c
@@ -891,6 +891,8 @@ static BOOL lookup_remote_ntname(const char *ntname, DOM_SID *sid, uint8 *type)
uint8 *types;
const char *names[1];
+ DEBUG(5,("lookup_remote_ntname: %s\n", ntname));
+
if (!cli_connect_serverlist(&cli, lp_passwordserver()))
{
return False;
diff --git a/source3/lib/sids.c b/source3/lib/sids.c
index 7eb968a435..c75168ee56 100644
--- a/source3/lib/sids.c
+++ b/source3/lib/sids.c
@@ -196,7 +196,7 @@ BOOL get_domain_sids(DOM_SID *sid3, DOM_SID *sid5, char *servers)
if (!cli_connect_serverlist(&cli, servers))
{
- DEBUG(0,("get_member_domain_sid: unable to initialise client connection.\n"));
+ DEBUG(0,("get_domain_sids: unable to initialise client connection.\n"));
return False;
}
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 8a9452ee00..9a4d0d9e25 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -2931,6 +2931,33 @@ void out_ascii(FILE *f, unsigned char *buf,int len)
}
}
+void out_struct(FILE *f,char *buf1,int len, int per_line)
+{
+ unsigned char *buf = (unsigned char *)buf1;
+ int i;
+
+ if (len<=0)
+ {
+ return;
+ }
+
+ fprintf(f, "{\n\t");
+ for (i=0;i<len;)
+ {
+ fprintf(f, "0x%02X",(int)buf[i]);
+ i++;
+ if (i != len)
+ {
+ fprintf(f, ", ");
+ }
+ if (i%per_line == 0 && i != len)
+ {
+ fprintf(f, "\n\t");
+ }
+ }
+ fprintf(f, "\n};\n");
+}
+
void out_data(FILE *f,char *buf1,int len, int per_line)
{
unsigned char *buf = (unsigned char *)buf1;
diff --git a/source3/lib/util_pwdb.c b/source3/lib/util_pwdb.c
index f78bdfff5d..0bf0cd9c4f 100644
--- a/source3/lib/util_pwdb.c
+++ b/source3/lib/util_pwdb.c
@@ -625,7 +625,16 @@ BOOL pwdb_initialise(BOOL is_server)
}
else
{
- if (!get_domain_sids(&global_member_sid, &global_sam_sid, global_myname))
+ char *srvs;
+ if (lp_server_role() == ROLE_DOMAIN_PDC)
+ {
+ srvs = global_myname;
+ }
+ else
+ {
+ srvs = lp_passwordserver();
+ }
+ if (!get_domain_sids(&global_member_sid, &global_sam_sid, srvs))
{
return False;
}