This reverts commit 1a9f0fc1842b52112f2f72932fa5595fe6a815d8. 0.9.3 does not work correctly... revert this until the issue is found.
89 lines
2.5 KiB
Diff
89 lines
2.5 KiB
Diff
From e4bc312cc5a5363ccf887475d187e5fbc07e0ad2 Mon Sep 17 00:00:00 2001
|
|
From: Robby Workman <rworkman@slackware.com>
|
|
Date: Thu, 11 Dec 2014 02:09:40 -0600
|
|
Subject: [PATCH 12/12] Fixup a couple of missed hardcoded /var/run/ usages
|
|
|
|
---
|
|
configure.ac | 1 +
|
|
src/main.c | 2 +-
|
|
tools/pam-foreground-compat.ck | 17 -----------------
|
|
tools/pam-foreground-compat.ck.in | 17 +++++++++++++++++
|
|
4 files changed, 19 insertions(+), 18 deletions(-)
|
|
delete mode 100755 tools/pam-foreground-compat.ck
|
|
create mode 100755 tools/pam-foreground-compat.ck.in
|
|
|
|
diff --git a/configure.ac b/configure.ac
|
|
index dd1f5bb..ff18e97 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -489,6 +489,7 @@ Makefile
|
|
src/Makefile
|
|
tools/70-udev-acl.rules
|
|
tools/Makefile
|
|
+tools/pam-foreground-compat.ck
|
|
tools/linux/Makefile
|
|
tools/freebsd/Makefile
|
|
tools/openbsd/Makefile
|
|
diff --git a/src/main.c b/src/main.c
|
|
index 3137bf9..99150ee 100644
|
|
--- a/src/main.c
|
|
+++ b/src/main.c
|
|
@@ -150,7 +150,7 @@ delete_pid (void)
|
|
unlink (CONSOLE_KIT_PID_FILE);
|
|
}
|
|
|
|
-#define CONSOLE_TAGS_DIR "/var/run/console"
|
|
+#define CONSOLE_TAGS_DIR RUNDIR "/console"
|
|
|
|
static void
|
|
delete_console_tags (void)
|
|
diff --git a/tools/pam-foreground-compat.ck b/tools/pam-foreground-compat.ck
|
|
deleted file mode 100755
|
|
index ce221c9..0000000
|
|
--- a/tools/pam-foreground-compat.ck
|
|
+++ /dev/null
|
|
@@ -1,17 +0,0 @@
|
|
-#!/bin/sh
|
|
-TAGDIR=/var/run/console
|
|
-
|
|
-[ -n "$CK_SESSION_USER_UID" ] || exit 1
|
|
-[ "$CK_SESSION_IS_LOCAL" = "true" ] || exit 0
|
|
-
|
|
-TAGFILE="$TAGDIR/`getent passwd $CK_SESSION_USER_UID | cut -f 1 -d:`"
|
|
-
|
|
-if [ "$1" = "session_added" ]; then
|
|
- mkdir -p "$TAGDIR"
|
|
- echo "$CK_SESSION_ID" >> "$TAGFILE"
|
|
-fi
|
|
-
|
|
-if [ "$1" = "session_removed" ] && [ -e "$TAGFILE" ]; then
|
|
- sed -i "\%^$CK_SESSION_ID\$%d" "$TAGFILE"
|
|
- [ -s "$TAGFILE" ] || rm -f "$TAGFILE"
|
|
-fi
|
|
diff --git a/tools/pam-foreground-compat.ck.in b/tools/pam-foreground-compat.ck.in
|
|
new file mode 100755
|
|
index 0000000..67ca844
|
|
--- /dev/null
|
|
+++ b/tools/pam-foreground-compat.ck.in
|
|
@@ -0,0 +1,17 @@
|
|
+#!/bin/sh
|
|
+TAGDIR=@RUNDIR@/console
|
|
+
|
|
+[ -n "$CK_SESSION_USER_UID" ] || exit 1
|
|
+[ "$CK_SESSION_IS_LOCAL" = "true" ] || exit 0
|
|
+
|
|
+TAGFILE="$TAGDIR/`getent passwd $CK_SESSION_USER_UID | cut -f 1 -d:`"
|
|
+
|
|
+if [ "$1" = "session_added" ]; then
|
|
+ mkdir -p "$TAGDIR"
|
|
+ echo "$CK_SESSION_ID" >> "$TAGFILE"
|
|
+fi
|
|
+
|
|
+if [ "$1" = "session_removed" ] && [ -e "$TAGFILE" ]; then
|
|
+ sed -i "\%^$CK_SESSION_ID\$%d" "$TAGFILE"
|
|
+ [ -s "$TAGFILE" ] || rm -f "$TAGFILE"
|
|
+fi
|
|
--
|
|
2.2.1
|
|
|