1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-05-23 08:26:04 +02:00
Commit Graph

11282 Commits

Author SHA1 Message Date
dana 77d203f3fb unposted: Release 5.8 2020-02-14 16:08:55 -06:00
dana 4bec892059 CVE-2019-20044: Update change log for preceding commits 2020-02-14 16:08:29 -06:00
dana 048f40b68b Update NEWS/README 2020-02-14 16:06:58 -06:00
dana b15bd4aa59 Add unsetopt/PRIVILEGED tests 2020-02-14 16:06:58 -06:00
dana 4ce66857b7 Clean up error-message white space 2020-02-14 16:06:57 -06:00
dana 26d02efa7a Improve PRIVILEGED fixes (again)
* Pass RGID instead of passwd GID to initgroups()

* Clean up #ifdefs, avoid unnecessary checks

* Flatten conditions
2020-02-14 16:06:57 -06:00
Daniel Shahaf 8250c5c168 Improve PRIVILEGED fixes
- Fix retval handling in bin_setopt()

- Don't skip_setuid / skip_setgid.  It's not our place to optimize away noops
  (that might not even _be_ noops; they might change the saved uid…).

- Remove HAVE_* guard checks around functions that are used unguarded elsewhere.

- Use bsd-setres_id.c from OpenSSH to provide setresuid() / setresgid()
  everywhere, and thus simplify the ifdef soup.  Fix some preëxisting
  bugs in the macro definitions of setuid() (do we still need that one?).

- Fix zwarning() format codes for variadic arguments type safety

- Restored a comment from HEAD

- Fix failure modes around initgroups()

- Compared privilege restoration code with OpenSSH's permanently_drop_uid() and
  updated as needed

- Add E01 PRIVILEGED sanity checks
2020-02-14 16:06:57 -06:00
Sam Foxman 24e993db62 Drop privileges securely 2020-02-14 16:06:57 -06:00
dana e89060a377 unposted: V01zmodload: Fix failing test from workers/45385 2020-02-14 15:55:52 -06:00
dana dd523255cc 45423: _su: Improve arg handling, shell look-ups
Differences from ML post:

* Properly fix escaping issue with $usr (needs unescaped first)

* Make $shell emptiness check easier to read (per feedback)
2020-02-14 09:42:12 -06:00
dana 8037462895 unposted: _zip: Recognise '--' 2020-02-07 14:05:48 -06:00
Daniel Shahaf 699dfdd0ea 45385: Add a test for 'zmodload -Fa' preemptively disabling ("blacklisting"?) features. 2020-02-07 12:44:53 +00:00
dana 643de93164 unposted: Test release: 5.7.1-test-3 2020-02-06 14:01:53 -06:00
Roman Perepelitsa 754fdc6580 zsh/system: Fix infinite loop in sysread 2020-02-06 13:42:32 -06:00
Martin von Wittich 1f238665f6 _diff_options: Restore -w completion lost in workers/43351 2020-02-06 13:24:00 -06:00
Daniel Shahaf 8a12bd81aa unposted: Fix ChangeLog typo. 2020-02-06 05:55:05 +00:00
Daniel Shahaf 3bcf9641eb 45368: Add tests for workers/45367's issue about double slashes in 'cd -P' and /home/daniel/in/zsh. 2020-02-03 07:09:30 +00:00
Peter Stephenson e01223a26c 45373: Fix ERR_EXIT bug in else branch of if.
The flags need resetting for this branch otherwise e.g. command
substitution with non-zero status doesn't cause exit.
2020-02-02 18:05:47 +00:00
Daniel Shahaf 7a9467e430 45372: Record a symlink loop bug involving :P 2020-02-02 07:36:41 +00:00
WGH e71ba9704f 45365: _git: Fix __git_recent_branches for the case when a commit has an empty message 2020-02-02 07:32:14 +00:00
Daniel Shahaf 581585dfc6 45343: Queue signals around arithmetic evaluations
The queueing added in execarith() in 45083 is reverted since the callee
does this now.
2020-01-29 09:02:49 +00:00
Daniel Shahaf 8dab5bc037 45344: Document where third-party completion functions should be installed. 2020-01-29 09:02:34 +00:00
Daniel Shahaf b4996ea5eb 45342: Add tests for interaction between autoloadable parameters and module loading. 2020-01-29 08:30:47 +00:00
Daniel Shahaf a06143bb30 45345: internal: ztst.vim: Fix highlighting of zsh comments in test payload 2020-01-28 09:24:34 +00:00
Daniel Shahaf 3511169731 unposted: internal: Add some comments and fix indentation. No functional change. 2020-01-26 03:46:00 +00:00
Daniel Shahaf 5e843a3721 45340: internal: Document the difference between paramtab and realparamtab. 2020-01-23 03:21:36 +00:00
Eitan Adler e626f57613 45332: _git: add completion for git-version
Signed-off-by: Eitan Adler <lists@eitanadler.com>
2020-01-19 23:32:37 +00:00
Mikael Magnusson 387247864e _brace_parameter: add missing \ 2020-01-19 16:11:14 +01:00
Daniel Shahaf bcd78756c8 45313: _git: Support completion from outside of a worktree when --git-dir/--work-tree are specified on the command line
Revised version of workers/41523.
2020-01-17 21:52:45 +00:00
Daniel Shahaf 7ca2b06501 45304: Do execute the always block even when the try/always block itself is the last command.
Fixes the test added in the previous commit (workers/45305).
2020-01-16 18:29:13 +00:00
Daniel Shahaf fb3865514c Merge branch 'master' into 5.9
* master:
  45305: Add an XFail test: The exec-last-command optimization is applied to try/always.
  45307: zstyle docs: Unoverload a placeholder variable name.
  45306: zstyle docs: Introduce the first synopsis in the same way as all others: with an item()().
  unposted: docs: Fix a cross-reference.
