HNHacker News
TopNewBestAskShowJobs

akdev1l

844 karma · joined October 27, 2023

submissionscomments
akdev1l··on Systemd has been a complete, utter, unmitigated success
use a shell function/alia?

    show-logs() { journalctl -u "$1" } 

    show-logs nginx 
(Not that I think journalctl -u even needs an alias tbh but if you want it you can have it)
akdev1l··on Systemd has been a complete, utter, unmitigated success
> when it breaks, path of least resistance is often to reinstall the OS

Can you elaborate how do you even break this?

Adding a systemd unit cannot really break much on systemd itself. Unless you’re messing with internal systemd stuff, I am not sure what is even there to break.

akdev1l··on Systemd has been a complete, utter, unmitigated success
afaik journald can just forward logs via rsyslog directly to a remote server

Why would it need to store plaintext locally?

akdev1l··on LLMs should not replace therapists
I disagree with your premise that 3 years ago “people” knew about hallucinations or that these models shouldn’t be trusted.

I would argue that today most people do not understand that and actually trust LLM output more on face value.

Unless maybe you mean people = software engineers who at least dabble in some AI research/learnings on the side

akdev1l··on Public Signal Backups Testing
That’s not a typo. They’re complaining about Discourse.

The signal forums that guy linked are from a Discourse instance/forum. Discourse is a platform to build forums.

https://www.discourse.org/

akdev1l··on New Linux udisks flaw lets attackers get root on major Linux distros
are you linking to the fact that “useradd” exists to prove your point…?

Lmfaoooo

I’m assuming you have actually never ran a linux on your desktop. Lmaooooo.

Yeah sure init runs as root, and maybe you have background services that run as some other user.

BUT YOUR ACTUAL DESKTOP SESSION RUNS AS ONE USER. THIS INCLUDES YOUR BROWSER, YOUR PASSWORD MANAGER AND ALL YOUR OTHER SHIT!

https://paste.centos.org/view/f8e5ec76

so multi-user much secure

You know being a know-it-all only really works if you know what you are talking about.

Feel free to dig into the code of gnome-session if you don’t believe me.

akdev1l··on New Linux udisks flaw lets attackers get root on major Linux distros
The context is that on a traditional Linux laptop/desktop you are in fact running everything as one user.

Firefox, the desktop environment, your password manager and even `sudo` are traditionally all running as your own user.

This is not true in Android whatsoever.

Being multi-seat or not has little security implications - most traditional Linux systems can handle multi-seat but they’re still limited in security by running everything as a single user

And no nearly all 100% of Linux systems do not run proper multi-user configurations because none of the most popular distributions ship like that. Not in the context of desktop usage anyway.

Servers do use multi-user configuration but that’s not what we’re talking about here

akdev1l··on New Linux udisks flaw lets attackers get root on major Linux distros
Android is not a single user system. Every app, every service basically everything gets its own user.

Applications have different user IDs and different SELinux contexts.

Android security is tight

akdev1l··on Resurrecting flip phone typing as a Linux driver
Why we don’t have t9 support on tv remotes???

I gotta aim and peck some bullshit or open up some app with a QR code instead. Give me T9

akdev1l··on U.S. bombs Iranian nuclear sites
> If they really wanted to, they would already have it. Enriched material was transported from these centers some time ago.

…

> 60% enrichment is not considered weapons-grade enrichment.

So which is it?

1. They already have enriched uranium and can just make a bomb now

2. They don’t have weapons-grade enriched uranium (and now probably cannot enrich it)

akdev1l··on Samsung embeds IronSource spyware app on phones across WANA
> Seriously, you never had to provide tech support to a parent, relative, or friend whose computer got totally fucked because they had root?

Literally 0 here, have you really?

Like I literally do not know anyone who is even using Linux to begin with but also people do have “root” in their Windows and MacOS systems. I do not see anyone destroying their computers at random.

Also to steal someone’s information you don’t need root access or any administrative access - if you already tricked the user into running your code then you can steal their passwords or whatever, all of that is user-level data.

akdev1l··on Harper – an open-source alternative to Grammarly
This is what peak innovation looks like
akdev1l··on Hurl: Run and test HTTP requests with plain text
Looks like you don’t have Fedora package either

If I find time I could throw a spec file + ci/cd workflow to get you going that way too

akdev1l··on Iran asks its people to delete WhatsApp from their devices
Also people found out and nothing happened?

So literally no downside to putting a backdoor and lying about it

akdev1l··on Simplest C++ Callback, from SumatraPDF
I don’t think it’s necessarily a C++ thing

If the post was about rust and it was using unsafe code and casting function pointers then everyone would quickly jump to try and correct it all the same

akdev1l··on Simplest C++ Callback, from SumatraPDF
I guess the point is that the articule does not prove what he did is better in any of the ways he claimed except for the “I understand it” part

Making changes like this claiming it will result in faster code or more smaller code without any test or comparison before vs after seems to be not the best way of engineering something

I think this is why the thread has seen a lot of push back overall

Maybe the claims are true or maybe they are not - we cannot really say based on the article (though I’m guessing not really)

akdev1l··on Simplest C++ Callback, from SumatraPDF
It’s not a warning, it’s a compile time error and I am not even using -Wall -Werror

I also believe there are platforms where a function pointer and a data pointer are not the same but idk about such esoteric platforms first hand (seems Itanium had that: https://stackoverflow.com/questions/36645660/why-cant-i-cast...)

Though my point was only that this code will not compile as is with whatever clang Apple ships*

I am not really sure how to get it to compile tbqh

Some further research ( https://www.kdab.com/how-to-cast-a-function-pointer-to-a-voi...) suggest it should be done like so:

> auto fptr = &f; void a = reinterpret_cast<void &>(fptr);

edit: I tried with GCC 15 and that compiled successfully

akdev1l··on Simplest C++ Callback, from SumatraPDF
I think none of these points are demonstrated in the post hence I fail to visualize it

Also I copy pasted the code from the post and I got this:

test.cpp:70:14: error: assigning to 'void ' from 'func0Ptr' (aka 'void ()(void *)') converts between void pointer and function pointer 70 | res.fn = (func0Ptr)fn;

akdev1l··on Simplest C++ Callback, from SumatraPDF
I don’t really understand what problem this is trying to solve and how the solution is better than std::function. (I understand the issue with the crash reports and lambdas being anonymous classes but not sure how the solution improved on this or how std::function has this problem?)

I haven’t used windows in a long time but back in the day I remember installing SumatraPDF to my Pentium 3 system running windows XP and that shit rocked

akdev1l··on Using `make` to compile C programs
I think technically those are targeted towards C++ but sure they probably work also

It will likely have less packages than the other established ones though

akdev1l··on Using `make` to compile C programs
C the language doesn’t but if you’re truly writing a C program you’ll just default to using the platform’s package manager unless you have specific requirements

So in that sense dnf/apt/zypper/pacman are all “C” package managers (not sure I agree with the OP but I think this is what they meant)

akdev1l··on Using `make` to compile C programs
> it’ll compile a binary for your system too (assuming static linking I guess).

I’ve tried as you said and I’ve found that this is not a good assumption to make

glibc doesn’t support static linking so this is not working in the general case

akdev1l··on Using `make` to compile C programs
> Make is a good replacement for shell script.

it’s not, you need to start thinking about .PHONY targets and other stuff quite quickly

akdev1l··on The curious case of shell commands, or how "this bug is required by POSIX" (2021)
Do you think using `psql -c "SELECT 1"` is actually doing sql injection?

Because yeah if your program provides “invoking the shell as a feature” then it sure as fuck needs to invoke the shell. I was just replying to this far-fetched example.

By the way, I think it is still better to do this than calling system because if I read “run([bash” I know the developer meant to do this explicitly. If I read “system()” then I’m probably gonna assume they were just lazy and probably didn’t even know about the extra shell being invoked. (I also said this in my previous comment, please read before replying)

akdev1l··on The curious case of shell commands, or how "this bug is required by POSIX" (2021)
Yes the user controls the path and in the example provided they could just call whatever command they want anyway

This doesn’t give the attacker any access that they wouldn’t have.

Also you can just clobber the “PATH” variable if it is so inclined.

> system() on the other hand is guaranteed to run the operating system’s command intepreter

Yeah that just it is means less predictable.

Please show me python programs which support the pattern shown by the parent post and which actually work when running under powershell. (Or Oil shell or any other non-POSIX shell)

Aside: `/bin/sh` is guaranteed to exist by POSIX

akdev1l··on Firefox OS's story from a Mozilla insider not working on the project (2024)
There is literally no way Firefox could have fixed the entire OEM landscape.

OEMs are not going to release the driver source code. They simply will not, at best they do random code dumps of whatever kernel version they were using at the time.

This is still true today and even Google tried to make it better with Project Treble. If Google cannot fix this even after all these years with total market dominance then literally Mozilla couldn’t do a single thing about it

akdev1l··on Firefox OS's story from a Mozilla insider not working on the project (2024)
Ironically, WhatsApp created their web client years later

If the web client would have existed back then it might have helped

akdev1l··on A year of funded FreeBSD development
Kind of the opposite, I think AWS was the first hyper scaler so tooling did not exist for many of these problems back then

Like they have their own custom clustering software where you would probably use k8s if you were to rebuild things today

Repeat this over a million different tools, etc

This article is interesting if you want to take a peek behind the curtain: https://www.allthingsdistributed.com/2014/11/apollo-amazon-d...

akdev1l··on The curious case of shell commands, or how "this bug is required by POSIX" (2021)
Yes, in this specific use case you need a shell.

But that’s the same as saying you technically need SQL injection so that `psql -c 'command'` can work

> you cannot simulate all of this with command vector

Uhh, yes we can just call a shell:

    subprocess.run(["bash", "-c", data_handler])
As a bonus this way we get control of which shell is being used and I find it is more explicit so I prefer it
akdev1l··on The curious case of shell commands, or how "this bug is required by POSIX" (2021)
> Note also that if you're using a deficient shell that supports neither `printf %q` nor `${var@Q}` it's still easy to do quoting in `sed`. GNU `./configure` scripts do this internally, including special-casing to only quote the right side of `--arg=value`.

With the assumption that:

1. The person knows to do this weird thing 2. They do it consistently every time 3. They never forget

Also not sure how to use those solutions for the popen() example you provided.

The correct way is:

    subprocess.run([
       "gzip",
       "-c",
       "—-to-stdout",
       user_input
    ], stdout=open("foo.gz"))

And now I don’t have to worry about any of these weird things
← PreviousPage 8 of 13Next →