/*
- Unix SMB/Netbios implementation.
- Version 1.9.
+ Unix SMB/CIFS implementation.
SMB client
Copyright (C) Andrew Tridgell 1994-1998
extern pstring user_socket_options;
-extern pstring debugf;
-
extern file_info def_finfo;
#define CNV_LANG(s) dos2unix_format(s,False)
int opt;
extern char *optarg;
extern int optind;
- static pstring servicesf = CONFIGFILE;
pstring term_code;
BOOL got_pass = False;
char *cmd_str="";
- mode_t myumask = 0755;
enum client_action cli_action = CLIENT_NONE;
int nprocs = 1;
int numops = 100;
+ pstring logfile;
struct client_info cli_info;
*term_code = 0;
#endif /* KANJI */
- if (!lp_load(servicesf,True, False, False))
+ if (!lp_load(dyn_CONFIGFILE,True, False, False))
{
- fprintf(stderr, "Can't load %s - run testparm to debug it\n", servicesf);
+ fprintf(stderr, "Can't load %s - run testparm to debug it\n", dyn_CONFIGFILE);
}
DEBUGLEVEL = 0;
setup_logging(pname, True);
- TimeInit();
-
- myumask = umask(0);
- umask(myumask);
-
if (!get_myname(global_myname))
{
fprintf(stderr, "Failed to get my hostname.\n");
case 'S':
{
pstrcpy(cli_info.dest_host,optarg);
- strupper(cli_info.dest_host);
+ strupper_m(cli_info.dest_host);
cli_action = CLIENT_IPC;
break;
}
case 'I':
{
cli_info.dest_ip = *interpret_addr2(optarg);
- if (zero_ip(cli_info.dest_ip))
+ if (is_zero_ip(cli_info.dest_ip))
{
exit(1);
}
case 'l':
{
- slprintf(debugf, sizeof(debugf)-1,
+ slprintf(logfile, sizeof(logfile)-1,
"%s.client",optarg);
+ lp_set_logfile(logfile);
break;
}
case 's':
{
- pstrcpy(servicesf, optarg);
+ pstrcpy(dyn_CONFIGFILE, optarg);
break;
}
exit(1);
}
- strupper(global_myname);
+ strupper_m(global_myname);
fstrcpy(cli_info.myhostname, global_myname);
DEBUG(3,("%s client started (version %s)\n",timestring(False),VERSION));
{
pstrcpy(smb_cli->domain,lp_workgroup());
}
- strupper(smb_cli->domain);
+ strupper_m(smb_cli->domain);
load_interfaces();
}
fstrcpy(cli_info.mach_acct, cli_info.myhostname);
- strupper(cli_info.mach_acct);
+ strupper_m(cli_info.mach_acct);
fstrcat(cli_info.mach_acct, "$");
/* set the password cache info */