OpenBSD CVS

CVS log for src/usr.bin/doas/doas.c


[BACK] Up to [local] / src / usr.bin / doas

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: OPENBSD_6_0_BASE


Revision 1.60 / (download) - annotate - [select for diffs], Mon Jul 18 16:46:30 2016 UTC (7 years, 10 months ago) by zhuk
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.59: +6 -4 lines
Diff to previous 1.59 (colored)

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@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.