]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/basic/tmpfile-util.h
tree-wide: make new/new0/malloc_multiply/reallocarray safe for size 0
[thirdparty/systemd.git] / src / basic / tmpfile-util.h
CommitLineData
e4de7287
LP
1/* SPDX-License-Identifier: LGPL-2.1+ */
2#pragma once
3
4#include <stdio.h>
5
6int fopen_temporary(const char *path, FILE **_f, char **_temp_path);
7int mkostemp_safe(char *pattern);
8int fmkostemp_safe(char *pattern, const char *mode, FILE**_f);
9
10int tempfn_xxxxxx(const char *p, const char *extra, char **ret);
11int tempfn_random(const char *p, const char *extra, char **ret);
12int tempfn_random_child(const char *p, const char *extra, char **ret);
13
14int open_tmpfile_unlinkable(const char *directory, int flags);
15int open_tmpfile_linkable(const char *target, int flags, char **ret_path);
16
17int link_tmpfile(int fd, const char *path, const char *target);
18
19int mkdtemp_malloc(const char *template, char **ret);