2020-01-16 18:21:41 +00:00
Daniel Shahaf 28e11ac60b 45305: Add an XFail test: The exec-last-command optimization is applied to try/always. 2020-01-16 18:21:11 +00:00
Daniel Shahaf 0a7bfc0bd2 45307: zstyle docs: Unoverload a placeholder variable name.
Use 'pattern' to refer to things matched against contexts and 'metapattern'
to refer to things matched against patterns.
2020-01-16 18:18:17 +00:00
Daniel Shahaf 6f263b5e89 45306: zstyle docs: Introduce the first synopsis in the same way as all others: with an item()(). 2020-01-16 18:18:14 +00:00
Daniel Shahaf 490478378f unposted: docs: Fix a cross-reference. 2020-01-16 16:32:39 +00:00
dana 977e1c75d8 45292: D02glob: Add regression test for macOS stat(2) misbehaviour
On macOS, a privileged stat(2) call can erroneously treat files as
directories, which can produce unexpected glob results. This was reported at
workers/42891. A side-effect of the change from workers/45291 is that it seems
to work around this issue, at least in the obvious cases
2020-01-15 19:31:16 -06:00
Daniel Shahaf edc04bd946 45291: A glob with a trailing slash will now match unreadable/unexecutable directories. 2020-01-15 19:20:33 -06:00
Daniel Shahaf e899c21863 Merge remote-tracking branch 'origin/master' into 5.9
Right now, as we're preparing to tag the 5.8 release, the 5.9 branch is
maintained as a topic branch off master.

