summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-09-15 20:03:35 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:38:11 -0500
commit85263c3061a4d086c9ab92b67238477cae15584f (patch)
treebaeeb52ae1c536bd6828828f78bba2f026112a23
parentfd619b4fb3a9a5c05df765d2cf57a042a4d5da2d (diff)
downloadsamba-85263c3061a4d086c9ab92b67238477cae15584f.tar.gz
samba-85263c3061a4d086c9ab92b67238477cae15584f.tar.bz2
samba-85263c3061a4d086c9ab92b67238477cae15584f.zip
r10246: Remove unused function
Move auth-specific file to auth/ (This used to be commit 8aa9711a306b30da905f53148ebe352462852d74)
-rw-r--r--source4/auth/config.mk7
-rw-r--r--source4/auth/pam_errors.c (renamed from source4/lib/pam_errors.c)0
-rw-r--r--source4/lib/basic.mk3
-rw-r--r--source4/lib/util_file.c90
4 files changed, 6 insertions, 94 deletions
diff --git a/source4/auth/config.mk b/source4/auth/config.mk
index 405f776830..7e7d4f026d 100644
--- a/source4/auth/config.mk
+++ b/source4/auth/config.mk
@@ -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]
diff --git a/source4/lib/pam_errors.c b/source4/auth/pam_errors.c
index a00464e624..a00464e624 100644
--- a/source4/lib/pam_errors.c
+++ b/source4/auth/pam_errors.c
diff --git a/source4/lib/basic.mk b/source4/lib/basic.mk
index 7b95632c70..86392cfc40 100644
--- a/source4/lib/basic.mk
+++ b/source4/lib/basic.mk
@@ -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 \
diff --git a/source4/lib/util_file.c b/source4/lib/util_file.c
index 338b9547a5..156d09aaf5 100644
--- a/source4/lib/util_file.c
+++ b/source4/lib/util_file.c
@@ -22,94 +22,6 @@
#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)