Commit Graph

543 Commits

Author SHA1 Message Date
sin
77a2f9f92c Add initial pw_check() 2014-06-09 11:12:53 +01:00
Hiltjo Posthuma
1abf7518ad mount: remove stat, not needed since we use realpath 2014-06-07 19:16:50 +01:00
Hiltjo Posthuma
01bbe2820a mount: resolve path given
this allows: cd /mnt; mount somename.
2014-06-07 19:16:42 +01:00
sin
9716ca2c7a OK we had our fun, now remove the randquotes from su.c 2014-06-05 17:43:11 +01:00
sin
2ea51e8cd8 Print errors on the next line 2014-06-05 17:20:58 +01:00
sin
f628b72747 Allow the user to change from an empty password
Default to SHA-512.
2014-06-05 17:17:18 +01:00
sin
abbb8fffc7 Remember to free the agetline() buffer 2014-06-05 17:00:39 +01:00
sin
1ec996439a Add initial implementation of passwd(1)
No shadow support yet.
2014-06-05 16:57:27 +01:00
sin
d3709f91a2 the shell field in passwd is optional - fallback to /bin/sh 2014-06-05 12:18:27 +01:00
FRIGN
5a2f3c85b7 Bring back some C89/C90 elements
dmesg: don't use VLAs
getty, su: no need to use compound literals
2014-06-05 11:33:34 +01:00
sin
8ab8a4cad0 Staticise copy_splice() 2014-06-04 20:50:43 +01:00
sin
ba3366646a Use %1023s as opposed to %1023c
Using %1023c doesn't work with musl.
2014-06-04 15:36:18 +01:00
sin
8441c95a2f define -D_XOPEN_SOURCE in config.mk
Remove from su.c and login.c
2014-06-04 15:16:24 +01:00
sin
1b28deba3d Add -D_FILE_OFFSET_BITS=64 to config.mk
stat() will fail if compiled on a 32-bit platform and the file
size is greater than (1<<31)-1 bytes.
2014-06-04 15:12:58 +01:00
sin
e2c6ab9a76 Simplify print_stat() 2014-06-04 13:53:10 +01:00
sin
9c7d08773f Fallback to pagesize transfers in dd(1) 2014-06-04 13:39:08 +01:00
sin
ee5c4e4521 ubase builds with clang as well 2014-06-04 13:36:09 +01:00
sin
a4e8cf6664 Use the macros from inttypes.h to properly print uint64_t 2014-06-04 13:22:54 +01:00
sin
4b58a3fcbe Add dd to README and remove from TODO 2014-06-04 13:15:48 +01:00
sin
6ea2b1aa53 Use estrtoul() in dd(1)
Allow specifications in hex and octal as well.
2014-06-04 13:13:00 +01:00
sin
144a893268 Ensure a proper exit code
If copy() fails at least print stats.
2014-06-04 13:06:46 +01:00
sin
7fa098ace6 Use eprintf() wherever possible, add -h to options 2014-06-04 13:04:45 +01:00
sin
5c66e30060 Nuke a harmless warning 2014-06-04 12:19:46 +01:00
sin
207ba019fd Add initial version of dd(1).
This code was written by Sebastian Krahmer and you can find
the original version at https://github.com/stealth/odd.git.

Permission has been granted to release this code under MIT/X
for ubase.  It has been simplified by sin@2f30.org.

Thanks Sebastian!
2014-06-04 11:47:38 +01:00
sin
d2dfc053c1 Clarify that hwclock(8) uses /dev/rtc as the default devnode 2014-06-04 11:01:00 +01:00
sin
01fa8eec58 Fix login(1) -p semantincs once and for all 2014-06-03 18:57:37 +01:00
sin
d522589a11 Clarify in login.1 that TERM is set as well 2014-06-03 18:23:34 +01:00
sin
916b7fed1e Set TERM to linux if needed for su and login 2014-06-03 18:21:05 +01:00
sin
8216a97519 Print a warning for -w to let the user know that we are assuming UTC 2014-06-03 16:29:22 +01:00
sin
0d09df4645 Add hwclock(8) manpage 2014-06-03 16:25:18 +01:00
sin
5bbc67aa96 Allow to specify the rtc devnode for hwclock(8) 2014-06-03 16:09:20 +01:00
sin
5836145a5c Implement -s support for hwclock(8)
Rename some functions as well.
2014-06-03 15:58:08 +01:00
sin
cd0c6cf5b8 Add hwclock in README 2014-06-03 15:46:12 +01:00
sin
5dd629fd42 Remove -pedantic from default config.mk 2014-06-03 15:37:46 +01:00
sin
e3d7ffa05c Use rtc_time 2014-06-03 15:15:21 +01:00
sin
dacfb76c75 Add initial version of hwclock(8) 2014-06-03 14:52:14 +01:00
sin
c4051021c9 Add hwclock to TODO 2014-06-03 12:49:48 +01:00
sin
df6f793d57 Remove login from TODO 2014-06-03 12:42:52 +01:00
sin
0daa5a8206 Update TODO 2014-06-03 12:42:15 +01:00
sin
604b5de69d Use -std=c99 and -pedantic in default config.mk 2014-06-03 12:39:22 +01:00
sin
da215823a3 Inform the user if exec*() fails 2014-06-03 12:34:39 +01:00
sin
323f6be8ef Use correction function name in error message 2014-06-03 12:34:32 +01:00
sin
b8dbf05ce7 Simplify dologin() in su(1)
Exec the user's shell with -l to fake a login.
2014-06-03 12:28:50 +01:00
sin
2f10d16b9f Remove explicit_bzero() calls 2014-06-03 12:18:19 +01:00
sin
bd4b6f4e47 Add /etc/passwd support to su(1) 2014-06-03 12:15:24 +01:00
sin
e5d539a76f Remove BUGS section from login.1 - we now have shadow support 2014-06-03 11:08:00 +01:00
sin
0de4f5fd9f I am stupid. 2014-06-03 11:03:25 +01:00
sin
bc709278b6 Add shadow support to login(1)
Also remember to really preserve the environment.
2014-06-03 11:00:44 +01:00
sin
c4c1feac2a Check if stdin is a tty
Some indentation changes as well.
2014-06-03 10:50:41 +01:00
sin
b6007ba92b Be consistent with login(1) usage 2014-06-02 17:38:12 +01:00