[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#579593: RFP: sssd - System Security Services Daemon



Attached is my first draft patch for the Ubuntu package to make it
ready for Debian.

Happy hacking,
-- 
Petter Reinholdtsen
--- sssd-1.0.5.orig/debian/sssd.postinst
+++ sssd-1.0.5/debian/sssd.postinst
@@ -29,6 +29,8 @@
     if dpkg --compare-versions "$2" lt-nl 1.0.2-0ubuntu1; then
         /usr/lib/sssd/sssd/upgrade_config.py
     fi
+
+    pam-auth-update --package
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)
--- sssd-1.0.5.orig/debian/copyright
+++ sssd-1.0.5/debian/copyright
@@ -104,7 +104,9 @@
   
    You should have received a copy of the GNU Lesser General Public
    License along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,
+   USA.
+
 
 =====================
 replace/getaddrinfo.c
--- sssd-1.0.5/debian/sssd.upstart
+++ sssd-1.0.5.orig/debian/sssd.upstart
@@ -1,16 +0,0 @@
-# sssd - System Security Services Daemon
-#
-# Provides a set of daemons to manage access to remote directories and
-# authentication mechanisms. It provides an NSS and PAM interface toward
-# the system and a pluggable backend system to connect to multiple different
-# account sources.
-
-description	"System Security Services Daemon"
-
-start on filesystem
-stop on runlevel [06]
-
-expect fork
-respawn
-
-exec sssd -D
--- sssd-1.0.5.orig/debian/control
+++ sssd-1.0.5/debian/control
@@ -1,8 +1,7 @@
 Source: sssd
 Section: utils
 Priority: extra
-Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
-XSBC-Original-Maintainer: Mathias Gug <mathiaz@ubuntu.com>
+Maintainer: Petter Reinholdtsen <pere@debian.org>
 Build-Depends: cdbs, debhelper (>= 7), dpatch,
     autoconf, automake, libtool, m4, autotools-dev,
     libpopt-dev, libdbus-1-dev, libldap2-dev, 
@@ -12,7 +11,7 @@
     xml-core, docbook-xsl, docbook-xml, libxml2-utils, xsltproc,
     cvs, krb5-config, libkrb5-dev, libc-ares-dev,
     python-dev (>= 2.3.5-11), python-central (>= 0.6)
-Standards-Version: 3.8.3
+Standards-Version: 3.8.4
 XS-Python-Version: current
 Homepage: https://fedorahosted.org/sssd/
 
