OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.10 / (download) - annotate - [select for diffs], Sun Jul 7 19:21:28 2019 UTC (4 years, 10 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, HEAD
Changes since 1.9: +5 -2 lines
Diff to previous 1.9 (colored)

fix one last edge case regarding PATH, allows simpler config.

Revision 1.9 / (download) - annotate - [select for diffs], Mon Jun 17 19:51:23 2019 UTC (4 years, 11 months ago) by tedu
Branch: MAIN
Changes since 1.8: +9 -3 lines
Diff to previous 1.8 (colored)

setusercontext resets PATH (which we want). but then it becomes
impossible to access the old PATH. save a copy in case we need it later.
bug report from espie.

Revision 1.8 / (download) - annotate - [select for diffs], Mon Jun 17 16:01:26 2019 UTC (4 years, 11 months ago) by tedu
Branch: MAIN
Changes since 1.7: +12 -14 lines
Diff to previous 1.7 (colored)

always reset the "su" variables, which is more consistent and predictable.
ok martijn millert

Revision 1.7 / (download) - annotate - [select for diffs], Sun Jun 16 18:16:34 2019 UTC (4 years, 11 months ago) by tedu
Branch: MAIN
Changes since 1.6: +34 -13 lines
Diff to previous 1.6 (colored)

redo the environment inheritance to not inherit. it was intended to make
life easier, but it can be surprising or even unsafe. instead, reset just
about everything to the target user's values.
ok deraadt martijn
Thanks to Sander Bos in particular for pointing out some nasty edge cases.

Revision 1.6 / (download) - annotate - [select for diffs], Thu Apr 6 21:12:06 2017 UTC (7 years, 1 month ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.5: +3 -3 lines
Diff to previous 1.5 (colored)

prepenv can take a const rule

Revision 1.5 / (download) - annotate - [select for diffs], Thu Sep 15 00:58:23 2016 UTC (7 years, 8 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.4: +2 -2 lines
Diff to previous 1.4 (colored)

use static in the right places to seperate modules better
ok tedu

Revision 1.4 / (download) - annotate - [select for diffs], Sun Jul 10 03:24:31 2016 UTC (7 years, 10 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.3: +6 -6 lines
Diff to previous 1.3 (colored)

rename variable for consistency

Revision 1.3 / (download) - annotate - [select for diffs], Mon Jun 27 15:41:17 2016 UTC (7 years, 10 months ago) by tedu
Branch: MAIN
Changes since 1.2: +106 -79 lines
Diff to previous 1.2 (colored)

revise environment handling.
Add a setenv keyword for manipulating the environment. keepenv now means
only retain everything. (for one release, the old use of keepenv will still
work.)
Allow setting variables to new or existing values, and also removing vars
when keepenv is used.
ok djm martijn tb

Revision 1.2 / (download) - annotate - [select for diffs], Sun Jun 19 19:29:43 2016 UTC (7 years, 11 months ago) by martijn
Branch: MAIN
Changes since 1.1: +29 -2 lines
Diff to previous 1.1 (colored)

Move the RB_ code from doas.h to env.c, and limit the environment interface to a
simple prepenv function.

OK tedu@

Revision 1.1 / (download) - annotate - [select for diffs], Thu Jun 16 17:40:30 2016 UTC (7 years, 11 months ago) by tedu
Branch: MAIN

the environment handling code was showing its age. just because environ
is a char** array doesn't mean we must exclusively operate on such.
convert to a red-black tree, manipulate as desired, then flatten to array.
potentially overkill for the current operations, but reading the tea leaves
i see that more manipulations are desired.
ok tb
(and some thought provoking disagreement from martijn)

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.