Commit Graph

104 Commits

Author SHA1 Message Date
3e052c72a0 init: don't wait before executing the session binary 2022-10-29 10:01:17 +02:00
e9092ab235 sh: Display username instead of shell's PID in prompt 2022-10-28 21:57:07 +02:00
0b838572e1 apps: Add a new session program which manages user login 2022-10-28 21:56:52 +02:00
91470851cd stat: Show username of file owner 2022-10-28 21:00:33 +02:00
5aba1c5f15 su: Make it setuid root, ask for a password, and accept a username
It asks for a password only if you are not root, obviously.
2022-10-28 20:57:13 +02:00
477af66cdc ps: Show usernames of processes, using getpwuid() 2022-10-28 20:55:39 +02:00
b8296eb92d su: Also set group ID 2022-10-28 17:55:56 +02:00
fa0dc4b18c apps: Remove sym and crash
Not necessary anymore.
2022-10-28 17:53:22 +02:00
68d0d0b759 apps: Add a new su utility 2022-10-28 17:52:46 +02:00
09a615bd99 Kernel, libc: Expose processes' UID and GID in pstat() 2022-10-28 17:31:34 +02:00
2269ec267c apps: Add a 'stat' utility 2022-10-28 17:14:20 +02:00
77d331b258 init: Open /etc/motd with O_CLOEXEC to avoid leaking this file to children 2022-10-28 17:13:45 +02:00
fcf53ef6a5 Kernel: Make waitpid() block by default unless WNOHANG is specified 2022-10-27 17:05:42 +02:00
f004122735 cat: Remove unnecessary include 2022-10-26 20:55:08 +02:00
41f7232b77 Devices: Return EOF after first read for some devices
Still not optimal.
2022-10-26 20:54:47 +02:00
d5a64319f9 apps: Add cat 2022-10-26 20:51:20 +02:00
2512acc716 ls: Use command-line arguments 2022-10-26 20:30:22 +02:00
6892fd96d0 sh: Split a command into arguments and pass those on
This is a big achievement!!
2022-10-26 20:06:21 +02:00
23b12d2d56 sh: Clear exit status if we do not execute another command 2022-10-26 19:39:04 +02:00
5492b1b44d sh: Implement our own execvp() while we wait for libc.
Of course, this is a very primitive execvp with hardcoded paths.
If it were decent, it would be integrated into libc instantly.
2022-10-26 19:36:09 +02:00
7d20c507b1 Kernel, libc, userspace: Implement command-line arguments (argv)
The only thing missing now is for sh to pass them on.
2022-10-26 18:57:06 +02:00
0bad662c2f sh: If fork() fails, show an error containing fork 2022-10-26 17:13:47 +02:00
af452e2b2a Kernel, libc: Add dup2() 2022-10-25 18:58:06 +02:00
8bf2904d74 libc: Implement a basic subset of dirent.h 2022-10-23 14:41:45 +02:00
32db366781 apps: Add a little ls utility that lists the files in /bin 2022-10-23 14:06:11 +02:00
06f9ffc184 libc: Add EXIT_SUCCESS, EXIT_FAILURE, RAND_MAX and BUFSIZ 2022-10-22 21:39:51 +02:00
26324259f2 uname: Use fgets() 2022-10-22 15:43:21 +02:00
a1a1157151 sh: update it 2022-10-22 15:09:09 +02:00
4aa979bd87 sh: remove duplicate code 2022-10-22 15:08:27 +02:00
189986d23f libc: Rename pstname() to pstatname()
To avoid confusion with ptsname().
2022-10-22 14:30:41 +02:00
727e227b09 apps: Add ps (uses pstat) 2022-10-22 14:26:59 +02:00
31e0f0efed uptime: Use fgets() 2022-10-22 14:23:34 +02:00
27a18a608c libc: Implement fgets, fgetc, getc, getchar (with buffered read IO) 2022-10-22 11:38:16 +02:00
b2f5a0502f Kernel, libc: Implement O_NONBLOCK 2022-10-21 21:51:03 +02:00
da61e3648f Kernel: Implement blocking reads
This is a huge step forward!! bc actually runs now, without echo or backspace, but it runs!!
2022-10-21 21:26:19 +02:00
0720b3245b sh: Do not backspace if command is empty 2022-10-20 19:32:32 +02:00
b69fbd46bf init: Add a Message of the Day 2022-10-20 19:27:37 +02:00
bd4c587409 sh: Try to execute programs in /bin if they are not found 2022-10-20 19:12:17 +02:00
de167c3c67 sh: Show last command' exit status in prompt if non-zero 2022-10-20 08:21:18 +02:00
44bd93b8b4 apps: Add a hello app 2022-10-19 21:13:47 +02:00
f682258fc9 sym: do not sleep 2022-10-19 21:13:38 +02:00
2c813f5901 apps: Add more simple apps
Now that we can start them at will from the command line, bring them on!!
2022-10-19 21:11:38 +02:00
aebd860947 libc: Add stdin
Aka keyboard :)
2022-10-19 20:43:04 +02:00
ba57f32f39 init: wait less before starting sh 2022-10-19 20:36:27 +02:00
a815beacfb sh: add builtins 2022-10-19 20:34:10 +02:00
20db8eaba6 Init: exit if the primary child process exits 2022-10-19 20:33:59 +02:00
7e9744419e sh: Improve it 2022-10-19 20:16:21 +02:00
3c5c92c7c3 sh: Add a simple interactive shell 2022-10-19 19:42:05 +02:00
f3af3e252b Kernel: refresh task_misbehave()
That function was severely outdated.
2022-10-19 17:26:36 +02:00
656667812a Kernel: reparent child processes to PID 1 when their parent exits 2022-10-19 17:16:01 +02:00