6baa57b5a0
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)
64 lines
1.8 KiB
Bash
Executable file
64 lines
1.8 KiB
Bash
Executable file
#!/bin/sh
|
|
|
|
. $(dirname $0)/adc.common-functions
|
|
|
|
# the help adc now takes some options; we need to process them first
|
|
|
|
[ "$1" = "-list" -o "$HELP_LIST_DEFAULT" = "1" ] && {
|
|
# the GL_ADC_PATH directory has files other than ADCs also, notably the
|
|
# include file for shell ADCs, and maybe a README or two. Those should be
|
|
# chmod -x.
|
|
|
|
# if you want to temporarily hide any ADC from being listed, do the same
|
|
# thing: chmod -x
|
|
|
|
cd $($GL_BINDIR/gl-query-rc GL_ADC_PATH)
|
|
for i in *
|
|
do
|
|
[ -x $i ] && echo $i
|
|
done
|
|
|
|
exit 0
|
|
}
|
|
|
|
# the local site can have a file called gl-adc-help.txt, which will be used as
|
|
# the *entire* help text for this site...
|
|
|
|
[ -f $HOME/gl-adc-help.txt ] && {
|
|
cat $HOME/gl-adc-help.txt
|
|
exit 0
|
|
}
|
|
|
|
# or the local site will use the default help text in this file, with an
|
|
# optional pre- and post- text that is site local (like maybe the admin's
|
|
# contact details)
|
|
|
|
# pre
|
|
[ -f $HOME/gl-adc-pre-help.txt ] && cat $HOME/gl-adc-pre-help.txt
|
|
|
|
# default help text
|
|
echo "
|
|
|
|
The following adc's (admin-defined commands) are available at this site.
|
|
|
|
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
|
|
|
|
deleting/trashing repos:
|
|
You can permanently remove a repo using 'rm'. By default, repos are
|
|
protected ('lock'ed) from being 'rm'-ed. You have to first 'unlock' a
|
|
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
|
|
you can then 'restore' whichever repo you need to bring back.
|
|
|
|
More details can be found in contrib/adc/repo-deletion.mkd (or online at
|
|
http://sitaramc.github.com/gitolite/wild_repodel.html)
|
|
|
|
"
|
|
|
|
# post
|
|
[ -f $HOME/gl-adc-post-help.txt ] && cat $HOME/gl-adc-post-help.txt
|