Commit Graph

14 Commits

Author SHA1 Message Date
sin
5c8cf6925d Add su manpage and fix su usage line 2014-04-13 17:23:26 +01:00
sin
634e77a1a5 Simply use eprintf() instead of enprintf() 2014-02-27 14:59:34 +00:00
Hiltjo Posthuma
96af28da60 su: set default 'root', fixes a uninitialised variable warning
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-02-14 14:11:28 +00:00
sin
5f3c183b85 Setup a sane PATH across su(1)
Also added a config.h for the basic configuration of ubase.
2013-10-19 19:11:14 +01:00
Jakob Kramer
ab37391837 fix SHELL being set to the usr's home directory 2013-10-18 21:46:03 +01:00
sin
bfb4b38cff If we are preserving the environment use SHELL instead of pw->pw_shell 2013-10-18 16:23:22 +01:00
sin
acb9ae197e Implement -p for su(1) 2013-10-18 14:26:40 +01:00
sin
7e59506b4b Set SHELL environment variable by default
If target user is not root also set USER and LOGNAME.
2013-10-18 11:22:31 +01:00
sin
784c6a5acf Implement -l support for su(1) 2013-10-18 11:15:31 +01:00
sin
f7bfe68a9e We use environ so declare it 2013-10-18 11:15:31 +01:00
sin
86566f4ceb Only try to ask for a password and check if uid is != 0 2013-10-18 10:26:48 +01:00
sin
56ce9e8bff Some stylistic changes to su(1)
Also set errno to zero before calling getspnam().
2013-10-18 10:26:40 +01:00
sin
f7fdd58972 Use a compound literal instead of malloc() in su(1) 2013-10-18 10:08:27 +01:00
sin
ff2e11638f Add initial su(1) 2013-10-17 23:04:20 +01:00