]> git.armaanb.net Git - opendoas.git/commit
The string with path to shell could be taken directly from struct passwd. At some...
authorzhuk <zhuk>
Mon, 18 Jul 2016 16:46:30 +0000 (16:46 +0000)
committerDuncaen <mail@duncano.de>
Thu, 1 Sep 2016 17:28:43 +0000 (19:28 +0200)
commit24c98415f578823a1132be03279f18189d41c241
treeca168a02f09dba412d3484705d123d211d888d83
parent6ec218cb321404af01a1bec505f782e98c5ec7a3
The string with path to shell could be taken directly from struct passwd. At some point later the data it points to is overridden by getpwuid() call, resulting in garbage. The problem could be easily demonstreated by double doas call:

  $ doas doas -su _sndio
  doas: mpty: command not found

The fix is easy: just strdup() the pw_shell field value.

okay tedu@, tweaks from & okay natano@
doas.c