tags 487443 +pending
thanks
On Sat, Jun 21, 2008 at 06:58:44PM -0300, Juan A. Diaz wrote:
> Package: libuuid1
> Version: 1.40.11-1
> Severity: important
> Tags: patch
Thanks for the patch. Unfortunately it doesn't do the right thing if
the parameter (i.e. FIRST_SYSTEM_GROUP) is not defined in adduser
group. So I've this is what I've checked into the source code
management system (see attached).
- Ted
>From 5882a3cbfa7370f92d4dbf3cd64de78529194252 Mon Sep 17 00:00:00 2001
From: Theodore Ts'o <[EMAIL PROTECTED]>
Date: Mon, 23 Jun 2008 11:57:54 -0400
Subject: [PATCH] debian: parse /etc/adduser.conf file manually
The syntax for /etc/adduser.conf allows spaces around the equals sign,
i.e.:
GROUPHOMES = no
We were previously asking /bin/sh to source the file, which doesn't
support the above syntax. So pull out the necessary fields via
sed/grep.
Thanks to Juan A. Diaz for reporting the bug and suggesting the fix.
Addresses-Debian-Bug: #487443
Signed-off-by: "Theodore Ts'o" <[EMAIL PROTECTED]>
---
debian/libuuid1.postinst | 25 +++++++++++++++++++------
1 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/debian/libuuid1.postinst b/debian/libuuid1.postinst
index ccbd881..27ca205 100644
--- a/debian/libuuid1.postinst
+++ b/debian/libuuid1.postinst
@@ -2,13 +2,26 @@
set -e
-FIRST_SYSTEM_UID=100
-LAST_SYSTEM_UID=999
-FIRST_SYSTEM_GID=100
-LAST_SYSTEM_GID=999
+ADDUSERCONF='/etc/adduser.conf'
-if test -f /etc/adduser.conf; then
- . /etc/adduser.conf
+if test -f $ADDUSERCONF; then
+ FIRST_SYSTEM_UID=$(sed -n
"s/^[[:space:]]*FIRST_SYSTEM_UID[[:space:]]*=[[:space:]]*[\"']\?\([^\"']*\)[\"']\?/\1/p"
$ADDUSERCONF)
+ LAST_SYSTEM_UID=$(sed -n
"s/^[[:space:]]*LAST_SYSTEM_UID[[:space:]]*=[[:space:]]*[\"']\?\([^\"']*\)[\"']\?/\1/p"
$ADDUSERCONF)
+ FIRST_SYSTEM_GID=$(sed -n
"s/^[[:space:]]*FIRST_SYSTEM_GID[[:space:]]*=[[:space:]]*[\"']\?\([^\"']*\)[\"']\?/\1/p"
$ADDUSERCONF)
+ LAST_SYSTEM_GID=$(sed -n
"s/^[[:space:]]*LAST_SYSTEM_GID[[:space:]]*=[[:space:]]*[\"']\?\([^\"']*\)[\"']\?/\1/p"
$ADDUSERCONF)
+fi
+
+if test -z "$FIRST_SYSTEM_UID"; then
+ FIRST_SYSTEM_UID=100
+fi
+if test -z "$LAST_SYSTEM_UID"; then
+ LAST_SYSTEM_UID=999
+fi
+if test -z "$FIRST_SYSTEM_GID"; then
+ FIRST_SYSTEM_GID=100
+fi
+if test -z "$LAST_SYSTEM_GID"; then
+ LAST_SYSTEM_GID=999
fi
groupadd -f -K GID_MIN=$FIRST_SYSTEM_GID -K GID_MAX=$LAST_SYSTEM_GID libuuid
--
1.5.6.rc3.1.g36b7.dirty
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]