pam: Makefile.am, configure.in, modules/pam_selinux/Makefile.am, m...

baggins baggins at pld-linux.org
Mon Jul 11 18:00:35 CEST 2005


Author: baggins                      Date: Mon Jul 11 16:00:35 2005 GMT
Module: pam                           Tag: HEAD
---- Log message:
- HOWTO build programs that need libpam

---- Files affected:
pam:
   Makefile.am (1.13 -> 1.14) , configure.in (1.55 -> 1.56) 
pam/modules/pam_selinux:
   Makefile.am (1.1 -> 1.2) , pam_selinux_check.8 (1.1 -> NONE)  (REMOVED), pam_selinux_check.c (1.1 -> NONE)  (REMOVED)
pam/modules/pam_selinux/check:
   Makefile.am (NONE -> 1.1)  (NEW), pam_selinux_check.8 (NONE -> 1.1)  (NEW), pam_selinux_check.c (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: pam/Makefile.am
diff -u pam/Makefile.am:1.13 pam/Makefile.am:1.14
--- pam/Makefile.am:1.13	Fri Jun 14 01:13:11 2002
+++ pam/Makefile.am	Mon Jul 11 18:00:30 2005
@@ -1,4 +1,4 @@
-SUBDIRS			= pamcrypt modules libpam libpamc libpam_misc doc conf
+SUBDIRS			= pamcrypt modules libpam libpamc libpam_misc modules/pam_selinux/check doc conf
 
 DIST_SUBDIRS		= $(SUBDIRS) examples dynamic
 

================================================================
Index: pam/configure.in
diff -u pam/configure.in:1.55 pam/configure.in:1.56
--- pam/configure.in:1.55	Mon Jul 11 17:01:59 2005
+++ pam/configure.in	Mon Jul 11 18:00:30 2005
@@ -454,6 +454,7 @@
 		modules/pam_rootok/Makefile
 		modules/pam_securetty/Makefile
 		modules/pam_selinux/Makefile
+		modules/pam_selinux/check/Makefile
 		modules/pam_shells/Makefile
 		modules/pam_stress/Makefile
 		modules/pam_succeed_if/Makefile

================================================================
Index: pam/modules/pam_selinux/Makefile.am
diff -u pam/modules/pam_selinux/Makefile.am:1.1 pam/modules/pam_selinux/Makefile.am:1.2
--- pam/modules/pam_selinux/Makefile.am:1.1	Mon Jul 11 17:12:15 2005
+++ pam/modules/pam_selinux/Makefile.am	Mon Jul 11 18:00:30 2005
@@ -4,11 +4,13 @@
 
 TITLE			= pam_selinux
 
+DIST_SUBDIRS		= check
+
 LIBS			=
 
 modulesdir		= /@libdirname@/security
 
-man_MANS		= pam_selinux.8 pam_selinux_check.8
+man_MANS		= pam_selinux.8
 
 if SELINUX_PRESENT
 LIBSELINUX		= -lselinux
@@ -26,16 +28,11 @@
 pam_selinux_la_LDFLAGS	= -avoid-version -module
 pam_selinux_la_LIBADD	= $(LIBSELINUX)
 
-EXTRA_pam_selinux_la_SOURCES	= pam_selinux_check.c
-
 EXTRA_DIST		= README $(man_MANS)
 
 CLEANFILES		= *~ $(TITLE).so
 
-sbin_PROGRAMS		= pam_selinux_check
-pam_selinux_check_SOURCES= pam_selinux_check.c
-pam_selinux_chack_CFLAGS= -I$(top_srcdir)/include $(DYNAMIC)
-pam_selinux_check_LDADD	= $(LIBSELINUX)
+all-local: Makefile $(LTLIBRARIES) $(MANS)
 
 clean-local:
 	rm -rf static

================================================================
Index: pam/modules/pam_selinux/check/Makefile.am
diff -u /dev/null pam/modules/pam_selinux/check/Makefile.am:1.1
--- /dev/null	Mon Jul 11 18:00:35 2005
+++ pam/modules/pam_selinux/check/Makefile.am	Mon Jul 11 18:00:30 2005
@@ -0,0 +1,25 @@
+## Process this file with automake to produce Makefile.in
+
+ at SET_MAKE@
+
+TITLE			= pam_selinux_check
+
+LIBS			=
+
+man_MANS		= pam_selinux_check.8
+
+if SELINUX_PRESENT
+LIBSELINUX		= -lselinux
+else
+LIBSELINUX		=
+endif
+
+EXTRA_DIST		= $(man_MANS)
+
+CLEANFILES		= *~ $(TITLE)
+
+sbin_PROGRAMS		= pam_selinux_check
+pam_selinux_check_SOURCES= pam_selinux_check.c
+pam_selinux_check_CFLAGS= -I$(top_srcdir)/include $(DYNAMIC)
+pam_selinux_check_LDADD	= -L$(top_srcdir)/libpam -L$(top_srcdir)/libpam_misc \
+			  -lpam -lpam_misc $(LIBSELINUX)

================================================================
Index: pam/modules/pam_selinux/check/pam_selinux_check.8
diff -u /dev/null pam/modules/pam_selinux/check/pam_selinux_check.8:1.1
--- /dev/null	Mon Jul 11 18:00:35 2005
+++ pam/modules/pam_selinux/check/pam_selinux_check.8	Mon Jul 11 18:00:30 2005
@@ -0,0 +1,35 @@
+.TH pam_selinux_check 8 2002/05/23 "Red Hat Linux" "System Administrator's Manual"
+.SH NAME
+pam_selinux_check \- login program to test pam_selinux_check
+.SH SYNOPSIS
+.B pam_selinux_check [user]
+.br
+
+.SH DESCRIPTION
+With no arguments,
+.B pam_selinux_check
+will prompt for user
+
+.SH OPTIONS
+.IP target_user
+The user to login as.
+
+.SH DIAGNOSTICS
+You must setup a /etc/pam.d/pam_selinux_check file, in order for the check to work.
+
+When checking if a selinux is valid,
+.B pam_selinux_check
+returns an exit code of 0 for success and > 0 on error:
+
+.nf
+1: Authentication failure
+.fi
+
+.SH SEE ALSO
+pam_selinux(8)
+
+.SH BUGS
+Let's hope not, but if you find any, please email the author.  
+
+.SH AUTHOR
+Dan Walsh <dwalsh at redhat.com>

================================================================
Index: pam/modules/pam_selinux/check/pam_selinux_check.c
diff -u /dev/null pam/modules/pam_selinux/check/pam_selinux_check.c:1.1
--- /dev/null	Mon Jul 11 18:00:35 2005
+++ pam/modules/pam_selinux/check/pam_selinux_check.c	Mon Jul 11 18:00:30 2005
@@ -0,0 +1,43 @@
+/******************************************************************************
+ * A module for Linux-PAM that will set the default security context after login 
+ * via PAM.
+ *
+ * Copyright (c) 2003 Red Hat, Inc.
+ * Written by Dan Walsh <dwalsh at redhat.com>
+ *
+ * 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, and the entire permission notice in its entirety,
+ *    including the disclaimer of warranties.
+ * 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 name of the author may not be used to endorse or promote
+ *    products derived from this software without specific prior
+ *    written permission.
+ *
+ * ALTERNATIVELY, this product may be distributed under the terms of
+ * the GNU Public License, in which case the provisions of the GPL are
+ * required INSTEAD OF the above restrictions.  (This clause is
+ * necessary due to a potential bad interaction between the GPL and
+ * the restrictions contained in a BSD-style copyright.)
+ *
+ * THIS SOFTWARE IS PROVIDED ``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 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.
+ *
+ */
+
+#define PAM_SELINUX_MAIN 1
+#include "../pam_selinux.c"
+
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/pam/Makefile.am?r1=1.13&r2=1.14&f=u
    http://cvs.pld-linux.org/pam/configure.in?r1=1.55&r2=1.56&f=u
    http://cvs.pld-linux.org/pam/modules/pam_selinux/Makefile.am?r1=1.1&r2=1.2&f=u




More information about the pld-cvs-commit mailing list