* origin/master:
  45287: zshexpn: Describe parameter elision and add some introductory prose
  45302: bin_umask(): Queue signals around umask().
  users/24656: docs: Add an example of setting and querying zstyles
  users/24659: Cross-ref doc for matchers.
  45296: D02glob: Clean up after test from users/24633
  45290: New helper script for listing XFail tests.
  users/24633: Add an xfail test for users/24619.
  unposted: additional typo fix
  45280: _git: add -local variants
  users/24628 (fixed): More doc for selectw-word-style widgets.
  45266: Fix losetup completion, broken in da085b7a20 (41720).
  unposted: Fix punctuation.
  use /dev/fd on Cygwin for process substitution
  unposted: Two additional typo fixes.
  Fix typos reported by codespell in shell code
  Fix typos reported by codespell in Src/
  45269: Fix misspellings in completions and elsewhere.
  45261: _gcc: Detect clang-as-gcc
  unposted: internal: Remove Vim modeline that interferes with ztst.vim.
  unposted: internal: ztst.vim: Use :syn-sync to work around (#x) and "`\\\\\\\\`" confusing the highlighting.
  unposted: internal: zyodl.vim: Support glob qualifiers in example()'s
  unposted: internal: zyodl.vim: Support yodl comments.
  github #44: Allow completion for picocom to list symlinks to character devices
  45245: _gcc: add some clang specific warnings
  45231: _rsync: When completing remote modules, ignore more of the motd.
  unposted: _tac: Eliminate superfluous variable
  45226: _man: Improve completion of file paths
  45184: Clarify documentation of %-sequences understood by compadd -[Xx]
  45239: Remove 'appendhistory' from zsh-newuser-install
  45218: add more options to swaks completion
  45196: fix completion after make -C, allowing for -C being used multiple times
  unposted (after 45183): Fix yodl error: "contrib.yo:4457: No macro: back(...)".
  45181: Fix workers/45164: ${(S)%%} will now consider the empty string as a potential match.
  45183: Improve documentation examples
  unposted: Add some tests for ${(S)}, including a regression test for workers/45164.
  45169/0002 (tweaked for trailing newlines): Add an expected-to-fail test for workers/44007.
  45169/0001: In the test suite, allow test cases to be marked as expected to fail.
  users/24582 + users/24583: Add regression tests for the previous commit.
  24581: Fix array assignments in shell word splitting and completion.
  45160: zshexpn: Expand documentation of (S)
  45150 + 45152: zshexpn: Use a more minimal example in the documentation of (#b).
  unposted: internal: Vim ztst support: Add an ftplugin in addition to the syntax highlighter.
  45130: _multi_parts: Always pass -f to compadd if given by caller
  unposted: zerrmsg(): Fix macro guard missed in previous commit
  unposted: ChangeLog for last commit
  internal: Allow %L in zerrmsg() in non-debug builds, too.
2020-01-15 22:49:09 +00:00
Daniel Shahaf 22c0fe02a5 45288: _git: Complete bisect/new as well as bisect/bad.
Also, complete the bisect/old-$commithash ref names.
2020-01-15 22:41:25 +00:00
Daniel Shahaf c7bc62aa06 45287: zshexpn: Describe parameter elision and add some introductory prose 2020-01-15 22:35:09 +00:00
Daniel Shahaf faa476a4ed 45302: bin_umask(): Queue signals around umask().
Otherwise, a signal handler might create files while the temporary umask
is in effect.
2020-01-15 19:49:45 +00:00
Daniel Shahaf 610b4b3028 users/24656: docs: Add an example of setting and querying zstyles 2020-01-14 17:42:36 +00:00
Peter Stephenson 8406a0d38e users/24659: Cross-ref doc for matchers. 2020-01-14 14:00:03 +00:00
dana 62a1e37ccc 45296: D02glob: Clean up after test from users/24633 2020-01-13 17:43:51 -06:00
Daniel Shahaf 9f8c369ccd 45290: New helper script for listing XFail tests. 2020-01-13 22:48:55 +00:00
Daniel Shahaf 0681be600c users/24633: Add an xfail test for users/24619. 2020-01-12 22:14:10 +00:00
Oliver Kiddle 06a9af4f59 unposted: additional typo fix 2020-01-11 17:41:14 +01:00
Eitan Adler 5482d65d5c 45280: _git: add -local variants
Technically all timezone formats support the "-local" suffix but it is
not meaningful for all of them. As such just list out the specific
formats which it does.

Also adjust the 'default' description
2020-01-11 17:37:44 +01:00
Peter Stephenson 2ce5f6d79a users/24628 (fixed): More doc for selectw-word-style widgets.
Add example of how to add a new binding for a widget that fixes
a particular word behaviour using styles.
2020-01-11 14:07:19 +00:00
Daniel Shahaf 70d6d0d86c 45266: Fix losetup completion, broken in da085b7a20 (41720). 2020-01-10 12:46:38 +00:00