[FreeNX-kNX] [Doc] nxserver-login-helper
Fabian Franz
FabianFranz at gmx.de
Thu Jul 5 16:29:33 UTC 2007
Hi,
here is the first component. This one has no i18n support, so you can only comment on the comments.
You can either grab the version from SVN (freenx-redesign/server/compatibility/) and send a diff (which I would prefer) or reply to this mail:
My comments will be the not commented ones ;-)
# nxnode-login: spawns and controls ssh|su for backwards compatibility.
#
# Copyright (c) 2004-2007 by Fabian Franz.
#
# License: GPL, version 2
#
# Environment variables used:
#
# @env COMMAND_SSH Command for spawning ssh.
# @env COMMAND_NETCAT Command for spawning netcat.
# @env NODE_PUBLICKEY Public key for test-nx mode.
# @env NODE_PASSWORD Password for ssh|su mode.
#
# Used external programs:
#
# @ext COMMAND_SSH OpenSSH SSH client (remote login program)
# @ext su Change user ID or become super-user
# @ext cat Concatenate files and print on the standard output (coreutils)
# @ext cut Remove sections from each line of files (coreutils)
# @ext tr Translate or delete characters (coreutils)
# @ext COMMAND_NETCAT TCP/IP swiss army knife.
#
# Exit codes used:
#
# @exit 0 Success
# @exit 1 Authentication failed.
# @exit 2 Redirection via netcat failed.
#
# Known protocol from server:
#
# @proto "hello NXSERVER - Version x.y.z" Banner used to determine successful connection.
# @proto "NX> 105" Prompt to send "quit" to.
# @proto "NX> 999 Bye." We have successfully logged out.
# @proto "NX> 103 Welcome to: <server> user: <user>" Used to determine successful login.
#
# Accepted protocol extensions from nxserver / nxnode:
#
# @protoext * "FREENX> 100 Switch: <host>:<port>" Spawns netcat to enable SSL tunneling mode.
#
# Used protocol extensions to nxclient:
#
# @protoext 100 "FREENX> 400 Redirection failed: $error" Thrown when redirecting netcat process fails.
#
# Parameters used:
#
# @param 1 "operation mode" - can be ssh or su or test-nx
# @param 2 username - to be used username## @param 3 "ssh port" - port provided to ssh command line
# @param 4 executable - program to be executed as <username>
# @param 5 parameters - parameters provided for <executable>
#
# Syntax used:
#
# nxserver-login-helper {ssh|su|test-nx} user ssh-port executable parameters
#
# SVN: $Id: nxserver-login-helper 348 2007-07-05 16:19:34Z fabianx $
#
#
# Special test-nx instruction for nxsetup
#
#
# Log the user in via the supplied method.
#
# Use the spawn id as fd and send everything
# received from nxserver to stderr.
# we do not need fd in here anymore
# redirection failed
# all okay
# authentication failed
As you can see all programs will be fully documented using some language, that is a bit like Doxygen, including _all_
- used programs
- used components
- used exit codes
- spoken protocol
So basically all external interfaces used in any way.
Enjoy spellchecking and making the comments more nice if needed.
cu
Fabian
More information about the FreeNX-kNX
mailing list