diff options
Diffstat (limited to 'source3/client')
-rw-r--r-- | source3/client/client.c | 8 | ||||
-rw-r--r-- | source3/client/clitar.c | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/source3/client/client.c b/source3/client/client.c index 8356d99b7b..c4c269293b 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -496,7 +496,7 @@ static void do_get(char *rname,char *lname) if(!strcmp(lname,"-")) { handle = fileno(stdout); } else { - handle = open(lname,O_WRONLY|O_CREAT|O_TRUNC,0644); + handle = sys_open(lname,O_WRONLY|O_CREAT|O_TRUNC,0644); newhandle = True; } if (handle < 0) { @@ -818,7 +818,7 @@ static void do_put(char *rname,char *lname) f = stdin; /* size of file is not known */ } else { - f = fopen(lname,"r"); + f = sys_fopen(lname,"r"); } if (!f) { @@ -982,7 +982,7 @@ static void cmd_mput(void) "/bin/ls %s > %s",p,tmpname); system(cmd); - f = fopen(tmpname,"r"); + f = sys_fopen(tmpname,"r"); if (!f) continue; while (!feof(f)) { @@ -1787,7 +1787,7 @@ static void get_password_file(void) sscanf(p, "%d", &fd); close_it = False; } else if ((p = getenv("PASSWD_FILE")) != NULL) { - fd = open(p, O_RDONLY); + fd = sys_open(p, O_RDONLY, 0); pstrcpy(spec, p); if (fd < 0) { fprintf(stderr, "Error opening PASSWD_FILE %s: %s\n", diff --git a/source3/client/clitar.c b/source3/client/clitar.c index e7915d1066..a2b23817f5 100644 --- a/source3/client/clitar.c +++ b/source3/client/clitar.c @@ -1539,7 +1539,7 @@ static int read_inclusion_file(char *filename) clipn = 0; buf[MAXPATHLEN] = '\0'; /* guarantee null-termination */ - if ((inclusion = fopen(filename, "r")) == NULL) { + if ((inclusion = sys_fopen(filename, "r")) == NULL) { /* XXX It would be better to include a reason for failure, but without * autoconf, it's hard to use strerror, sys_errlist, etc. */ @@ -1823,8 +1823,8 @@ int tar_parseargs(int argc, char *argv[], char *Optarg, int Optind) } tarhandle=-1; } else - if ((tar_type=='x' && (tarhandle = open(argv[Optind], O_RDONLY)) == -1) - || (tar_type=='c' && (tarhandle=creat(argv[Optind], 0644)) < 0)) + if ((tar_type=='x' && (tarhandle = sys_open(argv[Optind], O_RDONLY, 0)) == -1) + || (tar_type=='c' && (tarhandle=sys_creat(argv[Optind], 0644)) < 0)) { DEBUG(0,("Error opening local file %s - %s\n", argv[Optind], strerror(errno))); |