• Jears@social.jears.at
    link
    fedilink
    arrow-up
    0
    ·
    5 months ago

    So I don’t even use systemd myself I run OpenRC. Yet honestly I find the idea quite intriguing, having the service manager (PID 1) invoke the command seems like a cool idea to me.

    It’s not really a sudo alternative as much as it is another way of doing something similar.

      • NekkoDroid@programming.dev
        link
        fedilink
        arrow-up
        0
        ·
        edit-2
        5 months ago

        homed isn’t exactly a home directory replacement, more of an extension. You can mix and match homed and normal home directories like you want (on a per-user basis at least, not within a single user). It does have some nice things, such as user-password based encryption of the home directory, so the password is required to unlock it (no admin access) or automatically using subvolumes on btrfs.

        • taladar@sh.itjust.works
          link
          fedilink
          arrow-up
          0
          ·
          5 months ago

          user-password based encryption of the home directory, so the password is required to unlock it (no admin access)

          That seems like a very niche feature given that it is only relevant if the admin isn’t the same person as the user but the admin would have to set it up and condemn themselves to hearing endless whining from users who lose their files when they forgot their password.

            • taladar@sh.itjust.works
              link
              fedilink
              arrow-up
              0
              ·
              5 months ago

              In what way does selinux allow your users to lock themselves out of their own home directories in a way that the admin can not fix?

              • atzanteol@sh.itjust.works
                link
                fedilink
                English
                arrow-up
                0
                ·
                5 months ago

                SElinux is a “global ACL.” You can stop root from doing anything you like with it. Usually by accident and without realizing it’s been done in my experience…

                • taladar@sh.itjust.works
                  link
                  fedilink
                  arrow-up
                  0
                  ·
                  5 months ago

                  No, that is just not true. You can stop root from doing things without a reboot with SELinux but encrypting something with a password root does not know actually does stop them from doing it at all short of a brute force attack on the encryption.

    • takeda@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      5 months ago

      In theory it isn’t mandatory, in practice you will see a lot of distros replacing it.

        • Pasta Dental@sh.itjust.works
          link
          fedilink
          arrow-up
          0
          ·
          5 months ago

          Idk for the network stack, but for homed, I think it’s because it is up to the DEs to support it. As part of the Sovereign tech fund, GNOME is implementing support for it! I think this will be a great step forward for Linux desktop security when it lands

  • Skull giver@popplesburger.hilciferous.nl
    link
    fedilink
    arrow-up
    0
    ·
    5 months ago

    Yeah, that makes a lot of sense. Not needing the SUID bit on a complex tool is just a good idea. The simpler use cases can switch to doas, the use cases that require complex configuration can switch to something like run0, and the world of Linux is just a little bit harder to hack.

    • million@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      edit-2
      5 months ago

      I read the original mastodon post by the developer of run0 and I am still don’t understand what the problem with SUID is.

      Whats an example of an attack that would work with sudo and doas (which also uses SUID) and not on run0?

      • Skull giver@popplesburger.hilciferous.nl
        link
        fedilink
        arrow-up
        0
        ·
        5 months ago

        Any code execution inside of a SUID binary basically becomes root access. That means that SUID binaries need a lot of security measures for everything they do. The more complex you make your SUID capable binary, the more work this adds, and the higher the probability that you’re introducing some kind of bypass vulnerability.

        With sudo and to some extent doas, the process that should be in charge of vetting whether or not a user can become root/another user (and probably should only be doing that) is also parsing files, interacting with the network, possibly doing I/O on the filesystem. The binary is started as a user with limited permissions, but that user has full control of the binary’s environment.

        With a root daemon (the one your system already needs if you’re running systemd in the first place), the binary that submits the elevation request can be as small as possible, and have no additional permissions. You can trick run0 into doing something, but that won’t give you root access, as polkit and other mechanisms actually decide if you’re root or not. If you’re not root, you’re not going to be able to seriously influence those daemons, even if you debug and monitor the memory of the application that’s communicating with them, or somehow manage to LD_PRELOAD some malware into it.

        Take, for instance, CVE-2023–22809. This vulnerability allowed some users to write files with root permissions (think /etc/sudoers) when the low privilege user was permitted to only edit files on a whitelist, because rather than taking the root user environment variables, various sudo tools accepted the user’s environment variables (the ones you provide on the command line) to decide what editor to launch. This editor could (basically) be ‘nano /etc/passwd’ and when you sudoedit /etc/user/tool/file/here.conf (as specified in sido’s config), sudoedit would spawn an editor opening /etc/passwd instead.

        In the daemon model of run0, the daemon would be the one evaluating its (root) environment variables and picking the editor. However, in sudo, the binary that allowed itself to become root, could also be directly influenced by the low privilege user, and its protections against tampering proved insufficient.

        This entire class of attacks just isn’t viable when the binary the end user runs doesn’t have the ability to exert any control. All the important bits are on the “other side”, running as a different user, isolated from the low privilege side.

        • ZeDoTelhado@lemmy.world
          link
          fedilink
          arrow-up
          0
          ·
          5 months ago

          Thanks for taking the time to explain. I was trying to get my head around on how this works but could not understand much of it. A lot of people here are very much against systemd in all senses, but this sounds like a better approach. Even if it not done as systemd, makes more sense than checking files and getting elevated privileges for a scope and use guardrails everywhere

    • d3Xt3r@lemmy.nzM
      link
      fedilink
      arrow-up
      0
      ·
      edit-2
      5 months ago

      Agreed, this is a nice inclusion. I also hate sudoers with a passion - I already use doas but it’s not standard (in the Linux world anyway), but with systemd providing an alternative means that it’ll become a standard which most distros would adopt, and I hope this means we can finally ditch the convoluted sudoers file once and for all.

      • Skull giver@popplesburger.hilciferous.nl
        link
        fedilink
        arrow-up
        0
        ·
        5 months ago

        I wouldn’t rely on distros adopting it as a default. systemd has a whole range of features, like network management, that many distros still use other tools for, like NetworkManager and netplan.

        • NekkoDroid@programming.dev
          link
          fedilink
          arrow-up
          0
          ·
          5 months ago

          The thing with this is: its just a symlink to the systemd-run binary, which talks to PID1 to spawn new processes (in separate cgroups IIRC). Its one of the most fundamental parts of systemd. Even the debian systemd package includes systemd-run.

          • Skull giver@popplesburger.hilciferous.nl
            link
            fedilink
            arrow-up
            0
            ·
            5 months ago

            I haven’t checked the details yet, but surely this will need configuration to decide what users are allowed to use run0. The binary might exist, ready to be configured (the same is true for many systemd deployments that use alternative network managers!) but without configuration to match, I don’t think run0 will be usable for users that don’t already have root access.

            • NekkoDroid@programming.dev
              link
              fedilink
              arrow-up
              0
              ·
              5 months ago

              it does its authorization with polkit (which IIRC defaults to allow all wheel group members) and giving users that shouldn’t be allowed root access, root access, is not something you ever want. This is usually referred to as unauthorized privilege escalation. Also, it isn’t like sudo doesn’t need configuration.

          • UID_Zero@infosec.pub
            link
            fedilink
            English
            arrow-up
            0
            ·
            5 months ago

            I admit, I’m not a big fan of putting more functionality into systemd (or just of systemd in general), but that is a well-reasoned argument for having sudo live in the init system.

          • Technus@lemmy.zip
            link
            fedilink
            arrow-up
            0
            ·
            5 months ago

            Nice to see that Mastodon has the same problem as Twitter with people trying to use it for long-form blog posts for some godforsaken reason.

            • taladar@sh.itjust.works
              link
              fedilink
              arrow-up
              0
              ·
              5 months ago

              Makes sense considering people who moved from one micro-blogging service to another instead of giving up on the idea completely are probably the ones deeply committed to that flawed idea.

            • Regalia@lemmy.blahaj.zone
              link
              fedilink
              arrow-up
              0
              ·
              5 months ago

              Blame the Mastodon team, if you’re not running a fork, you have to go into the source and adjust the character limit manually.

              Nobody has to do it like this, Mastodon supports longer posts since other servers and clients support more, it’s seemingly just a choice from upstream.

        • d3Xt3r@lemmy.nzM
          link
          fedilink
          arrow-up
          0
          ·
          edit-2
          5 months ago

          doas is quite popular in the BSD world, and was ported to Linux a few years ago (via the OpenDoas project).

          For starters, it’s is a lot smaller than sudo - under 2k lines of code vs sudo’s 132k - this makes it lot more easier to audit and maintain, and technically less likely to have vulnerabilities.

          Another security advantage is that doas doesn’t pass on the environment variables by default (you’d have to explicitly declare the ones you want to pass, which you can do so in the config).

          The config is also a lot simpler, and doesn’t force you to use visudo - which never made sense to me, visudo should’ve just generated the actual config, instead of checking it after the fact. Kinda like how grubby or grub2-mkconfig works. But no need for that complexity with doas.

          Eg, the most basic doas config could just have one line in the file: permit: wheel. Maybe have another line for programs you want to run without a password, like permit nopass dexter cmd pacman.

  • sabreW4K3@lazysoci.al
    link
    fedilink
    arrow-up
    0
    ·
    5 months ago

    Surprised people aren’t moaning about systemd being too big already and still wanting to do more.

  • Olap@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    5 months ago

    When does systemd stop? Linux without it is increasingly looking unlikely in the future. Are we not worried about it being a single point of failure and attack vector?

    This isn’t a moan about the unix philosophy btw, but a genuine curiosity about how we split responsibilities in todays linux environment.

    • drwankingstein@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      0
      ·
      5 months ago

      Systemd is a bit of a hassle to be rid off, but thankfully it’s not actually that hard, the hardest part I found was converting systemd services to whatever init system I use.

        • notabot@lemm.ee
          link
          fedilink
          arrow-up
          0
          ·
          5 months ago

          Probably not much time, a lot of packages come with init scripts anyway, and they’re pretty trivial to write if not.

          You can certainly argue it’s a philosophical choice, I’d say it’s more down to recognising the many poor architectural choices in systemd, rubbing agaist its many pain points and misfeatures and being alarmed at the size of the attack surface it exposes. I understand there is an effort underway to reduce the size and complexity of the main shared library to help address the last point, but just the fact that is necessary shows the scope of the problem.

            • notabot@lemm.ee
              link
              fedilink
              arrow-up
              0
              ·
              5 months ago

              Let’s agree to disagree on that point. Redhat switched because they invented it, and so took all the RHEL derivative distros with them. Debian switched to prefer it after a rather contentious vote and so took all the Debian derivative distros, including Ubuntu, with them. That just leaves a lot of the smaller distros, most of which seem to have stuck with sysvinit or similar as far as I can see.

              • TrickDacy@lemmy.world
                link
                fedilink
                arrow-up
                0
                ·
                edit-2
                5 months ago

                The arguments against systemd are very unconvincing but more importantly, there is zero evidence that they actually matter.

                And it works.

                Further, in order to represent this as a nearly unilateral decision you failed to mention that arch, centos, and opensuse all opted in independently.

                And no offense but angry Internet randos arguing software philosophy will never convince me to disagree with the creator of the Linux kernel.

                Linus Torvalds said:

                “I don’t actually have any particularly strong opinions on systemd itself. I’ve had issues with some of the core developers that I think are much too cavalier about bugs and compatibility, and I think some of the design details are insane (I dislike the binary logs, for example), but those are details, not big issues.”

                • notabot@lemm.ee
                  link
                  fedilink
                  arrow-up
                  0
                  ·
                  5 months ago

                  I obviously find the arguments against systemd more persuasive than you do, and that’s fine, it’s all open source and we can all make our own choices about it. My experience with it over the years has been, and still is that it vastly over complicates things that used to be simple, often the less commonly used parts just don’t work right (the automounter is a particular bugbear of mine, and few distros seem to use the network management component). The arguments do matter in practical terms as they directly impact how it works.

                  Of the distros you mentioned, centos is a RHEL derivative and so wasn’t independent, arch packages multiple init systems, but yes, I’d forgotten opensuse, and they seem to be firmly in the systemd camp.

                  I may be an internet rando, but I’m not actually angry, more just disappointed. I’d agree with Mr Torvald’s opinion that some of the design details are insane, but I think they are more fundamental than just ‘details’ as many are to do with the fundamental concepts around what systemd is and how it works. Linus can be a real dragon around changes to the kernel, but he’s always tended to be more relaxed about the layers above it.

                  That the developers of systemd are ‘much too cavalier about bugs and compatibility’ is surely clear to anyone who follows the relevant mailing lists and bug trackers, and should alarm everyone.

    • 0x0@programming.dev
      link
      fedilink
      arrow-up
      0
      ·
      5 months ago

      Gentoo, Slackware and Devuan can be used without svchost for linux.

      They’ll only stop when they rebrand it to systemd OS.

    • mogoh@lemmy.ml
      link
      fedilink
      arrow-up
      0
      ·
      5 months ago

      By this logic the Linux kernel is also a single point of failure and attack vector.

      sudo isn’t going away, so does doas. run0 is just another alternative to use or not.

      There are still distribution out there without systemd and if there ever won’t be any systemd-free distributions left and systemd would become a critical part of the Linux ecosystem, then it would get the same treatment as the Linux kernel with many professional maintainers.

    • Cooleech@mstdn.plus
      link
      fedilink
      arrow-up
      0
      ·
      5 months ago

      @Olap
      I agree. As someone who uses systemd on daily basis (I use Arch, BTW 😄) I really like it, but I am a bit worried about it being a single point of attack. Maybe just push doas as default instead? I never used doas but I watched few videos about it, so I guess it’s fine and probably better than sudo (less bloated).
      Just my few cents.

      • taladar@sh.itjust.works
        link
        fedilink
        arrow-up
        0
        ·
        5 months ago

        I don’t see how something would be inherently easier to attack if it is called systemd-foo instead of just foo. Attack surface and vectors do not depend on which project develops a particular tool.

    • NateNate60@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      edit-2
      5 months ago

      SystemD will consume the entirety of Linux, bit by bit.

      • In 2032, SystemD announces they’re going to be introducing a new way to manage software on Linux
      • In 2035, SystemD will announce they’re making a display system to replace the ageing Wayland
      • In 2038, the SystemD team announces they’re making their own desktop environment
      • In 2039 SystemD’s codebase has grown to sixteen times its size in the 2020s. SystemD’s announces they’re going to release replacements for most other packages and ship their own vanilla distro.
      • In 2045 SystemD’s distro has become the standard Linux distribution. Most other distros have quietly faded away.
      • In 2047, SystemD announces they’re going to incorporate most of GNU into SystemD. Outrage ensues from the Free Software Foundation, which vehemently opposes this move.
      • In 2048, Richard Stallman dies of a heart attack after attempting to clone SystemD’s git repo. SystemD engages in a hostile takeover and all resistance within the FSF crumbles
      • In 2050, SystemD buys the struggling RedHat from IBM for $61 million.
      • In 2053, most world governments have been pressured into using SystemD.
      • In 2054, Linus Torvalds, fearing for his life, begins negotiations to merge kernel development into SystemD
      • In 2056, the final message on the Linux kernel development mailing list is sent.
      • In 2060, SystemD agents assassinate the CEO of Microsoft.
      • In 2063, after immense pressure from SystemD-controlled human rights organisations, Arch developers discontinue development.
      • In 2064, the remaining living Debian developers release the next stable version of their clandestine and highly illegal distro.
        • TheGrandNagus@lemmy.world
          link
          fedilink
          English
          arrow-up
          0
          ·
          5 months ago

          Debian in many ways isn’t as slow-moving as people think.

          For example, they moved to Wayland by default (for Gnome anyway) in 2019. A number of well-known distros likely won’t have that until 2025/2026 or beyond.

          • 0x0@programming.dev
            link
            fedilink
            arrow-up
            0
            ·
            5 months ago

            Sadly they’ve been dropping archs throughout the years, meaning they’re no longer the distro you can use to run on “anything” from a pi to a mainframe…

            • yoevli@lemmy.world
              link
              fedilink
              English
              arrow-up
              0
              ·
              5 months ago

              Doesn’t trixie still support like a dozen arches? I think one of the more recent deprecations was MIPS BE which is functionally obsolete in 2024, at least insofar as practically no one is using it to run a modern distribution.

              • CrazyLikeGollum@lemmy.world
                link
                fedilink
                English
                arrow-up
                0
                ·
                5 months ago

                Bookworm, Trixie, and Sid all currently support a total of 10 different architectures.

                And looking through the Wikipedia article for Debian’s version history, most of the dropped architectures were functionally obsolete when they were dropped, or like the Motorola 68000, when support was added. (notable exceptions being IA-64 which was dropped 4 years before intel discontinued it, SPARC which is still supported by Oracle, and PowerPC.)

              • 0x0@programming.dev
                link
                fedilink
                arrow-up
                0
                ·
                5 months ago

                If your bar is “modern distribution” stick to Ubuntu.

                If you want to maintain older hardware Debian used to be a go-to solution.

      • NekkoDroid@programming.dev
        link
        fedilink
        arrow-up
        0
        ·
        5 months ago

        One way to notice a person has “systemd derangement syndrome” is by looking at how they write systemd: if they write it SystemD they are already in late stages of SDS and it isn’t curable anymore.

      • taladar@sh.itjust.works
        link
        fedilink
        arrow-up
        0
        ·
        5 months ago

        I think you might want to recheck the ages of some of the people in your timeline, most of them aren’t that young anymore.

        • NateNate60@lemmy.world
          link
          fedilink
          arrow-up
          0
          ·
          5 months ago

          Yes, because it’s easier to take care of octogenarians than people who might actually put up a fight to having their laptop batteries replaced with a pipe bomb.

    • TheGrandNagus@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      5 months ago

      I mean it should kind of already be something like GNU/SystemD/X11/PipeWire/Linux, I guess.

      It’s not like the GNU utils are the only massive integral part of the OS.

    • Lexi Sneptaur@pawb.social
      link
      fedilink
      English
      arrow-up
      0
      ·
      5 months ago

      Systemd makes life easy. It also makes Linux more teachable. I like accessibility and don’t even mind this

      • lengau@midwest.social
        link
        fedilink
        arrow-up
        0
        ·
        5 months ago

        I’m not on the systemd hate train by any means, but I don’t understand how this is any improvement over pkexec

        • NekkoDroid@programming.dev
          link
          fedilink
          arrow-up
          0
          ·
          5 months ago

          I don’t understand how this is any improvement over pkexec

          That has the same problem as sudo: the SUID bit is set for it.

          The fact that run0 uses polkit is more of a byproduct that this kinda authentication is already done with polkit all over the place in systemd. You can have individual subcommand accessible to different users (for example everyone can systemctl status, but systemctl reboot needs to be in the wheel group) which is why its generally used within systemd already. And it wouldn’t surprise me if again you can do it with this as well, limiting what commands can unconditionally run, need prompt or are completely blocked.

        • pingveno@lemmy.ml
          link
          fedilink
          English
          arrow-up
          0
          ·
          5 months ago

          I’m unclear from the documentation, does pkexec work under non-GUI contexts?

          • lengau@midwest.social
            link
            fedilink
            arrow-up
            0
            ·
            5 months ago

            As long as you have polkit setup to work in terminal sessions, yes. This is pretty standard these days, though not particularly widely used.

      • topperharlie@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        5 months ago

        hard disagree. life with plain text logs and daemon init scripts was so easy and nice. But we can’t have nice things…

        • atzanteol@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          0
          ·
          5 months ago

          Those hacked together system-specific bash scripts were shit. Having a standard way of creating, starting, ensuring restarts,and logging services is so much better.

          You can still get all the plain text logs you like.

            • atzanteol@sh.itjust.works
              link
              fedilink
              English
              arrow-up
              0
              ·
              edit-2
              5 months ago

              By configuring journald to forward messages to syslog as is the default.

              “forces on you” 🙄

              Edit: Systemd has been around for 14 years. Did you never think to google this?

            • 2xsaiko@discuss.tchncs.de
              link
              fedilink
              arrow-up
              0
              ·
              5 months ago

              Set ForwardToSyslog=yes in journald.conf and install a syslog daemon. Also optionally Storage=volatile (I wouldn’t set Storage=none unless you want systemd to no longer show you any logs anywhere including in systemctl status because I assume it will do that)

          • baru@lemmy.world
            link
            fedilink
            arrow-up
            0
            ·
            5 months ago

            Those hacked together system-specific bash scripts were shit.

            With a different feature set per script as well. The systemd service files have often been pushed upstream.

            Pretty sure people liking those scripts never really tried dealing with them across distributions. Though this just rehashes things that were said when distributions decided if to switch to systemd. Still the same strange claim that those scripts are somehow easier. It wasn’t, it is also way easier to package a systemd file from upstream than to maintain that stuff within a distribution.

        • TimeSquirrel@kbin.social
          link
          fedilink
          arrow-up
          0
          ·
          5 months ago

          You know what’s nice? Being able to sit down at any Linux distro and being able to set up and configure services without Googling how to use that particular distro’s init system.

      • herrvogel@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        edit-2
        5 months ago

        But it’s so unbearably slow.

        Me when my computer that has a typical uptime of 37 days boots up in 7 seconds with systemd instead of 5.5 seconds with runit: 😡😡😡😡

    • Shareni@programming.dev
      link
      fedilink
      arrow-up
      0
      ·
      5 months ago

      That was so bad that vim users needed to make nvim to handle Emacs envy, and every modern ide tries to do the same in worse ways.

      (Not trying to start a holy war, I use both)

  • nifoc@lemm.ee
    link
    fedilink
    English
    arrow-up
    0
    ·
    5 months ago

    This is great. Not having the attack surface of sudo (and not even being a SUID binary) certainly are great additions.

    And I hope people realize that systemd is not one large thing, but a (large) collection of tools.

    • lemmyreader@lemmy.ml
      link
      fedilink
      English
      arrow-up
      0
      ·
      edit-2
      5 months ago

      This is great. Not having the attack surface of sudo (and not even being a SUID binary) certainly are great additions.

      And I hope people realize that systemd is not one large thing, but a (large) collection of tools.

      XZ-utils rings a bell ? It was among others Debian wanting to pull in part of a systemd tool into openssh and that almost turned into a world wide disaster :(

      • boredsquirrel@slrpnk.net
        link
        fedilink
        arrow-up
        0
        ·
        5 months ago

        I didnt understand that sentence. Is that what you meant?

        Among other things, Debian wanted to integrate a part of the systemd tools into openssh, which almost led to a worldwide catastrophe

        xz is not part of systemd or openssh afaik.

        • lemmyreader@lemmy.ml
          link
          fedilink
          English
          arrow-up
          0
          ·
          5 months ago

          You didn’t follow the XZ-utils story ? The malicious actor worked for years on that XZ backdoor that targeted the fact that some Linux distributions were modifying their openssh package to enable systemd notifications.

          • boredsquirrel@slrpnk.net
            link
            fedilink
            arrow-up
            0
            ·
            5 months ago

            Ok true, it was a systemd dependent issue. But it only makes sense to have those notifications. The problem is dependency on small hardly maintained products, which systemd will improve by centralizing it.

            • Macros@feddit.de
              link
              fedilink
              arrow-up
              0
              ·
              5 months ago

              And where do maintainers for the new parts of systemd come from? The larger systemd grows the more parts of it will be neglected. Also in regard to people checking commits, opening up doors for exploits like the one in xz.

            • lemmyreader@lemmy.ml
              link
              fedilink
              English
              arrow-up
              0
              ·
              edit-2
              5 months ago

              But it only makes sense to have those notifications.

              Maybe in your mind it makes sense. Going for ease of use rather than security is not something that OpenBSD would quickly do. If you read some more about what “jwz” has to say about all the screensaver bugs in Linux, like here : https://www.jwz.org/blog/2021/01/i-told-you-so-2021-edition and realize what a mess that Linux maintainers are making again and again, and then have a look at Debian and their packaging of xscreensaver. Guess what ? Debian added some systemd thingie to xscreensaver. 🤯

              I like Debian since a long time and I use it. But the tinkering of Debian package maintainers and always wanting to do things the Debian way is not something I am always very pleased with. Remember the OpenSSL Debian fiasco ? That shows a problem with Debian which may still exist. Too many packages, not enough maintainers with enough spare time, and no coherent team work of a security team.

    • lengau@midwest.social
      link
      fedilink
      arrow-up
      0
      ·
      5 months ago

      Kinda feels like writing a script that implements the sudo CLI but calls pkexec would be an easier way to do it. Given that so many systems already come with both sudo and pkexec, do we really need yet another option?

      • chameleon@kbin.social
        link
        fedilink
        arrow-up
        0
        ·
        5 months ago

        The point of this is to implement some form of privilege escalation without the SUID mechanism. sudo, pkexec and doas are all SUID.

    • digdilem@lemmy.ml
      link
      fedilink
      arrow-up
      0
      ·
      5 months ago

      I’ve had to scroll down eight pages to find a post that seems to actually address the good points raised in the article.

    • DefederateLemmyMl@feddit.nl
      link
      fedilink
      English
      arrow-up
      0
      ·
      5 months ago

      The attack surface will be a systemd daemon running with UID=0 instead, because how else are you going to hand out root privileges?

      So it doesn’t really change anything to the attack surface, it just moves it to a different location.

        • DefederateLemmyMl@feddit.nl
          link
          fedilink
          English
          arrow-up
          0
          ·
          5 months ago

          Not really, because you’re now going to make it do more, i.e. incorporate the functionality of sudo and expose it to user input. So unless you can prove that the newly written code is somehow inherently more secure than sudo’s existing code, the attack surface is exactly the same.

    • MonkderDritte@feddit.de
      link
      fedilink
      arrow-up
      0
      ·
      edit-2
      5 months ago

      that systemd is not one large thing, but a (large) collection of tools.

      Who don’t work without Systemd. And Systemd can’t coexist with tools in the same repo doing the same job in a portable way.

      • lemmyreader@lemmy.ml
        link
        fedilink
        English
        arrow-up
        0
        ·
        5 months ago

        Right. That reminds of the time I was visiting a friend who had broken his Linux computer (No, not “apt-get remove --purge systemd” but they did something slightly similar). When I booted from a live Linux, used chroot and wanted to use configure networking : FAIL because systemd was … not running. As he had no Internet because of his broken machine this caused some delays in fixing this but we got the job done eventually.

    • Shareni@programming.dev
      link
      fedilink
      arrow-up
      0
      ·
      5 months ago

      Systemd monolith - worst thing to have ever happened to Linux

      Wayland monolith - best thing to have ever happened to Linux

      • drwankingstein@lemmy.dbzer0.com
        link
        fedilink
        English
        arrow-up
        0
        ·
        5 months ago

        I think wayland has potential but in it’s current state it’s just half baked. Once more protocols get merged, maybe in a decades time Wayland should be quite flexible and robust.

          • drwankingstein@lemmy.dbzer0.com
            link
            fedilink
            English
            arrow-up
            0
            ·
            5 months ago

            It does have potential. I think anyone denying that is simply wrong. the issue with wayland is purely how slowly it moves and the fragmentation. Now the fragmentation is actually in large part due to how slowly it moves. There are numerous WIP protocols that will greatly decrease fragmentation when all are merged.

            I can’t wait because it seems like it will happen in the short future of one or two decades xD

        • Shareni@programming.dev
          link
          fedilink
          arrow-up
          0
          ·
          5 months ago

          That’s how I feel as well. IMO it’s ridiculous that Fedora wants to remove xorg completely from the repos in the next version.

          • PseudoSpock@lemmy.dbzer0.com
            link
            fedilink
            arrow-up
            0
            ·
            5 months ago

            It is ridiculous. Nothing like says f you to a large percentage of your user base like pushing out a solution that doesn’t work for them.

            • Shareni@programming.dev
              link
              fedilink
              arrow-up
              0
              ·
              edit-2
              5 months ago

              The wildest thing is that current xorg package is maintained by the community and they’re still removing it completely because “xorg is taking up too much dev time”.

      • d_k_bo@feddit.de
        link
        fedilink
        arrow-up
        0
        ·
        5 months ago

        Wayland monolith

        There seems to be misunderstanding about what Wayland is.

        Wayland is set of protocols. They are implemented by wayland servers (compositors) and wayland clients (applications) themselves. There is no single “wayland binary” like in the X11 days. Servers or clients may choose to implement or not implement a specific protocol.

        • NekkoDroid@programming.dev
          link
          fedilink
          arrow-up
          0
          ·
          5 months ago

          I think what they meant is that there are people that think: “Wayland is too fragmented, there should be 1 ‘Wayland Compositor’ and the rest should be window managers”

          • Shareni@programming.dev
            link
            fedilink
            arrow-up
            0
            ·
            edit-2
            5 months ago

            Nope, I meant that the wayland compositors are inflexible monoliths that are so tightly integrated into a DE that they can’t be replaced. Xorg might be bloated, but it follows the UNIX philosophy closely enough that each part of the stack above xorg can be trivially replaced.

            • NekkoDroid@programming.dev
              link
              fedilink
              arrow-up
              0
              ·
              5 months ago

              I guess my interpretation was too charitable.

              Nothing in the protocol prevents you from splitting the server from the window manager, just everyone implementing the wayland server protocol didn’t see any benefit in splitting it out.

        • Shareni@programming.dev
          link
          fedilink
          arrow-up
          0
          ·
          5 months ago

          Sure, but that doesn’t change the fact that Wayland compositors are forced to be inflexible monoliths that need to be so tightly integrated into a DE that they can’t be replaced.

          In xorg the server, wm, and compositor all do their own thing and can be replaced trivially. It took me like 5 minutes to replace xfwm4 with i3, and that included the research.

  • dotslashme@infosec.pub
    link
    fedilink
    English
    arrow-up
    0
    ·
    5 months ago

    Not that I’m opposed to a better sudo alternatives, but I find it rather ironic that one of the reason stated is the large attack surface, considering systemd is a massive attack surface already.

    • NekkoDroid@programming.dev
      link
      fedilink
      arrow-up
      0
      ·
      edit-2
      5 months ago

      This isn’t exactly a “new” attack surface, so removing the attack surface that sudo (and alternatives) is, is probably a net positive.

      • jkrtn@lemmy.ml
        link
        fedilink
        arrow-up
        0
        ·
        5 months ago

        That attack surface is not vanishing. It’s would be relocating the same attack surface to something that might have an xz library in memory.

        • NekkoDroid@programming.dev
          link
          fedilink
          arrow-up
          0
          ·
          5 months ago
          1. The attack surface is there either way, this is just functionality repackaged that existed already before (systemd-run, which is calling into PID1)
          2. all compression libraries (actually most libraries at this point) are dlopened on demand (which was planned even before the attack, which is speculated that the attack was accelerated in timeline because he was on a timer before the change was released)
  • foremanguy@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    5 months ago

    Maybe that could be a good thing, but only if the distros do not include sudo by default, the fact to have one thing to update to update more things is good in the security side! If it’s well implemented I’m okay with it

  • Baggins [he/him]@lemmy.ca
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    5 months ago

    new sudo vulnerabilities? how exciting!

    E: read the article, I guess that is part of the reason for the proposal. interesting