--- sssd-1.0.5.orig/debian/changelog
+++ sssd-1.0.5/debian/changelog
@@ -1,3 +1,15 @@
+sssd (1.0.5-1) unstable; urgency=low
+
+  * Initial upload based on package from Ubuntu (Closes: #579593).
+  * Update standards-version from 3.8.3 to 3.8.4.  No changes needed.
+  * Add init.d script and rename sssd.upstart to sssd.upstart.ubuntu
+    to make sure init.d script is installed instead of upstart job.
+  * Add draft pam-auth-update configuration based on proposals in
+    Launcepad bug #557398.
+  * Update address to FSF in copyright file.  Thanks lintian.
+
+ -- Petter Reinholdtsen <pere@debian.org>  Wed, 05 May 2010 08:12:59 +0200
+
 sssd (1.0.5-0ubuntu1) lucid; urgency=low
 
   * New upstream bugfix release. (LP: #510290)
--- sssd-1.0.5.orig/debian/rules
+++ sssd-1.0.5/debian/rules
@@ -21,6 +21,9 @@
 	install -D -m640 $(CURDIR)/server/config/etc/sssd.api.conf $(CURDIR)/debian/sss/etc/sssd/sssd/sssd.api.conf
 	mkdir -p $(CURDIR)/debian/sssd/etc/sssd/sssd.api.d/
 	install -m640 $(CURDIR)/server/config/etc/sssd.api.d/* $(CURDIR)/debian/sssd/etc/sssd/sssd.api.d/ 
+	mkdir -p $(CURDIR)/debian/sssd/usr/share/pam-configs
+	install -m644 debian/sssd.pam-auth-update \
+		$(CURDIR)/debian/sssd/usr/share/pam-configs/sssd
 
 binary-install/python-sss::
 	find $(CURDIR)/debian/python-sss/ -name '*.la' -exec rm '{}' ';'
--- sssd-1.0.5.orig/debian/sssd.pam-auth-update
+++ sssd-1.0.5/debian/sssd.pam-auth-update
@@ -0,0 +1,21 @@
+Name: SSS authentication
+Default: yes
+Priority: 800
+
+Auth-Type: Primary
+Auth:
+	[success=end default=ignore]			pam_sss.so use_first_pass
+Auth-Initial:
+	[success=end default=ignore]			pam_sss.so
+Account-Type: Additional
+Account:
+	[default=bad success=ok user_unknown=ignore]	pam_sss.so
+Password-Type: Primary
+Password:
+	sufficient					pam_sss.so use_authtok
+Password-Initial:
+	requisite					pam_sss.so
+Session-Type: Additional
+Session-Interactive-Only: yes
+Session:
+	sufficient					pam_sss.so
--- sssd-1.0.5.orig/debian/sssd.upstart.ubuntu
+++ sssd-1.0.5/debian/sssd.upstart.ubuntu
@@ -0,0 +1,16 @@
+# sssd - System Security Services Daemon
+#
+# Provides a set of daemons to manage access to remote directories and
+# authentication mechanisms. It provides an NSS and PAM interface toward
+# the system and a pluggable backend system to connect to multiple different
+# account sources.
+
+description	"System Security Services Daemon"
+
+start on filesystem
+stop on runlevel [06]
+
+expect fork
+respawn
+
+exec sssd -D
--- sssd-1.0.5.orig/debian/sssd.init
+++ sssd-1.0.5/debian/sssd.init
@@ -0,0 +1,81 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides:          sssd
+# Required-Start:    $remote_fs $syslog
+# Required-Stop:     $remote_fs $syslog
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: System Security Services Daemon
+# Description:       Provides a set of daemons to manage access to
+#                    remote directories and authentication
+#                    mechanisms. It provides an NSS and PAM interface
+#                    toward the system and a pluggable backend system
+#                    to connect to multiple different account sources.
+### END INIT INFO
+# start on filesystem
+# stop on runlevel [06]
+
+DESCRIPTION="System Security Services Daemon"
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+NAME=sssd
+OPTIONS="-D"
+DAEMON=/usr/sbin/$NAME
+PIDFILE=/var/run/$NAME.pid
+
+# Load the VERBOSE setting and other rcS variables
+. /lib/init/vars.sh
+
+# Define LSB log_* functions.
+# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
+# and status_of_proc is working.
+. /lib/lsb/init-functions
+
+initdmain() {
+    case "$1" in
+        start)
+            [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESCRIPTION" "$NAME"
+            start_daemon -p $PIDFILE $DAEMON $OPTIONS
+            RC=$?
+            case "$RC" in
+                0)
+                    [ "$VERBOSE" != no ] && log_end_msg $RC
+                    ;;
+                *)
+                # Report error also when VERBOSE=no
+                    log_daemon_msg "Starting $DESCRIPTION" "$NAME"
+                    log_end_msg $RC
+                    ;;
+            esac
+            ;;
+        stop)
+            [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESCRIPTION" "$NAME"
+            killproc -p $PIDFILE $DAEMON
+            RC=$?
+            case "$RC" in
+                0)
+                    [ "$VERBOSE" != no ] && log_end_msg $RC
+                    ;;
+                *)
+                # Report error also when VERBOSE=no
+                    log_daemon_msg "Stopping $DESCRIPTION" "$NAME"
+                    log_end_msg $RC
+                    ;;
+            esac
+            ;;
+        force-reload|restart)
+            $0 stop
+            $0 start
+            ;;
+        status)
+            status_of_proc -p $PIDFILE $DAEMON $NAME && exit 0 || exit $?
+            ;;
+        *)
+            echo "Usage: /etc/init.d/$NAME {start|stop|restart|force-reload|status}"
+            exit 1
+            ;;
+    esac
+}
+
+initdmain $@
+
+exit 0
--- sssd-1.0.5.orig/debian/sssd.prerm
+++ sssd-1.0.5/debian/sssd.prerm
@@ -0,0 +1,5 @@
+#! /bin/sh -e
+
+pam-auth-update --package --remove tmpdir
+
+#DEBHELPER#

Reply to: