r5902: A rather large change...
[samba.git] / source / client / smbmount.c
index dd72672bbb7fd360ed25bd233eb25085c732f471..7f73807ec6b1262324983342e3d72dd11520d42c 100644 (file)
@@ -19,6 +19,7 @@
 */
 
 #include "includes.h"
+#include "system/passwd.h"
 
 #include <mntent.h>
 #include <asm/types.h>
@@ -35,7 +36,7 @@ static pstring mpoint;
 static pstring service;
 static pstring options;
 
-static struct in_addr dest_ip;
+static struct ipv4_addr dest_ip;
 static BOOL have_ip;
 static int smb_port = 0;
 static BOOL got_user;
@@ -118,7 +119,7 @@ static struct smbcli_state *do_connection(char *the_service)
        struct smbcli_state *c;
        struct nmb_name called, calling;
        char *server_n;
-       struct in_addr ip;
+       struct ipv4_addr ip;
        pstring server;
        char *share;
 
@@ -495,7 +496,7 @@ static void init_mount(void)
 
                asprintf(&smbmnt_path, "%s/smbmnt", dyn_BINDIR);
                
-               if (file_exist(smbmnt_path, NULL)) {
+               if (file_exist(smbmnt_path)) {
                        execv(smbmnt_path, args);
                        fprintf(stderr,
                                "smbfs/init_mount: execv of %s failed. Error was %s.",
@@ -552,7 +553,7 @@ static void get_password_file(void)
                sscanf(p, "%d", &fd);
                close_it = False;
        } else if ((p = getenv("PASSWD_FILE")) != NULL) {
-               fd = sys_open(p, O_RDONLY, 0);
+               fd = open(p, O_RDONLY, 0);
                pstrcpy(spec, p);
                if (fd < 0) {
                        fprintf(stderr, "Error opening PASSWD_FILE %s: %s\n",