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
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "includes.h"
extern BOOL in_client;
extern pstring user_socket_options;
+extern char *optarg;
+extern int optind;
static pstring credentials;
static pstring my_netbios_name;
if (have_ip) ip = dest_ip;
/* have to open a new connection */
- if (!(c=cli_initialise(NULL)) || (cli_set_port(c, smb_port) != smb_port) ||
- !cli_connect(c, server_n, &ip)) {
+ if (!(c=cli_initialise()) || (cli_set_port(c, smb_port) != smb_port) ||
+ !NT_STATUS_IS_OK(cli_connect(c, server_n, &ip))) {
DEBUG(0,("%d: Connection to %s failed\n", sys_getpid(), server_n));
if (c) {
cli_shutdown(c);
c->force_dos_errors = True;
}
- if (!cli_session_setup(c, username,
- password, strlen(password),
- password, strlen(password),
- workgroup)) {
+ if (!NT_STATUS_IS_OK(cli_session_setup(c, username,
+ password, strlen(password),
+ password, strlen(password),
+ workgroup))) {
/* if a password was not supplied then try again with a
null username */
if (password[0] || !username[0] ||
- !cli_session_setup(c, "", "", 0, "", 0, workgroup)) {
+ !NT_STATUS_IS_OK(cli_session_setup(c, "", "", 0, "", 0, workgroup))) {
DEBUG(0,("%d: session setup failed: %s\n",
sys_getpid(), cli_errstr(c)));
cli_shutdown(c);
printf("Version %s\n\n",SAMBA_VERSION_STRING);
+ printf("Please be aware that smbfs is deprecated in favor of "
+ "cifs\n\n");
+
printf(
"Options:\n\
username=<arg> SMB username\n\
int opt;
char *opts;
char *opteq;
- extern char *optarg;
int val;
char *p;
****************************************************************************/
int main(int argc,char *argv[])
{
- extern char *optarg;
- extern int optind;
char *p;
DEBUGLEVEL = 1;
+ load_case_tables();
+
/* here we are interactive, even if run from autofs */
setup_logging("mount.smbfs",True);
pstrcpy(username,getenv("LOGNAME"));
}
- if (!lp_load(dyn_CONFIGFILE,True,False,False)) {
+ if (!lp_load(dyn_CONFIGFILE,True,False,False,True)) {
fprintf(stderr, "Can't load %s - run testparm to debug it\n",
dyn_CONFIGFILE);
}