diff options
Diffstat (limited to 'Linux-PAM/modules/pam_group')
-rw-r--r-- | Linux-PAM/modules/pam_group/Makefile.am | 4 | ||||
-rw-r--r-- | Linux-PAM/modules/pam_group/Makefile.in | 7 | ||||
-rw-r--r-- | Linux-PAM/modules/pam_group/group.conf | 8 | ||||
-rw-r--r-- | Linux-PAM/modules/pam_group/pam_group.c | 7 |
4 files changed, 17 insertions, 9 deletions
diff --git a/Linux-PAM/modules/pam_group/Makefile.am b/Linux-PAM/modules/pam_group/Makefile.am index 544fa12f..22dc831b 100644 --- a/Linux-PAM/modules/pam_group/Makefile.am +++ b/Linux-PAM/modules/pam_group/Makefile.am @@ -14,13 +14,13 @@ secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \ -DPAM_GROUP_CONF=\"$(SCONFIGDIR)/group.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 securelib_LTLIBRARIES = pam_group.la +pam_group_la_LIBADD = -L$(top_builddir)/libpam -lpam secureconf_DATA = group.conf diff --git a/Linux-PAM/modules/pam_group/Makefile.in b/Linux-PAM/modules/pam_group/Makefile.in index 7deca09c..48fcfe47 100644 --- a/Linux-PAM/modules/pam_group/Makefile.in +++ b/Linux-PAM/modules/pam_group/Makefile.in @@ -65,7 +65,7 @@ am__installdirs = "$(DESTDIR)$(securelibdir)" "$(DESTDIR)$(man5dir)" \ "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(secureconfdir)" securelibLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(securelib_LTLIBRARIES) -pam_group_la_LIBADD = +pam_group_la_DEPENDENCIES = pam_group_la_SOURCES = pam_group.c pam_group_la_OBJECTS = pam_group.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@ @@ -256,9 +257,9 @@ secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \ -DPAM_GROUP_CONF=\"$(SCONFIGDIR)/group.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) securelib_LTLIBRARIES = pam_group.la +pam_group_la_LIBADD = -L$(top_builddir)/libpam -lpam secureconf_DATA = group.conf TESTS = tst-pam_group @ENABLE_REGENERATE_MAN_TRUE@noinst_DATA = README diff --git a/Linux-PAM/modules/pam_group/group.conf b/Linux-PAM/modules/pam_group/group.conf index d4a10672..b766becb 100644 --- a/Linux-PAM/modules/pam_group/group.conf +++ b/Linux-PAM/modules/pam_group/group.conf @@ -10,7 +10,7 @@ # *** like. Example: games are allowed between the hours of 6pm and 6am # *** user joe logs in at 7pm writes a small C-program toplay.c that # *** invokes their favorite shell, compiles it and does -# *** "chgrp games toplay; chmod g+s toplay". They are basically able +# *** "chgrp play toplay; chmod g+s toplay". They are basically able # *** to play games any time... You have been warned. AGM # @@ -74,7 +74,7 @@ # # 1. to run an application as root # 2. add the following groups to the /etc/group file: -# floppy, games, sound +# floppy, play, sound # # @@ -88,10 +88,10 @@ # # another example: running 'xsh' on tty* (any ttyXXX device), # the user 'sword' is given access to games (through membership of -# the floppy group) after work hours +# the sound and play group) after work hours. # -#xsh; tty* ;sword;!Wk0900-1800;games, sound +#xsh; tty* ;sword;!Wk0900-1800;sound, play #xsh; tty* ;*;Al0900-1800;floppy # diff --git a/Linux-PAM/modules/pam_group/pam_group.c b/Linux-PAM/modules/pam_group/pam_group.c index 1dc329ef..4a54da14 100644 --- a/Linux-PAM/modules/pam_group/pam_group.c +++ b/Linux-PAM/modules/pam_group/pam_group.c @@ -329,6 +329,13 @@ is_same (const pam_handle_t *pamh UNUSED, 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 ); } |