summaryrefslogtreecommitdiff
path: root/source3/lib/username.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-09-10 12:46:42 +0000
committerAndrew Tridgell <tridge@samba.org>2001-09-10 12:46:42 +0000
commit79139fe8d882c39620b0d52ef081f639d1294917 (patch)
treedda0b12e26af7feb5872c093be1183b01c6a4065 /source3/lib/username.c
parentb12a4dd9b655485420d5c67dd143d8f49ac28a40 (diff)
downloadsamba-79139fe8d882c39620b0d52ef081f639d1294917.tar.gz
samba-79139fe8d882c39620b0d52ef081f639d1294917.tar.bz2
samba-79139fe8d882c39620b0d52ef081f639d1294917.zip
convert more code to use XFILE
(This used to be commit fe6679dffba9a92bb35933ad52172c9be0e9ef90)
Diffstat (limited to 'source3/lib/username.c')
-rw-r--r--source3/lib/username.c8
1 files changed, 4 insertions, 4 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