summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMark Eichin <eichin@mit.edu>1994-07-26 04:32:06 +0000
committerMark Eichin <eichin@mit.edu>1994-07-26 04:32:06 +0000
commit0d445e49a2de8b7de8950e5fd9b1271c82e4d744 (patch)
treecb591db03b6fb0bd471e46d424d4c804d50dcbcf /src
parent671a7b67c5b8eb7381c9f0fa865bed349dae4bb4 (diff)
downloadkrb5-0d445e49a2de8b7de8950e5fd9b1271c82e4d744.tar.gz
krb5-0d445e49a2de8b7de8950e5fd9b1271c82e4d744.tar.xz
krb5-0d445e49a2de8b7de8950e5fd9b1271c82e4d744.zip
* configure.in: Added tests for HAVE_SETOWN, HAVE_SYS_FILIO_H.
* krlogin.c, krsh.c, krshd.c, krlogin.c, krlogind.c: use them. Still doesn't build on Solaris, but it's a start. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4014 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r--src/appl/bsd/ChangeLog5
-rw-r--r--src/appl/bsd/configure.in6
-rw-r--r--src/appl/bsd/kcmd.c6
-rw-r--r--src/appl/bsd/krlogin.c4
-rw-r--r--src/appl/bsd/krlogind.c5
-rw-r--r--src/appl/bsd/krsh.c5
-rw-r--r--src/appl/bsd/krshd.c5
7 files changed, 30 insertions, 6 deletions
diff --git a/src/appl/bsd/ChangeLog b/src/appl/bsd/ChangeLog
index f2de440189..d2bc139d45 100644
--- a/src/appl/bsd/ChangeLog
+++ b/src/appl/bsd/ChangeLog
@@ -1,3 +1,8 @@
+Tue Jul 26 00:25:57 1994 Mark Eichin (eichin@cygnus.com)
+
+ * configure.in: Added tests for HAVE_SETOWN, HAVE_SYS_FILIO_H.
+ * krlogin.c, krsh.c, krshd.c, krlogin.c, krlogind.c: use them.
+
Sat Jul 23 08:48:50 1994 Tom Yu (tlyu@dragons-lair)
* kcmd.c:
diff --git a/src/appl/bsd/configure.in b/src/appl/bsd/configure.in
index 385d1b446c..bbba8b8bdf 100644
--- a/src/appl/bsd/configure.in
+++ b/src/appl/bsd/configure.in
@@ -8,6 +8,12 @@ AC_PROG_INSTALL
AC_HAVE_LIBRARY(socket)
AC_HAVE_LIBRARY(nsl)
AC_FUNC_CHECK(utimes,AC_DEFINE(HAS_UTIMES))
+AC_HAVE_HEADERS(sys/filio.h)
+AC_COMPILE_CHECK([F_SETOWN],
+[#include <sys/types.h>
+#include <fcntl.h>],
+[1+F_SETOWN;],
+AC_DEFINE(HAVE_SETOWN))
KRB_INCLUDE
WITH_KRB5ROOT
WITH_KRB4
diff --git a/src/appl/bsd/kcmd.c b/src/appl/bsd/kcmd.c
index bd72f4fdb1..4402b19276 100644
--- a/src/appl/bsd/kcmd.c
+++ b/src/appl/bsd/kcmd.c
@@ -181,11 +181,9 @@ kcmd(sock, ahost, rport, locuser, remuser, cmd, fd2p, service, realm,
krb5_free_creds(ret_cred);
return (-1);
}
-#if defined (hpux) || defined (CRAY) /*hpux does not handle async
- io thus setown is disabled */
-#else
+#ifdef HAVE_SETOWN
fcntl(s, F_SETOWN, pid);
-#endif /* hpux */
+#endif
sin.sin_family = hp->h_addrtype;
memcpy((caddr_t)&sin.sin_addr,hp->h_addr, hp->h_length);
sin.sin_port = rport;
diff --git a/src/appl/bsd/krlogin.c b/src/appl/bsd/krlogin.c
index 581e0b8e34..a9f02be62e 100644
--- a/src/appl/bsd/krlogin.c
+++ b/src/appl/bsd/krlogin.c
@@ -503,7 +503,7 @@ main(argc, argv)
it to the reader, and the oob() processing code in the reader will
work properly even if it is called when no oob() data is present.
*/
-#ifndef SYSV
+#ifdef HAVE_SETOWN
(void) fcntl(rem, F_SETOWN, getpid());
#endif
if (options & SO_DEBUG &&
@@ -1059,7 +1059,7 @@ reader(oldmask)
(void) signal(SIGTTOU, SIG_IGN);
(void) signal(SIGURG, oob);
ppid = getppid();
-#ifndef SYSV
+#ifdef HAVE_SETOWN
(void) fcntl(rem, F_SETOWN, pid);
#endif
(void) setjmp(rcvtop);
diff --git a/src/appl/bsd/krlogind.c b/src/appl/bsd/krlogind.c
index c801455d2c..ce5ff5aac5 100644
--- a/src/appl/bsd/krlogind.c
+++ b/src/appl/bsd/krlogind.c
@@ -155,6 +155,11 @@ static char sccsid[] = "@(#)rlogind.c 5.17 (Berkeley) 8/31/88";
#include <sys/param.h>
#include <utmp.h>
+#ifdef HAVE_SYS_FILIO_H
+/* get FIONBIO from sys/filio.h, so what if it is a compatibility feature */
+#include <sys/filio.h>
+#endif
+
#ifdef NO_WINSIZE
struct winsize {
unsigned short ws_row, ws_col;
diff --git a/src/appl/bsd/krsh.c b/src/appl/bsd/krsh.c
index 8551bd32e2..9dace665e6 100644
--- a/src/appl/bsd/krsh.c
+++ b/src/appl/bsd/krsh.c
@@ -49,6 +49,11 @@ static char sccsid[] = "@(#)rsh.c 5.7 (Berkeley) 9/20/88";
#include <pwd.h>
#include <netdb.h>
+#ifdef HAVE_SYS_FILIO_H
+/* get FIONBIO from sys/filio.h, so what if it is a compatibility feature */
+#include <sys/filio.h>
+#endif
+
#ifdef KERBEROS
#include <krb5/krb5.h>
#include <krb5/asn1.h>
diff --git a/src/appl/bsd/krshd.c b/src/appl/bsd/krshd.c
index a000a7a0c2..5aabbb54ee 100644
--- a/src/appl/bsd/krshd.c
+++ b/src/appl/bsd/krshd.c
@@ -150,6 +150,11 @@ static char sccsid[] = "@(#)rshd.c 5.12 (Berkeley) 9/12/88";
#include <syslog.h>
+#ifdef HAVE_SYS_FILIO_H
+/* get FIONBIO from sys/filio.h, so what if it is a compatibility feature */
+#include <sys/filio.h>
+#endif
+
#ifdef KERBEROS
#include <krb5/krb5.h>
#include <krb5/asn1.h>