Elektrine lite

← Feed

VinDuv

VinDuv@m.vinduv.app

<p>FR/EN Systems programmer</p>

Posts

  • View post

    So recvmsg(2) says that if you receive a Unix socket message and its ancillary data does not fit in the buffer, it still returns success but sets MSG_CTRUNC in the output flags. A bit error-prone, but OK. What it doesn&#39;t tell you is that if you receive file descriptors in the ancillary data (SCM_RIGHTS) and the Linux security subsystem decides that you don&#39;t have access to those file descriptors, it just removes them from the list and sets MSG_CTRUNC. Took a long time to figure out...

  • View post

    Oh no he did it again https://tom7.org/httpv/httpv.pdf (I checked with Wireshark and it works as advertised, when you load the site every byte sent by the server is visible in cleartext in the TLS stream)

  • View post

    Encountered an interesting way to generate a temporary file name today: take the original file name, and increment the last character&#39;s byte https://github.com/servo/nss/blob/3d07e85/lib/util/utilmod.c#L467

  • View post

    Just a random thought for no particular reason, if you work at Nvidia you might be a bit biased about so-called AI so maybe don’t try to sell LLMs as being great for open source software?

  • View post

    Writing this so I can remember it later: If you try to run sudo in a chroot/systemd-nspawn rootfs of a foreign architecture (via binfmt) and get sudo: effective uid is not 0, is /usr/bin/sudo on a file system with the &#39;nosuid&#39; option set or an NFS file system without root privileges? it’s because binfmt doesn’t honor the setuid bit by default. Copy /usr/lib/binfmt.d/qemu-&amp;lt;arch&amp;gt;.conf to /etc/binfmt.d/, edit the copy, add a C at the end and restart systemd-binfmt.service.

  • View post

    Good job

  • View post

    RE: https://corteximplant.com/@codinginquarantine/116460826954446199 I’ve seen this a few times and that made me wonder… Was analog “snow” black and white or color? I’m pretty sure it was B&amp;amp;W, but maybe it depends on the TV standard (I’ve only seen SECAM TVs back in the day…)

  • View post

    TIL that in C++ you can specify a default parameter value in a function/method declaration even if you omit the parameter name. This is valid: void f(int = 3); (The code I was reading was something like void f(..., timestamp = 0) and it took me a while to realize that timestamp was a custom type and not a parameter name…)

  • View post

    Me: return some_list[start:end] Python formatting tool #1: Hey you need spaces around colons, I changed the line to &quot;return some_list[start : end]&quot; Python formatting tool #2: Error! whitespace before &#39;:&#39; Me: ... Me: return some_list[slice(start, end)] Thanks, formatting tools...