sm-commit AT lists.ibiblio.org
Subject: Source Mage code commit list
List archive
[SM-Commit] GIT changes to master grimoire by David Brown (dc203e275b5996da392c89bf86a3866a518082ba)
- From: David Brown <scm AT sourcemage.org>
- To: sm-commit AT lists.ibiblio.org
- Subject: [SM-Commit] GIT changes to master grimoire by David Brown (dc203e275b5996da392c89bf86a3866a518082ba)
- Date: Fri, 14 Sep 2007 09:34:16 -0500
GIT changes to master grimoire by David Brown <dmlb2000 AT gmail.com>:
libaccount | 16 ++++++++++++++++
1 files changed, 16 insertions(+)
New commits:
commit dc203e275b5996da392c89bf86a3866a518082ba
Author: David Brown <dmlb2000 AT gmail.com>
Commit: David Brown <dmlb2000 AT gmail.com>
selinux/pam don't seem to like useradd/groupadd commands being run with
LD_PRELOAD on so back it up and execute the command
diff --git a/libaccount b/libaccount
index 1c3261b..2c2464f 100755
--- a/libaccount
+++ b/libaccount
@@ -73,10 +73,18 @@ function create_account() {
debug "libgrimoire" "create_account() - $1, UID=$ACCOUNT_UID,
GID=$PRIMARY_GID:$PRIMARY_GNAME, HOME=$HOME_DIR, SHELL=$USER_SHELL,
SECONDARY_GIDS=$4"
+ # selinux/pam doesn't like it when LD_PRELOAD is set during group/user
+ # manipulations. These files aren't tracked anyway so this won't matter.
+
+ LD_PRELOAD_BAK="$LD_PRELOAD"
+ unset LD_PRELOAD
groupadd -g $PRIMARY_GID -f $PRIMARY_GNAME
# check for adding user problems and try to notify user.
useradd -u $ACCOUNT_UID -g $PRIMARY_GNAME $SECONDARY_GIDS -d "$HOME_DIR"
-s "$USER_SHELL" $1
+ LD_PRELOAD="$LD_PRELOAD_BAK"
+ unset LD_PRELOAD_BAK
+
local USERADD_RETURN=$?
debug "libgrimoire.create_account()" "useradd return code was:
$USERADD_RETURN"
@@ -117,7 +125,15 @@ function create_group() {
debug "libgrimoire" "create_group() - $1, GID=$GROUP_UID "
+ # selinux/pam doesn't like it when you are doing user/group manipulations
+ # with LD_PRELOAD set. the files changed aren't tracked anyway so this
+ # shouldn't matter
+
+ LD_PRELOAD_BAK="$LD_PRELOAD"
+ unset LD_PRELOAD
groupadd -g $GROUP_GID $1 > /dev/null 2>&1
+ LD_PRELOAD="$LD_PRELOAD_BAK"
+ unset LD_PRELOAD_BAK
local GROUPADD_RETURN=$?
debug "libgrimoire.create_group()" "groupadd return code was:
$GROUPADD_RETURN"
- [SM-Commit] GIT changes to master grimoire by David Brown (dc203e275b5996da392c89bf86a3866a518082ba), David Brown, 09/14/2007
Archive powered by MHonArc 2.6.24.