mirror of
https://github.com/gravitational/teleport.git
synced 2026-10-12 02:15:01 +00:00
* Clean up unneeded forwarder for reexec.IsReexec * Disallow reexec through common.Run * Remove the checkhomedir SSH subsystem * Add true reexec subcommand * Assume /proc/self/exe is always usable * Add sessionhelper embed logic
29 lines
1.3 KiB
Go
29 lines
1.3 KiB
Go
// Teleport
|
|
// Copyright (C) 2026 Gravitational, Inc.
|
|
//
|
|
// This program is free software: you can redistribute it and/or modify
|
|
// it under the terms of the GNU Affero General Public License as published by
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
// (at your option) any later version.
|
|
//
|
|
// This program is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU Affero General Public License for more details.
|
|
//
|
|
// You should have received a copy of the GNU Affero General Public License
|
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
package reexec
|
|
|
|
// InitEmbeddedReexec tries to set up the embedded session helper for execution,
|
|
// returning true if the helper is available and was tested successfully, false
|
|
// if there is no embedded session helper in the build, or an error if the
|
|
// helper is present in the build but the setup failed. This function can be
|
|
// called multiple times with no adverse effects, and, if successful, any
|
|
// subsequent call to [CommandOSTweaks] will result in a reexecution using the
|
|
// embedded helper rather than the current process.
|
|
func InitEmbeddedReexec() (bool, error) {
|
|
return initEmbeddedReexec()
|
|
}
|