summaryrefslogtreecommitdiff
path: root/usr/src/cmd/ssh
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/cmd/ssh')
-rw-r--r--usr/src/cmd/ssh/include/config.h3
-rw-r--r--usr/src/cmd/ssh/include/daemon.h21
-rw-r--r--usr/src/cmd/ssh/include/openbsd-compat.h1
-rw-r--r--usr/src/cmd/ssh/libopenbsd-compat/Makefile.com3
-rw-r--r--usr/src/cmd/ssh/libopenbsd-compat/common/daemon.c86
-rw-r--r--usr/src/cmd/ssh/libopenbsd-compat/common/llib-lopenbsd-compat3
-rw-r--r--usr/src/cmd/ssh/libssh/common/llib-lssh3
7 files changed, 3 insertions, 117 deletions
diff --git a/usr/src/cmd/ssh/include/config.h b/usr/src/cmd/ssh/include/config.h
index 978559f2d0..8bf9962434 100644
--- a/usr/src/cmd/ssh/include/config.h
+++ b/usr/src/cmd/ssh/include/config.h
@@ -279,9 +279,6 @@ extern "C" {
/* Define if your libraries define login() */
/* #undef HAVE_LOGIN */
-/* Define if your libraries define daemon() */
-/* #undef HAVE_DAEMON */
-
/* Define if your libraries define getpagesize() */
#define HAVE_GETPAGESIZE 1
diff --git a/usr/src/cmd/ssh/include/daemon.h b/usr/src/cmd/ssh/include/daemon.h
deleted file mode 100644
index fd22d587fd..0000000000
--- a/usr/src/cmd/ssh/include/daemon.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* $Id: daemon.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */
-
-#ifndef _DAEMON_H
-#define _DAEMON_H
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "config.h"
-#ifndef HAVE_DAEMON
-int daemon(int nochdir, int noclose);
-#endif /* !HAVE_DAEMON */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _DAEMON_H */
diff --git a/usr/src/cmd/ssh/include/openbsd-compat.h b/usr/src/cmd/ssh/include/openbsd-compat.h
index df2472da0e..aab8e36c62 100644
--- a/usr/src/cmd/ssh/include/openbsd-compat.h
+++ b/usr/src/cmd/ssh/include/openbsd-compat.h
@@ -44,7 +44,6 @@ extern "C" {
#include "strlcat.h"
#include "strmode.h"
#include "mktemp.h"
-#include "daemon.h"
#include "dirname.h"
#include "base64.h"
#include "sigact.h"
diff --git a/usr/src/cmd/ssh/libopenbsd-compat/Makefile.com b/usr/src/cmd/ssh/libopenbsd-compat/Makefile.com
index bfee4459c7..0b8ad1622b 100644
--- a/usr/src/cmd/ssh/libopenbsd-compat/Makefile.com
+++ b/usr/src/cmd/ssh/libopenbsd-compat/Makefile.com
@@ -18,7 +18,7 @@
#
# CDDL HEADER END
#
-# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# cmd/ssh/libopenbsd-compat/Makefile.com
@@ -41,7 +41,6 @@ OBJECTS = \
xmmap.o \
base64.o \
bindresvport.o \
- daemon.o \
dirname.o \
getcwd.o \
getgrouplist.o \
diff --git a/usr/src/cmd/ssh/libopenbsd-compat/common/daemon.c b/usr/src/cmd/ssh/libopenbsd-compat/common/daemon.c
deleted file mode 100644
index a7e44333f0..0000000000
--- a/usr/src/cmd/ssh/libopenbsd-compat/common/daemon.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include "includes.h"
-
-#ifndef HAVE_DAEMON
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: daemon.c,v 1.2 1996/08/19 08:22:13 tholo Exp $";
-#endif /* LIBC_SCCS and not lint */
-
-int
-daemon(nochdir, noclose)
- int nochdir, noclose;
-{
- int fd;
-
- switch (fork()) {
- case -1:
- return (-1);
- case 0:
-#ifdef HAVE_CYGWIN
- register_9x_service();
-#endif
- break;
- default:
-#ifdef HAVE_CYGWIN
- /*
- * This sleep avoids a race condition which kills the
- * child process if parent is started by a NT/W2K service.
- */
- sleep(1);
-#endif
- _exit(0);
- }
-
- if (setsid() == -1)
- return (-1);
-
- if (!nochdir)
- (void)chdir("/");
-
- if (!noclose && (fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) {
- (void)dup2(fd, STDIN_FILENO);
- (void)dup2(fd, STDOUT_FILENO);
- (void)dup2(fd, STDERR_FILENO);
- if (fd > 2)
- (void)close (fd);
- }
- return (0);
-}
-
-#endif /* !HAVE_DAEMON */
-
-
-#pragma ident "%Z%%M% %I% %E% SMI"
diff --git a/usr/src/cmd/ssh/libopenbsd-compat/common/llib-lopenbsd-compat b/usr/src/cmd/ssh/libopenbsd-compat/common/llib-lopenbsd-compat
index 7d6ae70cda..3c5912997f 100644
--- a/usr/src/cmd/ssh/libopenbsd-compat/common/llib-lopenbsd-compat
+++ b/usr/src/cmd/ssh/libopenbsd-compat/common/llib-lopenbsd-compat
@@ -21,7 +21,7 @@
*
* CDDL HEADER END
*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -38,7 +38,6 @@
#include <bsd-waitpid.h>
#include <config.h>
#include <crc32.h>
-#include <daemon.h>
#include <deattack.h>
#include <defines.h>
#include <dirname.h>
diff --git a/usr/src/cmd/ssh/libssh/common/llib-lssh b/usr/src/cmd/ssh/libssh/common/llib-lssh
index 3d8e8d5525..c44090abe6 100644
--- a/usr/src/cmd/ssh/libssh/common/llib-lssh
+++ b/usr/src/cmd/ssh/libssh/common/llib-lssh
@@ -21,7 +21,7 @@
*
* CDDL HEADER END
*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -53,7 +53,6 @@
#include <compress.h>
#include <config.h>
#include <crc32.h>
-#include <daemon.h>
#include <deattack.h>
#include <defines.h>
#include <dh.h>