Commit Graph

29 Commits

Author SHA1 Message Date
sin
10d6bf2f4d Stop using *_FILENO 2014-11-30 13:12:33 +00:00
sin
2d45a04b92 Check if 0, 1, 2 are valid tty file descriptors 2014-11-30 13:05:24 +00:00
sin
6f7f387352 Stop using EXIT_{SUCCESS,FAILURE} 2014-10-02 23:47:39 +01:00
sin
30715f1eec No need for putchar('\n') after getpass() 2014-09-04 11:52:12 +01:00
sin
1aaec6250a Convert lastlog(8) to {w,}eprintf() 2014-08-18 21:55:38 +01:00
sin
6af24e35f9 Only check errno if getpwnam() fails 2014-08-18 21:49:22 +01:00
Hiltjo Posthuma
291aedb875 code consistency fixes 2014-07-09 15:08:01 +01:00
Hiltjo Posthuma
c50f7a3a27 login: separate write utmp in a separate function
write utmp entry (as root) before setuid.
2014-07-09 15:07:53 +01:00
sin
c9609ea5ff Only call fwrite() and fclose() when fp is not NULL
Spotted by Hiltjo.
2014-07-02 12:09:01 +01:00
sin
3669fa4117 More error checking for fwrite() 2014-07-02 12:06:26 +01:00
sin
53547b7835 Just die if ttyname() fails 2014-07-02 12:06:16 +01:00
sin
2832db2368 Set UTMP_PATH in config.def.h 2014-07-02 12:06:07 +01:00
sin
d0145aaf1f login: Write utmp entry 2014-07-02 12:05:58 +01:00
sin
86060b535c Fix includes across all tools 2014-06-30 19:04:47 +01:00
sin
d745889805 Fix pw_check() semantics and style - it is now similar to pw_copy() 2014-06-09 13:05:24 +01:00
sin
4b05ca07cc Port login(1) to pw_check() 2014-06-09 11:13:12 +01:00
sin
2ea51e8cd8 Print errors on the next line 2014-06-05 17:20:58 +01:00
sin
d3709f91a2 the shell field in passwd is optional - fallback to /bin/sh 2014-06-05 12:18:27 +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
01fa8eec58 Fix login(1) -p semantincs once and for all 2014-06-03 18:57:37 +01:00
sin
916b7fed1e Set TERM to linux if needed for su and login 2014-06-03 18:21:05 +01:00
sin
323f6be8ef Use correction function name in error message 2014-06-03 12:34:32 +01:00
sin
2f10d16b9f Remove explicit_bzero() calls 2014-06-03 12:18:19 +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
FRIGN
af65094dbe Simplify login
Remove some unnecessary local values, simplify the exec-call at the end
(we don't need the separate array) and print clearer and more consistent
error-messages.
2014-06-02 17:15:36 +01:00
sin
aaea1e9ff7 Print getpass() errors on a newline 2014-06-02 17:06:38 +01:00
sin
0a3ed68d25 Add initial implementation of login(1)
No shadow support atm.
2014-06-02 16:17:33 +01:00