[1565] in Kerberos-V5-bugs
beta5 ksu could autodetect getusershell(), but doesn't
daemon@ATHENA.MIT.EDU (Michael Shields)
Fri Jul 21 22:33:59 1995
Date: Sat, 22 Jul 95 01:35 GMT
From: shields@yage.tembel.org (Michael Shields)
To: krb5-bugs@MIT.EDU
This patch lets ksu automatically use getusershell() if it exists.
Index: clients/ksu/ChangeLog
===================================================================
RCS file: /usr/src/master/security/kerberos/src/clients/ksu/ChangeLog,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 ChangeLog
--- ChangeLog 1995/07/18 06:24:02 1.1.1.1
+++ ChangeLog 1995/07/19 08:22:43
@@ -1,3 +1,9 @@
+Wed Jul 19 08:20:52 1995 Michael Shields <shields@tembel.org>
+
+ * configure.in: Check for getusershell(3) automatically.
+ * main.c: Change HAS_GETUSERSHELL to HAVE_GETUSERSHELL.
+ * ksu.M: Update.
+
Thu Mar 16 20:50:32 1995 John Gilmore (gnu at toad.com)
* configure.in: Replace CHECK_STDARG with AC_CHECK_HEADERS.
Index: clients/ksu/configure.in
===================================================================
RCS file: /usr/src/master/security/kerberos/src/clients/ksu/configure.in,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 configure.in
--- configure.in 1995/07/18 06:24:04 1.1.1.1
+++ configure.in 1995/07/19 08:22:43
@@ -6,6 +6,7 @@
WITH_NETLIB
AC_CHECK_LIB(ndbm,main)
AC_CHECK_LIB(dbm,main)
+AC_CHECK_FUNCS(getusershell)
KRB_INCLUDE
WITH_KRB5ROOT
AC_CHECK_HEADERS(stdarg.h)
Index: clients/ksu/ksu.M
===================================================================
RCS file: /usr/src/master/security/kerberos/src/clients/ksu/ksu.M,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 ksu.M
--- ksu.M 1995/07/18 06:24:04 1.1.1.1
+++ ksu.M 1995/07/19 08:22:41
@@ -480,12 +480,13 @@
specifies a list of directories containing programs
that users are authorized to execute (via .k5users file).
.TP 10
-\fIHAS_GETUSERSHELL\fP
+\fIHAVE_GETUSERSHELL\fP
If the source user is non-root, ksu insists that
the target user's shell to be invoked
is a "legal shell". getusershell(3) is called to obtain
the names of "legal shells". Note that the target user's
-shell is obtained from the passwd file.
+shell is obtained from the passwd file. This flag is
+automatically #defined if you have getusershell(3).
.TP 10
SAMPLE CONFIGURATION:
KSU_OPTS = -DLOCAL_REALM='"ISI.EDU"' -DGET_TGT_VIA_PASSWD
Index: clients/ksu/main.c
===================================================================
RCS file: /usr/src/master/security/kerberos/src/clients/ksu/main.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 main.c
--- main.c 1995/07/18 06:24:05 1.1.1.1
+++ main.c 1995/07/19 08:22:43
@@ -702,7 +702,7 @@
shell = _DEF_CSH; /* default is cshell */
}
-#ifdef HAS_GETUSERSHELL
+#ifdef HAVE_GETUSERSHELL
/* insist that the target login uses a standard shell (root is omited) */
@@ -711,7 +711,7 @@
sweep_up(ksu_context, use_source_cache, cc_target);
exit(1);
}
-#endif /* HAS_GETUSERSHELL */
+#endif /* HAVE_GETUSERSHELL */
if (target_pwd->pw_uid){
@@ -847,7 +847,7 @@
}
}
-#ifdef HAS_GETUSERSHELL
+#ifdef HAVE_GETUSERSHELL
int standard_shell(sh)
char *sh;
@@ -861,7 +861,7 @@
return (0);
}
-#endif /* HAS_GETUSERSHELL */
+#endif /* HAVE_GETUSERSHELL */
char * ontty()
{
--
Shields.