← Back to team overview

canonical-ubuntu-qa team mailing list archive

[Bug 2126689] Re: Rust coreutils sleep does not allow exec to replace argv[0]

 

I believe this is a duplicate of LP: #2117709. Not fixable in rust-
coreutils, mitigated in autopkgtest upstream.

-- 
You received this bug notification because you are a member of
Canonical's Ubuntu QA, which is subscribed to autopkgtest in Ubuntu.
Matching subscriptions: ubuntu-qa-bugs
https://bugs.launchpad.net/bugs/2126689

Title:
  Rust coreutils sleep does not allow exec to replace argv[0]

Status in autopkgtest package in Ubuntu:
  New
Status in rust-coreutils package in Ubuntu:
  New
Status in autopkgtest source package in Noble:
  New
Status in autopkgtest source package in Plucky:
  New

Bug description:
  The bash exec builtin allows a '-a' option to override the value of a
  program's argv[0]:

    -a name     pass NAME as the zeroth argument to COMMAND

  The "sleep" gnu coreutils binary allows such replacement. However, the
  uutils sleep binary does not.

  In questing, with gnu coreutils:

  $ bash -c 'exec -a background_test sleep 2'
  $ echo $?
  0

  Now, with uutils:
  # bash -c 'exec -a background_test sleep 2'
  Security violation: Requested utility `background_test` does not match executable name:
    /usr/lib/cargo/bin/coreutils/sleep
  # echo $?
  1

  This issue currently makes the autopkgtest (package) DEP8 tests fail
  in with:

  5464s 14:52:49 O: autopkgtest [14:09:36]: test bg: - - - - - - - - - - stderr - - - - - - - - - -
  5464s 14:52:49 O: Security violation: Requested utility `bg_daemon` does not match executable name:
  5464s 14:52:49 O: /usr/lib/cargo/bin/coreutils/sleep
  5464s 14:52:49 O: autopkgtest: DBG: sending command to testbed: copyup /tmp/autopkgtest-lxc.a1qx79y_/downtmp/bg-artifacts/ /tmp/autopkgtest.output.w6bkn95m/artifacts/
  5464s 14:52:49 O: autopkgtest: DBG: got reply from testbed: ok
  5464s 14:52:49 O: autopkgtest: DBG: testbed command ['rm', '-rf', '/tmp/autopkgtest-lxc.a1qx79y_/downtmp/bg-artifacts', '/tmp/autopkgtest-lxc.a1qx79y_/downtmp/autopkgtest_tmp'], kind short, sout raw, serr pipe, env []
  5464s 14:52:49 O: autopkgtest: DBG: testbed command exited with code 0
  5464s 14:52:49 O: autopkgtest: DBG: needs_reset, previously=False, requested by run_tests() line 231
  5464s 14:52:49 O: autopkgtest [14:09:36]: @@@@@@@@@@@@@@@@@@@@ summary
  5464s 14:52:49 O: bg FAIL stderr: Security violation: Requested utility `bg_daemon` does not match executable name:
  5464s 14:52:49 O: autopkgtest: DBG: testbed stop
  5464s 14:52:49 O: autopkgtest: DBG: testbed close, scratch=/tmp/autopkgtest-lxc.a1qx79y_/downtmp
  5464s 14:52:49 O: autopkgtest: DBG: sending command to testbed: close
  5464s 14:52:49 O: autopkgtest: DBG: got reply from testbed: ok
  5464s 14:52:49 O: autopkgtest: DBG: sending command to testbed: quit
  5464s 14:52:49 O:
  5464s 14:52:49 O:
  5464s 14:52:49 O: ----------------------------------------------------------------------
  5464s 14:52:49 O: Ran 97 tests in 3637.768s
  5464s 14:52:49 O:
  5464s 14:52:49 O: FAILED (failures=1, skipped=2, expected failures=2)
  5464s 14:52:49 I: Finished with exitcode 1

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/autopkgtest/+bug/2126689/+subscriptions



References