aaa55367ba
The appropriate entry in /etc/group as returned by getgrnam() is used to determine if 'su root' may be permitted, rather than checking if membership exists in the result of getgroups(). The following changes were made regarding the behaviour of the special group for 'su root' * allow for definition of SUGROUP (defaults to "wheel") to override group name. * use getgrnam(SUGROUP) instead of getgrgid(0). * only scan getgrnam(SUGROUP)->gr_mem when checking for group membership. * be more specific as to why 'su root' failed NOTE: If a user's primary group is SUGROUP, and they're not a member of SUGROUP in /etc/group, they will not be able to su.
30 lines
530 B
Makefile
30 lines
530 B
Makefile
# $NetBSD: Makefile,v 1.10 1997/07/02 05:42:11 lukem Exp $
|
|
# from: @(#)Makefile 8.1 (Berkeley) 7/19/93
|
|
|
|
PROG= su
|
|
BINOWN= root
|
|
BINMODE=4555
|
|
INSTALLFLAGS=-fschg
|
|
|
|
# Uncomment the following line to change the group that may su root to "sugroup"
|
|
#
|
|
#CFLAGS+=-DSUGROUP=\"sugroup\"
|
|
|
|
.include <bsd.prog.mk>
|
|
|
|
.ifdef SKEY
|
|
CFLAGS+=-DSKEY
|
|
LDADD+= -lcrypt -lskey
|
|
DPADD+= ${LIBCRYPT} ${LIBSKEY}
|
|
.endif
|
|
|
|
.ifdef KERBEROS
|
|
.ifdef AFS
|
|
LDADD+= -lkafs
|
|
DPADD+= ${LIBKAFS}
|
|
.endif
|
|
CFLAGS+=-DKERBEROS
|
|
LDADD+= -lkrb -ldes
|
|
DPADD+= ${LIBKRB} ${LIBDES}
|
|
.endif
|