* lib/prototypes.h, src/suauth.c, src/su.c (check_su_auth): Do not

use the pwent global variable to communicate between APIs of
	different files. Added boolean parameter su_to_root to
	check_su_auth().
	* src/su.c (check_perms): Return the passwd entry of the finally
	authenticated user. Remove usage of the pwent variable.
	* src/su.c: The password of the caller is the one from the
	spwd structure only if the passwd's password is 'x'.
This commit is contained in:
nekral-guest
2011-06-13 18:26:26 +00:00
parent 3abd71c526
commit 7ebfb5c90f
4 changed files with 67 additions and 64 deletions

View File

@ -348,7 +348,9 @@ extern int safe_system (const char *command,
extern long strtoday (const char *);
/* suauth.c */
extern int check_su_auth (const char *actual_id, const char *wanted_id);
extern int check_su_auth (const char *actual_id,
const char *wanted_id,
bool su_to_root);
/* sulog.c */
extern void sulog (const char *tty,