diff options
Diffstat (limited to 'Linux-PAM/modules/pam_time')
-rw-r--r-- | Linux-PAM/modules/pam_time/Makefile.am | 4 | ||||
-rw-r--r-- | Linux-PAM/modules/pam_time/Makefile.in | 7 | ||||
-rw-r--r-- | Linux-PAM/modules/pam_time/pam_time.c | 10 |
3 files changed, 15 insertions, 6 deletions
diff --git a/Linux-PAM/modules/pam_time/Makefile.am b/Linux-PAM/modules/pam_time/Makefile.am index 6c5ae3a2..9c63ee5e 100644 --- a/Linux-PAM/modules/pam_time/Makefile.am +++ b/Linux-PAM/modules/pam_time/Makefile.am @@ -16,11 +16,11 @@ secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \ -DPAM_TIME_CONF=\"$(SCONFIGDIR)/time.conf\" -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam +AM_LDFLAGS = -no-undefined -avoid-version -module if HAVE_VERSIONING AM_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map endif +pam_time_la_LIBADD = -L$(top_builddir)/libpam -lpam securelib_LTLIBRARIES = pam_time.la secureconf_DATA = time.conf diff --git a/Linux-PAM/modules/pam_time/Makefile.in b/Linux-PAM/modules/pam_time/Makefile.in index 9e3810bf..5058d1a8 100644 --- a/Linux-PAM/modules/pam_time/Makefile.in +++ b/Linux-PAM/modules/pam_time/Makefile.in @@ -65,7 +65,7 @@ am__installdirs = "$(DESTDIR)$(securelibdir)" "$(DESTDIR)$(man5dir)" \ "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(secureconfdir)" securelibLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(securelib_LTLIBRARIES) -pam_time_la_LIBADD = +pam_time_la_DEPENDENCIES = pam_time_la_SOURCES = pam_time.c pam_time_la_OBJECTS = pam_time.lo DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ @@ -178,6 +178,7 @@ POSUB = @POSUB@ RANLIB = @RANLIB@ SCONFIGDIR = @SCONFIGDIR@ SECUREDIR = @SECUREDIR@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -257,8 +258,8 @@ secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \ -DPAM_TIME_CONF=\"$(SCONFIGDIR)/time.conf\" -AM_LDFLAGS = -no-undefined -avoid-version -module \ - -L$(top_builddir)/libpam -lpam $(am__append_1) +AM_LDFLAGS = -no-undefined -avoid-version -module $(am__append_1) +pam_time_la_LIBADD = -L$(top_builddir)/libpam -lpam securelib_LTLIBRARIES = pam_time.la secureconf_DATA = time.conf @ENABLE_REGENERATE_MAN_TRUE@noinst_DATA = README diff --git a/Linux-PAM/modules/pam_time/pam_time.c b/Linux-PAM/modules/pam_time/pam_time.c index 43b716f0..56b418f4 100644 --- a/Linux-PAM/modules/pam_time/pam_time.c +++ b/Linux-PAM/modules/pam_time/pam_time.c @@ -59,7 +59,7 @@ shift_bytes(char *mem, int from, int by) } static int -read_field(pam_handle_t *pamh, int fd, char **buf, int *from, int *to) +read_field(const pam_handle_t *pamh, int fd, char **buf, int *from, int *to) { /* is buf set ? */ @@ -137,6 +137,7 @@ read_field(pam_handle_t *pamh, int fd, char **buf, int *from, int *to) switch ((*buf)[i]) { int j,c; case '#': + c = 0; for (j=i; j < *to && (c = (*buf)[j]) != '\n'; ++j); if (j >= *to) { (*buf)[*to = ++i] = '\0'; @@ -324,6 +325,13 @@ is_same(pam_handle_t *pamh UNUSED, const void *A, const char *b, return FALSE; } } + + /* Ok, we know that b is a substring from A and does not contain + wildcards, but now the length of both strings must be the same, + too. */ + if (strlen (a) != strlen(b)) + return FALSE; + return ( !len ); } |