Lines Matching refs:mnt

617     nxt_fs_mount_t  *mnt, *lang_mnt;  in nxt_isolation_set_lang_mounts()  local
628 mnt = mounts->elts; in nxt_isolation_set_lang_mounts()
637 mnt[i].dst = nxt_mp_alloc(mp, rootfs_len + len + 1); in nxt_isolation_set_lang_mounts()
638 if (nxt_slow_path(mnt[i].dst == NULL)) { in nxt_isolation_set_lang_mounts()
642 p = nxt_cpymem(mnt[i].dst, rootfs, rootfs_len); in nxt_isolation_set_lang_mounts()
648 mnt = nxt_array_add(mounts); in nxt_isolation_set_lang_mounts()
649 if (nxt_slow_path(mnt == NULL)) { in nxt_isolation_set_lang_mounts()
653 mnt->src = (u_char *) "tmpfs"; in nxt_isolation_set_lang_mounts()
654 mnt->name = (u_char *) "tmpfs"; in nxt_isolation_set_lang_mounts()
655 mnt->type = NXT_FS_TMP; in nxt_isolation_set_lang_mounts()
656 mnt->flags = (NXT_FS_FLAGS_NOSUID in nxt_isolation_set_lang_mounts()
659 mnt->data = (u_char *) "size=1m,mode=1777"; in nxt_isolation_set_lang_mounts()
660 mnt->builtin = 1; in nxt_isolation_set_lang_mounts()
661 mnt->deps = 0; in nxt_isolation_set_lang_mounts()
663 mnt->dst = nxt_mp_nget(mp, rootfs_len + nxt_length("/tmp") + 1); in nxt_isolation_set_lang_mounts()
664 if (nxt_slow_path(mnt->dst == NULL)) { in nxt_isolation_set_lang_mounts()
668 p = nxt_cpymem(mnt->dst, rootfs, rootfs_len); in nxt_isolation_set_lang_mounts()
674 mnt = nxt_array_add(mounts); in nxt_isolation_set_lang_mounts()
675 if (nxt_slow_path(mnt == NULL)) { in nxt_isolation_set_lang_mounts()
679 mnt->name = (u_char *) "proc"; in nxt_isolation_set_lang_mounts()
680 mnt->type = NXT_FS_PROC; in nxt_isolation_set_lang_mounts()
681 mnt->src = (u_char *) "none"; in nxt_isolation_set_lang_mounts()
682 mnt->dst = nxt_mp_nget(mp, rootfs_len + nxt_length("/proc") + 1); in nxt_isolation_set_lang_mounts()
683 if (nxt_slow_path(mnt->dst == NULL)) { in nxt_isolation_set_lang_mounts()
687 p = nxt_cpymem(mnt->dst, rootfs, rootfs_len); in nxt_isolation_set_lang_mounts()
691 mnt->data = (u_char *) ""; in nxt_isolation_set_lang_mounts()
692 mnt->flags = NXT_FS_FLAGS_NOEXEC | NXT_FS_FLAGS_NOSUID; in nxt_isolation_set_lang_mounts()
693 mnt->builtin = 1; in nxt_isolation_set_lang_mounts()
694 mnt->deps = 0; in nxt_isolation_set_lang_mounts()
724 nxt_fs_mount_t *mnt; in nxt_isolation_unmount_all() local
738 mnt = mounts->elts; in nxt_isolation_unmount_all()
743 if (mnt[n].deps && !automount->language_deps) { in nxt_isolation_unmount_all()
747 nxt_fs_unmount(mnt[n].dst); in nxt_isolation_unmount_all()
760 nxt_fs_mount_t *mnt; in nxt_isolation_prepare_rootfs() local
767 mnt = mounts->elts; in nxt_isolation_prepare_rootfs()
770 dst = mnt[i].dst; in nxt_isolation_prepare_rootfs()
772 if (mnt[i].deps && !automount->language_deps) { in nxt_isolation_prepare_rootfs()
776 if (nxt_slow_path(mnt[i].type == NXT_FS_BIND in nxt_isolation_prepare_rootfs()
777 && stat((const char *) mnt[i].src, &st) != 0)) in nxt_isolation_prepare_rootfs()
779 nxt_log(task, NXT_LOG_WARN, "host path not found: %s", mnt[i].src); in nxt_isolation_prepare_rootfs()
789 ret = nxt_fs_mount(task, &mnt[i]); in nxt_isolation_prepare_rootfs()
802 nxt_fs_unmount(mnt[i].dst); in nxt_isolation_prepare_rootfs()