Jeremy.
/*The following definitions come from lib/cmd_interp.c */
void free_cmd_set_array(uint32 num_entries, struct command_set **entries);
-struct command_set *add_cmd_set_to_array(uint32 *len,
- struct command_set ***array,
+struct command_set *add_cmd_set_to_array(uint32 *len, struct command_set ***array,
const struct command_set *cmd);
void add_command_set(const struct command_set *cmds);
void cmd_set_no_autoconnect(void);
struct ntuser_creds *creds);
void cli_lsa_shutdown(struct cli_state *cli);
uint32 cli_lsa_open_policy(struct cli_state *cli, BOOL sec_qos,
- uint32 des_access, POLICY_HND *hnd);
-uint32 cli_lsa_close(struct cli_state *cli, POLICY_HND *hnd);
-uint32 cli_lsa_lookup_sids(struct cli_state *cli, POLICY_HND *hnd,
+ uint32 des_access, POLICY_HND *pol);
+uint32 cli_lsa_close(struct cli_state *cli, POLICY_HND *pol);
+uint32 cli_lsa_lookup_sids(struct cli_state *cli, POLICY_HND *pol,
int num_sids, DOM_SID *sids, char ***names,
uint32 **types, int *num_names);
-uint32 cli_lsa_lookup_names(struct cli_state *cli, POLICY_HND *hnd,
+uint32 cli_lsa_lookup_names(struct cli_state *cli, POLICY_HND *pol,
int num_names, char **names, DOM_SID **sids,
uint32 **types, int *num_sids);
-uint32 cli_lsa_query_info_policy(struct cli_state *cli, POLICY_HND *hnd,
+uint32 cli_lsa_query_info_policy(struct cli_state *cli, POLICY_HND *pol,
uint16 info_class, fstring domain_name,
DOM_SID * domain_sid);
+uint32 cli_lsa_enum_trust_dom(struct cli_state *cli, POLICY_HND *pol,
+ uint32 *enum_ctx, uint32 *num_domains,
+ char ***domain_names, DOM_SID **domain_sids);
/*The following definitions come from libsmb/cliconnect.c */
Unix SMB/Netbios implementation.
Version 1.9.
SMB client
- Copyright (C) Andrew Tridgell 1994-1998
+ Copyright (C) Andrew Tridgell 1994-1998
+ Copyright (C) Luke Kenneth Casson Leighton 1998-2000
+ Copyright (C) Gerald Carter 2000
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
static void cmd_set_free(struct command_set *item)
{
if (item != NULL)
- {
safe_free(item->name);
- }
+
safe_free(item);
}
{
if (from != NULL)
{
- struct command_set *copy =
- (struct command_set
- *)malloc(sizeof(struct command_set));
+ struct command_set *copy;
+
+ copy = (struct command_set*)malloc(sizeof(struct command_set));
if (copy != NULL)
{
memcpy(copy, from, sizeof(struct command_set));
if (from->name != NULL)
- {
copy->name = strdup(from->name);
- }
}
return copy;
}
free_void_array(num_entries, (void **)entries, *fn);
}
-struct command_set *add_cmd_set_to_array(uint32 *len,
- struct command_set ***array,
+struct command_set *add_cmd_set_to_array(uint32 *len, struct command_set ***array,
const struct command_set *cmd)
{
void *(*fn) (const void *) = (void *(*)(const void *))&cmd_set_dup;
- return (struct command_set *)add_copy_to_array(len,
- (void ***)array,
+ return (struct command_set *)add_copy_to_array(len, (void ***)array,
(const void *)cmd, *fn,
False);
free_connections();
exit(0);
+
/* NOTREACHED */
return 0;
}
int i = 0;
/* get help on a specific command */
- if (argc > 0)
+ if (argc > 1)
{
- if ((i = process_tok(argv[1])) >= 0)
+ if ((i = process_tok(argv[0])) >= 0)
{
- fprintf(out_hnd, "HELP %s:\n\t%s\n\n",
- commands[i]->name, commands[i]->description);
+ fprintf(out_hnd, "HELP %s:\n\t%s\n\n", commands[i]->name,
+ commands[i]->description);
}
return 0;
/* get the first part of the command */
if (!next_token(&ptr, tok, NULL, sizeof(tok)))
- {
return False;
- }
do
{
return False;
if (cmd_argc == 0)
- {
return False;
- }
i = process_tok(cmd_argv[0]);
if (i >= 0)
{
- int argc = ((int)cmd_argc)-1;
+ int argc = ((int)cmd_argc);
char **argv = cmd_argv;
optind = 0;
/* Initialise */
if (state == 0)
- {
cmd_index = 0;
- }
/* Return the next name which partially matches the list of commands */
&& (strlen(name = commands[cmd_index++]->name) > 0))
{
if (strncmp(name, text, strlen(text)) == 0)
- {
return strdup(name);
- }
}
return NULL;
/* Complete rpcclient command */
if (start == 0)
- {
return completion_matches(text, complete_cmd);
- }
/* Count # of words in command */
for (i = 0; i <= end; i++)
{
if ((rl_line_buffer[i] != ' ') && (lastch == ' '))
- {
num_words++;
- }
lastch = rl_line_buffer[i];
}
if (strncmp(rl_line_buffer, commands[cmd_index]->name,
strlen(commands[cmd_index]->name)) == 0)
{
-
/* Call appropriate completion function */
if (num_words == 2 || num_words == 3)
{
char *(*fn) (char *, int);
- fn =
- commands[cmd_index]->compl_args
- [num_words - 2];
+ fn = commands[cmd_index]->compl_args[num_words - 2];
if (fn != NULL)
- {
return completion_matches(text, fn);
- }
}
}
}
/* Eeek! */
-
return NULL;
}
if (usr_creds != NULL)
- {
copy_nt_creds(&usr.ntc, &usr_creds->ntc);
- }
else
- {
copy_nt_creds(&usr.ntc, NULL);
- }
pstrcpy(dest_host, cli_info.dest_host);
pstrcpy(usr.ntc.user_name, optarg);
{
if (use[i] != NULL && use[i]->connected)
{
- report(out_hnd, "Server:\t%s\t",
- use[i]->srv_name);
- report(out_hnd, "Key:\t[%d,%x]\t",
- use[i]->key.pid,
- use[i]->key.vuid);
- report(out_hnd, "User:\t%s\t",
- use[i]->user_name);
- report(out_hnd, "Domain:\t%s\n",
- use[i]->domain);
+ report(out_hnd, "Server:\t%s\t",use[i]->srv_name);
+ report(out_hnd, "Key:\t[%d,%x]\t",use[i]->key.pid, use[i]->key.vuid);
+ report(out_hnd, "User:\t%s\t", use[i]->user_name);
+ report(out_hnd, "Domain:\t%s\n", use[i]->domain);
}
}
}
{
BOOL isnew;
if (null_pwd)
- {
set_user_password(&usr.ntc, True, NULL);
- }
else
- {
set_user_password(&usr.ntc, got_pwd, password);
- }
/* paranoia: destroy the local copy of the password */
ZERO_STRUCT(password);
srv_name, usr.ntc.user_name, usr.ntc.domain);
report(out_hnd, "Connection:\t");
- if (cli_net_use_add(srv_name, &usr.ntc,
- info->reuse, &isnew) != NULL)
- {
+ if (cli_net_use_add(srv_name, &usr.ntc, info->reuse, &isnew) != NULL)
report(out_hnd, "OK\n");
- }
else
- {
report(out_hnd, "FAILED\n");
- }
}
else
{
srv_name, usr.ntc.user_name, usr.ntc.domain);
report(out_hnd, "Connection:\t");
- if (!cli_net_use_del(srv_name, &usr.ntc,
- force_close, &closed))
- {
+ if (!cli_net_use_del(srv_name, &usr.ntc, force_close, &closed))
report(out_hnd, ": Does not exist\n");
- }
else if (force_close && closed)
- {
report(out_hnd, ": Forcibly terminated\n");
- }
else if (closed)
- {
report(out_hnd, ": Terminated\n");
- }
else
- {
report(out_hnd, ": Unlinked\n");
- }
}
/* paranoia: destroy the local copy of the password */
#define CMD_SCOPE 0x10000
#define CMD_INTER 0x20000
-static uint32 cmd_set(struct client_info *info, int argc, char *argv[])
+static void read_authfile (char *filename, char* username, char* password)
+{
+ FILE *auth;
+ fstring buf;
+ uint16 len = 0;
+ char *ptr, *val, *param;
+
+ if ((auth=sys_fopen(filename, "r")) == NULL)
+ {
+ /* fail if we can't open the credentials file */
+ DEBUG(0,("ERROR: Unable to open credentials file!\n"));
+ return;
+ }
+
+ while (!feof(auth))
+ {
+ /* get a line from the file */
+ if (!fgets (buf, sizeof(buf), auth))
+ continue;
+
+ len = strlen(buf);
+
+ /* skip empty lines */
+ if ((len) && (buf[len-1]=='\n'))
+ {
+ buf[len-1] = '\0';
+ len--;
+ }
+ if (len == 0)
+ continue;
+
+ /* break up the line into parameter & value.
+ will need to eat a little whitespace possibly */
+ param = buf;
+ if (!(ptr = strchr (buf, '=')))
+ continue;
+ val = ptr+1;
+ *ptr = '\0';
+
+ /* eat leading white space */
+ while ((*val!='\0') && ((*val==' ') || (*val=='\t')))
+ val++;
+
+ if (strwicmp("password", param) == 0)
+ {
+ pstrcpy(password, val);
+ cmd_set_options |= CMD_PASS;
+ }
+ else if (strwicmp("username", param) == 0)
+ {
+ pstrcpy(username, val);
+ cmd_set_options |= CMD_USER;
+ }
+
+ memset(buf, 0, sizeof(buf));
+ }
+ fclose(auth);
+
+ return;
+}
+
+static uint32 cmd_set(CLIENT_INFO *info, int argc, char *argv[])
{
BOOL interactive = True;
char *cmd_str = NULL;
pstring term_code;
pstring password; /* local copy only, if one is entered */
fstring srv_name;
+ int new_debuglevel = -1;
password[0] = 0;
usr_creds = &usr;
argc--;
argv++;
}
+
if (argc > 1 && (*argv[1] != '-'))
{
cmd_set_options |= CMD_PASS;
argv++;
}
- while ((opt = getopt(argc, argv,
- "PRs:O:M:S:i:Nn:d:l:hI:EB:U:L:t:m:W:T:D:c:A:")) !=
- EOF)
+ while ((opt = getopt(argc, argv,"PRs:O:M:S:i:Nn:d:l:hI:EB:U:L:t:m:W:T:D:c:A:")) != EOF)
{
switch (opt)
{
+ /* reuse connections in the case of a previous authentication */
case 'R':
{
info->reuse = True;
break;
}
+ /* max protocol */
case 'm':
{
/* FIXME ... max_protocol seems to be funny here */
int max_protocol = 0;
- max_protocol =
- interpret_protocol(optarg,
- max_protocol);
- fprintf(stderr,
- "max protocol not currently supported\n");
+ max_protocol = interpret_protocol(optarg, max_protocol);
+ fprintf(stderr, "max protocol not currently supported\n");
break;
}
+ /* socket options */
case 'O':
{
cmd_set_options |= CMD_SOCK;
break;
}
+ /* define the server to connect to */
case 'S':
{
cmd_set_options |= CMD_HOST;
break;
}
+ /* username for the connection -- support the
+ username%password format as well */
case 'U':
{
char *lp;
}
break;
}
+
+ /* authfile -- only get the username and password from the file */
case 'A':
{
- FILE *auth;
- fstring buf;
- uint16 len = 0;
- char *ptr, *val, *param;
-
- if ((auth=sys_fopen(optarg, "r")) == NULL)
- {
- /* fail if we can't open the credentials file */
- DEBUG(0,("ERROR: Unable to open credentials file!\n"));
- exit (-1);
- }
-
- while (!feof(auth))
- {
- /* get a line from the file */
- if (!fgets (buf, sizeof(buf), auth))
- continue;
- len = strlen(buf);
-
- if ((len) && (buf[len-1]=='\n'))
- {
- buf[len-1] = '\0';
- len--;
- }
- if (len == 0)
- continue;
-
- /* break up the line into parameter & value.
- will need to eat a little whitespace possibly */
- param = buf;
- if (!(ptr = strchr (buf, '=')))
- continue;
- val = ptr+1;
- *ptr = '\0';
-
- /* eat leading white space */
- while ((*val!='\0') && ((*val==' ') || (*val=='\t')))
- val++;
-
- if (strwicmp("password", param) == 0)
- {
- pstrcpy(password, val);
- cmd_set_options |= CMD_PASS;
- }
- else if (strwicmp("username", param) == 0)
- {
- pstrcpy(usr.ntc.user_name, val);
- cmd_set_options |= CMD_USER;
- }
-
- memset(buf, 0, sizeof(buf));
- }
- fclose(auth);
+ read_authfile (optarg, usr.ntc.user_name, password);
break;
}
+ /* define the workgroup/domain name */
case 'W':
{
cmd_set_options |= CMD_DOM;
break;
}
+ /* should we display a command prompt at all */
case 'P':
{ /* optarg == prompt string ? */
info->show_prompt = False;
break;
}
+ /* send to stderr instaed of stdout */
case 'E':
{
cmd_set_options |= CMD_DBG;
break;
}
+ /* IP address of destination host */
case 'I':
{
cmd_set_options |= CMD_IP;
break;
}
+ /* define netbios name of client machine we are on */
case 'n':
{
cmd_set_options |= CMD_NAME;
break;
}
+ /* do not prompt for a password. Implies anonymous connection
+ unless the password was passed in username%password form */
case 'N':
{
cmd_set_options |= CMD_NOPW | CMD_PASS;
break;
}
+ /* debug level */
case 'd':
{
cmd_set_options |= CMD_DBLV;
if (*optarg == 'A')
- DEBUGLEVEL = 10000;
+ new_debuglevel = 10000;
else
- DEBUGLEVEL = atoi(optarg);
+ new_debuglevel = atoi(optarg);
break;
}
+ /* log file name */
case 'l':
{
cmd_set_options |= CMD_INTER;
- slprintf(debugf, sizeof(debugf) - 1,
- "%s.client", optarg);
+ slprintf(debugf, sizeof(debugf) - 1, "%s.client", optarg);
interactive = False;
break;
}
+ /* command string to be executed */
case 'c':
{
cmd_set_options |= CMD_STR;
break;
}
+ /* program usage/help screen */
case 'h':
{
cmd_set_options |= CMD_HELP;
break;
}
+ /* config file to use */
case 's':
{
cmd_set_options |= CMD_SVC;
break;
}
+ /* terminal code */
case 't':
{
cmd_set_options |= CMD_TERM;
}
}
- if (cmd_set_options & CMD_INTER) {
+
+ if (cmd_set_options & CMD_INTER)
+ {
setup_logging(debugf, interactive);
if (!interactive)
reopen_logs();
strupper(global_myname);
fstrcpy(cli_info.myhostname, global_myname);
- if (cmd_set_options & CMD_SVC) {
+ if (cmd_set_options & CMD_SVC)
+ {
if (!lp_load(servicesf, True, False, False))
{
- fprintf(stderr,
- "Can't load %s - run testparm to debug it\n",
+ fprintf(stderr, "Can't load %s - run testparm to debug it\n",
servicesf);
}
}
- if (cmd_set_options & CMD_INTER) {
+ if (new_debuglevel != -1) {
+ DEBUGLEVEL = new_debuglevel;
+ }
+
+ if (cmd_set_options & CMD_INTER)
+ {
load_interfaces();
}
}
/* NULL password if specified or is username is empty */
- if ((cmd_set_options & CMD_NOPW) || (strlen(usr.ntc.user_name) == 0)) {
+ if ((cmd_set_options & CMD_NOPW) || (strlen(usr.ntc.user_name) == 0))
set_user_password(&usr.ntc, True, NULL);
- }
else
- {
- set_user_password(&usr.ntc,
- ((cmd_set_options & CMD_PASS) != 0),
- password);
- }
+ set_user_password(&usr.ntc, ((cmd_set_options & CMD_PASS) != 0), password);
/* paranoia: destroy the local copy of the password */
ZERO_STRUCT(password);
- if (strcmp(cli_info.dest_host, "*") == 0) {
+ if (strcmp(cli_info.dest_host, "*") == 0)
+ {
/* special case - we want the PDC */
struct in_addr ip;
if (!resolve_srv_name(cli_info.dest_host, cli_info.dest_host, &ip)) {
strupper(srv_name);
- if (auto_connect && !strequal(srv_name, "\\\\."))
+ if (auto_connect)
{
BOOL isnew;
report(out_hnd, "Server:\t%s:\tUser:\t%s\tDomain:\t%s\n",
/* ???? --jerry
usr_creds = NULL; */
}
+
if (cmd_str != NULL)
- {
return process(&cli_info, cmd_str);
- }
return 0;
}
memset(strchr(getenv("USER"), '%') + 1, 'X',
strlen(password));
}
- strupper(u->user_name);
}
/* modification to support PASSWD environmental var
25.Aug.97, jdblair@uab.edu */
if (getenv("PASSWD"))
- {
pstrcpy(password, getenv("PASSWD"));
- }
if (*u->user_name == 0 && getenv("LOGNAME"))
- {
pstrcpy(u->user_name, getenv("LOGNAME"));
- strupper(u->user_name);
- }
set_user_password(u, True, password);
DEBUGLEVEL = 2;
charset_initialise();
+
+ /* add in the internal command set and the various
+ client RPC groups--spoolss, lsa, etc... */
add_command_set(general_commands);
+ /* usr_creds is a global most recently used set of user credentials
+ retrieved from the connection list. */
copy_user_creds(&usr, NULL);
-
usr_creds = &usr;
usr.ptr_ntc = 1;
-
+
out_hnd = stdout;
+ /* retrieve the binary name used when invoking the program
+ for instances like samedit, etc... */
strncpy(path, argv[0], 255);
for (s = strtok(path, "/"); s; s = strtok(NULL, "/"))
fstrcpy(progname, s);
slprintf(debugf, sizeof(debugf) - 1,
"%s/log.%s", LOGFILEBASE, progname);
+ /* initialize usr */
pstrcpy(usr.ntc.domain, "");
pstrcpy(usr.ntc.user_name, "");
-
pstrcpy(cli_info.myhostname, "");
pstrcpy(cli_info.dest_host, "");
- cli_info.dest_ip.s_addr = 0;
+ /* init client_info struct */
+ cli_info.dest_ip.s_addr = 0;
cli_info.show_prompt = True;
-
ZERO_STRUCT(cli_info.dom.level3_sid);
ZERO_STRUCT(cli_info.dom.level5_sid);
fstrcpy(cli_info.dom.level3_dom, "");
codepage_initialise(lp_client_code_page());
+ /* parse the command line args
+ init the first connection if possible
+ process a command if passed in on the command line */
status = cmd_set(&cli_info, argc, argv);
+ /* Should we exit? Are we done? */
if (cmd_set_options & (CMD_HELP|CMD_STR)) {
free_connections();
get_safe_nt_error_msg(status, msg, sizeof(msg));
DEBUG(3, ("%s client started (version %s)\n",
timestring(False), VERSION));
+ /* enter shell mode */
status = process(&cli_info, NULL);
+ /* cleanup */
free_connections();
-
free_cmd_set_array(num_commands, commands);
num_commands = 0;
commands = NULL;
+ /* report and exit */
get_safe_nt_error_msg(status, msg, sizeof(msg));
report(out_hnd, "Exit Status: %s\n", msg);
-
return status;
}
*/
if (!process_exists(pid)) {
- tdb_delete(tdb, message_key_pid(pid));
DEBUG(2,("message_send_pid: pid %d doesn't exist\n", (int)pid));
+ tdb_delete(tdb, message_key_pid(pid));
return False;
}
- using the lp_usernamelevel() for permutations
Note that this can change user!
****************************************************************************/
+
struct passwd *Get_Pwnam(char *user,BOOL allow_change)
{
fstring user2, orig_username;
- int usernamelevel = lp_usernamelevel();
+ int usernamelevel = lp_usernamelevel();
struct passwd *ret;
if (!user || !(*user))
/* Initialise cli_state information */
- ZERO_STRUCTP(cli);
-
if (!cli_initialise(cli)) {
return NULL;
}
/* Open a LSA policy handle */
uint32 cli_lsa_open_policy(struct cli_state *cli, BOOL sec_qos,
- uint32 des_access, POLICY_HND *hnd)
+ uint32 des_access, POLICY_HND *pol)
{
prs_struct qbuf, rbuf;
LSA_Q_OPEN_POL q;
goto done;
}
- result = r.status;
-
/* Return output parameters */
- if (result == NT_STATUS_NOPROBLEMO) {
- *hnd = r.pol;
+ if ((result = r.status) == NT_STATUS_NOPROBLEMO) {
+ *pol = r.pol;
}
done:
/* Close a LSA policy handle */
-uint32 cli_lsa_close(struct cli_state *cli, POLICY_HND *hnd)
+uint32 cli_lsa_close(struct cli_state *cli, POLICY_HND *pol)
{
prs_struct qbuf, rbuf;
LSA_Q_CLOSE q;
/* Marshall data and send request */
- init_lsa_q_close(&q, hnd);
+ init_lsa_q_close(&q, pol);
if (!lsa_io_q_close("", &q, &qbuf, 0) ||
!rpc_api_pipe_req(cli, LSA_CLOSE, &qbuf, &rbuf)) {
goto done;
}
- result = r.status;
-
/* Return output parameters */
- if (result == NT_STATUS_NOPROBLEMO) {
- *hnd = r.pol;
+ if ((result = r.status) == NT_STATUS_NOPROBLEMO) {
+ *pol = r.pol;
}
done:
/* Lookup a list of sids */
-uint32 cli_lsa_lookup_sids(struct cli_state *cli, POLICY_HND *hnd,
+uint32 cli_lsa_lookup_sids(struct cli_state *cli, POLICY_HND *pol,
int num_sids, DOM_SID *sids, char ***names,
uint32 **types, int *num_names)
{
/* Marshall data and send request */
- init_q_lookup_sids(cli->mem_ctx, &q, hnd, num_sids, sids, 1);
+ init_q_lookup_sids(cli->mem_ctx, &q, pol, num_sids, sids, 1);
if (!lsa_io_q_lookup_sids("", &q, &qbuf, 0) ||
!rpc_api_pipe_req(cli, LSA_LOOKUPSIDS, &qbuf, &rbuf)) {
result = r.status;
- if (result != 0 && r.status != 0x107 &&
- r.status != (0xC0000000 | NT_STATUS_NONE_MAPPED)) {
+ if (result != NT_STATUS_NOPROBLEMO && result != 0x00000107 &&
+ result != (0xC0000000 | NT_STATUS_NONE_MAPPED)) {
/* An actual error occured */
/* Lookup a list of names */
-uint32 cli_lsa_lookup_names(struct cli_state *cli, POLICY_HND *hnd,
+uint32 cli_lsa_lookup_names(struct cli_state *cli, POLICY_HND *pol,
int num_names, char **names, DOM_SID **sids,
uint32 **types, int *num_sids)
{
/* Marshall data and send request */
- init_q_lookup_names(cli->mem_ctx, &q, hnd, num_names, names);
+ init_q_lookup_names(cli->mem_ctx, &q, pol, num_names, names);
if (!lsa_io_q_lookup_names("", &q, &qbuf, 0) ||
!rpc_api_pipe_req(cli, LSA_LOOKUPNAMES, &qbuf, &rbuf)) {
result = r.status;
- if (result != 0 && result != (0xC0000000 | NT_STATUS_NONE_MAPPED)) {
+ if (result != NT_STATUS_NOPROBLEMO &&
+ result != (0xC0000000 | NT_STATUS_NONE_MAPPED)) {
/* An actual error occured */
/* Query info policy */
-uint32 cli_lsa_query_info_policy(struct cli_state *cli, POLICY_HND *hnd,
+uint32 cli_lsa_query_info_policy(struct cli_state *cli, POLICY_HND *pol,
uint16 info_class, fstring domain_name,
DOM_SID * domain_sid)
{
/* Marshall data and send request */
- init_q_query(&q, hnd, info_class);
+ init_q_query(&q, pol, info_class);
if (!lsa_io_q_query("", &q, &qbuf, 0) ||
!rpc_api_pipe_req(cli, LSA_QUERYINFOPOLICY, &qbuf, &rbuf)) {
goto done;
}
- result = r.status;
-
- if (result != NT_STATUS_NOPROBLEMO) {
+ if ((result = r.status) != NT_STATUS_NOPROBLEMO) {
goto done;
}
return result;
}
+
+/* Enumerate list of trusted domains */
+
+uint32 cli_lsa_enum_trust_dom(struct cli_state *cli, POLICY_HND *pol,
+ uint32 *enum_ctx, uint32 *num_domains,
+ char ***domain_names, DOM_SID **domain_sids)
+{
+ prs_struct qbuf, rbuf;
+ LSA_Q_ENUM_TRUST_DOM q;
+ LSA_R_ENUM_TRUST_DOM r;
+ uint32 result;
+ int i;
+
+ ZERO_STRUCT(q);
+ ZERO_STRUCT(r);
+
+ /* Initialise parse structures */
+
+ prs_init(&qbuf, MAX_PDU_FRAG_LEN, 4, cli->mem_ctx, False);
+ prs_init(&rbuf, 0, 4, cli->mem_ctx, True);
+
+ /* Marshall data and send request */
+
+ init_q_enum_trust_dom(&q, pol, *enum_ctx, 0xffffffff);
+
+ if (!lsa_io_q_enum_trust_dom("", &q, &qbuf, 0) ||
+ !rpc_api_pipe_req(cli, LSA_ENUMTRUSTDOM, &qbuf, &rbuf)) {
+ result = NT_STATUS_UNSUCCESSFUL;
+ goto done;
+ }
+
+ /* Unmarshall response */
+
+ if (!lsa_io_r_enum_trust_dom("", &r, &rbuf, 0)) {
+ result = NT_STATUS_UNSUCCESSFUL;
+ goto done;
+ }
+
+ result = r.status;
+
+ if (result != NT_STATUS_NOPROBLEMO && result != 0x8000001a) {
+
+ /* An actual error ocured */
+
+ goto done;
+ }
+
+ result = NT_STATUS_NOPROBLEMO;
+
+ /* Return output parameters */
+
+ if (!((*domain_names) = (char **)malloc(sizeof(char *) *
+ r.num_domains))) {
+ DEBUG(0, ("cli_lsa_enum_trust_dom(): out of memory\n"));
+ result = NT_STATUS_UNSUCCESSFUL;
+ goto done;
+ }
+
+ if (!((*domain_sids) = (DOM_SID *)malloc(sizeof(DOM_SID) *
+ r.num_domains))) {
+ DEBUG(0, ("cli_lsa_enum_trust_dom(): out of memory\n"));
+ result = NT_STATUS_UNSUCCESSFUL;
+ goto done;
+ }
+
+ for (i = 0; i < r.num_domains; i++) {
+ fstring tmp;
+
+ unistr2_to_ascii(tmp, &r.uni_domain_name[i], sizeof(tmp) - 1);
+ (*domain_names)[i] = strdup(tmp);
+ sid_copy(&(*domain_sids)[i], &r.domain_sid[i].sid);
+ }
+
+ *num_domains = r.num_domains;
+ *enum_ctx = r.enum_context;
+
+ lsa_free_r_enum_trust_dom(&r);
+
+ done:
+ prs_mem_free(&qbuf);
+ prs_mem_free(&rbuf);
+
+ return result;
+}
time_t t = time(NULL);
slprintf(keystr, sizeof(keystr), "CACHESEQ/%s", domain_name);
+ dos_to_unix(keystr, True); /* Convert key to unix-codepage */
dbuf = tdb_fetch_by_string(cache_tdb, keystr);
if (!dbuf.dptr || dbuf.dsize != sizeof(rec)) {
goto refetch;
fstring keystr;
slprintf(keystr,sizeof(keystr),"CACHESEQ %s/%s/%s",
domain_name, cache_type, subkey?subkey:"");
+ dos_to_unix(keystr, True); /* Convert key to unix-codepage */
tdb_store_int(cache_tdb, keystr, cached_sequence_number(domain_name));
}
uint32 seq_num;
slprintf(keystr,sizeof(keystr),"CACHESEQ %s/%s/%s",
domain_name, cache_type, subkey?subkey:"");
+ dos_to_unix(keystr, True); /* Convert key to unix-codepage */
seq_num = (uint32)tdb_fetch_int(cache_tdb, keystr);
DEBUG(4,("%s is %u\n", keystr, (unsigned)seq_num));
return seq_num;
/* Store data as a mega-huge chunk in the tdb */
slprintf(keystr, sizeof(keystr), "%s CACHE DATA/%s", cache_type,
domain_name);
-
+ dos_to_unix(keystr, True); /* Convert key to unix-codepage */
tdb_store_by_string(cache_tdb, keystr,
sam_entries, sizeof(struct acct_info) * num_sam_entries);
/* Create key for store */
slprintf(keystr, sizeof(keystr), "%s/%s/%s", cache_type, domain, name);
+ dos_to_unix(keystr, True); /* Convert key to unix-codepage */
DEBUG(4, ("filling cache entry %s\n", keystr));
/* Fill extra data */
slprintf(keystr, sizeof(keystr), "%s/%s/%s DATA", CACHE_TYPE_GROUP, domain, group_name);
+ dos_to_unix(keystr, True); /* Convert key to unix-codepage */
tdb_store_by_string(cache_tdb, keystr, extra_data, extra_data_len);
set_cache_sequence_number(domain, CACHE_TYPE_GROUP, group_name);
/* Fill extra data */
slprintf(keystr, sizeof(keystr), "%s/%s/%s DATA", CACHE_TYPE_GROUP, domain, gidstr);
+ dos_to_unix(keystr, True); /* Convert key to unix-codepage */
tdb_store_by_string(cache_tdb, keystr, extra_data, extra_data_len);
set_cache_sequence_number(domain, CACHE_TYPE_GROUP, gidstr);
/* Create key */
slprintf(keystr, sizeof(keystr), "%s CACHE DATA/%s", cache_type,
domain_name);
+ dos_to_unix(keystr, True); /* Convert key to unix-codepage */
/* Fetch cache information */
data = tdb_fetch_by_string(cache_tdb, keystr);
/* Create key for lookup */
slprintf(keystr, sizeof(keystr), "%s/%s/%s", cache_type, domain, name);
+ dos_to_unix(keystr, True); /* Convert key to unix-codepage */
/* Look up cache entry */
data = tdb_fetch_by_string(cache_tdb, keystr);
/* Fetch extra data */
slprintf(keystr, sizeof(keystr), "%s/%s/%s DATA", CACHE_TYPE_GROUP, domain_name, group);
+ dos_to_unix(keystr, True); /* Convert key to unix-codepage */
data = tdb_fetch_by_string(cache_tdb, keystr);
if (!data.dptr) return False;
/* Fetch extra data */
slprintf(keystr, sizeof(keystr), "%s/%s/%s DATA", CACHE_TYPE_GROUP, domain_name, gidstr);
+ dos_to_unix(keystr, True); /* Convert key to unix-codepage */
data = tdb_fetch_by_string(cache_tdb, keystr);
if (!data.dptr) return False;
/* Check if rid is present in database */
slprintf(keystr, sizeof(keystr), "%s/%d", domain_name, rid);
+ dos_to_unix(keystr, True); /* Convert key to unix-codepage */
key.dptr = keystr;
key.dsize = strlen(keystr) + 1;
int fd;
static int initialised;
struct in_addr *ret;
- char *p;
+ struct in_addr p;
int j;
if (!initialised) {
* goto out;
* }
*/
- p = lp_wins_server();
- if (p && *p) {
- ret = name_query(fd,name,0x20,False,True, *interpret_addr2(p), count);
+ p = wins_srv_ip();
+ if( !zero_ip(p) ) {
+ ret = name_query(fd,name,0x20,False,True, p, count);
goto out;
}
size_t size;
slprintf(key, sizeof(key), "%s/%s", SECRETS_DOMAIN_SID, domain);
+ dos_to_unix(key, True); /* Convert key to unix-codepage */
dyn_sid = (DOM_SID *)secrets_fetch(key, &size);
if (dyn_sid == NULL)
{
static fstring keystr;
slprintf(keystr,sizeof(keystr),"%s/%s", SECRETS_MACHINE_ACCT_PASS, domain);
+ dos_to_unix(keystr, True); /* Convert key to unix-codepage */
return keystr;
}
}
slprintf(keystr, sizeof(keystr), "USER_%s", name);
+ dos_to_unix(keystr, True); /* Convert key to unix-codepage */
key.dptr = keystr;
key.dsize = strlen (keystr) + 1;
if (tdb_delete(pwd_tdb, key) != TDB_SUCCESS)
memcpy (tdb_entry->strings + tdb_entry->munged_dial_offset, newpwd->munged_dial, munged_dial_len);
slprintf(keystr, sizeof(keystr), "USER_%s", newpwd->smb_name);
+ dos_to_unix(keystr, True); /* Convert key to unix-codepage */
key.dptr = keystr;
key.dsize = strlen (keystr) + 1;
memcpy (tdb_entry->strings + tdb_entry->munged_dial_offset, newpwd->munged_dial, munged_dial_len);
slprintf(keystr, sizeof(keystr), "USER_%s", newpwd->smb_name);
+ dos_to_unix(keystr, True); /* Convert key to unix-codepage */
key.dptr = keystr;
key.dsize = strlen (keystr) + 1;
}
slprintf(keystr, sizeof(keystr), "USER_%s", name);
+ dos_to_unix(keystr, True); /* Convert key to unix-codepage */
key.dptr = keystr;
key.dsize = strlen (keystr) + 1;
(*list)[i].bottom);
if (len > sizeof(buf)) break;
slprintf(key, sizeof(key), "%s%s", FORMS_PREFIX, (*list)[i].name);
+ dos_to_unix(key, True); /* Convert key to unix-codepage */
kbuf.dsize = strlen(key)+1;
kbuf.dptr = key;
dbuf.dsize = len;
}
slprintf(key, sizeof(key), "%s%s", FORMS_PREFIX, (*list)[n].name);
+ dos_to_unix(key, True); /* Convert key to unix-codepage */
kbuf.dsize = strlen(key)+1;
kbuf.dptr = key;
if (tdb_delete(tdb, kbuf) != 0) {
slprintf(directory, sizeof(directory), "\\print$\\%s\\%d\\", architecture, driver->cversion);
-
- fstrcpy(temp_name, driver->driverpath);
- slprintf(driver->driverpath, sizeof(driver->driverpath), "%s%s", directory, temp_name);
+ /* .inf files do not always list a file for each of the four standard files.
+ * Don't prepend a path to a null filename, or client claims:
+ * "The server on which the printer resides does not have a suitable
+ * <printer driver name> printer driver installed. Click OK if you
+ * wish to install the driver on your local machine."
+ */
+ if (strlen(driver->driverpath)) {
+ fstrcpy(temp_name, driver->driverpath);
+ slprintf(driver->driverpath, sizeof(driver->driverpath), "%s%s", directory, temp_name);
+ }
- fstrcpy(temp_name, driver->datafile);
- slprintf(driver->datafile, sizeof(driver->datafile), "%s%s", directory, temp_name);
+ if (strlen(driver->datafile)) {
+ fstrcpy(temp_name, driver->datafile);
+ slprintf(driver->datafile, sizeof(driver->datafile), "%s%s", directory, temp_name);
+ }
- fstrcpy(temp_name, driver->configfile);
- slprintf(driver->configfile, sizeof(driver->configfile), "%s%s", directory, temp_name);
+ if (strlen(driver->configfile)) {
+ fstrcpy(temp_name, driver->configfile);
+ slprintf(driver->configfile, sizeof(driver->configfile), "%s%s", directory, temp_name);
+ }
- fstrcpy(temp_name, driver->helpfile);
- slprintf(driver->helpfile, sizeof(driver->helpfile), "%s%s", directory, temp_name);
+ if (strlen(driver->helpfile)) {
+ fstrcpy(temp_name, driver->helpfile);
+ slprintf(driver->helpfile, sizeof(driver->helpfile), "%s%s", directory, temp_name);
+ }
if (driver->dependentfiles) {
for (i=0; *driver->dependentfiles[i]; i++) {
- fstrcpy(temp_name, driver->dependentfiles[i]);
- slprintf(driver->dependentfiles[i], sizeof(driver->dependentfiles[i]), "%s%s", directory, temp_name);
+ fstrcpy(temp_name, driver->dependentfiles[i]);
+ slprintf(driver->dependentfiles[i], sizeof(driver->dependentfiles[i]), "%s%s", directory, temp_name);
}
}
slprintf(key, sizeof(key), "%s%s/%d/%s", DRIVERS_PREFIX, architecture, driver->cversion, driver->name);
+ dos_to_unix(key, True); /* Convert key to unix-codepage */
DEBUG(5,("add_a_printer_driver_3: Adding driver with key %s\n", key ));
pstring key;
TDB_DATA kbuf;
- slprintf(key, sizeof(key), "%s%s",
- PRINTERS_PREFIX, sharename);
+ slprintf(key, sizeof(key), "%s%s", PRINTERS_PREFIX, sharename);
+ dos_to_unix(key, True); /* Convert key to unix-codepage */
kbuf.dptr=key;
kbuf.dsize=strlen(key)+1;
}
- slprintf(key, sizeof(key), "%s%s",
- PRINTERS_PREFIX, info->sharename);
+ slprintf(key, sizeof(key), "%s%s", PRINTERS_PREFIX, info->sharename);
+ dos_to_unix(key, True); /* Convert key to unix-codepage */
kbuf.dptr = key;
kbuf.dsize = strlen(key)+1;
ZERO_STRUCT(info);
slprintf(key, sizeof(key), "%s%s", PRINTERS_PREFIX, sharename);
+ dos_to_unix(key, True); /* Convert key to unix-codepage */
kbuf.dptr = key;
kbuf.dsize = strlen(key)+1;
pstring_sub(syscmd, "%p", p);
standard_sub_snum(snum,syscmd);
- /* Convert script args to unix-codepage */
- dos_to_unix(syscmd, True);
+ /* Convert script args to unix-codepage */
+ dos_to_unix(syscmd, True);
ret = smbrun(syscmd,outfile,False);
DEBUG(3,("Running the command `%s' gave %d\n",syscmd,ret));
{
fstring key;
slprintf(key, sizeof(key), "CACHE/%s", lp_servicename(snum));
+ dos_to_unix(key, True); /* Convert key to unix-codepage */
tdb_store_int(tdb, key, -1);
}
struct traverse_struct tstruct;
fstring keystr, printer_name;
TDB_DATA data, key;
-
+
+ /* Convert printer name (i.e. share name) to unix-codepage for all of the
+ * following tdb key generation */
fstrcpy(printer_name, lp_servicename(snum));
+ dos_to_unix(printer_name, True);
/*
* Update the cache time FIRST ! Stops others doing this
/* store the new queue status structure */
slprintf(keystr, sizeof(keystr), "STATUS/%s", printer_name);
- key.dptr = keystr;
+ key.dptr = keystr;
key.dsize = strlen(keystr);
status.qcount = qcount;
time_t t2, t = time(NULL);
slprintf(key, sizeof(key), "CACHE/%s", lp_servicename(snum));
+ dos_to_unix(key, True); /* Convert key to unix-codepage */
t2 = tdb_fetch_int(tdb, key);
if (t2 == ((time_t)-1) || (t - t2) >= lp_lpqcachetime()) {
DEBUG(3, ("print cache expired\n"));
ZERO_STRUCTP(status);
slprintf(keystr, sizeof(keystr), "STATUS/%s", lp_servicename(snum));
+ dos_to_unix(keystr, True); /* Convert key to unix-codepage */
key.dptr = keystr;
key.dsize = strlen(keystr);
data = tdb_fetch(tdb, key);
*/
ZERO_STRUCTP(status);
slprintf(keystr, sizeof(keystr), "STATUS/%s", lp_servicename(snum));
+ dos_to_unix(keystr, True); /* Convert key to unix-codepage */
key.dptr = keystr;
key.dsize = strlen(keystr);
data = tdb_fetch(tdb, key);
int njobs, i;
njobs = print_queue_status(snum, &queue, &status);
- for (i=0;i<njobs;i++) {
- if (print_access_check(user, snum, PRINTER_ACCESS_ADMINISTER)) {
+
+ if (print_access_check(user, snum, PRINTER_ACCESS_ADMINISTER)) {
+ for (i=0;i<njobs;i++) {
print_job_delete1(queue[i].job);
}
}
}
done:
- DEBUG(10, ("sec_equal(): secdescs are identical\n"));
+ DEBUG(10, ("sec_desc_equal(): secdescs are identical\n"));
return True;
}
********************************************************************/
static void fill_printer_driver_info_2(DRIVER_INFO_2 *info, NT_PRINTER_DRIVER_INFO_LEVEL driver, fstring servername)
{
- pstring temp_driverpath;
- pstring temp_datafile;
- pstring temp_configfile;
+ pstring temp;
info->version=driver.info_3->cversion;
init_unistr( &info->name, driver.info_3->name );
init_unistr( &info->architecture, driver.info_3->environment );
- snprintf(temp_driverpath, sizeof(temp_driverpath)-1, "\\\\%s%s", servername, driver.info_3->driverpath);
- init_unistr( &info->driverpath, temp_driverpath );
- snprintf(temp_datafile, sizeof(temp_datafile)-1, "\\\\%s%s", servername, driver.info_3->datafile);
- init_unistr( &info->datafile, temp_datafile );
+ if (strlen(driver.info_3->driverpath)) {
+ snprintf(temp, sizeof(temp)-1, "\\\\%s%s", servername, driver.info_3->driverpath);
+ init_unistr( &info->driverpath, temp );
+ } else
+ init_unistr( &info->driverpath, "" );
- snprintf(temp_configfile, sizeof(temp_configfile)-1, "\\\\%s%s", servername, driver.info_3->configfile);
- init_unistr( &info->configfile, temp_configfile );
+ if (strlen(driver.info_3->datafile)) {
+ snprintf(temp, sizeof(temp)-1, "\\\\%s%s", servername, driver.info_3->datafile);
+ init_unistr( &info->datafile, temp );
+ } else
+ init_unistr( &info->datafile, "" );
+
+ if (strlen(driver.info_3->configfile)) {
+ snprintf(temp, sizeof(temp)-1, "\\\\%s%s", servername, driver.info_3->configfile);
+ init_unistr( &info->configfile, temp );
+ } else
+ init_unistr( &info->configfile, "" );
}
/********************************************************************
********************************************************************/
static void fill_printer_driver_info_3(DRIVER_INFO_3 *info, NT_PRINTER_DRIVER_INFO_LEVEL driver, fstring servername)
{
- pstring temp_driverpath;
- pstring temp_datafile;
- pstring temp_configfile;
- pstring temp_helpfile;
+ pstring temp;
ZERO_STRUCTP(info);
init_unistr( &info->name, driver.info_3->name );
init_unistr( &info->architecture, driver.info_3->environment );
- snprintf(temp_driverpath, sizeof(temp_driverpath)-1, "\\\\%s%s", servername, driver.info_3->driverpath);
- init_unistr( &info->driverpath, temp_driverpath );
-
- snprintf(temp_datafile, sizeof(temp_datafile)-1, "\\\\%s%s", servername, driver.info_3->datafile);
- init_unistr( &info->datafile, temp_datafile );
-
- snprintf(temp_configfile, sizeof(temp_configfile)-1, "\\\\%s%s", servername, driver.info_3->configfile);
- init_unistr( &info->configfile, temp_configfile );
-
- snprintf(temp_helpfile, sizeof(temp_helpfile)-1, "\\\\%s%s", servername, driver.info_3->helpfile);
- init_unistr( &info->helpfile, temp_helpfile );
+ if (strlen(driver.info_3->driverpath)) {
+ snprintf(temp, sizeof(temp)-1, "\\\\%s%s", servername, driver.info_3->driverpath);
+ init_unistr( &info->driverpath, temp );
+ } else
+ init_unistr( &info->driverpath, "" );
+
+ if (strlen(driver.info_3->datafile)) {
+ snprintf(temp, sizeof(temp)-1, "\\\\%s%s", servername, driver.info_3->datafile);
+ init_unistr( &info->datafile, temp );
+ } else
+ init_unistr( &info->datafile, "" );
+
+ if (strlen(driver.info_3->configfile)) {
+ snprintf(temp, sizeof(temp)-1, "\\\\%s%s", servername, driver.info_3->configfile);
+ init_unistr( &info->configfile, temp );
+ } else
+ init_unistr( &info->configfile, "" );
+
+ if (strlen(driver.info_3->helpfile)) {
+ snprintf(temp, sizeof(temp)-1, "\\\\%s%s", servername, driver.info_3->helpfile);
+ init_unistr( &info->helpfile, temp );
+ } else
+ init_unistr( &info->helpfile, "" );
init_unistr( &info->monitorname, driver.info_3->monitorname );
init_unistr( &info->defaultdatatype, driver.info_3->defaultdatatype );
static void fill_printer_driver_info_6(DRIVER_INFO_6 *info, NT_PRINTER_DRIVER_INFO_LEVEL driver, fstring servername)
{
- pstring temp_driverpath;
- pstring temp_datafile;
- pstring temp_configfile;
- pstring temp_helpfile;
+ pstring temp;
fstring nullstr;
ZERO_STRUCTP(info);
init_unistr( &info->name, driver.info_3->name );
init_unistr( &info->architecture, driver.info_3->environment );
- snprintf(temp_driverpath, sizeof(temp_driverpath)-1, "\\\\%s%s", servername, driver.info_3->driverpath);
- init_unistr( &info->driverpath, temp_driverpath );
-
- snprintf(temp_datafile, sizeof(temp_datafile)-1, "\\\\%s%s", servername, driver.info_3->datafile);
- init_unistr( &info->datafile, temp_datafile );
-
- snprintf(temp_configfile, sizeof(temp_configfile)-1, "\\\\%s%s", servername, driver.info_3->configfile);
- init_unistr( &info->configfile, temp_configfile );
-
- snprintf(temp_helpfile, sizeof(temp_helpfile)-1, "\\\\%s%s", servername, driver.info_3->helpfile);
- init_unistr( &info->helpfile, temp_helpfile );
-
+ if (strlen(driver.info_3->driverpath)) {
+ snprintf(temp, sizeof(temp)-1, "\\\\%s%s", servername, driver.info_3->driverpath);
+ init_unistr( &info->driverpath, temp );
+ } else
+ init_unistr( &info->driverpath, "" );
+
+ if (strlen(driver.info_3->datafile)) {
+ snprintf(temp, sizeof(temp)-1, "\\\\%s%s", servername, driver.info_3->datafile);
+ init_unistr( &info->datafile, temp );
+ } else
+ init_unistr( &info->datafile, "" );
+
+ if (strlen(driver.info_3->configfile)) {
+ snprintf(temp, sizeof(temp)-1, "\\\\%s%s", servername, driver.info_3->configfile);
+ init_unistr( &info->configfile, temp );
+ } else
+ init_unistr( &info->configfile, "" );
+
+ if (strlen(driver.info_3->helpfile)) {
+ snprintf(temp, sizeof(temp)-1, "\\\\%s%s", servername, driver.info_3->helpfile);
+ init_unistr( &info->helpfile, temp );
+ } else
+ init_unistr( &info->helpfile, "" );
+
init_unistr( &info->monitorname, driver.info_3->monitorname );
init_unistr( &info->defaultdatatype, driver.info_3->defaultdatatype );
shift
shift
-for d in $BASEDIR $BINDIR $LIBDIR $VARDIR; do
+for d in $BASEDIR $BINDIR $LIBDIR $VARDIR $BASEDIR/private; do
if [ ! -d $d ]; then
mkdir $d
if [ ! -d $d ]; then
-#!/bin/sh -v
+#!/bin/sh
SRCDIR=$1
+shift
+FILES=$@
+
+if test -z $FILES; then
+ FILES=*.yo
+fi
YODLDIR=$SRCDIR/../docs/yodldocs
MANPAGEDIR=$SRCDIR/../docs/manpages
cd $YODLDIR
-for d in *.yo
+for d in $FILES
do
#
key.pid = sys_getpid();
key.cnum = conn?conn->cnum:-1;
fstrcpy(key.name, name);
+ dos_to_unix(key.name, True); /* Convert key to unix-codepage */
kbuf.dptr = (char *)&key;
kbuf.dsize = sizeof(key);
key.pid = sys_getpid();
key.cnum = conn?conn->cnum:-1;
fstrcpy(key.name, name);
+ dos_to_unix(key.name, True); /* Convert key to unix-codepage */
kbuf.dptr = (char *)&key;
kbuf.dsize = sizeof(key);
*/
if ((name_type != SID_NAME_DOM_GRP) && (name_type != SID_NAME_ALIAS) && (name_type != SID_NAME_WKN_GRP)) {
- DEBUG(10,("sid_to_gid: winbind lookup succeeded but SID is not a know group (%u)\n",
+ DEBUG(10,("sid_to_gid: winbind lookup succeeded but SID is not a known group (%u)\n",
(unsigned int)name_type ));
return local_sid_to_gid(pgid, psid, sidtype);
usage();
}
+ /* Only load interfaces if we are doing network operations. */
+
+ if (joining_domain || remote_machine) {
+ load_interfaces();
+ }
+
if(joining_domain) {
if (argc != 0)
usage();
* via a remote machine (even if that machine is
* localhost).
*/
+
+ load_interfaces(); /* Delayed from main() */
+
if (remote_machine == NULL) {
remote_machine = "127.0.0.1";
}
-
if (remote_machine != NULL) {
old_passwd = get_pass("Old SMB password:",stdin_passwd_get);
}
codepage_initialise(lp_client_code_page());
- load_interfaces();
secrets_init();
/* Check the effective uid - make sure we are not setuid */