diff options
Diffstat (limited to 'ldd/exec.go')
| -rw-r--r-- | ldd/exec.go | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/ldd/exec.go b/ldd/exec.go index c0b40655..7392bd8b 100644 --- a/ldd/exec.go +++ b/ldd/exec.go @@ -18,14 +18,17 @@ import ( ) const ( - // msgStaticSuffix is the suffix of message printed to stderr by musl on a statically linked program. + // msgStaticSuffix is the suffix of message printed to stderr by musl on a + // statically linked program. msgStaticSuffix = ": Not a valid dynamic program" - // msgStaticGlibc is a substring of the message printed to stderr by glibc on a statically linked program. + // msgStaticGlibc is a substring of the message printed to stderr by glibc + // on a statically linked program. msgStaticGlibc = "not a dynamic executable" // lddName is the file name of ldd(1) passed to exec.LookPath. lddName = "ldd" - // lddTimeout is the maximum duration ldd(1) is allowed to ran for before it is terminated. + // lddTimeout is the maximum duration ldd(1) is allowed to ran for before it + // is terminated. lddTimeout = 4 * time.Second ) @@ -104,15 +107,3 @@ func Resolve( } return entries, decodeErr } - -// Exec runs ldd(1) in a restrictive [container] and connects it to a [Decoder], returning resulting entries. -// -// Deprecated: this function takes an unchecked pathname string. -// Relative pathnames do not work in the container as working directory information is not sent. -func Exec(ctx context.Context, msg message.Msg, pathname string) ([]*Entry, error) { - if a, err := check.NewAbs(pathname); err != nil { - return nil, err - } else { - return Resolve(ctx, msg, a) - } -} |
