Giter Site home page Giter Site logo

subsystemctl's People

Contributors

absolucy avatar godeater avatar mame avatar qaston avatar sorah avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

subsystemctl's Issues

errors

Provided a working solution to this. Enjoy :)

A note on AppArmor and WSL

Just a quick note to let you know that I've had a patch accepted into AppArmor (and have a similar one awaiting review for snapd) to support running under WSL:

https://gitlab.com/apparmor/apparmor/-/merge_requests/812

As suggested in the comments there, there's a potential issue with AppArmor profiles leaking from distro to distro and/or from container to container because of WSL's architecture, so to avoid this problem in genie, I've arranged for it to create an AppArmor namespace before starting systemd (if AppArmor support is detected in the kernel) to prevent potential leakage.

Thought I'd let the other authors of WSL systemd hacks know in case you wish to take similar measures. In case it might be useful, my implementation of this can be found here, called from here.

Regards,

Alistair
genie developer

is this available for CentOS/RHEL?

Complete!
[root@NOKIE-x270 home]# neofetch
.. root@NOKIE-x270
.PLTJ. ---------------
<><><><> OS: CentOS Linux 7 (Core) on Windows 10 x86_64
KKSSV' 4KKK LJ KKKL.'VSSKK Kernel: 5.4.91-microsoft-standard-WSL2
KKV' 4KKKKK LJ KKKKAL 'VKK Uptime: 19 mins
V' ' 'VKKKK LJ KKKKV' ' 'V Packages: 1119 (rpm)
.4MA.' 'VKK LJ KKV' '.4Mb. Shell: bash 4.2.46
. KKKKKA.' 'V LJ V' '.4KKKKK . CPU: Intel i7-6600U (4) @ 2.807GHz
.4D KKKKKKKA.'' LJ ''.4KKKKKKK FA. Memory: 168MiB / 12687MiB
<QDD ++++++++++++ ++++++++++++ GFD>
'VD KKKKKKKK'.. LJ ..'KKKKKKKK FV
' VKKKKK'. .4 LJ K. .'KKKKKV '
'VK'. .4KK LJ KKA. .'KV'
A. . .4KKKK LJ KKKKA. . .4
KKA. 'KKKKK LJ KKKKK' .4KK
KKSSA. VKKK LJ KKKV .4SSKK
<><><><>
'MKKM'
''

[root@NOKIE-x270 home]#

error in command using subsystemctl exec bash

โ—‹ โ†’ /root/.cargo/bin/subsystemctl exec bash
error: Found argument 'bash' which wasn't expected, or isn't valid in this context

USAGE:
subsystemctl exec [FLAGS] [OPTIONS] [-- ...]

For more information try --help

i am using Windows 11, the latest WSL2. the bash does not exist or invalid.

but all commands are working good in Windows 10 WSL2.

please check, thank you!

by the way, you did a great job for this code, thank you very much!

WORKING GOOD in CENTOS7/RHEL7 / Oracle Linux 7

Good news! everything working smoothly in both CENTOS7 and RHEL7. Just make sure that if you want to port those Linux Distro, make sure to pull the official images in their respective repos

I am having problem using genie as I am using incorrect LINUX DISTRO as i created it by myself. It is much easier to pull official LINUX Distro in their respective official images repositories.

THANK YOU TO THE AUTHOR! SUCH A GREAT WORK!

I am arranging my github profile, and will push/upload all the LINUX DISTRO images I am using!

Not working in ssh

Running subsystemctl exec -- echo 1 will normally prints 1, but if you run it in a ssh session, it will show this:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Sys(ENOENT)', src/bottle.rs:385:18
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Some thoughts about setuid

So subsystemctl is designed to work with root privilege, which I fully acknowledge, but recently I've been experimenting with chmod +s on the executable.

What I noticed is that, after setting the setuid on subsystemctl executable, start and stop subcommands still require you invoke sudo, but the behavior of shell and exec subcommands is more interesting - you can run them without your current user as root, you can even issue the flag to, by the way, start the systemd container without problem, and you won't be automatically escalated to root if you run setuid-ed subsustemctl as a normal user - you run a new process as exactly who you are.

Just wondering if that was the expected behavior, or whether subsystemctl is supposed to work with setuid at all.

Thank you ๐Ÿ™‚

Cockpit + KVM

the subsystemctl cannot load KVM inside the cockpit.

probably, the author may include this in his next release?

thank you!

Cannot access DISPLAY :0

The glxlgears works just fine, but executing it inside the subsystemctl says that it couldn't open display :0
In this case i use WSL Graphic via /dev/dxg

[root@LAPTOP ~]# subsystemctl start
[root@LAPTOP ~]# DISPLAY=:0 glxgears
Error: couldn't open display :0

I was able to run the subsystemctl in Centos 8

I was able to run the subsystemctl in Centos 8, however, it is the same with genie, there are few application that are depreciated, like the firewalld.

All you need to do is to compile to the latest systemd 248.3 or later. and the subsystemctl is working in WSL2.

Missing Windows Path

When inside the systemd environment the windows paths are missing.
These paths are there when outside the system environment.
How do I automatically append windows paths when entering the system environment?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.