diff options
Diffstat (limited to 'modules/pam_group')
-rw-r--r-- | modules/pam_group/Makefile | 21 | ||||
-rw-r--r-- | modules/pam_group/Makefile.am | 21 | ||||
-rw-r--r-- | modules/pam_group/pam_group.c | 25 |
3 files changed, 33 insertions, 34 deletions
diff --git a/modules/pam_group/Makefile b/modules/pam_group/Makefile deleted file mode 100644 index 44464089..00000000 --- a/modules/pam_group/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# $Id$ -# -# This Makefile controls a build process of $(TITLE) module for -# Linux-PAM. You should not modify this Makefile (unless you know -# what you are doing!). -# - -include ../../Make.Rules - -TITLE=pam_group -LOCAL_CONFILE=./group.conf -INSTALLED_CONFILE=$(SCONFIGD)/group.conf - -DEFS=-DDEFAULT_CONF_FILE=\"$(INSTALLED_CONFILE)\" -CFLAGS += $(DEFS) - -MODULE_SIMPLE_INSTALL=bash -f ../install_conf "$(FAKEROOT)" "$(SCONFIGD)" "$(INSTALLED_CONFILE)" "$(TITLE)" "$(LOCAL_CONFILE)" -MODULE_SIMPLE_REMOVE=rm -f $(FAKEROOT)$(INSTALLED_CONFILE) -MODULE_SIMPLE_CLEAN=rm -f ./.ignore_age - -include ../Simple.Rules diff --git a/modules/pam_group/Makefile.am b/modules/pam_group/Makefile.am new file mode 100644 index 00000000..7846d6b1 --- /dev/null +++ b/modules/pam_group/Makefile.am @@ -0,0 +1,21 @@ +# +# Copyright (c) 2005 Thorsten Kukuk <kukuk@suse.de> +# + +CLEANFILES = *~ + +EXTRA_DIST = group.conf + +securelibdir = $(SECUREDIR) +secureconfdir = $(SCONFIGDIR) + +AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \ + -I$(top_srcdir)/modules/pammodutil/include/ \ + -DPAM_GROUP_CONF=\"$(SCONFIGDIR)/group.conf\" +AM_LDFLAGS = -avoid-version -module \ + -L$(top_builddir)/modules/pammodutil -lpammodutil \ + -L$(top_builddir)/libpam -lpam + +securelib_LTLIBRARIES = pam_group.la + +secureconf_DATA = group.conf diff --git a/modules/pam_group/pam_group.c b/modules/pam_group/pam_group.c index 896f1e84..81fa64de 100644 --- a/modules/pam_group/pam_group.c +++ b/modules/pam_group/pam_group.c @@ -30,11 +30,6 @@ static const char rcsid[] = #include <sys/stat.h> #include <fcntl.h> -#ifdef DEFAULT_CONF_FILE -# define PAM_GROUP_CONF DEFAULT_CONF_FILE /* from external define */ -#else -# define PAM_GROUP_CONF "/etc/security/group.conf" -#endif #define PAM_GROUP_BUFLEN 1000 #define FIELD_SEPARATOR ';' /* this is new as of .02 */ @@ -163,8 +158,9 @@ static int read_field(int fd, char **buf, int *from, int *to) } } switch ((*buf)[i]) { - int j,c; + int j, c; case '#': + c = 0; for (j=i; j < *to && (c = (*buf)[j]) != '\n'; ++j); if (j >= *to) { (*buf)[*to = ++i] = '\0'; @@ -329,7 +325,8 @@ static boolean logic_field(const void *me, const char *x, int rule, return left; } -static boolean is_same(const void *A, const char *b, int len, int rule) +static boolean +is_same (const void *A, const char *b, int len, int rule UNUSED) { int i; const char *a; @@ -351,10 +348,10 @@ typedef struct { int minute; /* integer, hour*100+minute for now */ } TIME; -struct day { +static struct day { const char *d; int bit; -} static const days[11] = { +} const days[11] = { { "su", 01 }, { "mo", 02 }, { "tu", 04 }, @@ -769,14 +766,16 @@ static int check_account(pam_handle_t *pamh, const char *service, /* --- public authentication management functions --- */ -PAM_EXTERN int pam_sm_authenticate(pam_handle_t *pamh, int flags - , int argc, const char **argv) +PAM_EXTERN int +pam_sm_authenticate (pam_handle_t *pamh UNUSED, int flags UNUSED, + int argc UNUSED, const char **argv UNUSED) { return PAM_IGNORE; } -PAM_EXTERN int pam_sm_setcred(pam_handle_t *pamh, int flags - , int argc, const char **argv) +PAM_EXTERN int +pam_sm_setcred (pam_handle_t *pamh, int flags, + int argc UNUSED, const char **argv UNUSED) { const void *service=NULL, *void_tty=NULL; const char *user=NULL; |