summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rwxr-xr-xaccounts1
-rwxr-xr-xgroups1
-rwxr-xr-xx11/mdm/BUILD14
-rwxr-xr-xx11/mdm/CONFIGURE25
-rwxr-xr-xx11/mdm/DEPENDS89
-rwxr-xr-xx11/mdm/DETAILS70
-rw-r--r--x11/mdm/HISTORY5
-rwxr-xr-xx11/mdm/INSTALL4
-rwxr-xr-xx11/mdm/PRE_BUILD16
-rwxr-xr-xx11/mdm/init.d/mdm45
-rw-r--r--x11/mdm/mdm-session69
-rwxr-xr-xx11/mdm/pam.d/mdm20
-rwxr-xr-xx11/mdm/pam.d/mdm-autologin20
14 files changed, 384 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 6bc993a3b8..ee81835c67 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-06-04 Eric Sandall <sandalle@sourcemage.org>
+ * accounts,groups: Added mdm:195:196 account:group for Mint Display
+ Manager (mdm).
+ * x11/mdm: Added Mint Display Manager (git version)
+
2013-06-03 Florian Franzmann <siflfran@hawo.stw.uni-erlangen.de>
* utils/ocaml-csv: new spell, a library and cli tool for csv processing
diff --git a/accounts b/accounts
index 1236387ee5..2c6da2befc 100755
--- a/accounts
+++ b/accounts
@@ -99,4 +99,5 @@ lightdm:191:191
masqmail:192:192
burp:193:194
ratbox:194:195
+mdm:195:196
nobody:65534:65534
diff --git a/groups b/groups
index a8ca6711a8..17c0b76d13 100755
--- a/groups
+++ b/groups
@@ -120,5 +120,6 @@ masqmail:192:
bumblebee:193:
burp:194:
ratbox:195:
+mdm:196:
users:1000:
nogroup:65534:
diff --git a/x11/mdm/BUILD b/x11/mdm/BUILD
new file mode 100755
index 0000000000..11bf4a5b02
--- /dev/null
+++ b/x11/mdm/BUILD
@@ -0,0 +1,14 @@
+create_account mdm &&
+
+# Disable PAM helper if it was previously enabled when linux-pam is disabled
+#if [[ "x${MDM_AUTH}" != "xlinux-pam" ]]; then
+## Missing usermode package for `consolehelper` binary
+ MDM_PAM_HELPER='--enable-console-helper=no'
+#fi &&
+
+OPTS="${MDM_IPV6} \
+ --enable-authentication-scheme=${MDM_AUTH/linux-/} \
+ ${MDM_PAM_HELPER} \
+ ${OPTS}" &&
+
+default_build
diff --git a/x11/mdm/CONFIGURE b/x11/mdm/CONFIGURE
new file mode 100755
index 0000000000..2fb1acaabf
--- /dev/null
+++ b/x11/mdm/CONFIGURE
@@ -0,0 +1,25 @@
+config_query_option MDM_IPV6 \
+ 'Enable IPv6 transport?' \
+ y \
+ '--enable-ipv6=yes' \
+ '--enable-ipv6=no' &&
+
+if spell_ok linux-pam; then
+ config_query_list MDM_AUTH 'Use which encryption scheme?' \
+ linux-pam shadow crypt
+elif spell_ok shadow; then
+ config_query_list MDM_AUTH 'Use which encryption scheme?' \
+ shadow linux-pam crypt
+else
+ config_query_list MDM_AUTH 'Use which encryption scheme?' \
+ crypt linux-pam shadow
+fi
+
+# Missing usermode package for `consolehelper` binary
+#if [[ "x${MDM_AUTH}" == "xlinux-pam" ]]; then
+# config_query_option MDM_PAM_HELPER \
+# 'Enable PAM console helper?' \
+# y \
+# '--enable-console-helper=yes' \
+# '--enable-console-helper=no'
+#fi
diff --git a/x11/mdm/DEPENDS b/x11/mdm/DEPENDS
new file mode 100755
index 0000000000..693cdc8dd8
--- /dev/null
+++ b/x11/mdm/DEPENDS
@@ -0,0 +1,89 @@
+# PRE_BUILD requirements
+depends 'autoconf' &&
+depends 'automake' &&
+depends 'glib2' &&
+depends 'gnome-common2' &&
+depends 'gnome-doc-utils' &&
+depends 'intltool' &&
+depends 'libtool' &&
+depends 'pkgconfig' &&
+
+# Download requirements
+depends 'git' &&
+
+# Application requirements
+depends 'dbus' &&
+depends 'gdk-pixbuf2' &&
+depends 'glib2' &&
+depends 'gtk+2' &&
+depends 'libglade2' &&
+depends 'libgnomecanvas' &&
+depends 'libice' &&
+depends 'libpng' &&
+depends 'libx11' &&
+depends 'libxau' &&
+depends 'libxext' &&
+depends 'libxi' &&
+depends 'pango' &&
+depends 'perl' &&
+depends 'webkitgtk' &&
+
+# Auth scheme
+if [[ "x${MDM_AUTH}" != "xcrypt" ]] ; then
+ depends "${MDM_AUTH}"
+fi &&
+
+optional_depends 'consolekit' \
+ '--with-console-kit=yes' \
+ '--with-console-kit=no' \
+ 'for ConsoleKit support' &&
+
+optional_depends 'gettext' \
+ '--enable-nls' \
+ '--disable-nls' \
+ 'for Native Language Support (NLS)' &&
+
+optional_depends 'libselinux' \
+ '--with-selinux' \
+ '--without-selinux' \
+ 'for Security Enhanced Linux (SELinux)' &&
+
+optional_depends 'libdmx' \
+ '--with-dmx=yes' \
+ '--with-dmx=no' \
+ 'for DMX (Distributed Multihead X) support' &&
+
+optional_depends 'libxdmcp' \
+ '--with-xdmcp=yes' \
+ '--with-xdmcp=yes' \
+ 'for XDMCP (X Remote Login) support' &&
+
+optional_depends 'libxevie' \
+ '--with-xevie=yes' \
+ '--with-xevie=no' \
+ 'for XEvIE Xserver extension support' &&
+
+optional_depends 'libxinerama' \
+ '--with-xinerama=yes' \
+ '--with-xinerama=no' \
+ 'for Xinerama (multi-monitor) support' &&
+
+optional_depends 'rarian' \
+ '--enable-scrollkeeper' \
+ '--disable-scrollkeeper' \
+ 'for updated ScrollKeeper database' &&
+
+optional_depends 'SSH' \
+ '--enable-secureremote=yes' \
+ '--enable-secureremote=no' \
+ 'for secure X connections via Secure SHell (SSH)' &&
+
+if is_depends_enabled "${SPELL}" "$(get_spell_provider $SPELL SSH)"; then
+ depends zenity
+fi &&
+
+optional_depends 'tcp_wrappers' \
+ '--with-tcp-wrappers=yes' \
+ '--with-tcp-wrappers=no' \
+ 'for TCP wrappers support'
+
diff --git a/x11/mdm/DETAILS b/x11/mdm/DETAILS
new file mode 100755
index 0000000000..8cabb9c172
--- /dev/null
+++ b/x11/mdm/DETAILS
@@ -0,0 +1,70 @@
+ SPELL=mdm
+ VERSION=git
+ SOURCE="${SPELL}-${VERSION}.tar.bz2"
+ SOURCE_URL[0]=git://github.com/linuxmint/mdm.git
+ SOURCE_IGNORE="unversioned"
+SOURCE_DIRECTORY="${BUILD_DIRECTORY}/${SPELL}-${VERSION}"
+ WEB_SITE="https://github.com/linuxmint/mdm"
+ LICENSE[0]=GPLv2
+ ENTERED=20130604
+ SHORT="Mint Display Manager"
+cat << EOF
+The MDM Display Manager (MDM) is a display manager that
+implements all significant features required for managing
+local and remote displays. For full information about
+MDM features, refer to the documentation. In summary,
+features include:
+
+MDM daemon:
+ o X Authentication
+ o XDMCP (Remote Login) including TCP Wrappers for access
+ control and improved security.
+ o Machine-specific and system-wide configuration support.
+ o Default and per-display initialization scripts.
+ o PreSession, PostSession, Init, and PostLogin scripts.
+ o Pluggable Authentication Modules (PAM)
+ o IPv6 support (optional, use --enable-ipv6=yes to enable)
+ o Autologin for single user workstations (off by default)
+ o Timed login for kiosks and public terminals (off by
+ default).
+ o On-demand local servers (mdmflexiserver) and dynamic
+ servers (mdmdynamic). For example, dynamic servers are
+ used to support SRSS (Sun Ray) environments.
+ o Can manage X servers without a login window (Such as
+ for XDMCP terminal client machines)
+ o Many other features ...
+
+mdmlogin and mdmgreeter:
+ o Supports accessibility and the ability to launch AT
+ programs like orca or GOK. Currently mdmlogin
+ has more complete accessibility support than
+ mdmgreeter.
+ o Can launch the XDMCP chooser program (Remote Login)
+ o Can launch the Setup program (off by default)
+ o Can halt, reboot, or suspend the machine (off by
+ default)
+ o Session selection support
+ o Language selection support
+
+mdmlogin:
+ o Logo image
+ o Background image/color
+ o Face browser
+ o Background program support
+ o Xinerama support
+
+mdmgreeter:
+ o Themable with many themes at http://art.gnome.org/
+ o Xinerama support
+ o Face browser (if supported by the theme)
+
+mdmchooser:
+ o XDMCP
+ o Visual host browser
+ o Type in extra host names
+ o Customizable icons
+
+mdmsetup:
+ o GUI to edit the MDM configuration. Refer to the documentation
+ for more information about how to configure MDM.
+EOF
diff --git a/x11/mdm/HISTORY b/x11/mdm/HISTORY
new file mode 100644
index 0000000000..1dbe728eb9
--- /dev/null
+++ b/x11/mdm/HISTORY
@@ -0,0 +1,5 @@
+2013-06-04 Eric Sandall <sandalle@sourcemage.org>
+ * Created
+ * PRE_BUILD, pam.d/mdm{,-autologin}: Need to provide our own
+ as we don't have a service=system-auth from linux-pam.
+
diff --git a/x11/mdm/INSTALL b/x11/mdm/INSTALL
new file mode 100755
index 0000000000..bd12b14c89
--- /dev/null
+++ b/x11/mdm/INSTALL
@@ -0,0 +1,4 @@
+default_install &&
+install -m755 ${SCRIPT_DIRECTORY}/mdm-session ${INSTALL_ROOT}/usr/sbin/
+PAM_DIR="${INSTALL_ROOT}/etc/pam.d" &&
+chmod +x ${PAM_DIR}/mdm{,-autologin}
diff --git a/x11/mdm/PRE_BUILD b/x11/mdm/PRE_BUILD
new file mode 100755
index 0000000000..69e882b35e
--- /dev/null
+++ b/x11/mdm/PRE_BUILD
@@ -0,0 +1,16 @@
+default_pre_build &&
+cd "${SOURCE_DIRECTORY}" &&
+
+NOCONFIGURE="y" gnome-autogen.sh &&
+
+# Provide our own PAM modules until service=system-auth is
+# provided via our packages.
+cp -f "${SPELL_DIRECTORY}"/pam.d/mdm{,-autologin} \
+ "${SOURCE_DIRECTORY}"/config/ &&
+
+# Disable warnings as errors
+sedit 's:-Werror=missing-prototypes::g' aclocal.m4 &&
+sedit 's:-Werror=missing-prototypes::g' configure &&
+sedit 's:-Werror=implicit-function-declaration::g' aclocal.m4 &&
+sedit 's:-Werror=implicit-function-declaration::g' configure
+
diff --git a/x11/mdm/init.d/mdm b/x11/mdm/init.d/mdm
new file mode 100755
index 0000000000..cb269610f7
--- /dev/null
+++ b/x11/mdm/init.d/mdm
@@ -0,0 +1,45 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/mdm
+PIDFILE=/var/run/mdm.pid
+ARGS=
+RUNLEVEL=5
+PROVIDES=display_manager
+NEEDS="smgl-messagebus hald"
+
+. /etc/init.d/smgl_init
+
+start() {
+ echo -n "Starting Mint Display Manager..."
+ mkdir -p /var/run/mdm
+ chown mdm:mdm /var/run/mdm
+ $PROGRAM $ARGS &
+ evaluate_retval
+}
+
+stop()
+{
+ ${PROGRAM}-stop
+ evaluate_retval
+}
+
+restart()
+{
+ ${PROGRAM}-safe-restart
+ evaluate_retval
+}
+
+status() {
+ if [ ! -f $PIDFILE ]; then
+ echo "Mint Display Manager is not running"
+ return 0
+ fi
+ local pid=$(cat $PIDFILE)
+ if ps -p $pid > /dev/null; then
+ echo "Mint Display Manager is running with Process ID $pid"
+ else
+ echo "Mint Display Manager is not running, but $PIDFILE exists"
+ return 1
+ fi
+}
+
diff --git a/x11/mdm/mdm-session b/x11/mdm/mdm-session
new file mode 100644
index 0000000000..516291a39d
--- /dev/null
+++ b/x11/mdm/mdm-session
@@ -0,0 +1,69 @@
+#!/bin/sh
+#
+# MDM wrapper to run around X sessions.
+
+echo "Running X session wrapper"
+
+# Load profile
+for file in "/etc/profile" "$HOME/.profile" "/etc/xprofile" "$HOME/.xprofile"; do
+ if [ -f "$file" ]; then
+ echo "Loading profile from $file";
+ . "$file"
+ fi
+done
+
+# Load resources
+for file in "/etc/X11/Xresources" "$HOME/.Xresources"; do
+ if [ -f "$file" ]; then
+ echo "Loading resource: $file"
+ xrdb -nocpp -merge "$file"
+ fi
+done
+
+# Load keymaps
+for file in "/etc/X11/Xkbmap" "$HOME/.Xkbmap"; do
+ if [ -f "$file" ]; then
+ echo "Loading keymap: $file"
+ setxkbmap `cat "$file"`
+ XKB_IN_USE=yes
+ fi
+done
+
+# Load xmodmap if not using XKB
+if [ -z "$XKB_IN_USE" ]; then
+ for file in "/etc/X11/Xmodmap" "$HOME/.Xmodmap"; do
+ if [ -f "$file" ]; then
+ echo "Loading modmap: $file"
+ xmodmap "$file"
+ fi
+ done
+fi
+
+unset XKB_IN_USE
+
+# Run all system xinitrc shell scripts.
+xinitdir="/etc/X11/xinit/xinitrc.d"
+if [ -d "$xinitdir" ]; then
+ for script in $xinitdir/*; do
+ echo "Loading xinit script $script"
+ if [ -x "$script" -a ! -d "$script" ]; then
+ . "$script"
+ fi
+ done
+fi
+
+# Load Xsession scripts
+xsessionddir="/etc/X11/Xsession.d"
+if [ -d "$xsessionddir" ]; then
+ for i in `ls $xsessionddir`; do
+ script="$xsessionddir/$i"
+ echo "Loading X session script $script"
+ if [ -r "$script" -a -f "$script" ] && expr "$i" : '^[[:alnum:]_-]\+$' > /dev/null; then
+ . "$script"
+ fi
+ done
+fi
+
+echo "X session wrapper complete, running session $@"
+
+exec $@
diff --git a/x11/mdm/pam.d/mdm b/x11/mdm/pam.d/mdm
new file mode 100755
index 0000000000..fed8a9b461
--- /dev/null
+++ b/x11/mdm/pam.d/mdm
@@ -0,0 +1,20 @@
+#%PAM-1.0
+
+# Block login if they are globally disabled
+auth required pam_nologin.so
+
+# Load environment from /etc/environment and ~/.pam_environment
+auth required pam_env.so
+
+# Use /etc/passwd and /etc/shadow for passwords
+auth required pam_unix.so
+
+# Check account is active, change password if required
+account required pam_unix.so
+
+# Allow password to be changed
+password required pam_unix.so
+
+# Setup session
+session required pam_unix.so
+session optional pam_systemd.so
diff --git a/x11/mdm/pam.d/mdm-autologin b/x11/mdm/pam.d/mdm-autologin
new file mode 100755
index 0000000000..ba7a68cef6
--- /dev/null
+++ b/x11/mdm/pam.d/mdm-autologin
@@ -0,0 +1,20 @@
+#%PAM-1.0
+
+# Block login if they are globally disabled
+auth required pam_nologin.so
+
+# Load environment from /etc/environment and ~/.pam_environment
+auth required pam_env.so
+
+# Allow access without authentication
+auth required pam_permit.so
+
+# Stop autologin if account requires action
+account required pam_unix.so
+
+# Can't change password
+password required pam_deny.so
+
+# Setup session
+session required pam_unix.so
+session optional pam_systemd.so