r10246: Remove unused function
authorJelmer Vernooij <jelmer@samba.org>
Thu, 15 Sep 2005 20:03:35 +0000 (20:03 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:38:11 +0000 (13:38 -0500)
Move auth-specific file to auth/
(This used to be commit 8aa9711a306b30da905f53148ebe352462852d74)

source4/auth/config.mk
source4/auth/pam_errors.c [moved from source4/lib/pam_errors.c with 100% similarity]
source4/lib/basic.mk
source4/lib/util_file.c

index 405f7768302e4ca6effd8605d6b66d1e2ff0ab01..7e7d4f026d705f0b7c4fb404e1c50612485db02a 100644 (file)
@@ -58,7 +58,7 @@ INIT_OBJ_FILES = \
 #######################
 
 #######################
-# Start MODULE auth_developer
+# Start MODULE auth_unix
 [MODULE::auth_unix]
 INIT_FUNCTION = auth_unix_init
 SUBSYSTEM = AUTH
@@ -66,9 +66,12 @@ INIT_OBJ_FILES = \
                auth/auth_unix.o
 REQUIRED_SUBSYSTEMS = \
                EXT_LIB_CRYPT EXT_LIB_PAM PAM_ERRORS
-# End MODULE auth_developer
+# End MODULE auth_unix
 #######################
 
+[SUBSYSTEM::PAM_ERRORS]
+OBJ_FILES = auth/pam_errors.o
+
 #######################
 # Start SUBSYSTEM AUTH
 [SUBSYSTEM::AUTH]
index 7b95632c70a43b7fcd2faf23b719e98d2229d1b7..86392cfc40cf4cb65d79d4b749283dce6732ed26 100644 (file)
@@ -35,9 +35,6 @@ INIT_OBJ_FILES = \
 # End SUBSYSTEM LIBCOMPRESION
 ################################################
 
-[SUBSYSTEM::PAM_ERRORS]
-OBJ_FILES = lib/pam_errors.o
-
 [SUBSYSTEM::GENCACHE]
 OBJ_FILES = \
                lib/gencache.o \
index 338b9547a57824e56ad465e9a3b7ee698117da2e..156d09aaf5b6a002b66aeb0e7af771dccd855fa4 100644 (file)
 #include "system/shmem.h"
 #include "system/filesys.h"
 
-/*************************************************************************
- gets a line out of a file.
- line is of format "xxxx:xxxxxx:xxxxx:".
- lines with "#" at the front are ignored.
-*************************************************************************/
-int getfileline(void *vp, char *linebuf, int linebuf_size)
-{
-       /* Static buffers we will return. */
-       FILE *fp = (FILE *)vp;
-       uint8_t   c;
-       uint8_t  *p;
-       size_t            linebuf_len;
-
-       if (fp == NULL)
-       {
-               DEBUG(0,("getfileline: Bad file pointer.\n"));
-               return -1;
-       }
-
-       /*
-        * Scan the file, a line at a time.
-        */
-       while (!feof(fp))
-       {
-               linebuf[0] = '\0';
-
-               fgets(linebuf, linebuf_size, fp);
-               if (ferror(fp))
-               {
-                       return -1;
-               }
-
-               /*
-                * Check if the string is terminated with a newline - if not
-                * then we must keep reading and discard until we get one.
-                */
-
-               linebuf_len = strlen(linebuf);
-               if (linebuf_len == 0)
-               {
-                       linebuf[0] = '\0';
-                       return 0;
-               }
-
-               if (linebuf[linebuf_len - 1] != '\n')
-               {
-                       c = '\0';
-                       while (!ferror(fp) && !feof(fp))
-                       {
-                               c = fgetc(fp);
-                               if (c == '\n')
-                               {
-                                       break;
-                               }
-                       }
-               }
-               else
-               {
-                       linebuf[linebuf_len - 1] = '\0';
-               }
-
-#ifdef DEBUG_PASSWORD
-               DEBUG(100, ("getfileline: got line |%s|\n", linebuf));
-#endif
-               if ((linebuf[0] == 0) && feof(fp))
-               {
-                       DEBUG(4, ("getfileline: end of file reached\n"));
-                       return 0;
-               }
-
-               if (linebuf[0] == '#' || linebuf[0] == '\0')
-               {
-                       DEBUG(6, ("getfileline: skipping comment or blank line\n"));
-                       continue;
-               }
-
-               p = (uint8_t *) strchr_m(linebuf, ':');
-               if (p == NULL)
-               {
-                       DEBUG(0, ("getfileline: malformed line entry (no :)\n"));
-                       continue;
-               }
-               return linebuf_len;
-       }
-       return -1;
-}
-
-
 /****************************************************************************
 read a line from a file with possible \ continuation chars. 
 Blanks at the start or end of a line are stripped.
@@ -350,7 +262,7 @@ char **fd_lines_load(int fd, int *numlines, TALLOC_CTX *mem_ctx)
 
 
 /****************************************************************************
-take a lislist of lines and modify them to produce a list where \ continues
+take a list of lines and modify them to produce a list where \ continues
 a line
 ****************************************************************************/
 void file_lines_slashcont(char **lines)