diff options
author | Sitaram Chamarty <sitaram@atc.tcs.com> | 2012-02-14 06:36:02 +0530 |
---|---|---|
committer | Sitaram Chamarty <sitaram@atc.tcs.com> | 2012-02-14 11:41:13 +0530 |
commit | 6baa57b5a03d543ba8883aa1b444f39f11a275fc (patch) | |
tree | 5d87348f929d140f92b8ea7588e06a2dbda509db | |
parent | v2.3 (diff) | |
download | gitolite-gentoo-6baa57b5a03d543ba8883aa1b444f39f11a275fc.tar.gz gitolite-gentoo-6baa57b5a03d543ba8883aa1b444f39f11a275fc.tar.bz2 gitolite-gentoo-6baa57b5a03d543ba8883aa1b444f39f11a275fc.zip |
replace <<EOF type constructs with multi-line echo
This compensates for an selinux bug reported on #gitolite by John Hawley
(warthog9). sh/bash uses a tempfile to do this, which in turn causes
some problems in selinux; I really don't [need to] know more than that.
*Technically* this is a bug in selinux/policy, and would qualify for an
entry in "nagp"... but:
(1) the changes are small and localised
(2) the problem makes gitolite -- currently -- unusable with selinux,
and what use is a security program which can't run under selinux
(regardless of whose fault it is)?
and finally
(3) if I can't break my own rules for one of my most high-profile users
then what's the point of owning the code?
:-)
----
Implementation notes: I've only done this for code that is likely/meant
to be used in production
I also slip-streamed in a URL fix (from when I changed all the online
document rendering)
-rwxr-xr-x | contrib/adc/help | 12 | ||||
-rwxr-xr-x | src/gl-admin-push | 4 | ||||
-rwxr-xr-x | src/gl-setup | 4 |
3 files changed, 10 insertions, 10 deletions
diff --git a/contrib/adc/help b/contrib/adc/help index 9c2289e..82912e0 100755 --- a/contrib/adc/help +++ b/contrib/adc/help @@ -37,11 +37,11 @@ [ -f $HOME/gl-adc-pre-help.txt ] && cat $HOME/gl-adc-pre-help.txt # default help text -cat <<EOF +echo " The following adc's (admin-defined commands) are available at this site. -creating a "fork" of a repo: +creating a 'fork' of a repo: the 'fork' adc forks a repo that you have read access to, to a repo that you have create rights to @@ -51,13 +51,13 @@ deleting/trashing repos: repo before you can 'rm' it. A different scheme of handling this is to use 'trash' to move the repo to - a "trashcan" area. You can then 'list-trash' to see what you have, and + a 'trashcan' area. You can then 'list-trash' to see what you have, and you can then 'restore' whichever repo you need to bring back. - More details can be found at: - http://sitaramc.github.com/gitolite/contrib/adc/repo-deletion.html + More details can be found in contrib/adc/repo-deletion.mkd (or online at + http://sitaramc.github.com/gitolite/wild_repodel.html) -EOF +" # post [ -f $HOME/gl-adc-post-help.txt ] && cat $HOME/gl-adc-post-help.txt diff --git a/src/gl-admin-push b/src/gl-admin-push index 3fd0214..4031e93 100755 --- a/src/gl-admin-push +++ b/src/gl-admin-push @@ -9,7 +9,7 @@ die() { echo "$@" >&2; exit 1; } GL_BINDIR=` perl -ne 'print($1), exit if /^command="(.+?)\/gl-(time|auth-command) /' < $HOME/.ssh/authorized_keys` # GL_BINDIR still not known? we have a problem... [ -z "$GL_BINDIR" ] && { - cat <<EOF2 + echo " Unable to determine correct path for gitolite scripts from the authkeys file. @@ -21,7 +21,7 @@ this command. For example (if you followed doc/http-backend.mkd precisely): GL_BINDIR=/var/www/gitolite-home/bin $0 $@ -EOF2 +" exit 1 } diff --git a/src/gl-setup b/src/gl-setup index 7bf8881..b00560a 100755 --- a/src/gl-setup +++ b/src/gl-setup @@ -110,13 +110,13 @@ GL_ADMINDIR=`get_rc_val GL_ADMINDIR` gl-install -q [ -f $GL_ADMINDIR/conf/gitolite.conf ] || { - cat <<EOF | cut -c9- > $GL_ADMINDIR/conf/gitolite.conf + echo " repo gitolite-admin RW+ = $admin_name repo testing RW+ = @all -EOF + " | cut -c9- > $GL_ADMINDIR/conf/gitolite.conf } [ -n "$pubkey_file" ] && cp $pubkey_file $GL_ADMINDIR/keydir |