summaryrefslogtreecommitdiff
path: root/source3/libsmb
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/libsmb
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/libsmb')
-rw-r--r--source3/libsmb/namequery.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c
index 39159be41b..9dea4b7694 100644
--- a/source3/libsmb/namequery.c
+++ b/source3/libsmb/namequery.c
@@ -449,26 +449,26 @@ struct in_addr *name_query(int fd,const char *name,int name_type,
Start parsing the lmhosts file.
*********************************************************/
-FILE *startlmhosts(char *fname)
+XFILE *startlmhosts(char *fname)
{
- FILE *fp = sys_fopen(fname,"r");
- if (!fp) {
- DEBUG(4,("startlmhosts: Can't open lmhosts file %s. Error was %s\n",
- fname, strerror(errno)));
- return NULL;
- }
- return fp;
+ XFILE *fp = x_fopen(fname,O_RDONLY, 0);
+ if (!fp) {
+ DEBUG(4,("startlmhosts: Can't open lmhosts file %s. Error was %s\n",
+ fname, strerror(errno)));
+ return NULL;
+ }
+ return fp;
}
/********************************************************
Parse the next line in the lmhosts file.
*********************************************************/
-BOOL getlmhostsent( FILE *fp, pstring name, int *name_type, struct in_addr *ipaddr)
+BOOL getlmhostsent( XFILE *fp, pstring name, int *name_type, struct in_addr *ipaddr)
{
pstring line;
- while(!feof(fp) && !ferror(fp)) {
+ while(!x_feof(fp) && !x_ferror(fp)) {
pstring ip,flags,extra;
char *ptr;
int count = 0;
@@ -549,9 +549,9 @@ BOOL getlmhostsent( FILE *fp, pstring name, int *name_type, struct in_addr *ipad
Finish parsing the lmhosts file.
*********************************************************/
-void endlmhosts(FILE *fp)
+void endlmhosts(XFILE *fp)
{
- fclose(fp);
+ x_fclose(fp);
}
BOOL name_register_wins(const char *name, int name_type)
@@ -741,7 +741,7 @@ static BOOL resolve_lmhosts(const char *name, int name_type,
* "lmhosts" means parse the local lmhosts file.
*/
- FILE *fp;
+ XFILE *fp;
pstring lmhost_name;
int name_type2;
struct in_addr return_ip;