summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorThomas Doerfler <Thomas.Doerfler@embedded-brains.de>2009-04-14 08:50:03 +0000
committerThomas Doerfler <Thomas.Doerfler@embedded-brains.de>2009-04-14 08:50:03 +0000
commitcbd1e8799f8bcd3e083ba5a1affa8267461f256a (patch)
treec752009784973066cca83c8e10b1cc80bd77cee9 /cpukit
parentFixed return codes of open handler. (diff)
downloadrtems-cbd1e8799f8bcd3e083ba5a1affa8267461f256a.tar.bz2
adapt copyright statements
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/ChangeLog5
-rw-r--r--cpukit/libmisc/shell/login_check.c14
-rw-r--r--cpukit/libmisc/shell/login_prompt.c55
-rw-r--r--cpukit/libmisc/shell/shell.c40
-rw-r--r--cpukit/libmisc/shell/shell.h60
-rw-r--r--cpukit/telnetd/check_passwd.c5
-rw-r--r--cpukit/telnetd/telnetd.c5
-rw-r--r--cpukit/telnetd/telnetd.h9
8 files changed, 128 insertions, 65 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index ec2adbb308..90fb4aaca8 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,3 +1,8 @@
+2009-04-03 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libnetworking/lib/ftpfs.c: Fixed return codes of open handler.
+ Request reply after data write connection close.
+
2009-04-02 Ralf Corsépius <ralfcorsepius@rtems.org>
* aclocal/check-rtems-debug.m4: Add missing ','.
diff --git a/cpukit/libmisc/shell/login_check.c b/cpukit/libmisc/shell/login_check.c
index 066ab16b61..969ae942a6 100644
--- a/cpukit/libmisc/shell/login_check.c
+++ b/cpukit/libmisc/shell/login_check.c
@@ -1,20 +1,21 @@
/**
* @file
*
- * @author Sebastian Huber <sebastian.huber@embedded-brains.de>
- *
* @brief Shell login check function.
*/
/*
- * Copyright (c) 2009
- * Embedded Brains GmbH
+ * Copyright (c) 2009 embedded brains GmbH and others.
+ *
+ * embedded brains GmbH
* Obere Lagerstr. 30
* D-82178 Puchheim
* Germany
- * rtems@embedded-brains.de
+ * <rtems@embedded-brains.de>
+ *
+ * Based on work from Chris Johns and Fernando Ruiz.
*
- * Based on work from Chris Johns, Fernando Ruiz and Till Straumann.
+ * Derived from file "cpukit/libmisc/shell/shell.c".
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -25,7 +26,6 @@
#include <unistd.h>
#include <pwd.h>
-#include <rtems/login.h>
#include <rtems/shell.h>
#include <rtems/userenv.h>
diff --git a/cpukit/libmisc/shell/login_prompt.c b/cpukit/libmisc/shell/login_prompt.c
index fd347fb728..5701a579c2 100644
--- a/cpukit/libmisc/shell/login_prompt.c
+++ b/cpukit/libmisc/shell/login_prompt.c
@@ -1,13 +1,55 @@
/**
* @file
*
- * @author Sebastian Huber <sebastian.huber@embedded-brains.de>
- *
* @brief Shell login prompt functions.
*/
/*
- * Copyright (c) 2009
+ * Authorship
+ * ----------
+ * Parts of this software was created by
+ * Till Straumann <strauman@slac.stanford.edu>, 2003-2007
+ * Stanford Linear Accelerator Center, Stanford University.
+ *
+ * Acknowledgement of sponsorship
+ * ------------------------------
+ * Parts of this software was produced by
+ * the Stanford Linear Accelerator Center, Stanford University,
+ * under Contract DE-AC03-76SFO0515 with the Department of Energy.
+ *
+ * Government disclaimer of liability
+ * ----------------------------------
+ * Neither the United States nor the United States Department of Energy,
+ * nor any of their employees, makes any warranty, express or implied, or
+ * assumes any legal liability or responsibility for the accuracy,
+ * completeness, or usefulness of any data, apparatus, product, or process
+ * disclosed, or represents that its use would not infringe privately owned
+ * rights.
+ *
+ * Stanford disclaimer of liability
+ * --------------------------------
+ * Stanford University makes no representations or warranties, express or
+ * implied, nor assumes any liability for the use of this software.
+ *
+ * Stanford disclaimer of copyright
+ * --------------------------------
+ * Stanford University, owner of the copyright, hereby disclaims its
+ * copyright and all other rights in this software. Hence, anyone may
+ * freely use it for any purpose without restriction.
+ *
+ * Maintenance of notices
+ * ----------------------
+ * In the interest of clarity regarding the origin and status of this
+ * SLAC software, this and all the preceding Stanford University notices
+ * are to remain affixed to any copy or derivative of this software made
+ * or distributed by the recipient and are to be affixed to any copy of
+ * software made or distributed by the recipient that contains a copy or
+ * derivative of this software.
+ *
+ * ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
+ *
+ * Copyright (c) 2009 embedded brains GmbH and others.
+ *
* embedded brains GmbH
* Obere Lagerstr. 30
* D-82178 Puchheim
@@ -16,6 +58,9 @@
*
* Based on work from Chris Johns, Fernando Ruiz and Till Straumann.
*
+ * Derived from files "cpukit/libmisc/shell/shell.c" and
+ * "cpukit/telnetd/check_passwd.c".
+ *
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
@@ -26,7 +71,7 @@
#include <unistd.h>
#include <ctype.h>
-#include <rtems/login.h>
+#include <rtems/shell.h>
static int rtems_shell_discard( int c, FILE *stream)
{
@@ -110,7 +155,7 @@ bool rtems_shell_login_prompt(
FILE *in,
FILE *out,
const char *device,
- rtems_login_check check
+ rtems_shell_login_check_t check
)
{
int fd_in = fileno( in);
diff --git a/cpukit/libmisc/shell/shell.c b/cpukit/libmisc/shell/shell.c
index 4561f3dd45..25c2e18269 100644
--- a/cpukit/libmisc/shell/shell.c
+++ b/cpukit/libmisc/shell/shell.c
@@ -846,19 +846,19 @@ bool rtems_shell_main_loop(
}
/* ----------------------------------------------- */
-static rtems_status_code rtems_shell_run (
- const char *task_name,
- size_t task_stacksize,
- rtems_task_priority task_priority,
- const char *devname,
- bool forever,
- bool wait,
- const char *input,
- const char *output,
- bool output_append,
- rtems_id wake_on_end,
- bool echo,
- rtems_login_check login_check
+static rtems_status_code rtems_shell_run (
+ const char *task_name,
+ size_t task_stacksize,
+ rtems_task_priority task_priority,
+ const char *devname,
+ bool forever,
+ bool wait,
+ const char *input,
+ const char *output,
+ bool output_append,
+ rtems_id wake_on_end,
+ bool echo,
+ rtems_shell_login_check_t login_check
)
{
rtems_id task_id;
@@ -920,13 +920,13 @@ static rtems_status_code rtems_shell_run (
}
rtems_status_code rtems_shell_init(
- const char *task_name,
- size_t task_stacksize,
- rtems_task_priority task_priority,
- const char *devname,
- bool forever,
- bool wait,
- rtems_login_check login_check
+ const char *task_name,
+ size_t task_stacksize,
+ rtems_task_priority task_priority,
+ const char *devname,
+ bool forever,
+ bool wait,
+ rtems_shell_login_check_t login_check
)
{
rtems_id to_wake = RTEMS_ID_NONE;
diff --git a/cpukit/libmisc/shell/shell.h b/cpukit/libmisc/shell/shell.h
index 0df4cbec2b..333b03d977 100644
--- a/cpukit/libmisc/shell/shell.h
+++ b/cpukit/libmisc/shell/shell.h
@@ -24,7 +24,6 @@
#include <termios.h>
#include <rtems/fs.h>
#include <rtems/libio.h>
-#include <rtems/login.h>
#ifdef __cplusplus
extern "C" {
@@ -55,6 +54,23 @@ extern "C" {
#define RTEMS_SHELL_KEYS_F9 (16)
#define RTEMS_SHELL_KEYS_F10 (17)
+typedef bool (*rtems_shell_login_check_t)(
+ const char * /* user */,
+ const char * /* passphrase */
+);
+
+bool rtems_shell_login_prompt(
+ FILE *in,
+ FILE *out,
+ const char *device,
+ rtems_shell_login_check_t check
+);
+
+bool rtems_shell_login_check(
+ const char *user,
+ const char *passphrase
+);
+
typedef int (*rtems_shell_command_t)(int argc, char **argv);
struct rtems_shell_cmd_tt;
@@ -133,13 +149,13 @@ int rtems_shell_script_file(
*
*/
rtems_status_code rtems_shell_init(
- const char *task_name,
- size_t task_stacksize, /* 0 default*/
- rtems_task_priority task_priority,
- const char *devname,
- bool forever,
- bool wait,
- rtems_login_check login_check
+ const char *task_name,
+ size_t task_stacksize,
+ rtems_task_priority task_priority,
+ const char *devname,
+ bool forever,
+ bool wait,
+ rtems_shell_login_check_t login_check
);
/**
@@ -172,21 +188,21 @@ rtems_status_code rtems_shell_script(
*/
int rtems_shell_str2int(const char * s);
-typedef struct {
- rtems_name magic; /* 'S','E','N','V': Shell Environment */
- const char *devname;
- const char *taskname;
+typedef struct {
+ rtems_name magic; /* 'S','E','N','V': Shell Environment */
+ const char *devname;
+ const char *taskname;
/* user extensions */
- bool exit_shell; /* logout */
- bool forever; /* repeat login */
- int errorlevel;
- bool echo;
- char cwd[256];
- const char *input;
- const char *output;
- bool output_append;
- rtems_id wake_on_end;
- rtems_login_check login_check;
+ bool exit_shell; /* logout */
+ bool forever; /* repeat login */
+ int errorlevel;
+ bool echo;
+ char cwd [256];
+ const char *input;
+ const char *output;
+ bool output_append;
+ rtems_id wake_on_end;
+ rtems_shell_login_check_t login_check;
} rtems_shell_env_t;
bool rtems_shell_main_loop(
diff --git a/cpukit/telnetd/check_passwd.c b/cpukit/telnetd/check_passwd.c
index 46059e8936..f541a21b5d 100644
--- a/cpukit/telnetd/check_passwd.c
+++ b/cpukit/telnetd/check_passwd.c
@@ -44,15 +44,14 @@
*
* ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
*
- * Copyright (c) 2009
+ * Copyright (c) 2009 embedded brains GmbH and others.
+ *
* embedded brains GmbH
* Obere Lagerstr. 30
* D-82178 Puchheim
* Germany
* <rtems@embedded-brains.de>
*
- * Modified by Sebastian Huber <sebastian.huber@embedded-brains.de>.
- *
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
diff --git a/cpukit/telnetd/telnetd.c b/cpukit/telnetd/telnetd.c
index 772b62af08..ec6caabc6f 100644
--- a/cpukit/telnetd/telnetd.c
+++ b/cpukit/telnetd/telnetd.c
@@ -23,15 +23,14 @@
* possible to have 'telnetd' run an arbitrary 'shell'
* program.
*
- * Copyright (c) 2009
+ * Copyright (c) 2009 embedded brains GmbH and others.
+ *
* embedded brains GmbH
* Obere Lagerstr. 30
* D-82178 Puchheim
* Germany
* <rtems@embedded-brains.de>
*
- * Modified by Sebastian Huber <sebastian.huber@embedded-brains.de>.
- *
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
diff --git a/cpukit/telnetd/telnetd.h b/cpukit/telnetd/telnetd.h
index cb1ee6aa44..0e9e4fde7d 100644
--- a/cpukit/telnetd/telnetd.h
+++ b/cpukit/telnetd/telnetd.h
@@ -3,15 +3,14 @@
* May 2001
* Reworked by Till Straumann and .h overhauled by Joel Sherrill.
*
- * Copyright (c) 2009
+ * Copyright (c) 2009 embedded brains GmbH and others.
+ *
* embedded brains GmbH
* Obere Lagerstr. 30
* D-82178 Puchheim
* Germany
* <rtems@embedded-brains.de>
*
- * Modified by Sebastian Huber <sebastian.huber@embedded-brains.de>.
- *
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
@@ -23,7 +22,7 @@
#define _RTEMS_TELNETD_H
#include <rtems.h>
-#include <rtems/login.h>
+#include <rtems/shell.h>
#ifdef __cplusplus
extern "C" {
@@ -77,7 +76,7 @@ typedef struct {
*
* Method used for login checks. Use @c NULL to disable a login check.
*/
- rtems_login_check login_check;
+ rtems_shell_login_check_t login_check;
/**
* @brief Keep standard IO of the caller.