summaryrefslogtreecommitdiffstats
path: root/crypto/heimdal
diff options
context:
space:
mode:
authorkensmith <kensmith@FreeBSD.org>2005-07-07 14:16:38 +0000
committerkensmith <kensmith@FreeBSD.org>2005-07-07 14:16:38 +0000
commit28b7f562fc678fae0db68e2f56a58b703f9a93dd (patch)
tree710b8b002dddd551dd4f24a9841dfdb5fa2d4ee6 /crypto/heimdal
parent0d69457df8ccd88ca9066d313c9d76c6bd22f148 (diff)
downloadFreeBSD-src-28b7f562fc678fae0db68e2f56a58b703f9a93dd.zip
FreeBSD-src-28b7f562fc678fae0db68e2f56a58b703f9a93dd.tar.gz
This is sort of an MFS. Peter made these changes to the RELENG_*
branches but missed HEAD. This patch extends his a little bit, setting it up via the Makefiles so that adding _FREEFALL_CONFIG to /etc/make.conf is the only thing needed to cluster-ize things (current setup also requires overriding CFLAGS). From Peter's commit to the RELENG_* branches: > Add the freebsd.org custer's source modifications under #ifdefs to aid > keeping things in sync. For ksu: > * install suid-root by default > * don't fall back to asking for a unix password (ie: be pure kerberos) > * allow custom user instances for things like www and not just root The Makefile tweaks will be MFC-ed, the rest is already done. MFC after: 3 days Approved by: re (dwhite)
Diffstat (limited to 'crypto/heimdal')
-rw-r--r--crypto/heimdal/appl/su/Makefile.am5
-rw-r--r--crypto/heimdal/appl/su/su.c20
2 files changed, 23 insertions, 2 deletions
diff --git a/crypto/heimdal/appl/su/Makefile.am b/crypto/heimdal/appl/su/Makefile.am
index 9cacaba..86e8533 100644
--- a/crypto/heimdal/appl/su/Makefile.am
+++ b/crypto/heimdal/appl/su/Makefile.am
@@ -1,9 +1,14 @@
# $Id: Makefile.am,v 1.7 2001/08/28 08:31:22 assar Exp $
+# $FreeBSD$
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
diff --git a/crypto/heimdal/appl/su/su.c b/crypto/heimdal/appl/su/su.c
index 79324e9..d44cf1b 100644
--- a/crypto/heimdal/appl/su/su.c
+++ b/crypto/heimdal/appl/su/su.c
@@ -30,6 +30,10 @@
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/*
+ * $FreeBSD$
+ */
+
#include <config.h>
RCSID("$Id: su.c,v 1.26.2.1 2003/05/06 12:06:44 joda Exp $");
@@ -193,12 +197,20 @@ 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(su_info->pw_uid != 0 || krb5_kuserok(context, p, su_info->pw_name)) {
+ if(
+#ifndef _FREEFALL_CONFIG
+ su_info->pw_uid != 0 ||
+#endif
+ krb5_kuserok(context, p, su_info->pw_name)) {
ret = krb5_cc_gen_new(context, &krb5_mcc_ops, &ccache);
if(ret) {
#if 1
@@ -430,7 +442,11 @@ main(int argc, char **argv)
ok = 4;
#endif
- if(ok == 0 && login_info->pw_uid && verify_unix(su_info) != 0) {
+ if(ok == 0 && login_info->pw_uid
+#ifndef _FREEFALL_CONFIG
+ && verify_unix(su_info) != 0
+#endif
+ ) {
printf("Sorry!\n");
exit(1);
}
OpenPOWER on IntegriCloud