zulip/scripts
Anders Kaseorg ff1622afcf zulip_tools: Replace deprecated mktemp call.
Although mktemp is deprecated due to security issues, this is not a
security issue.

The security problems with mktemp happen when you open the resulting
filename (without O_EXCL) in a publicly writable directory, because
then someone else might have predicted the filename and created or
symlinked or hardlinked something there between the mktemp and the
open, causing you to write to a file you didn’t expect.

Here we don’t open the resulting filename, we symlink to it.  symlink
will refuse to clobber an existing file, and we handle the error that
arises from this case.  This is the normal way to atomically create a
symlink.

We should still replace mktemp because it’s deprecated, but we can’t
replace it with a function that creates the temporary file.  Instead
we build a random filename ourselves.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-09 14:32:02 -07:00
..
lib zulip_tools: Replace deprecated mktemp call. 2020-07-09 14:32:02 -07:00
nagios nagios: Don’t crash on missing cron file. 2020-06-13 16:49:32 -07:00
setup puppet: Apply basic PostgreSQL configuration before pg_upgradecluster. 2020-07-06 18:30:16 -07:00
README.md cleanup: Delete trailing newlines. 2019-08-06 23:29:11 -07:00
__init__.py Factor out venv-creating code from provision.py. 2016-06-21 11:25:41 -07:00
get-django-setting setup_path_on_import: Replace with setup_path function. 2020-02-25 15:40:21 -08:00
purge-old-deployments python: Sort imports with isort. 2020-06-11 16:45:32 -07:00
refresh-sharding-and-restart sharding: Add basic sharding configuration for Tornado. 2020-05-20 13:47:20 -07:00
restart-server python: Manually convert more percent-formatting to f-strings. 2020-06-14 23:27:22 -07:00
upgrade-zulip Use #!/usr/bin/env for bash shebangs. 2018-12-17 17:21:08 -08:00
upgrade-zulip-from-git Use #!/usr/bin/env for bash shebangs. 2018-12-17 17:21:08 -08:00
zulip-puppet-apply puppet: Allow passing an alternate config path to zulip-puppet-apply. 2020-07-06 18:30:16 -07:00

README.md

This directory contains scripts that:

  • Generally do not require access to Django or the database (those are "management commands"), and thus are suitable to run operationally.

  • Are useful for managing a production deployment of Zulip (many are also used in a Zulip development environment, though development-only scripts live in tools/).

For more details, see https://zulip.readthedocs.io/en/latest/overview/directory-structure.html.