From 0ec3d77761d52dc4b1822e8c23be12acc58f5cba Mon Sep 17 00:00:00 2001 From: Sitaram Chamarty Date: Sun, 28 Aug 2011 09:28:01 +0530 Subject: [PATCH] delegation: allow includes in fragments, fixup doc I could not think why we disallowed includes in subconfs, since an include is the same as inserting all those lines inline anyway. --- doc/delegation.mkd | 5 +++-- doc/gitolite.conf.mkd | 3 --- src/gl-compile-conf | 1 - 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/doc/delegation.mkd b/doc/delegation.mkd index b8594aa..fd8b4e0 100644 --- a/doc/delegation.mkd +++ b/doc/delegation.mkd @@ -117,8 +117,9 @@ to the bottom of the main file. ### other notes -The "include" statement cannot be used in fragment files, for security -reasons. +If you're in big-config mode (`GL_BIG_CONFIG` set to 1 in the rc file), a +fragment file cannot define any new groups; all groups have to be defined in +the main config file or in a file included from it. ---- diff --git a/doc/gitolite.conf.mkd b/doc/gitolite.conf.mkd index 9cda16e..87e1ff7 100644 --- a/doc/gitolite.conf.mkd +++ b/doc/gitolite.conf.mkd @@ -80,9 +80,6 @@ config file exists. Files that have been already processed once are skipped, with a warning. -[Advanced users: the include statement cannot be used inside a delegated -config file, for security reasons]. - ### basic access control diff --git a/src/gl-compile-conf b/src/gl-compile-conf index 273786f..fe24738 100755 --- a/src/gl-compile-conf +++ b/src/gl-compile-conf @@ -257,7 +257,6 @@ sub parse_conf_line { my $include_glob = $1; for my $file (glob($include_glob =~ m(^/) ? $include_glob : "conf/$include_glob")) { - die "$ABRT $fragment attempting to include configuration\n" if $fragment ne 'master'; die "$ABRT included file not found: '$file'\n" unless -f $file; my $file_id = device_inode($file);