Skip to Content.
Sympa Menu

sm-commit - Re: [SM-Commit] GIT changes to master grimoire by David Brown (dc203e275b5996da392c89bf86a3866a518082ba)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: David Kowis <dkowis AT shlrm.org>
  • To: David Brown <dmlb2000 AT gmail.com>
  • Cc: sm-commit AT lists.ibiblio.org
  • Subject: Re: [SM-Commit] GIT changes to master grimoire by David Brown (dc203e275b5996da392c89bf86a3866a518082ba)
  • Date: Wed, 19 Sep 2007 22:36:13 -0500

David Brown wrote:
> 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 mailing list
> SM-Commit AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/sm-commit
>
> !DSPAM:46ea9beb100938770899232!
>


This seems to cause
http://bugs.sourcemage.org/show_bug.cgi?id=14000

Perhaps it needs some "if I'm running SElinux" logic? It should probably
be reverted for now though, since it breaks apache22's install log,
probably anything that creates accounts in INSTALL. I'm not really sure
how this breaks stuff, but it sho does. :(

--
David Kowis
==================================================================
| www.ronpaul2008.com | www.sourcemage.org |
| Ron Paul for President! | SourceMage GNU/Linux |
==================================================================

Attachment: signature.asc
Description: OpenPGP digital signature




Archive powered by MHonArc 2.6.24.

Top of Page