public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/28369] New: hard coded /bin/sh in gdb/ser-pipe.c
@ 2021-09-22  2:26 maxim.cournoyer at gmail dot com
  2021-09-25 21:35 ` [Bug gdb/28369] " sergiodj at sergiodj dot net
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: maxim.cournoyer at gmail dot com @ 2021-09-22  2:26 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=28369

            Bug ID: 28369
           Summary: hard coded /bin/sh in gdb/ser-pipe.c
           Product: gdb
           Version: 10.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: maxim.cournoyer at gmail dot com
  Target Milestone: ---

Hello, 

A hard coded instance of /bin/sh was discovered in GDB while running the test
suite of ldc using Guix:

file: gdb/ser-pipe.c

static int
pipe_open (struct serial *scb, const char *name)
[...]
        }

      close_most_fds ();
      execl ("/bin/sh", "sh", "-c", name, (char *) 0);
      _exit (127);
    }

This contrasts with the rest of the code which carefully looks 'sh' from the
PATH or SHELL variables.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug gdb/28369] hard coded /bin/sh in gdb/ser-pipe.c
  2021-09-22  2:26 [Bug gdb/28369] New: hard coded /bin/sh in gdb/ser-pipe.c maxim.cournoyer at gmail dot com
@ 2021-09-25 21:35 ` sergiodj at sergiodj dot net
  2021-09-30 22:19 ` cvs-commit at gcc dot gnu.org
  2021-09-30 22:54 ` sergiodj at sergiodj dot net
  2 siblings, 0 replies; 4+ messages in thread
From: sergiodj at sergiodj dot net @ 2021-09-25 21:35 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=28369

Sergio Durigan Junior <sergiodj at sergiodj dot net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sergiodj at sergiodj dot net

--- Comment #1 from Sergio Durigan Junior <sergiodj at sergiodj dot net> ---
https://sourceware.org/pipermail/gdb-patches/2021-September/182186.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug gdb/28369] hard coded /bin/sh in gdb/ser-pipe.c
  2021-09-22  2:26 [Bug gdb/28369] New: hard coded /bin/sh in gdb/ser-pipe.c maxim.cournoyer at gmail dot com
  2021-09-25 21:35 ` [Bug gdb/28369] " sergiodj at sergiodj dot net
@ 2021-09-30 22:19 ` cvs-commit at gcc dot gnu.org
  2021-09-30 22:54 ` sergiodj at sergiodj dot net
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-09-30 22:19 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=28369

--- Comment #2 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Sergio Durigan Junior
<sergiodj@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=906e2b7664c5becfa3e10717a7d530e87fdab4ec

commit 906e2b7664c5becfa3e10717a7d530e87fdab4ec
Author: Sergio Durigan Junior <sergiodj@sergiodj.net>
Date:   Sat Sep 25 17:27:23 2021 -0400

    [PR gdb/28369] Use get_shell on gdb/ser-pipe.c

    PR gdb/28369 reports that gdb/ser-pipe.c has an 'execl' function call
    with a hard-coded "/bin/sh" as its argument.  We've had 'get_shell'
    for a while now, which is conscious about the SHELL environment and a
    better alternative to always calling "/bin/sh".

    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28369

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug gdb/28369] hard coded /bin/sh in gdb/ser-pipe.c
  2021-09-22  2:26 [Bug gdb/28369] New: hard coded /bin/sh in gdb/ser-pipe.c maxim.cournoyer at gmail dot com
  2021-09-25 21:35 ` [Bug gdb/28369] " sergiodj at sergiodj dot net
  2021-09-30 22:19 ` cvs-commit at gcc dot gnu.org
@ 2021-09-30 22:54 ` sergiodj at sergiodj dot net
  2 siblings, 0 replies; 4+ messages in thread
From: sergiodj at sergiodj dot net @ 2021-09-30 22:54 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=28369

Sergio Durigan Junior <sergiodj at sergiodj dot net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #3 from Sergio Durigan Junior <sergiodj at sergiodj dot net> ---
This has been fixed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-09-30 22:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-22  2:26 [Bug gdb/28369] New: hard coded /bin/sh in gdb/ser-pipe.c maxim.cournoyer at gmail dot com
2021-09-25 21:35 ` [Bug gdb/28369] " sergiodj at sergiodj dot net
2021-09-30 22:19 ` cvs-commit at gcc dot gnu.org
2021-09-30 22:54 ` sergiodj at sergiodj dot net

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).