fixing smbpasswd to link to smbd to obtain domain sid
authorLuke Leighton <lkcl@samba.org>
Tue, 1 Dec 1998 19:34:58 +0000 (19:34 +0000)
committerLuke Leighton <lkcl@samba.org>
Tue, 1 Dec 1998 19:34:58 +0000 (19:34 +0000)
(This used to be commit bfb75e58ced1082d3bb7d6b3f3367d50a0ca26ea)

source3/include/proto.h
source3/lib/sids.c
source3/lib/util_pwdb.c

index 4360d6b8ee8fc5e73ee3ae401a23600d4b8c5415..da543e748d594312927cabc454f51cb93c2d7f5b 100644 (file)
@@ -261,7 +261,7 @@ char *rep_inet_ntoa(struct in_addr ip);
 
 void get_sam_domain_name(void);
 BOOL get_member_domain_sid(void);
-BOOL get_domain_sids(DOM_SID *sid3, DOM_SID *sid5);
+BOOL get_domain_sids(DOM_SID *sid3, DOM_SID *sid5, char *servers);
 void generate_wellknown_sids(void);
 BOOL generate_sam_sid(char *domain_name);
 BOOL map_domain_name_to_sid(DOM_SID *sid, char **nt_domain);
@@ -458,7 +458,7 @@ void pwdb_set_must_change_time(char *p, int max_len, time_t t);
 void pwdb_set_last_set_time(char *p, int max_len, time_t t);
 void pwdb_sethexpwd(char *p, const char *pwd, uint16 acct_ctrl);
 BOOL pwdb_gethexpwd(const char *p, char *pwd);
-BOOL pwdb_initialise(BOOL server);
+BOOL pwdb_initialise(BOOL is_server);
 
 /*The following definitions come from  lib/util_sid.c  */
 
index 4a2a5d4805b99aaff4aa2e414dde55a2530b27c4..8a289bcea76eaa4663c2d46ba028f94de0811ec9 100644 (file)
@@ -172,13 +172,13 @@ BOOL get_member_domain_sid(void)
                }
        }
 
-       return get_domain_sids(NULL, &global_member_sid);
+       return get_domain_sids(NULL, &global_member_sid, lp_passwordserver());
 }
 
 /****************************************************************************
  obtain the sid from the PDC.  do some verification along the way...
 ****************************************************************************/
-BOOL get_domain_sids(DOM_SID *sid3, DOM_SID *sid5)
+BOOL get_domain_sids(DOM_SID *sid3, DOM_SID *sid5, char *servers)
 {
        POLICY_HND pol;
        fstring srv_name;
@@ -193,7 +193,7 @@ BOOL get_domain_sids(DOM_SID *sid3, DOM_SID *sid5)
                return False;
        }
 
-       if (!cli_connect_serverlist(&cli, lp_passwordserver()))
+       if (!cli_connect_serverlist(&cli, servers))
        {
                DEBUG(0,("get_member_domain_sid: unable to initialise client connection.\n"));
                return False;
index 8008e9de71f12f44333cc41b04c31b9b6b149424..7e7eb0da8b03d95fb0f0246e1f7bab6df4b1a8ab 100644 (file)
@@ -31,6 +31,9 @@ extern DOM_SID global_member_sid;
 extern fstring global_myworkgroup;
 
 extern DOM_SID global_sid_S_1_5_20;
+
+extern pstring global_myname;
+
 /*
  * A list of the rids of well known BUILTIN and Domain users
  * and groups.
@@ -443,7 +446,7 @@ BOOL pwdb_initialise(BOOL is_server)
        }
        else
        {
-               if (!get_domain_sids(&global_member_sid, &global_sam_sid))
+               if (!get_domain_sids(&global_member_sid, &global_sam_sid, global_myname))
                {
                        return False;
                }