I love C more than C++, but I still code in C++ occasionally. I try not to go beyond C++98 syntax (or C++2003). I hate templates, iterators and long namespaces. Basically I don't like STL, though I may use it. I use NULL for null pointers and I use pointers instead of references. I think this style was called "C with classes" back in the days. :-)
How about vibe-coding your own multi-platform XMPP client first ? The one that suites your needs, that has all the contemporary features and is not a bloat. We all will say thanks to you. :)
I suggest finding a code path where FreeBSD crypt() ever returns NULL, which would mean one of its internal functions returning non-zero, before getting too excited. They all end in return (0) . (-:
As I said, the callers of crypt() have for a long time been using the knowledge that crypt() on their platform simply never returns NULL. Unix has never been returning NULL from crypt() as far back as 7th Edition, when it simply always returned a pointer to a single internal static buffer.
The reality is that all C library people have to work with a corpus of Unix applications that do not check for crypt() returning NULL that goes back almost 50 years, and an error return mechanism that barely exists outwith the pages of the SUS.
That includes callers in single-user mode in process 1 in some configurations.
Well, crypt_blowfish() has a number of returns with (-1). I'm not familiar with Blowfish, so it's hard for me to trace the possibility of failure here. But what if in a distant future someone adds more hashing algorithms to the list without possessing historical knowledge of this "never return not 0" ?
Failing to check result of crypt() in init cannot do much harm, doing so is equivalent of going system reboot (crash init :-)). Besides, whoever has access to system console can do whatever they want with the system, no password can prevent from that.
I have no doubt, despite that Marshall Kirk McKusick is still committing in 2026, that FreeBSD developers will come along that do not know history. But they will get pointed to the manual page that (amusingly) says that returning NULL is 'not a standard behaviour' and that AT&T Unix never did that.
NetBSD's manual is more detailed on the subject, and explains the bind that library implementors have been in for decades, thanks to almost 50 years of applications knowing what crypt() 'really' does.
And this despite the SUS trying to shoehorn an error return mechanism into crypt(3) in order to accommodate the problems that operating systems had exporting encryption code, two decades afterwards. (The 1997 GoSolo book explains that this is why there's an ENOSYS error.)
> but because there's no way in C to force API users to decide what to do if an error occurrs,
0. There are tons of libc functions that return NULL on failure, it is conventional way in C to indicate failure.
1. There's no much to decide, just fail to login if crypt() fails with NULL.
2. errno is standard way in C to check error code of a failing function, but in case of login you hardly need this, just fail!
I totally agree that fixing this issue in musl was a pretty dubious solution. Don't fix what's not broken, fix broken application instead. Publish a CVE if you cannot fix it.
I looked through FreeBSD source code for how they use crypt(), it's checked for NULL everywhere!
Nothing you said is incorrect, but I believe they meant that there’s no way to force a C program to check the NULL correctly—the compiler will happily compile code that gets a pointer back from a function but doesn’t check for NULL before dereferencing it.
In something like Rust the type system won’t let you touch the value until you’ve done something to deal with the error. Even if you just want to ignore it, you are forced to acknowledge that the function is fallible by the type system—it’s a compile error if you don’t.
Recently I've had to deal with this same problem - get a new TV for living room. Personally, I do not watch TV at all, but kids want to see cartoons when having their breakfast. I spent a week reading forums and came to conclusion that best solution would be to buy a "dumb TV" and connect it to a PC I trust, but it appears there are no dump TVs in my rage of 55" and larger. So, I bought "Google TV" based TCL.
When I brought it home, I never connected it to Ethernet or WiFi. Instead, I connected it to my laptop over USB, then using adb I uninstalled almost every application from it. It took me quite some time to figure out what app is possible to remove and what should be kept to let TV functionality to work. I even had to factory-default it a couple of times because some random apps I removed were crucial for Android to work. :) I think it took me 5-6 hours to clean it. Now it has only basic TV functionality like any dump TV does, I can watch air and cable TV channels, watch movies and play music from USB storage. If there's a need to watch something online, I connect it over HDMI to my small mini-PC that runs FreeBSD. I think I'm satisfied with the result. :-)
PS: Yesterday I opened the case and disconnected WiFi antenna. Just in case.
> PS: Yesterday I opened the case and disconnected WiFi antenna. Just in case.
While this couldn't hurt, it also won't stop the TV from being able to connect to wifi. I ran my desktop without an antenna attached for months. The speed noticeably improved when I attached an antenna but it was fine for browsing the web and downloading software updates without one.
Also so that any electronics don't get fried. Wi-fi board borking itself would be good, but I'd be worried about it affecting something else down the line.
Exactly. That's part of what I meant by "none the wiser." The other being that the xmitter could in theory detect a missing antenna from the impedance mismatch and try to increase its power (assuming it knows how to do so without frying itself).
"(assuming it knows how to do so without frying itself)."
Unlikely, as Wi-Fi is flea power (not high enough to do damage). Moreover, Wi-Fi chips have an inbuilt power limit so as to comply with spectrum management regulations.
Anyway, why wouldn't you want to fry the Wi-Fi chip if possible, that'd solve everything? If I had that problem I'd simply stuff the chip or short out its RF output (bridge solder across its antenna pins).
There are multiple ways of fucking the chip, likely the easiest is shorting B+ to the high side of its antenna pins (that'll likely do the trick). Another method is to hold the tip of a hot soldiering iron on the center of the chip until it fails.
Of course, you shouldn't do this unless you know what you are doing. The Wi-Fi chip may also control Bluetooth so if you still want that risky comms pathway then consult the chip's datasheet first.
If you know what you are doing and have explicitly disconnected/cut all antennas including entire MIMO arrays (many people miss one or more antennas) in the motherboard then the only remaining explanation is "accidental antennas".
This is only possible if the WiFi-chip has dangling metal pins/traces/joints whose length is comparable to that of its wavelength, in which case these will act as makeshift antennas. These will pickup ambient WiFi RF, but for this to work at all you need lots of RF power i.e. a very strong signal strength which means you have to be very close to the WiFi router.
The whole thing works because of Physics and not Engineering (the "accidental" part) and hence very iffy (may not work at all) and should not be relied upon.
You don't need an antenna. You can think of an antenna as simply being a signal booster.
That being said, without an antenna it is highly improbable that it could still find an open WiFi AP to connect to (especially if you don't have one in your house).
I would imagine the antenna just strengthens the incoming signal.
You could still get reception/communication if the gateway/router/modem was near enough and not a lot of electrical shit attached (I would imagine that would generate more noise that could interfere)?
As an example - if you have a motherboard on your computer that supports wifi and comes with a port/plug for an antenna, you could remove that antenna and still receive a signal (IDK about sending) but it would suffer more signal loss due to the lack of antenna.
All that is just a guess of course. People more knowledgeable than me could explain/clarify.
I am not the person you asked the question of, but here is the answer;
Smart TVs have a built-in "WiFi-Chip" on the motherboard and its antenna hidden in the TV frame itself, exactly like the antennas in a Smartphone. The different radios on a Smart TV viz. OTA, WiFi, Bluetooth, Satellite, Zigbee etc. all operate at different frequency ranges and hence need their own antennas. Many of these antennas are either a) etched on the motherboard b) hidden within the plastic back frame or c) directly taped to it.
Axiom of RF Wireless - There can be no transmission/reception without an antenna either external or internal.
PS: Since RF Wireless is everywhere today and most people do not have much of an idea of this technology, i very highly recommend the book The Essential Guide to RF and Wireless by Carl Weisman for study. Expressly written for a non-technical audience, it explains everything simply and beautifully. It really gave me the invaluable overview and the grounding i needed to understand this important science/technology.
This is not even a viable option these days: secondary processors, the potential for a backchannel to some installed app on a device in the home (this has not made headlines, but it’s possible), tying an account to the device proactively.. The TV industry really ran to collect “their” data
Some IoT providers' h/w products use globally viable sim cards that can connect to supporting networks. It doesn't have to be "open wifi" since a lot of IoT is for movable objects that are shipped around.
And it’s clearly less convenient for exfiltration vs most other options. Even closed implementation of HDMI eth to a soundbar of the same brand: then where to
Yes, that’s my second argument: even if it were implemented, you think Apple’s going to let just any ol’ POS IoT junk use an Apple TV’s connection? “Pass through using my IP address doing $DEITY-knows-what? Sure, random device, have at it!”
The last TV I bought was a Kogan, and at first power up, or after a factory reset, it let you select where you wanted it to be a dumb screen with inputs only, or run the Google TV OS.
This is somewhat an option. I have this TV too and when you set it up, you can choose to have it be a dumb tv, and even avoid Google TV if you want. In the US.
Our TCL has this option, but there are multiple buttons on the remote that open youtube or ask zuck to club baby seal to death or whatever, and if you press those (i.e., sit on the remote), it goes into a labyrinth of google bullshit that complains about how you are missing important notifications and need to debug your wifi.
F--- Google, but at least the kids know those menus are bullshit, and do not have the wifi password at any rate.
Also, we're probably already to the point where I could just put it on a firewalled network, and have a [chinese open weight] LLM pop the factory android, get root, and reprogram the remote buttons to no-ops.
Or, I could open the remote up, physically cut out the spam buttons, then 3d print an alternative top-half of the shell without holes for them.
At least on our TCL (which has an array of thousands of back lights) some of the unhance options actually need to be turned on.
We bought it because it has crazy high brightness (it is in a bright room with direct sunlight hitting the panel while we are watching it), and while it can beat back the sun, it cannot do so by just turning all the zones on 100% because it would melt or something.
So, if all the image slopping were turned off, the contrast ratio would drop 100x, and the TV wouldn't really be fit for purpose.
(For when the sun is not actively trying to kill the panel, I have a de-slop shortcut setup. That also has the backlight enhance stuff turned on -- as low as possible -- to get true black on the LCD. It works OK. OLED is not quite there yet for this corner case.)
This kind of trade-off is often a dark pattern used when forced to offer a feature by regulators or by competitors offering it. The evil trick is complying with the regs or being able to advertise the feature but making it so unattractive users won't activate it, enabling the manufacturer to still earn that sweet $35-$60 / yr from advertising, app install payments, rev share and selling your viewing data.
> the image enhancements.
Having spent a couple decades working in and around digital video production tooling and engineering, as well as being a filmmaker and home theater enthusiast, it's worth mentioning that today almost all television image enhancement features are net negative, even if they make the image subjectively 'pop' or motion appear smoother on typical scenes, they'll introduce artifacts or trade-offs in other kinds of scenes.
In my experience doing a lot of testing over the years with objective signal analysis tools at work as well as subjectively across 7 generations of upgrades in my own home theater, the trade-offs aren't worth it. There are a few context and content specific exceptions but they're quite rare and usually involve slightly improving significantly degraded signals which no longer exist in most home theaters (eg noise reduction in analog sources like laserdisc, DCT macro-block smoothing in highly compressed old MPEG 1/2 sources or dynamic range expansion on legacy SD sources).
With today's 4K and HD digital sources encoded at high bit rates in modern codecs, the director, colorist and mastering engineer can finally deliver their precise intent all the way to your eyeballs. The ~$20 chip calculating synthetic frames and pixels in your TV introduces surface curb appeal at the cost of artifacts and a poorly integrated image. If it actually made the image look better, the director and colorist have more and better tools than that $20 chip that they're already applying to the source. You're just turning a $20 chip loose on 'full auto' to guess at (and often undo or muddy) intentional enhancements manually applied frame by frame over days by experts.
Do whatever you like but I encourage you to critically audition each of those enhancements across a range of source types (4K, HD, HDR, HDR10, SDR, 24, 30, and 60 frame) and diverse scenes (low-light, quick panning, smooth dollies, and synthetic test signals, etc). Once you compare the before/after across that breadth back-to-back you'll see what I mean. I run my calibrated, high-end 3-laser projector (150" screen) as close to neutral, native settings as I can get and it looks sensational. And to be clear I'm not being a purist, if 'enhancements' really improved some scenes meaningfully without degrading other scenes, I'd be "Fuck the director's intent, it's just better." But for every scene an enhancement improves, I can queue up a scene from another film it makes noticeably worse. Fortunately, on most high-end Sony TVs you can get an un-hyped, accurate image in the standard UX without going to the calibrator or factory menus.
> Having spent a couple decades working in and around digital video production tooling and engineering, as well as being a filmmaker and home theater enthusiast, it's worth mentioning that today almost all television image enhancement features are net negative
Yep, generally you don't want anything the TV manufacturer markets as "enhancements." They basically all add things to the signal that were not part of the director's or video editor's vision. Any cinephile will remind you that there is one correct setting for "brightness," "contrast," "color," and "tint". "Sharpness" should almost always be zero, and any other setting that claims to "enhance" the picture should be turned off for correct output.
The worst ones now are the "motion smoothing" modes that take your normal FPS movie and try to interpolate them up to 60FPS, 120FPS or even 240FPS, giving them that cheap, crappy "soap opera" effect. Turn it off as soon as you turn on your TV for the first time.
While this is generally true, there are some notorious cases where the director's intent was terrible, and the image definitely needs more contrast and brightness to see what's going on.
>motion smoothing works nice on my 30fps video games.
Of course a modern console only managing 30fps is the actual 'bug' :-). But I agree that's one of the narrow exception cases where an 'enhancement' might be a net benefit. Although if you're going to use synthetic frames, doing it in the console can be better because intra-frame motion hinting might be available and, even if it's not, the console's frame gen is trained on game content where a TV's chip is cross-function and far less capable (both in look-ahead and motion vector count). But I know some consoles don't have frame gen, so in that case it's a win.
1) Would you consider publishing which apps you removed? (A wiki on making smart devices dumb - cars, TVs, refrigerators, tractors ... - would be useful, though I'm not suggesting you make and manage it yourself.)
2) Why bother removing the apps if it has no network connection? Defense in depth is sensible to me, but maybe there's something else I'm missing ...
3) Why not buy a large desktop computer monitor, or are those no longer 'dumb' either?
1) All the google data gathering crap, and all the "give permission to garbage preload to turn on the microphone" bullshit (and look for a physical mic switch; ours has that. Also, turn off notifications, because, do you want notifications telling you the wifi does not work? If you have an android phone, do this on your phone first.
2) Less crap = less backlog of surveillance data if you ever accidentally need to put it online. Also, see (1).
3) You can't get a nice 55"-100" desktop monitor for < $2K.
> I even had to factory-default it a couple of times because some random apps I removed were crucial for Android to work. :)
I had this same experience with my Samsung tablet - but for a TV that isn't connected to the internet, I couldn't really be bothered to adb uninstall apps - it's not like they're going to be doing anything anyway.
Who's gonna fine a manufacturer for a modem when governments mandate they are fitted to cars? And now mandate driver facing cameras? They want to know what you're watching.
Stop with this "they". I'm sure most people on HN live in democracies. We are at fault for not raising our voices. We've become lazy participants in the democratic process. Blaming "the government" is only gonna cause disillusionment and further the causes of evil.
What do you mean? Obviously consuming too much media, or consuming anything too much of it is not good, but how does that negate concerns about inadvertently inviting for-profit corporations to your breakfast and every intimate conversation at home?
I fully share your sentiment, someone buying a tv specifically so the kids don't let their brains rest during a 15 min breakfast seems insane to me. That said I guess better they watch without spyware than with..
Can someone please tell why Linux kernel needs this "early" memory allocator and what happens when kernel switches to standard allocator ? From what I know FreeBSD (and other BSDs?) has Universal Memory Allocator (UMA) that is used for everything.
reply