Merge pull request #7542 from yuwata/build-cleanup

several build cleanups
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2017-12-05 12:13:17 +01:00 committed by GitHub
commit 3aa6a55904
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 6 deletions

View File

@ -635,9 +635,9 @@ substs.set('TTY_GID', tty_gid)
# Ensure provided GID argument is numeric, otherwise fallback to default assignment
if get_option('users-gid') != ''
users_gid = get_option('users-gid').to_int()
users_gid = get_option('users-gid').to_int()
else
users_gid = '-'
users_gid = '-'
endif
substs.set('USERS_GID', users_gid)

View File

@ -2146,6 +2146,7 @@ fail:
return r;
}
#if ENABLE_SMACK
static int setup_smack(
const ExecContext *context,
const ExecCommand *command) {
@ -2176,6 +2177,7 @@ static int setup_smack(
return 0;
}
#endif
static int compile_bind_mounts(
const ExecContext *context,
@ -2733,7 +2735,7 @@ static int exec_child(
int *exit_status) {
_cleanup_strv_free_ char **our_env = NULL, **pass_env = NULL, **accum_env = NULL, **final_argv = NULL;
_cleanup_free_ char *mac_selinux_context_net = NULL, *home_buffer = NULL;
_cleanup_free_ char *home_buffer = NULL;
_cleanup_free_ gid_t *supplementary_gids = NULL;
const char *username = NULL, *groupname = NULL;
const char *home = NULL, *shell = NULL;
@ -2744,6 +2746,7 @@ static int exec_child(
needs_mount_namespace, /* Do we need to set up a mount namespace for this kernel? */
needs_ambient_hack; /* Do we need to apply the ambient capabilities hack? */
#if HAVE_SELINUX
_cleanup_free_ char *mac_selinux_context_net = NULL;
bool use_selinux = false;
#endif
#if ENABLE_SMACK

View File

@ -419,12 +419,14 @@ static int verify_esp(
uint64_t *ret_pstart,
uint64_t *ret_psize,
sd_id128_t *ret_uuid) {
#if HAVE_BLKID
_cleanup_blkid_free_probe_ blkid_probe b = NULL;
char t[DEV_NUM_PATH_MAX];
const char *v;
#endif
uint64_t pstart = 0, psize = 0;
struct stat st, st2;
const char *v, *t2;
const char *t2;
struct statfs sfs;
sd_id128_t uuid = SD_ID128_NULL;
uint32_t part = 0;
@ -479,6 +481,7 @@ static int verify_esp(
if (detect_container() > 0 || geteuid() != 0)
goto finish;
#if HAVE_BLKID
xsprintf_dev_num_path(t, "block", st.st_dev);
errno = 0;
b = blkid_new_probe_from_filename(t);
@ -561,6 +564,7 @@ static int verify_esp(
r = safe_atou64(v, &psize);
if (r < 0)
return log_error_errno(r, "Failed to parse PART_ENTRY_SIZE field.");
#endif
finish:
if (ret_part)

View File

@ -155,7 +155,8 @@ tests += [
[['src/test/test-async.c'],
[],
[]],
[],
'', 'timeout=120'],
[['src/test/test-locale-util.c'],
[],