ROOTPLOIT
Server: LiteSpeed
System: Linux in-mum-web1878.main-hosting.eu 5.14.0-570.21.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jun 11 07:22:35 EDT 2025 x86_64
User: u435929562 (435929562)
PHP: 7.4.33
Disabled: system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
Upload Files
File: //opt/golang/1.22.0/src/cmd/go/testdata/script/version_buildvcs_nested.txt
[!git] skip
[!exec:hg] skip
[short] skip
env GOFLAGS='-n -buildvcs'

# Create a root module in a root Git repository.
mkdir root
cd root
go mod init example.com/root
exec git init

# Nesting repositories in parent directories are ignored, as the current
# directory main package, and containing main module are in the same repository.
# This is an error in GOPATH mode (to prevent VCS injection), but for modules,
# we assume users have control over repositories they've checked out.
mkdir hgsub
cd hgsub
exec hg init
cp ../../main.go main.go
! go build
stderr '^error obtaining VCS status: main module is in repository ".*root" but current directory is in repository ".*hgsub"$'
stderr '^\tUse -buildvcs=false to disable VCS stamping.$'
go build -buildvcs=false
go mod init example.com/root/hgsub
go build
cd ..

# It's an error to build a package from a nested Git repository if the package
# is in a separate repository from the current directory or from the module
# root directory.
mkdir gitsub
cd gitsub
exec git init
exec git config user.name 'J.R.Gopher'
exec git config user.email '[email protected]'
cp ../../main.go main.go
! go build
stderr '^error obtaining VCS status: main module is in repository ".*root" but current directory is in repository ".*gitsub"$'
go build -buildvcs=false
go mod init example.com/root/gitsub
exec git commit --allow-empty -m empty # status commands fail without this
go build
rm go.mod
cd ..
! go build ./gitsub
stderr '^error obtaining VCS status: main package is in repository ".*gitsub" but current directory is in repository ".*root"$'
go build -buildvcs=false -o=gitsub${/} ./gitsub

-- main.go --
package main
func main() {}