summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-11-03 00:17:12 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:05:22 -0500
commit6f214cc510a59b7a65ee9d4486baf14a3e579f73 (patch)
tree4e579f2500247716babf400b3bbf13039bacce02 /source4/libcli
parentacb23b2c5fa02ebbee762a8bf4b9d1fec40d4fea (diff)
downloadsamba-6f214cc510a59b7a65ee9d4486baf14a3e579f73.tar.gz
samba-6f214cc510a59b7a65ee9d4486baf14a3e579f73.tar.bz2
samba-6f214cc510a59b7a65ee9d4486baf14a3e579f73.zip
r3494: got rid of include/rewrite.h, and split out the dynconfig.h header
(This used to be commit 558de54ec6432a4ae90aa14a585f32c6cd03ced2)
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/namequery.c112
1 files changed, 0 insertions, 112 deletions
diff --git a/source4/libcli/namequery.c b/source4/libcli/namequery.c
index 2a67df5ffd..85270c1001 100644
--- a/source4/libcli/namequery.c
+++ b/source4/libcli/namequery.c
@@ -457,118 +457,6 @@ struct ipv4_addr *name_query(int fd,const char *name,int name_type,
}
/********************************************************
- Start parsing the lmhosts file.
-*********************************************************/
-
-XFILE *startlmhosts(char *fname)
-{
- 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( TALLOC_CTX *mem_ctx,
- XFILE *fp, pstring name, int *name_type, struct ipv4_addr *ipaddr)
-{
- pstring line;
-
- while(!x_feof(fp) && !x_ferror(fp)) {
- pstring ip,flags,extra;
- const char *ptr;
- char *ptr1;
- int count = 0;
-
- *name_type = -1;
-
- if (!fgets_slash(line,sizeof(pstring),fp))
- continue;
-
- if (*line == '#')
- continue;
-
- pstrcpy(ip,"");
- pstrcpy(name,"");
- pstrcpy(flags,"");
-
- ptr = line;
-
- if (next_token(&ptr,ip ,NULL,sizeof(ip)))
- ++count;
- if (next_token(&ptr,name ,NULL, sizeof(pstring)))
- ++count;
- if (next_token(&ptr,flags,NULL, sizeof(flags)))
- ++count;
- if (next_token(&ptr,extra,NULL, sizeof(extra)))
- ++count;
-
- if (count <= 0)
- continue;
-
- if (count > 0 && count < 2)
- {
- DEBUG(0,("getlmhostsent: Ill formed hosts line [%s]\n",line));
- continue;
- }
-
- if (count >= 4)
- {
- DEBUG(0,("getlmhostsent: too many columns in lmhosts file (obsolete syntax)\n"));
- continue;
- }
-
- DEBUG(4, ("getlmhostsent: lmhost entry: %s %s %s\n", ip, name, flags));
-
- if (strchr_m(flags,'G') || strchr_m(flags,'S'))
- {
- DEBUG(0,("getlmhostsent: group flag in lmhosts ignored (obsolete)\n"));
- continue;
- }
-
- *ipaddr = interpret_addr2(ip);
-
- /* Extra feature. If the name ends in '#XX', where XX is a hex number,
- then only add that name type. */
- if((ptr1 = strchr_m(name, '#')) != NULL)
- {
- char *endptr;
-
- ptr1++;
- *name_type = (int)strtol(ptr1, &endptr, 16);
-
- if(!*ptr1 || (endptr == ptr1))
- {
- DEBUG(0,("getlmhostsent: invalid name %s containing '#'.\n", name));
- continue;
- }
-
- *(--ptr1) = '\0'; /* Truncate at the '#' */
- }
-
- return True;
- }
-
- return False;
-}
-
-/********************************************************
- Finish parsing the lmhosts file.
-*********************************************************/
-
-void endlmhosts(XFILE *fp)
-{
- x_fclose(fp);
-}
-
-
-/********************************************************
Resolve via "bcast" method.
*********************************************************/