~xnox/ubuntu/quantal/shadow/clear-locks

« back to all changes in this revision

Viewing changes to debian/patches/491_configure.in_friendly_selinux_detection

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2009-05-05 09:45:21 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20090505094521-wpk2wn3q7957tlah
Tags: 1:4.1.3.1-1ubuntu1
* Merge from debian unstable, remaining changes:
  - Ubuntu specific:
    + debian/login.defs: use SHA512 by default for password crypt routine.
  - debian/patches/stdout-encrypted-password.patch: chpasswd can report
    password hashes on stdout (debian bug 505640).
  - debian/login.pam: Enable SELinux support (debian bug 527106).
  - debian/securetty.linux: support Freescale MX-series (debian bug 527095).
* Add debian/patches/300_lastlog_failure: fixed upstream (debian bug 524873).
* Drop debian/patches/593_omit_lastchange_field_if_clock_is_misset: fixed
  upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Goal: detect that SE Linux is not present without failing if
2
 
      --without-selinux or --with-selinux is not specified.
3
 
 
4
 
Fix: FTBFS on kfreebsd (and probably The Hurd)
5
 
 
6
 
Author: Mike Frysinger <vapier@gentoo.org>
7
 
 
8
 
Status wrt upstream: Fixed upstream.
9
 
 
10
 
Index: shadow-4.1.0/configure.in
11
 
===================================================================
12
 
--- shadow-4.1.0.orig/configure.in
13
 
+++ shadow-4.1.0/configure.in
14
 
@@ -221,7 +221,7 @@
15
 
        [with_libpam=$withval], [with_libpam=yes])
16
 
 AC_ARG_WITH(selinux,
17
 
        [AC_HELP_STRING([--with-selinux], [use SELinux support @<:@default=autodetect@:>@])],
18
 
-       [with_selinux=$withval], [with_selinux=yes])
19
 
+       [with_selinux=$withval], [with_selinux=maybe])
20
 
 AC_ARG_WITH(skey,
21
 
        [AC_HELP_STRING([--with-skey], [use S/Key support @<:@default=no@:>@])],
22
 
        [with_skey=$withval], [with_skey=no])
23
 
@@ -292,15 +292,22 @@
24
 
                AC_DEFINE(HAVE_LIBCRACK_PW, 1, [Defined if it includes *Pw functions.]))
25
 
 fi
26
 
 
27
 
-if test "$with_selinux" = "yes"; then
28
 
+if test "$with_selinux" != "no"; then
29
 
+       have_selinux="yes"
30
 
        AC_CHECK_LIB(selinux, is_selinux_enabled,
31
 
                [LIBSELINUX="-lselinux"
32
 
+               ],
33
 
+               [have_selinux="no"])
34
 
+       if test "x$have_selinux$with_selinux" = "xnoyes" ; then
35
 
+               AC_MSG_ERROR([libselinux not found])
36
 
+       elif test "x$have_selinux" = "xyes" ; then
37
 
                AC_SUBST(LIBSELINUX)
38
 
-               AC_CHECK_HEADERS(selinux/selinux.h, [],
39
 
-                       [AC_MSG_ERROR([selinux/selinux.h is missing])])
40
 
+               with_selinux="yes"
41
 
+               AC_CHECK_HEADERS(selinux/selinux.h, [], [selinux/selinux.h is missing])
42
 
                AC_DEFINE(WITH_SELINUX, 1, [Build shadow with SELinux support])
43
 
-               ],
44
 
-               [AC_MSG_ERROR([libselinux not found])])
45
 
+       else
46
 
+               with_selinux="no"
47
 
+       fi
48
 
 fi
49
 
 
50
 
 AC_SUBST(LIBPAM)