2 * Copyright (c) 2021-2022 Sergey Sushilin <sergeysushilin@protonmail.com>
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
22 #include "attributes.h"
27 extern struct env
*createenv(void)
28 __returns_nonnull __warn_unused_result
;
30 extern void defaultenv(struct env
*const restrict env
,
31 struct passwd
const *const restrict original
,
32 struct passwd
const *const restrict target
)
34 extern void inheritenv(struct env
*env
)
36 extern int keepenv(struct env
*const restrict env
,
37 char const *const restrict
*const restrict envlist
)
39 extern int fillenv(struct env
*restrict env
,
40 char const *const restrict
*const restrict envlist
)
42 extern int unfillenv(struct env
*restrict env
,
43 char const *const restrict
*const restrict envlist
)
46 extern char **prepenv(struct env
*const restrict env
)
47 __malloc __returns_nonnull
__nonnull((1));