]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
OK. This code works on a RedHat 6.0 system. However smbpasswd
authorGerald Carter <jerry@samba.org>
Thu, 9 Dec 1999 07:06:12 +0000 (07:06 +0000)
committerGerald Carter <jerry@samba.org>
Thu, 9 Dec 1999 07:06:12 +0000 (07:06 +0000)
time out of sending the session setup on Solaris 2.6.  No idea.
I'll work on it some tomorrow.  This is to fix the "Unable to
setup password vectors" thingy.

Also changed an inet_aton() to inet_addr() as the former is
not very portable :-)

Luke,  I set the redir flag to false because the connection to
the smb-agent was failing and smbpasswd bombed.  Double check me
on this one.

-jc
(This used to be commit e1d2b174caf5f0c48a8fac25778f72a868ec6eb7)

source3/lib/util.c
source3/libsmb/clientgen.c
source3/rpc_client/cli_connect.c
source3/utils/smbpasswd.c

index 9a9f87d4737deb62efb4e7496f9d48a499d1bcbf..65908ff19ee0a43265ebe08d9a03ea8bd91287ab 100644 (file)
@@ -3234,11 +3234,18 @@ char *get_trusted_serverlist(const char* domain)
        static char *server_list = NULL;
        static pstring srv_list;
        char *trusted_list = lp_trusted_domains();
+       int my_role = lp_server_role();
 
        if (strequal(lp_workgroup(), domain))
        {
-               DEBUG(10,("local domain server list: %s\n", server_list));
-               pstrcpy(srv_list, lp_passwordserver());
+               if ((my_role == ROLE_DOMAIN_PDC) || (my_role == ROLE_DOMAIN_NONE)) {
+                        pstrcpy(srv_list,global_myname);
+               }
+               /* we must be a BDC or MEMBER if we execute this branch */
+               else {
+                       pstrcpy(srv_list, lp_passwordserver());
+               }
+               DEBUG(10,("local domain server list: %s\n", srv_list));
                return srv_list;
        }
 
index 49772cd37ad13eeaab4ed49d37d0150588c2af7a..50bf54d02c3cc1724428599148b9e177b3804182 100644 (file)
@@ -1337,7 +1337,9 @@ int cli_nt_create(struct cli_state *cli, const char *fname)
        pstrcpy(p,fname);
        p = skip_string(p,1);
 
-       cli_send_smb(cli, True);
+       if (!cli_send_smb(cli, True)) {
+               return -1;
+       }
        if (!cli_receive_smb(cli)) {
                return -1;
        }
@@ -2945,7 +2947,7 @@ static int cli_init_redirect(struct cli_state *cli,
        if (strequal(srv_name, "*SMBSERVER"))
        {
                fstrcpy(ip_name, "\\\\");
-               inet_aton(&ip_name[2], destip);
+               destip->s_addr = inet_addr(&ip_name[2]);
                srv_name = ip_name;
        }
 
index f935b530444811ba05f142f2c35347d89d3e6792..fcca3e44fffcd20d9993002a24662a10455af456 100644 (file)
@@ -96,7 +96,7 @@ static struct cli_connection *cli_con_get(const char* srv_name,
                con->pipe_name = strdup(pipe_name);
        }
 
-       con->cli = cli_net_use_add(srv_name, usr_creds, True, reuse);
+       con->cli = cli_net_use_add(srv_name, usr_creds, False, reuse);
 
        if (con->cli == NULL)
        {
index 3b87687c261609fdfbdf979b94eec5b42adeb21a..a1a870a674a1077fa6f5ab53af734a407f6a9c66 100644 (file)
@@ -794,6 +794,8 @@ int main(int argc, char **argv)
 
        load_interfaces();
 
+       init_policy_hnd(64);
+
        if(!pwdb_initialise(False))
        {
                fprintf(stderr, "Can't setup password database vectors.\n");