summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/username.c8
-rw-r--r--source3/lib/util_file.c6
2 files changed, 7 insertions, 7 deletions
diff --git a/source3/lib/username.c b/source3/lib/username.c
index 6abc4f9a77..9164fd3936 100644
--- a/source3/lib/username.c
+++ b/source3/lib/username.c
@@ -56,7 +56,7 @@ BOOL map_username(char *user)
{
static BOOL initialised=False;
static fstring last_from,last_to;
- FILE *f;
+ XFILE *f;
char *mapfile = lp_username_map();
char *s;
pstring buf;
@@ -82,7 +82,7 @@ BOOL map_username(char *user)
return True;
}
- f = sys_fopen(mapfile,"r");
+ f = x_fopen(mapfile,O_RDONLY, 0);
if (!f) {
DEBUG(0,("can't open username map %s. Error %s\n",mapfile, strerror(errno) ));
return False;
@@ -135,7 +135,7 @@ BOOL map_username(char *user)
fstrcpy(last_to,user);
if(return_if_mapped) {
lp_list_free (&dosuserlist);
- fclose(f);
+ x_fclose(f);
return True;
}
}
@@ -143,7 +143,7 @@ BOOL map_username(char *user)
lp_list_free (&dosuserlist);
}
- fclose(f);
+ x_fclose(f);
/*
* Setup the last_from and last_to as an optimization so
diff --git a/source3/lib/util_file.c b/source3/lib/util_file.c
index d80c09666b..8eeb3475e3 100644
--- a/source3/lib/util_file.c
+++ b/source3/lib/util_file.c
@@ -272,14 +272,14 @@ read a line from a file with possible \ continuation chars.
Blanks at the start or end of a line are stripped.
The string will be allocated if s2 is NULL
****************************************************************************/
-char *fgets_slash(char *s2,int maxlen,FILE *f)
+char *fgets_slash(char *s2,int maxlen,XFILE *f)
{
char *s=s2;
int len = 0;
int c;
BOOL start_of_line = True;
- if (feof(f))
+ if (x_feof(f))
return(NULL);
if (maxlen <2) return(NULL);
@@ -296,7 +296,7 @@ char *fgets_slash(char *s2,int maxlen,FILE *f)
while (len < maxlen-1)
{
- c = getc(f);
+ c = x_getc(f);
switch (c)
{
case '\r':