News for hackers. Stuff that matters.
Re:Why the Windows Registry sucks technically (2010) by lelanthran on Friday July 29, 2022 @08:13AM (#32275938)
> Unix simply doesn't have a "way" in that regard, other than a loose convention to put text files in "/etc".

So? The registry doesn't have much of a way either - the actual fields are simply a loose convention.

> Every application comes up with its own format.

Same with Windows applications - one application might store an IP address as a dotted-octet string, another might store it as a single 32 bit integer.

> Parsing that file is application-specific.

Same for Windows applications; the subtree for any application is very specific to that application and almost always differs from the subtree for other applications.

> Updating a value in a text file means re-writing the whole file again.

Not a problem, when it means that breaking a value in a text file breaks only that one application. Break the registry almost always breaks something else, if not the entire system.

I'm not saying files in /etc aren't without their problems, I'm saying that all /etc problems are already present in the registry, but the registry adds a few more of its own.

Re:Why the Windows Registry sucks technically (2010) by mmis1000 on Friday July 29, 2022 @12:27PM (#32278957)
> the actual fields are simply a loose convention.

Let alone some windows program end up just save a blob in it and totally ignore the typing.

Who care about the field type if I can save everything in a single blob(?

Re:Why the Windows Registry sucks technically (2010) by yndoendo on Friday July 29, 2022 @03:01PM (#32280591)
Even Microsoft likes to save blobs.

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\BrowserEmulation\ClearableListData]\UserFilter

Re:Why the Windows Registry sucks technically (2010) by jbverschoor on Friday July 29, 2022 @08:54AM (#32276236)
I can’t and shouldn’t be able to write to /etc as an ordinary or guest user.

Er-readying values isn’t done usually with apps.

You can get corrupted files if two instances fight for the same file. If that’s your thing, please use mongo. Also, please provide support to all the users.

Lastly, if you messed up certain configuration or data files, your system won’t boot either on ANY system.

Sounds like you’re just one of many anti-windows people, exactly what was pointed out about people bashing the registry.

Re:Why the Windows Registry sucks technically (2010) by deelowe on Friday July 29, 2022 @10:04AM (#32277044)
> I can’t and shouldn’t be able to write to /etc as an ordinary or guest user.

You're right, you shouldn't. If you are able to, your distro is very odd and I'd recommend seeking a new one.

> Sounds like you’re just one of many anti-windows people, exactly what was pointed out about people bashing the registry.

There's no need to attack people.

Re:Why the Windows Registry sucks technically (2010) by chasil on Friday July 29, 2022 @10:49AM (#32277657)
This is emphatically NOT true.

If you absolutely could not write to /etc, then you would never be able to change your password.

The passwd, chsh, chfn, and other utilities allow a non-privileged user to make controlled changes to privileged files via the setuid/gid system calls.

A user can trigger controlled writes to files in /etc.

Re:Why the Windows Registry sucks technically (2010) by 5e92cb50239222b on Friday July 29, 2022 @11:20AM (#32278078)
> If you absolutely could not write to /etc, then you would never be able to change your password.

Since we're talking about Linux, I would refrain from using absolute clauses like "never".

systemd-homed allows you to create "portable" user profiles which contain everything pertaining to a particular user, including his password. So user profiles (including your files, etc) can be moved between computers simply by rsync'ing that directory, or putting it on a network share.

`homectl passwd` (which changes a portable user's password) does not require writable /etc.

I think I've seen a few other solutions like that.

https://wiki.archlinux.org/title/Systemd-homed

https://systemd.io/HOME_DIRECTORY/

Re:Why the Windows Registry sucks technically (2010) by RedShift1 on Friday July 29, 2022 @02:56PM (#32280527)
Users can not write to /etc, those programs like passwd can because they have the suid bit on and run as root regardless of which user initiated the process.
Re:Why the Windows Registry sucks technically (2010) by Blikkentrekker on Friday July 29, 2022 @12:30PM (#32278999)
It's more so that users can ask the administrator to write to `/etc/` for them.

The administrator in this case has an automated tool that handles this requæst but the actual user the writing occurs under is the root user.

Re:Why the Windows Registry sucks technically (2010) by mecsred on Friday July 29, 2022 @11:29AM (#32278220)
That's like saying you've broken RSA because you can cause controlled reads. All you have to do is send the encrypted message to the intended recipient and wait for them to decrypt it.
Re:Why the Windows Registry sucks technically (2010) by deelowe on Friday July 29, 2022 @10:56AM (#32277770)
That's being a bit pedantic innit?
Re:Why the Windows Registry sucks technically (2010) by lelanthran on Monday August 01, 2022 @04:42AM (#32303479)
Maybe in OPs opinion, using `passwd` to write to `/etc/passwd` is not the same thing as using the registry API to write to the registry?

Personally, I feel it is the same thing.

Re:Why the Windows Registry sucks technically (2010) by lelanthran on Friday July 29, 2022 @08:58AM (#32276264)
> I can’t and shouldn’t be able to write to /etc as an ordinary or guest user

I don't believe you can. What distribution is this?

Re:Why the Windows Registry sucks technically (2010) by jbverschoor on Friday July 29, 2022 @09:01AM (#32276288)
Point about /etc is that it’s just one part of “configuration”.

There’s no /etc for users. That’s why we get all these dot.dirs. At least some apps use ~/.config/

Re:Why the Windows Registry sucks technically (2010) by augustk on Friday July 29, 2022 @10:27AM (#32277353)
"$XDG_CONFIG_HOME defines the base directory relative to which user-specific configuration files should be stored. If $XDG_CONFIG_HOME is either not set or empty, a default equal to $HOME/.config should be used."

https://specifications.freedesktop.org/basedir-spec/basedir-...

Re:Why the Windows Registry sucks technically (2010) by hiptobecubic on Friday July 29, 2022 @10:21AM (#32277285)
.config/ and .local/ are the de facto /etc for users, but there is the set of XDG_ environment variables that are intended to fill that role.
Re:Why the Windows Registry sucks technically (2010) by jbverschoor on Friday July 29, 2022 @04:08PM (#32281260)
Well, my git, ssh, caches of what not, almost everything is in my home directory directly. It's even worse than "My Documents"
Re:Why the Windows Registry sucks technically (2010) by viraptor on Saturday July 30, 2022 @08:20AM (#32286220)
Git uses XDG_CONFIG_HOME https://git-scm.com/docs/git-config#Files - putting the config directly in your home is just a choice.
Re:Why the Windows Registry sucks technically (2010) by jbverschoor on Sunday July 31, 2022 @02:17AM (#32293633)
It doesn’t in macOS.

It’s not a choice. It’s the default. It’s like saying it’s a choice to run mongodb without authentication.

Lastly, why should I be using XDG Desktop variables on something that don’t haveA desktop environment?

Re:Why the Windows Registry sucks technically (2010) by rad_gruchalski on Friday July 29, 2022 @07:37PM (#32282900)
„My Documents” isn’t the same as a home directory. Home directory in recent Windows versions is „C:\Users\CurrentUserName”. Or better: %homedrive%%homepath%.
Re:Why the Windows Registry sucks technically (2010) by yjftsjthsd-h on Friday July 29, 2022 @10:54AM (#32277723)
I'm pretty sure .local is the per-user /usr, and .config is /etc
Re:Why the Windows Registry sucks technically (2010) by db48x on Friday July 29, 2022 @11:45AM (#32278447)
You’re both correct; a fair number of applications put their configuration in ~/.local/share even though that wasn’t the intent.