Use opt_target_workgroup instead of lp_workgroup() in vampire code so
authorTim Potter <tpot@samba.org>
Wed, 10 Sep 2003 06:49:13 +0000 (06:49 +0000)
committerTim Potter <tpot@samba.org>
Wed, 10 Sep 2003 06:49:13 +0000 (06:49 +0000)
we can override the value in smb.conf with the -w option.

Migrating accounts from another domain can now be done like:

# bin/net join bdc -w nt4dom -Uadministrator%password
# bin/net rpc vampire -w nt4dom -U administrator%password

source/utils/net_rpc_samsync.c

index ed69f8a326b15850fdc67df1f1f18d707cabbde9..4d8fa5e7e233d5406fd113bfcc7868a701ab781a 100644 (file)
@@ -1034,7 +1034,7 @@ int rpc_vampire(int argc, const char **argv)
                goto fail;
        }
 
-       if (!secrets_fetch_trust_account_password(lp_workgroup(),
+       if (!secrets_fetch_trust_account_password(opt_target_workgroup,
                                                  trust_password, NULL,
                                                  &sec_channel)) {
                d_printf("Could not retrieve domain trust secret\n");
@@ -1056,7 +1056,7 @@ int rpc_vampire(int argc, const char **argv)
                         nt_errstr(result));
                if (NT_STATUS_EQUAL(result, NT_STATUS_NOT_SUPPORTED))
                        d_printf("Perhaps %s is a Windows 2000 native mode "
-                                "domain?\n", lp_workgroup());
+                                "domain?\n", opt_target_workgroup);
                goto fail;
        }