mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-29 12:03:03 +00:00
Remove _FREEFALL_CONFIG hacks. su+pam_ksu works well enough to use on
the freebsd.org cluster.
This commit is contained in:
parent
8ac67f3016
commit
d0a6d5e51e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=172765
@ -5,10 +5,6 @@ include $(top_srcdir)/Makefile.am.common
|
||||
|
||||
INCLUDES += $(INCLUDE_krb4) $(INCLUDE_des)
|
||||
|
||||
.if defined(_FREEFALL_CONFIG)
|
||||
CFLAGS+=-D_FREEFALL_CONFIG
|
||||
.endif
|
||||
|
||||
bin_PROGRAMS = su
|
||||
bin_SUIDS = su
|
||||
su_SOURCES = su.c
|
||||
|
@ -197,20 +197,12 @@ krb5_verify(const struct passwd *login_info,
|
||||
NULL);
|
||||
else
|
||||
ret = krb5_make_principal(context, &p, NULL,
|
||||
#ifdef _FREEFALL_CONFIG
|
||||
login_name,
|
||||
#else
|
||||
su_info->pw_name,
|
||||
#endif
|
||||
NULL);
|
||||
if(ret)
|
||||
return 1;
|
||||
|
||||
if(
|
||||
#ifndef _FREEFALL_CONFIG
|
||||
su_info->pw_uid != 0 ||
|
||||
#endif
|
||||
krb5_kuserok(context, p, su_info->pw_name)) {
|
||||
if(su_info->pw_uid != 0 || krb5_kuserok(context, p, su_info->pw_name)) {
|
||||
ret = krb5_cc_gen_new(context, &krb5_mcc_ops, &ccache);
|
||||
if(ret) {
|
||||
#if 1
|
||||
@ -442,11 +434,7 @@ main(int argc, char **argv)
|
||||
ok = 4;
|
||||
#endif
|
||||
|
||||
if(ok == 0 && login_info->pw_uid
|
||||
#ifndef _FREEFALL_CONFIG
|
||||
&& verify_unix(su_info) != 0
|
||||
#endif
|
||||
) {
|
||||
if(ok == 0 && login_info->pw_uid && verify_unix(su_info) != 0) {
|
||||
printf("Sorry!\n");
|
||||
exit(1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user