Page MenuHome GnuPG

gpgtar: --status-fd requires HANDLE (not POSIX fd) when spawning a process
Testing, NormalPublic


In master, gnupg_process_spawn on Windows controls HANDLES accurately (while 2.4, 2.2 are *not*) ; It closes all HANDLES, when not specifically addressed.

gpgtar supports --status-fd option. On Windows, it may be a HANDLE. gpgtar uses the HANDLE for its own status output, as well as passing it to subprocess of gpg which is invoked by gnupg_process_spawn.

For the handling of the HANDLE of --status-fd, we have a bug which confuses the HANDLE and POSIX file descriptor.

The bug doesn't expose a problem in 2.4 or 2.2, because its invocation of a process doesn't closes HANDLE but all HANDLES are inherit to subprocess.

In master, gnupg_process_spawn does correctly, so, this bug is exposed.

Event Timeline

gniibe triaged this task as Normal priority.Jun 27 2023, 7:55 AM
gniibe created this task.
gniibe created this object with edit policy "Contributor (Project)".

We need to keep the gpgtar part of commit in rG2756147e392c: gpg,sm,tools: Use string for option --*-fd..

gniibe changed the task status from Open to Testing.EditedJun 28 2023, 7:12 AM

Changes are pushed.

It sets up the stream for status with the syshd using gnupg_parse_fdstr.
The argument for --status-fd is passed to gnupg from gpgtar verbatimly.

gniibe mentioned this in Unknown Object (Event).Jul 3 2023, 5:07 AM