summaryrefslogtreecommitdiff
path: root/Userland/chown.cpp
AgeCommit message (Collapse)Author
2021-01-12Userland: Move command-line utilities to Userland/Utilities/Andreas Kling
2020-06-21chown: Don't allow "invalid" uid/gid specs (#2596)Emanuele Torre
The usage message states that a uid/gid spec should be <uid[:gid]>. Let's not allow `anon:`, `anon:users:hello` and `:users` then.
2020-06-17Userland: Fix a crash in chown(1)Sergey Bugaev
2020-06-12AK: Make string-to-number conversion helpers return OptionalAndreas Kling
Get rid of the weird old signature: - int StringType::to_int(bool& ok) const And replace it with sensible new signature: - Optional<int> StringType::to_int() const
2020-04-04Userland: Fix null-pointer deref on unknown user/group in chown/chgrpAndreas Kling
We can't just blindly dereference the result of getpwnam()/getgrnam()! Fixes #1625.
2020-02-14AK: Add a forward declaration headerAndreas Kling
You can now #include <AK/Forward.h> to get most of the AK types as forward declarations. Header dependency explosion is one of the main contributors to compile times at the moment, so this is a step towards smaller include graphs.
2020-02-10Userland: Fix segfault in chownWilliam McPherson
chown takes 2 arguments, not 1.
2020-01-18Meta: Add license header to source filesAndreas Kling
As suggested by Joshua, this commit adds the 2-clause BSD license as a comment block to the top of every source file. For the first pass, I've just added myself for simplicity. I encourage everyone to add themselves as copyright holders of any file they've added or modified in some significant way. If I've added myself in error somewhere, feel free to replace it with the appropriate copyright holder instead. Going forward, all new source files should include a license header.
2020-01-12chown: Use pledge()0xtechnobabble
2020-01-12Userland: Add named gid/uid args parsing0xtechnobabble
This patch makes it so that if a user provides a groupname/username instead of an id, chown will automatically convert it to a gid/uid using getgrnam() or getpwnam() respectively.
2019-09-06AK: Rename <AK/AKString.h> to <AK/String.h>Andreas Kling
This was a workaround to be able to build on case-insensitive file systems where it might get confused about <string.h> vs <String.h>. Let's just not support building that way, so String.h can have an objectively nicer name. :^)
2019-06-07Userland: Run clang-format on everything.Andreas Kling
2019-02-27Add chown() syscall and a simple /bin/chown program.Andreas Kling