Commit graph

15 commits

Author SHA1 Message Date
Tim Schumacher
d43a7eae54 LibCore: Rename File to DeprecatedFile
As usual, this removes many unused includes and moves used includes
further down the chain.
2023-02-13 00:50:07 +00:00
Lucas CHOLLET
ebe925b7c0 userdel: Use Core::Account::sync() to interact with sensitive files 2022-12-31 04:24:05 -07:00
Lucas CHOLLET
3c76790d51 userdel: Use Core::File::remove() instead of spawning /bin/rm 2022-12-31 04:24:05 -07:00
Linus Groh
6e19ab2bbc AK+Everywhere: Rename String to DeprecatedString
We have a new, improved string type coming up in AK (OOM aware, no null
state), and while it's going to use UTF-8, the name UTF8String is a
mouthful - so let's free up the String name by renaming the existing
class.
Making the old one have an annoying name will hopefully also help with
quick adoption :^)
2022-12-06 08:54:33 +01:00
Lucas CHOLLET
507cb411c2 LibCore: Use StringView instead of char * in Account 2022-09-27 21:29:44 +01:00
sin-ack
3f3f45580a Everywhere: Add sv suffix to strings relying on StringView(char const*)
Each of these strings would previously rely on StringView's char const*
constructor overload, which would call __builtin_strlen on the string.
Since we now have operator ""sv, we can replace these with much simpler
versions. This opens the door to being able to remove
StringView(char const*).

No functional changes.
2022-07-12 23:11:35 +02:00
Idan Horowitz
086969277e Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Brian Gianforcaro
cf4fa936be Everywhere: Use default execpromises argument for Core::System::pledge 2021-11-28 08:04:57 +01:00
faxe1008
b49bed5152 userdel: Port to LibMain 2021-11-23 22:54:25 +01:00
brapru
4c0c4f3102 Utilities: Validate user with Core::Account in userdel
Previously the remove home directory option never actually removed the
user's home directory because it was not properly unveiled. By
validating the user with Core::Account, we can identify the user's home
directory earlier in the program and unveil as necessary.

Additionally, by identifying if the user does not exist much earlier in
the program, this elimates depending on getpwent to validate the user
and creating unneccessary temp files.
2021-06-24 17:33:14 +04:30
brapru
d24dd7a3df Utilities: Implement ArmedScopeGuard in userdel to unlink temp files 2021-05-30 17:42:03 +01:00
brapru
54578ec5d4 Utilities: Update userdel to use /etc/shadow
Updates userdel to delete entries from /etc/shadow.

Fixes #4884
2021-05-30 17:42:03 +01:00
Linus Groh
7b79758fc6 userdel: Replace fprintf(stderr) with warnln() 2021-05-30 14:07:58 +01:00
Brian Gianforcaro
1682f0b760 Everything: Move to SPDX license identifiers in all files.
SPDX License Identifiers are a more compact / standardized
way of representing file license information.

See: https://spdx.dev/resources/use/#identifiers

This was done with the `ambr` search and replace tool.

 ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-22 11:22:27 +02:00
Andreas Kling
ececac65c2 Userland: Move command-line utilities to Userland/Utilities/ 2021-01-12 12:04:09 +01:00
Renamed from Userland/userdel.cpp (Browse further)