--- libpam-alreadyloggedin-0.3.orig/Makefile +++ libpam-alreadyloggedin-0.3/Makefile @@ -11,8 +11,8 @@ MKDIR = mkdir -p INSTALL = install #CFLAGS = -c -Wall -O2 -fPIC -I. -CFLAGS = -c $(RPM_OPT_FLAGS) -fPIC -DLINUX_PAM -I. -Wall -DBUG_STAT_MISSING -LDFLAGS = -s -lpam --shared +CFLAGS = -g -O2 -Wall -fPIC -DLINUX_PAM -I. -DBUG_STAT_MISSING +LDFLAGS = -lpam --shared -lc TITLE = pam_alreadyloggedin LIBSHARED = $(TITLE).so @@ -34,7 +34,7 @@ $(LD) $(LDFLAGS) $(OBJS) -o $@ $(TITLE).o: $(TITLE).c - $(CC) $(CFLAGS) $< + $(CC) -c $(CFLAGS) $< install: $(MKDIR) $(FAKEROOT)$(SECUREDIR) --- libpam-alreadyloggedin-0.3.orig/pam_alreadyloggedin.c +++ libpam-alreadyloggedin-0.3/pam_alreadyloggedin.c @@ -71,6 +71,8 @@ #include #include +#include + /*-------- Reporting ---------*/ #ifdef DEBUG --- libpam-alreadyloggedin-0.3.orig/pam_alreadyloggedin.8 +++ libpam-alreadyloggedin-0.3/pam_alreadyloggedin.8 @@ -71,7 +71,7 @@ output, they will generally be allowed to authenticate using this method. .Pp The following options may be passed to the authentication module: -.Bl -tag -width ".Cm restrict_loggedin_tty Ns = Ns Ar ttyfoo*" +.Bl -tag -width ".Cm restrict_loggedin_tty Ns = Ns Ar ttyglob*" .It Cm debug Enable verbose output to syslog at LOG_DEBUG level. .It Cm no_debug @@ -86,9 +86,9 @@ argument is specified as a shell glob, and checked using the .Xr fnmatch 3 function. For example, -.Cm restryct_tty=/dev/tty[1-6] +.Cm restrict_tty=/dev/tty[1-6] allows logging from text consoles of physical terminal only. -.It Cm restrict_loggedin_tty Ns = Ns Ar ttyfoo* +.It Cm restrict_loggedin_tty Ns = Ns Ar ttyglob* Disallow recognition that the user is already logged in unless the terminal device logged in upon matches .Ar ttyglob* . .El @@ -108,9 +108,9 @@ FreeBSD version expects .Pa /dev/ prefix in -.Cm restryct_tty +.Cm restrict_tty value, but value of -.Cm restryct_loggedin_tty +.Cm restrict_loggedin_tty should be without them. Linux version expects .Pa /dev/ --- libpam-alreadyloggedin-0.3.orig/debian/README.Debian +++ libpam-alreadyloggedin-0.3/debian/README.Debian @@ -0,0 +1,9 @@ +libpam-alreadyloggedin for Debian +--------------------------------- + +To enable the alreadyloggedin module, add the following line to +/etc/pam.d/login, just before ``@include common-auth``:: + + auth sufficient pam_alreadyloggedin.so no_root restrict_tty=/dev/tty[0-9]* restrict_loggedin_tty=/dev/tty[0-9]* + + -- Jakub Wilk Sat, 18 Apr 2009 13:35:30 +0200 --- libpam-alreadyloggedin-0.3.orig/debian/compat +++ libpam-alreadyloggedin-0.3/debian/compat @@ -0,0 +1 @@ +7 --- libpam-alreadyloggedin-0.3.orig/debian/copyright +++ libpam-alreadyloggedin-0.3/debian/copyright @@ -0,0 +1,37 @@ +This package was debianized by Jakub Wilk on +18 Apr 2009. + +It was downloaded from +. + +Upstream author: Ilya Evseev + +Copyright © 2002 Brian Fundakowski Feldman +Copyright © 2002 Networks Associates Technologies, Inc. + +License: + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The names of the authors may not be used to endorse or promote + products derived from this software without specific prior written + permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + --- libpam-alreadyloggedin-0.3.orig/debian/rules +++ libpam-alreadyloggedin-0.3/debian/rules @@ -0,0 +1,30 @@ +#!/usr/bin/make -f + +configure: ; + +build: build-stamp + +build-stamp: + dh build + touch $@ + +clean: + dh clean + +install: build + dh install --until dh_prep + dh_installexamples login.sso + dh_installman *.8 + dh_install pam_alreadyloggedin.so lib/security/ + dh_install --remaining + +binary-indep: install ; + +binary-arch: install + dh binary-arch + +binary: binary-indep binary-arch + +.PHONY: build clean binary-indep binary-arch binary install configure + +# vim:ts=4 sw=4 --- libpam-alreadyloggedin-0.3.orig/debian/changelog +++ libpam-alreadyloggedin-0.3/debian/changelog @@ -0,0 +1,6 @@ +libpam-alreadyloggedin (0.3-1) unstable; urgency=low + + * Initial release (Closes: #520108). + * Due to #524608, recommend login (>= 1:4.1.3.1-1). + + -- Jakub Wilk Tue, 12 May 2009 10:19:43 +0200 --- libpam-alreadyloggedin-0.3.orig/debian/watch +++ libpam-alreadyloggedin-0.3/debian/watch @@ -0,0 +1,3 @@ +version=3 + +http://ilya-evseev.narod.ru/posix/pam_alreadyloggedin/ pam_alreadyloggedin-(.*)[.]tar[.]gz --- libpam-alreadyloggedin-0.3.orig/debian/control +++ libpam-alreadyloggedin-0.3/debian/control @@ -0,0 +1,15 @@ +Source: libpam-alreadyloggedin +Section: admin +Priority: extra +Maintainer: Jakub Wilk +Build-Depends: debhelper (>= 7), libpam0g-dev +Standards-Version: 3.8.1 +Homepage: http://ilya-evseev.narod.ru/posix/pam_alreadyloggedin/ + +Package: libpam-alreadyloggedin +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Recommends: login (>= 1:4.1.3.1-1) +Description: PAM module to skip password authentication for logged users + libpam-alreadloggedin is a PAM module which allows a user to skip + authentication if he is already logged in on an another console.