1,389 karma · joined September 25, 2014
podman run -ti --rm --security-opt seccomp=unconfined --security-opt label=disable --cap-add SYS_ADMIN --env STORAGE_DRIVER=vfs quay.io/podman/stable sh -c 'podman run -ti --rm --security-opt seccomp=unconfined --security-opt label=disable --cap-add SYS_ADMIN --env STORAGE_DRIVER=vfs quay.io/podman/stable sh -c "podman run --rm hello-world"' sudo apt install miniupnpc
upnpc -r 22 57922 TCP # forward 57922 on public address to this client's port 22
Together with something like https://dynv6.com/ you even get a subdomain that you can point to the public address: curl "https://ipv4.dynv6.com/api/update?ipv4=auto&token=$TOKEN&zone=$ZONE.dynv6.net"
curl "https://ipv6.dynv6.com/api/update?ipv6=auto&token=$TOKEN&zone=$ZONE.dynv6.net"wasm3, WebAssembly interpreter: https://github.com/wasm3/wasm3
… and many more
You can even have a whole systemd setup in a container using this VNC backend, here in this Dockerfile with CPU rendering (LIBGL_ALWAYS_SOFTWARE=1) to avoid requring a GPU:
FROM docker.io/fedora
RUN dnf -y update && dnf install -y phosh phoc wayvnc sudo socat iproute mutter xorg-x11-server-Xwayland dbus-x11 mesa-libgbm mesa-libOpenCL mesa-libGL mesa-libGLU mesa-libEGL mesa-vulkan-drivers mesa-libOSMesa mesa-dri-drivers mesa-filesystem gnome-shell gnome-terminal
RUN mkdir -p /etc/systemd/system/phosh.service.d && echo -e '\
[Unit]\n\
ConditionPathExists=\n\
[Service]\n\
Environment=WLR_BACKENDS=headless\n\
Environment=WLR_LIBINPUT_NO_DEVICES=1\n\
StandardInput=null\n\
TTYPath=/dev/console\n\
TTYReset=no\n\
TTYVHangup=no\n\
TTYVTDisallocate=no\n\
ExecStart=\n\
ExecStart=/usr/bin/phoc --exec "bash -lc \"/usr/libexec/phosh --unlocked & wayvnc 0.0.0.0 7050\""\n\
' > /etc/systemd/system/phosh.service.d/10-headless.conf
RUN systemctl enable phosh.service
# Work around a problem with a missing dbus.service unit file
RUN mkdir -p /etc/systemd/system && ln -fs /usr/lib/systemd/system/dbus-broker.service /etc/systemd/system/dbus.service
# Mask udev instead of making /sys/ read-only as suggested in https://systemd.io/CONTAINER_INTERFACE/
RUN systemctl mask systemd-udevd.service systemd-modules-load.service systemd-udevd-control.socket systemd-udevd-kernel.socket
ENV container=docker
RUN groupadd --system sudo
RUN useradd --create-home --shell /bin/bash -G sudo user
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
ENV LIBGL_ALWAYS_SOFTWARE=1
RUN sudo -u user gsettings set sm.puri.phoc auto-maximize false
EXPOSE 7050
# Set up a /dev/console link to have the same behavior with or without "-it", needs podman run --systemd=always
CMD [ "/bin/sh", "-c", "if ! [ -e /dev/console ] ; then socat -u pty,link=/dev/console stdout & fi ; exec /sbin/init" ]
Use as: podman run --systemd=always --rm -p 7050:7050 imagenameThe model checking approach seems to be a bit limited regarding loops. There are also abstract interpreters, such as https://github.com/facebookexperimental/MIRAI, and symbolic executers, such as https://github.com/dwrensha/seer or https://github.com/GaloisInc/crucible.
Overall I believe this space would benefit from more coordination and focus on developing something that has the theoretical foundations to cover as many needs as possible and then make a user-friendly tool out of it that is endorsed by the Rust project similar to how Rust analyzer is the one language server to come.
I definded this wrapper script ~/bin/git-ydiff-s:
#!/bin/sh
git diff "$@" | ydiff -s --wrap --width=0
with which you can do `git ydiff-s` in your repos easily.Not sure how they exactly compare - seems QuickJS supports a newer JS standard?
https://gist.github.com/pothos/73dd4f7694acc3b6bbed614438f6e...
Since polkit is used (but not the setuid pkexec, this was the point of this exercise) there is still one setuid binary invoked for the PAM check, though.
https://gist.github.com/pothos/73dd4f7694acc3b6bbed614438f6e...
Right, process group and being child process gets lost when following this route. I think it's a compromise that is acceptable in many cases.
> [polkit-agent-helper-1] will fail to check your password because most mechanisms for doing so, like the usual pam_unix, are only accessible to root.)
That's what I mean, the helper itself could be unprivileged and hand the password over to a privileged daemon that does the check.
Edit: Maybe to make it clear, yes, in theory the polkit project does follow the scheme of a privileged daemon process and unprivileged clients but in practice it doesn't because of the setuid polkit-agent-helper-1 and setuid pkexec programs.