diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-09-10 12:46:42 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-09-10 12:46:42 +0000 |
commit | 79139fe8d882c39620b0d52ef081f639d1294917 (patch) | |
tree | dda0b12e26af7feb5872c093be1183b01c6a4065 /source3/nmbd | |
parent | b12a4dd9b655485420d5c67dd143d8f49ac28a40 (diff) | |
download | samba-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/nmbd')
-rw-r--r-- | source3/nmbd/nmbd_lmhosts.c | 2 | ||||
-rw-r--r-- | source3/nmbd/nmbd_synclists.c | 8 | ||||
-rw-r--r-- | source3/nmbd/nmbd_winsserver.c | 10 |
3 files changed, 10 insertions, 10 deletions
diff --git a/source3/nmbd/nmbd_lmhosts.c b/source3/nmbd/nmbd_lmhosts.c index 158988813b..04ab280784 100644 --- a/source3/nmbd/nmbd_lmhosts.c +++ b/source3/nmbd/nmbd_lmhosts.c @@ -36,7 +36,7 @@ void load_lmhosts_file(char *fname) pstring name; int name_type; struct in_addr ipaddr; - FILE *fp = startlmhosts( fname ); + XFILE *fp = startlmhosts( fname ); if (!fp) { DEBUG(2,("load_lmhosts_file: Can't open lmhosts file %s. Error was %s\n", diff --git a/source3/nmbd/nmbd_synclists.c b/source3/nmbd/nmbd_synclists.c index dea68d4c27..51c9257f5a 100644 --- a/source3/nmbd/nmbd_synclists.c +++ b/source3/nmbd/nmbd_synclists.c @@ -241,7 +241,7 @@ read the completed sync info **********************************************************************/ static void complete_sync(struct sync_record *s) { - FILE *f; + XFILE *f; fstring server, type_str; unsigned type; pstring comment; @@ -249,11 +249,11 @@ static void complete_sync(struct sync_record *s) char *ptr; int count=0; - f = sys_fopen(s->fname,"r"); + f = x_fopen(s->fname,O_RDONLY, 0); if (!f) return; - while (!feof(f)) { + while (!x_feof(f)) { if (!fgets_slash(line,sizeof(pstring),f)) continue; @@ -272,7 +272,7 @@ static void complete_sync(struct sync_record *s) count++; } - fclose(f); + x_fclose(f); unlink(s->fname); diff --git a/source3/nmbd/nmbd_winsserver.c b/source3/nmbd/nmbd_winsserver.c index 0ba1aef057..03d475133e 100644 --- a/source3/nmbd/nmbd_winsserver.c +++ b/source3/nmbd/nmbd_winsserver.c @@ -173,7 +173,7 @@ Load or create the WINS database. BOOL initialise_wins(void) { time_t time_now = time(NULL); - FILE *fp; + XFILE *fp; pstring line; if(!lp_we_are_a_wins_server()) @@ -181,14 +181,14 @@ BOOL initialise_wins(void) add_samba_names_to_subnet(wins_server_subnet); - if((fp = sys_fopen(lock_path(WINS_LIST),"r")) == NULL) + if((fp = x_fopen(lock_path(WINS_LIST),O_RDONLY, 0)) == NULL) { DEBUG(2,("initialise_wins: Can't open wins database file %s. Error was %s\n", WINS_LIST, strerror(errno) )); return True; } - while (!feof(fp)) + while (!x_feof(fp)) { pstring name_str, ip_str, ttl_str, nb_flags_str; unsigned int num_ips; @@ -219,7 +219,7 @@ BOOL initialise_wins(void) version != WINS_VERSION || hash != wins_hash()) { DEBUG(0,("Discarding invalid wins.dat file [%s]\n",line)); - fclose(fp); + x_fclose(fp); return True; } continue; @@ -342,7 +342,7 @@ BOOL initialise_wins(void) free((char *)ip_list); } - fclose(fp); + x_fclose(fp); return True; } |