Lines Matching refs:mnt

563     nxt_fs_mount_t  *mnt, *lang_mnt;  in nxt_isolation_set_lang_mounts()  local
574 mnt = mounts->elts; in nxt_isolation_set_lang_mounts()
583 mnt[i].dst = nxt_mp_alloc(mp, rootfs_len + len + 1); in nxt_isolation_set_lang_mounts()
584 if (nxt_slow_path(mnt[i].dst == NULL)) { in nxt_isolation_set_lang_mounts()
588 p = nxt_cpymem(mnt[i].dst, rootfs, rootfs_len); in nxt_isolation_set_lang_mounts()
594 mnt = nxt_array_add(mounts); in nxt_isolation_set_lang_mounts()
595 if (nxt_slow_path(mnt == NULL)) { in nxt_isolation_set_lang_mounts()
599 mnt->src = (u_char *) "tmpfs"; in nxt_isolation_set_lang_mounts()
600 mnt->name = (u_char *) "tmpfs"; in nxt_isolation_set_lang_mounts()
601 mnt->type = NXT_FS_TMP; in nxt_isolation_set_lang_mounts()
602 mnt->flags = (NXT_FS_FLAGS_NOSUID in nxt_isolation_set_lang_mounts()
605 mnt->data = (u_char *) "size=1m,mode=777"; in nxt_isolation_set_lang_mounts()
606 mnt->builtin = 1; in nxt_isolation_set_lang_mounts()
607 mnt->deps = 0; in nxt_isolation_set_lang_mounts()
609 mnt->dst = nxt_mp_nget(mp, rootfs_len + nxt_length("/tmp") + 1); in nxt_isolation_set_lang_mounts()
610 if (nxt_slow_path(mnt->dst == NULL)) { in nxt_isolation_set_lang_mounts()
614 p = nxt_cpymem(mnt->dst, rootfs, rootfs_len); in nxt_isolation_set_lang_mounts()
620 mnt = nxt_array_add(mounts); in nxt_isolation_set_lang_mounts()
621 if (nxt_slow_path(mnt == NULL)) { in nxt_isolation_set_lang_mounts()
625 mnt->name = (u_char *) "proc"; in nxt_isolation_set_lang_mounts()
626 mnt->type = NXT_FS_PROC; in nxt_isolation_set_lang_mounts()
627 mnt->src = (u_char *) "none"; in nxt_isolation_set_lang_mounts()
628 mnt->dst = nxt_mp_nget(mp, rootfs_len + nxt_length("/proc") + 1); in nxt_isolation_set_lang_mounts()
629 if (nxt_slow_path(mnt->dst == NULL)) { in nxt_isolation_set_lang_mounts()
633 p = nxt_cpymem(mnt->dst, rootfs, rootfs_len); in nxt_isolation_set_lang_mounts()
637 mnt->data = (u_char *) ""; in nxt_isolation_set_lang_mounts()
638 mnt->flags = NXT_FS_FLAGS_NOEXEC | NXT_FS_FLAGS_NOSUID; in nxt_isolation_set_lang_mounts()
639 mnt->builtin = 1; in nxt_isolation_set_lang_mounts()
640 mnt->deps = 0; in nxt_isolation_set_lang_mounts()
670 nxt_fs_mount_t *mnt; in nxt_isolation_unmount_all() local
684 mnt = mounts->elts; in nxt_isolation_unmount_all()
689 if (mnt[n].deps && !automount->language_deps) { in nxt_isolation_unmount_all()
693 nxt_fs_unmount(mnt[n].dst); in nxt_isolation_unmount_all()
706 nxt_fs_mount_t *mnt; in nxt_isolation_prepare_rootfs() local
713 mnt = mounts->elts; in nxt_isolation_prepare_rootfs()
716 dst = mnt[i].dst; in nxt_isolation_prepare_rootfs()
718 if (mnt[i].deps && !automount->language_deps) { in nxt_isolation_prepare_rootfs()
722 if (nxt_slow_path(mnt[i].type == NXT_FS_BIND in nxt_isolation_prepare_rootfs()
723 && stat((const char *) mnt[i].src, &st) != 0)) in nxt_isolation_prepare_rootfs()
725 nxt_log(task, NXT_LOG_WARN, "host path not found: %s", mnt[i].src); in nxt_isolation_prepare_rootfs()
735 ret = nxt_fs_mount(task, &mnt[i]); in nxt_isolation_prepare_rootfs()
748 nxt_fs_unmount(mnt[i].dst); in nxt_isolation_prepare_rootfs()