From: Fred T. Hamster Date: Fri, 13 Feb 2026 01:22:00 +0000 (-0500) Subject: working on solving unfortunate sub-link traversals X-Git-Tag: 2.140.191^2~2 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=9954e3985d4dca647ec255e5288dc88c2f430488;p=feisty_meow.git working on solving unfortunate sub-link traversals the rcheckin command will go into sub-folders in the directory that are links, which we would prefer it not do. there are cases where the linked sub-folder is a software product we do not have rights to update, so we should not be trying to dive into there and mess with the source. if a linked sub-folder does need to be checked in, then that is a special case that will have to be dealt with somewhere else, currently. --- diff --git a/scripts/rev_control/version_control.sh b/scripts/rev_control/version_control.sh index 90761484..2396dc3f 100644 --- a/scripts/rev_control/version_control.sh +++ b/scripts/rev_control/version_control.sh @@ -551,6 +551,8 @@ function puff_out_list() # that are located under the directory passed as the first parameter. # if this does not result in any directories being found, then a recursive # upwards search is done for git repos, which wants the .git directory. +# note that this will skip links, unless the directory passed is itself a +# link; it will be entered, but links underneath it will be ignored. function generate_rev_ctrl_filelist() { local dir="$1"; shift @@ -559,14 +561,19 @@ function generate_rev_ctrl_filelist() local tempfile=$(mktemp /tmp/zz_checkins.XXXXXX) echo -n >$tempfile local additional_filter - find $dirhere -follow -maxdepth $MAX_DEPTH -type d -iname ".svn" -exec echo {}/.. ';' >>$tempfile 2>/dev/null + # we will still enter into dirhere if it's a link, but we will not follow into sub-links. + find $dirhere/. -maxdepth $MAX_DEPTH -type d -iname ".svn" -exec echo {}/.. ';' >>$tempfile 2>/dev/null +#-follow #hmmm: how to get the report of things ABOVE here, which we need. # can we do an exec using the seek writable? - find $dirhere -follow -maxdepth $MAX_DEPTH -type d -iname ".git" -exec echo {}/.. ';' >>$tempfile 2>/dev/null + # we will still enter into dirhere if it's a link, but we will not follow into sub-links. + find $dirhere/. -maxdepth $MAX_DEPTH -type d -iname ".git" -exec echo {}/.. ';' >>$tempfile 2>/dev/null +#-follow # CVS is not well behaved like git and (now) svn, and we seldom use it anymore. + popd &>/dev/null # see if they've warned us not to try checking in within vendor hierarchies.