Compare commits
45 Commits
master
...
1f032a1d43
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1f032a1d43 | ||
|
|
ec32733dab | ||
|
|
6aec044c52 | ||
|
|
97ac40f7a1 | ||
|
|
aa60166da6 | ||
|
|
362be76b7c | ||
|
|
1446e495dc | ||
|
|
7d4a2f1b99 | ||
|
|
d763467440 | ||
|
|
7d71436bb3 | ||
|
|
edd63ea3fd | ||
|
|
feb12eb0c5 | ||
|
|
5a69a9532a | ||
|
|
b5d0fc983e | ||
|
|
866ff1688c | ||
|
|
bfdfd87ec3 | ||
|
|
bf9f9de5d4 | ||
|
|
39bf88dd3b | ||
|
|
43cb959dc2 | ||
|
|
ee57cb486d | ||
|
|
3351044f68 | ||
|
|
af08efb6ad | ||
|
|
349dba63d6 | ||
|
|
a4dd6abc12 | ||
|
|
0e69a47827 | ||
|
|
94e2ccc6e4 | ||
|
|
7ee884fe38 | ||
|
|
3f0fd53a33 | ||
|
|
b676c8f5ce | ||
|
|
a4dfee99e2 | ||
|
|
8e7c97ff7f | ||
|
|
b7206fc83a | ||
|
|
2ee152f543 | ||
|
|
829be767c9 | ||
|
|
a4d3ded77e | ||
|
|
0d3bbdec8e | ||
|
|
ed3acbe2d4 | ||
|
|
9670c4e749 | ||
|
|
a3f7460150 | ||
|
|
476c51ac10 | ||
|
|
5bbe69ac5f | ||
|
|
331fb1a746 | ||
|
|
bb9392b9b0 | ||
|
|
24f48e1f96 | ||
|
|
0a31d87196 |
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
error.log
|
||||
119
CMakeLists.txt
Normal file
@@ -0,0 +1,119 @@
|
||||
#################################
|
||||
# Project
|
||||
##############
|
||||
|
||||
#################################
|
||||
# Dependencies
|
||||
##############
|
||||
|
||||
#################################
|
||||
# Generated files
|
||||
##############
|
||||
|
||||
# systemd itself is detected by the top-level systemdservice.cmake.
|
||||
# This webui submodule only consumes WITH_SYSTEMD and SYSTEMD_SERVICES_INSTALL_DIR.
|
||||
if(NOT DEFINED MARS_NWE_SYSTEMD_SERVICE)
|
||||
set(MARS_NWE_SYSTEMD_SERVICE "mars-nwe-serv.service" CACHE STRING "MARS_NWE systemd service name")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED SYSTEMCTL_EXECUTABLE)
|
||||
find_program(SYSTEMCTL_EXECUTABLE systemctl)
|
||||
endif()
|
||||
if(NOT SYSTEMCTL_EXECUTABLE)
|
||||
set(SYSTEMCTL_EXECUTABLE "/usr/bin/systemctl")
|
||||
endif()
|
||||
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/config.h"
|
||||
IMMEDIATE @ONLY)
|
||||
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/smart.conf.cmake"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/smart.conf"
|
||||
IMMEDIATE @ONLY)
|
||||
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/smart.cmake"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/smart"
|
||||
IMMEDIATE @ONLY)
|
||||
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/control.cmake"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/control"
|
||||
IMMEDIATE @ONLY)
|
||||
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/static/start.html.cmake"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/static/start.html"
|
||||
IMMEDIATE @ONLY)
|
||||
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/mars-nwe-webui.service.cmake"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/mars-nwe-webui.service"
|
||||
@ONLY
|
||||
)
|
||||
|
||||
|
||||
#################################
|
||||
# Compiler Switches
|
||||
##############
|
||||
|
||||
INCLUDE_DIRECTORIES(
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/include
|
||||
${CMAKE_BINARY_DIR}/include
|
||||
)
|
||||
|
||||
#################################
|
||||
# Source Files
|
||||
##############
|
||||
|
||||
add_executable(nwwebui nwwebui.c)
|
||||
add_executable(check_login check_login.c)
|
||||
|
||||
#################################
|
||||
# Linking
|
||||
##############
|
||||
|
||||
target_link_libraries(nwwebui
|
||||
OpenSSL::SSL
|
||||
OpenSSL::Crypto
|
||||
)
|
||||
|
||||
target_link_libraries(check_login
|
||||
${PAM_LIBRARY}
|
||||
${DL_LIBRARY}
|
||||
)
|
||||
|
||||
#################################
|
||||
# Install Files
|
||||
##############
|
||||
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/smart.conf DESTINATION ${MARS_NWE_INSTALL_FULL_CONFDIR})
|
||||
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/smart DESTINATION ${MARS_NWE_INSTALL_FULL_LIBEXECDIR})
|
||||
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/control DESTINATION ${MARS_NWE_INSTALL_FULL_LIBEXECDIR})
|
||||
install(FILES smart.pamd DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/pam.d RENAME smart)
|
||||
|
||||
install(PROGRAMS apply.pl DESTINATION ${MARS_NWE_INSTALL_FULL_LIBEXECDIR})
|
||||
install(PROGRAMS readconfig.pl DESTINATION ${MARS_NWE_INSTALL_FULL_LIBEXECDIR})
|
||||
install(PROGRAMS settings.pl DESTINATION ${MARS_NWE_INSTALL_FULL_LIBEXECDIR})
|
||||
install(PROGRAMS static.pl DESTINATION ${MARS_NWE_INSTALL_FULL_LIBEXECDIR})
|
||||
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/static/start.html DESTINATION ${MARS_NWE_INSTALL_FULL_LIBEXECDIR}/static)
|
||||
install(FILES static/menu.html DESTINATION ${MARS_NWE_INSTALL_FULL_LIBEXECDIR}/static)
|
||||
install(FILES static/smart_icon.jpg DESTINATION ${MARS_NWE_INSTALL_FULL_LIBEXECDIR}/static)
|
||||
install(FILES static/smart.jpg DESTINATION ${MARS_NWE_INSTALL_FULL_LIBEXECDIR}/static)
|
||||
install(FILES static/favicon.ico DESTINATION ${MARS_NWE_INSTALL_FULL_LIBEXECDIR}/static)
|
||||
install(FILES static/favicon-32x32.png DESTINATION ${MARS_NWE_INSTALL_FULL_LIBEXECDIR}/static)
|
||||
install(FILES static/favicon-16x16.png DESTINATION ${MARS_NWE_INSTALL_FULL_LIBEXECDIR}/static)
|
||||
install(FILES static/apple-touch-icon.png DESTINATION ${MARS_NWE_INSTALL_FULL_LIBEXECDIR}/static)
|
||||
|
||||
if(WITH_SYSTEMD)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/mars-nwe-webui.service DESTINATION ${SYSTEMD_SERVICES_INSTALL_DIR})
|
||||
endif()
|
||||
|
||||
install(TARGETS check_login DESTINATION ${MARS_NWE_INSTALL_FULL_LIBEXECDIR})
|
||||
|
||||
install(TARGETS nwwebui DESTINATION ${CMAKE_INSTALL_SBINDIR})
|
||||
|
||||
276
README.md
Normal file
@@ -0,0 +1,276 @@
|
||||
# SMArT
|
||||
|
||||
SMArT is the web-based configuration interface for **MARS_NWE**, a Novell NetWare 3.x emulator for Linux and FreeBSD.
|
||||
|
||||
In the current setup, this repository is no longer treated as a standalone component only. It is integrated into the main `mars_nwe` project as a **Git submodule** and is therefore included in the normal **mars_nwe release** process.
|
||||
|
||||
## Project status and integration
|
||||
|
||||
This repository is intended to be embedded into the main `mars_nwe` Git repository:
|
||||
|
||||
- Main project: `mars_nwe`
|
||||
- Submodule role: provides the SMArT web UI and helper tools
|
||||
- Release model: shipped as part of the integrated **MARS_NWE** release, not as a separate end-user release artifact
|
||||
|
||||
The build and install rules show that the web UI binaries, Perl helpers, configuration, static assets, and PAM file are installed as part of the overall build and installation flow.
|
||||
|
||||
## Architecture overview
|
||||
|
||||
SMArT consists of two main parts:
|
||||
|
||||
1. **Perl-based application logic** for configuration pages and helper scripts
|
||||
2. **`nwwebui` service** as the web frontend that exposes the application over HTTP and HTTPS
|
||||
|
||||
The current implementation adds a dedicated `nwwebui` service that can serve the application directly over:
|
||||
|
||||
- **HTTP on port 9080**
|
||||
- **HTTPS on port 9443**
|
||||
|
||||
The service supports TLS via OpenSSL and can run both listeners in parallel. HTTPS is the preferred mode because authentication happens more securely over an encrypted connection, while plain HTTP may still be useful for testing or trusted internal environments.
|
||||
|
||||
## Security model
|
||||
|
||||
SMArT uses PAM-based authentication through the `check_login` helper. The supplied PAM policy is a standard `pam_unix` stack for authentication, account, password, and session handling. During installation with **MARS_NWE**, this file is installed automatically as:
|
||||
|
||||
- `/etc/pam.d/smart`
|
||||
|
||||
That means no manual PAM file deployment is normally required when SMArT is installed through the integrated `mars_nwe` package or release.
|
||||
|
||||
## Installed components
|
||||
|
||||
The install rules include the following relevant components.
|
||||
|
||||
### Binaries
|
||||
|
||||
- `nwwebui` – dedicated web service frontend
|
||||
- `check_login` – PAM authentication helper
|
||||
|
||||
### Perl helpers
|
||||
|
||||
- `smart`
|
||||
- `apply.pl`
|
||||
- `readconfig.pl`
|
||||
- `settings.pl`
|
||||
- `static.pl`
|
||||
|
||||
### Configuration and assets
|
||||
|
||||
- `smart.conf`
|
||||
- static HTML and image assets for the web UI
|
||||
- optional `mars-nwe-webui.service` systemd unit
|
||||
- PAM file installed as `/etc/pam.d/smart`
|
||||
|
||||
These components are all installed by the build system as part of the same integrated installation target.
|
||||
|
||||
## Typical runtime paths
|
||||
|
||||
The original templates use CMake placeholders. For documentation, the following standard example paths can be used in a typical Linux installation:
|
||||
|
||||
- Main MARS_NWE config directory: `/etc/mars_nwe`
|
||||
- SMArT config file: `/etc/mars_nwe/smart.conf`
|
||||
- Main MARS_NWE server config: `/etc/mars_nwe/nwserv.conf`
|
||||
- Helper binaries and scripts: `/usr/libexec/mars_nwe`
|
||||
- Static SMArT assets: `/usr/libexec/mars_nwe/static`
|
||||
- Log directory: `/var/log/mars_nwe`
|
||||
- PID directory: `/run/mars_nwe`
|
||||
- TLS certificate: `/etc/mars_nwe/server.crt`
|
||||
- TLS private key: `/etc/mars_nwe/server.key`
|
||||
- PAM file: `/etc/pam.d/smart`
|
||||
|
||||
These values are sensible standard defaults for documentation. Packaging may still adjust them depending on the target distribution.
|
||||
|
||||
## The `smart.conf` file
|
||||
|
||||
The `smart.conf` file controls both the SMArT frontend behavior and the `nwwebui` listener settings.
|
||||
|
||||
A documented example with standard installation paths is shown below:
|
||||
|
||||
```perl
|
||||
# SMArT / nwwebui configuration file
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# UI colors
|
||||
# ------------------------------------------------------------
|
||||
$COLOR_BACK = "#F0F0FF";
|
||||
$COLOR_HEAD_BACK = "#C0C0FF";
|
||||
$COLOR_HEAD_FORE = "#000000";
|
||||
$COLOR_SUBH_BACK = "#D0D0FF";
|
||||
$COLOR_SUBH_FORE = "#000000";
|
||||
$COLOR_TEXT_BACK = "#E0E0FF";
|
||||
$COLOR_TEXT_FORE = "#000000";
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Main MARS_NWE configuration
|
||||
# ------------------------------------------------------------
|
||||
$mars_config = '/etc/mars_nwe/nwserv.conf';
|
||||
$nonroot_user = 'nobody';
|
||||
$smart_compact_nwservconf = 0;
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# SMArT internal file layout
|
||||
# ------------------------------------------------------------
|
||||
$smart_conf_path = '/etc/mars_nwe/smart.conf';
|
||||
$smart_nwclient_path = '/etc/mars_nwe/.nwclient';
|
||||
$smart_static_dir = '/usr/libexec/mars_nwe/static';
|
||||
$smart_log_path = '/var/log/mars_nwe/smart.log';
|
||||
$smart_check_login = '/usr/libexec/mars_nwe/check_login';
|
||||
|
||||
# Optional override, usually not needed
|
||||
# $smart_perl_path = '/usr/libexec/mars_nwe/smart';
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# nwwebui listener settings
|
||||
# ------------------------------------------------------------
|
||||
$nw_bind_ip = '0.0.0.0';
|
||||
$nw_log_level = 1;
|
||||
$nw_daemonize = 0;
|
||||
$nw_pid_file = '/run/mars_nwe/nwwebui.pid';
|
||||
$nw_log_file = '/var/log/mars_nwe/nwwebui.log';
|
||||
|
||||
$nw_ssl_enable = 0;
|
||||
$nw_http_port = 9080;
|
||||
$nw_https_port = 9443;
|
||||
|
||||
$nw_cert_file = '/etc/mars_nwe/server.crt';
|
||||
$nw_key_file = '/etc/mars_nwe/server.key';
|
||||
```
|
||||
|
||||
## `smart.conf` settings explained
|
||||
|
||||
### UI colors
|
||||
|
||||
These variables define the default SMArT page colors:
|
||||
|
||||
- `$COLOR_BACK` – page background
|
||||
- `$COLOR_HEAD_BACK` / `$COLOR_HEAD_FORE` – main section header colors
|
||||
- `$COLOR_SUBH_BACK` / `$COLOR_SUBH_FORE` – subsection header colors
|
||||
- `$COLOR_TEXT_BACK` / `$COLOR_TEXT_FORE` – regular content row colors
|
||||
|
||||
### Main MARS_NWE configuration
|
||||
|
||||
- `$mars_config` – path to the main `nwserv.conf` file that SMArT reads and updates
|
||||
- `$nonroot_user` – unprivileged user account used when SMArT drops privileges
|
||||
- `$smart_compact_nwservconf` – controls how `nwserv.conf` is written back:
|
||||
- `0` keeps comments, spacing, and the original structure as much as possible
|
||||
- `1` writes a more compact version without the original long comment layout
|
||||
|
||||
### SMArT internal file layout
|
||||
|
||||
- `$smart_conf_path` – absolute path to `smart.conf`
|
||||
- `$smart_nwclient_path` – file used to store bindery login information for SMArT helper tools
|
||||
- `$smart_static_dir` – directory containing HTML, icons, and other static assets
|
||||
- `$smart_log_path` – log file used by the Perl-based SMArT frontend
|
||||
- `$smart_check_login` – PAM-based authentication helper path
|
||||
- `$smart_perl_path` – optional override for the main SMArT Perl executable; usually not needed
|
||||
|
||||
### `nwwebui` listener settings
|
||||
|
||||
- `$nw_bind_ip` – bind address for HTTP and HTTPS listeners, for example `0.0.0.0` for all IPv4 interfaces or `127.0.0.1` for localhost-only access
|
||||
- `$nw_log_level` – service log verbosity:
|
||||
- `0` = errors only
|
||||
- `1` = informational messages
|
||||
- `2` = debug output
|
||||
- `$nw_daemonize` – whether `nwwebui` detaches into the background
|
||||
- `$nw_pid_file` – location of the PID file
|
||||
- `$nw_log_file` – log file written by `nwwebui`
|
||||
- `$nw_ssl_enable` – enables or disables HTTPS support
|
||||
- `$nw_http_port` – HTTP listener port; set to `0` to disable plain HTTP
|
||||
- `$nw_https_port` – HTTPS listener port; set to `0` to disable HTTPS
|
||||
- `$nw_cert_file` – PEM certificate path for TLS
|
||||
- `$nw_key_file` – PEM private key path for TLS
|
||||
|
||||
The current code and template show that:
|
||||
|
||||
- `nwwebui` listens on `9080` for HTTP by default
|
||||
- `9443` is used for HTTPS
|
||||
- the log file can be configured with `$nw_log_file`
|
||||
- the log path can also be overridden at runtime with `-l`
|
||||
|
||||
Because passwords may be transmitted during login, HTTPS is the recommended way to access the interface.
|
||||
|
||||
## Starting the service
|
||||
|
||||
Depending on the installation method, `nwwebui` can be started either via **systemd** or directly from the **command line**. The build system installs a `mars-nwe-webui.service` unit when systemd support is enabled.
|
||||
|
||||
### Starting with systemd
|
||||
|
||||
A typical installed system uses the `mars-nwe-webui.service` unit. The unit starts `nwwebui`, prepares the needed runtime directories, and loads the standard `smart.conf` file.
|
||||
|
||||
Typical commands:
|
||||
|
||||
```bash
|
||||
systemctl enable --now mars-nwe-webui.service
|
||||
systemctl start mars-nwe-webui.service
|
||||
systemctl stop mars-nwe-webui.service
|
||||
systemctl restart mars-nwe-webui.service
|
||||
systemctl status mars-nwe-webui.service
|
||||
```
|
||||
|
||||
The service unit starts `nwwebui` with the equivalent of:
|
||||
|
||||
```bash
|
||||
/usr/sbin/nwwebui -c /etc/mars_nwe/smart.conf
|
||||
```
|
||||
|
||||
### Starting from the command line
|
||||
|
||||
`nwwebui` can also be launched manually. The built-in usage text documents the supported options:
|
||||
|
||||
```text
|
||||
Usage: nwwebui [-h] [-d] [-s] [-c <smart.conf>] [-p <pidfile>] [-l <logfile>]
|
||||
|
||||
Options:
|
||||
-h, --help Show this help text and exit
|
||||
-d, --daemon Run in daemon mode
|
||||
-s, --stop Stop the running nwwebui instance
|
||||
-c, --config <file> Use an alternate smart.conf path
|
||||
-p, --pidfile <file> Override PID file path
|
||||
-l, --logfile <file> Override log file path
|
||||
```
|
||||
|
||||
Typical examples:
|
||||
|
||||
```bash
|
||||
# start in foreground with the standard configuration
|
||||
/usr/sbin/nwwebui -c /etc/mars_nwe/smart.conf
|
||||
|
||||
# start in daemon mode
|
||||
/usr/sbin/nwwebui -d -c /etc/mars_nwe/smart.conf
|
||||
|
||||
# stop a running instance
|
||||
/usr/sbin/nwwebui -s -c /etc/mars_nwe/smart.conf
|
||||
|
||||
# use a custom PID file
|
||||
/usr/sbin/nwwebui -d -c /etc/mars_nwe/smart.conf -p /run/mars_nwe/nwwebui.pid
|
||||
|
||||
# use a custom log file
|
||||
/usr/sbin/nwwebui -c /etc/mars_nwe/smart.conf -l /var/log/mars_nwe/custom-nwwebui.log
|
||||
|
||||
# override both PID and log file
|
||||
/usr/sbin/nwwebui -d -c /etc/mars_nwe/smart.conf -p /run/mars_nwe/nwwebui.pid -l /var/log/mars_nwe/nwwebui.log
|
||||
```
|
||||
|
||||
The `-l` option overrides `$nw_log_file` from `smart.conf` at runtime.
|
||||
|
||||
Typical access URLs:
|
||||
|
||||
- `http://<host>:9080/`
|
||||
- `https://<host>:9443/`
|
||||
|
||||
For production use, HTTPS should be preferred.
|
||||
|
||||
## Build and installation notes
|
||||
|
||||
This repository is built as part of the main `mars_nwe` build. The build system:
|
||||
|
||||
- generates `smart.conf` from the template
|
||||
- generates the `smart` launcher script
|
||||
- builds `nwwebui`
|
||||
- builds `check_login`
|
||||
- installs the PAM file and static UI assets
|
||||
|
||||
Because this repository is integrated as a Git submodule in `mars_nwe`, end users normally consume it through the main `mars_nwe` source tree and release packages rather than using it as a standalone project.
|
||||
|
||||
## Summary
|
||||
|
||||
SMArT is now an integrated part of the `mars_nwe` release and includes a dedicated `nwwebui` service that can expose the interface over both HTTP and HTTPS. The standard listener ports are **9080** for HTTP and **9443** for HTTPS. Authentication is handled through PAM, and the required `/etc/pam.d/smart` file is installed automatically together with the integrated MARS_NWE installation.
|
||||
13
apply.pl
@@ -109,6 +109,11 @@ sub handle_request()
|
||||
{
|
||||
delconfigline( '4 ' . $c[2] );
|
||||
}
|
||||
if( defined( $p{interface_manual} ) && $p{interface_manual} ne '' )
|
||||
{
|
||||
$p{interface} = $p{interface_manual};
|
||||
}
|
||||
$p{interface} =~ s/[^-_\.A-Za-z0-9:\*]//g;
|
||||
if( $p{number} ne '' )
|
||||
{
|
||||
addconfigline( '4 ' . $p{number} . ' ' . $p{interface} . ' ' . $p{frametype} . ' ' . $p{delay} );
|
||||
@@ -138,17 +143,17 @@ sub handle_request()
|
||||
if( $p{mars_config} ne $mars_config )
|
||||
{
|
||||
# Just append the line. Messy but easy. ;)
|
||||
open( FILE, '>>' . $base . 'smart.conf' );
|
||||
open( FILE, '>>' . $smart_conf_path ) or die "Could not open $smart_conf_path: $!";
|
||||
print( FILE "\n" . '$mars_config = \'' . $p{mars_config} . '\';' . "\n" );
|
||||
close( FILE );
|
||||
}
|
||||
|
||||
open( FILE, '>' . $base . '.nwclient' );
|
||||
open( FILE, '>' . $smart_nwclient_path ) or die "Could not open $smart_nwclient_path: $!";
|
||||
print( FILE $p{bind_server} . '/' . $p{bind_user} . ' ' . $p{bind_pass } . "\n" );
|
||||
close( FILE );
|
||||
|
||||
chown( scalar( getpwnam( $nonroot_user ) ), 0, $base . '.nwclient' );
|
||||
chmod( 0600, $base . '.nwclient' );
|
||||
chown( scalar( getpwnam( $nonroot_user ) ), 0, $smart_nwclient_path );
|
||||
chmod( 0600, $smart_nwclient_path );
|
||||
}
|
||||
elsif( $c[1] eq 'users' )
|
||||
{
|
||||
|
||||
BIN
check_login
@@ -23,6 +23,8 @@
|
||||
|
||||
#include <security/pam_appl.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
int my_conv(int num_msg, const struct pam_message **msg, struct pam_response **resp, void *appdata_ptr);
|
||||
|
||||
|
||||
34
config.h.cmake
Normal file
@@ -0,0 +1,34 @@
|
||||
#ifndef NWWEBUI_CONFIG_H
|
||||
#define NWWEBUI_CONFIG_H
|
||||
|
||||
#define NWWEBUI_NAME "nwwebui"
|
||||
#define NWWEBUI_VERSION "@MARS_NWE_VERSION@"
|
||||
|
||||
#define DEFAULT_SMART_CONF "@MARS_NWE_INSTALL_FULL_CONFDIR@/smart.conf"
|
||||
#define DEFAULT_SMART_PERL "@MARS_NWE_INSTALL_FULL_LIBEXECDIR@/smart"
|
||||
#define DEFAULT_CONTROL_PERL "@MARS_NWE_INSTALL_FULL_LIBEXECDIR@/control"
|
||||
#define DEFAULT_MARS_SERVICE "@MARS_NWE_SYSTEMD_SERVICE@"
|
||||
#define DEFAULT_SYSTEMCTL_PATH "@SYSTEMCTL_EXECUTABLE@"
|
||||
|
||||
#define LOG_PATH_DEFAULT "@MARS_NWE_LOG_DIR@/nwwebui.log"
|
||||
|
||||
#define LOG_LEVEL_ERROR 0
|
||||
#define LOG_LEVEL_INFO 1
|
||||
#define LOG_LEVEL_DEBUG 2
|
||||
#define LOG_LEVEL_DEFAULT LOG_LEVEL_INFO
|
||||
|
||||
#define DEFAULT_BIND_IP "0.0.0.0"
|
||||
#define DEFAULT_SSL_ENABLE 1
|
||||
#define DEFAULT_HTTP_PORT 9080
|
||||
#define DEFAULT_HTTPS_PORT 9443
|
||||
|
||||
#define DEFAULT_CERT_FILE "@MARS_NWE_INSTALL_FULL_CONFDIR@/server.crt"
|
||||
#define DEFAULT_KEY_FILE "@MARS_NWE_INSTALL_FULL_CONFDIR@/server.key"
|
||||
|
||||
#define DEFAULT_PID_FILE "@MARS_NWE_PID_DIR@/nwwebui.pid"
|
||||
#define DEFAULT_DAEMONIZE 0
|
||||
|
||||
#define NW_BACKLOG 64
|
||||
#define NW_BUF_SZ 16384
|
||||
|
||||
#endif
|
||||
127
control.cmake
Normal file
@@ -0,0 +1,127 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
# SMArT service control helper for MARS_NWE systemd unit.
|
||||
# Installed next to the other SMArT perl helpers.
|
||||
#
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
our ($server_id, $mars_nwe_service, $smart_systemctl_path, $cc, %p);
|
||||
|
||||
sub html_escape($)
|
||||
{
|
||||
my ($s) = @_;
|
||||
$s = '' unless defined $s;
|
||||
$s =~ s/&/&/g;
|
||||
$s =~ s/</</g;
|
||||
$s =~ s/>/>/g;
|
||||
$s =~ s/"/"/g;
|
||||
return $s;
|
||||
}
|
||||
|
||||
sub handle_request()
|
||||
{
|
||||
my $service = $mars_nwe_service || '@MARS_NWE_SYSTEMD_SERVICE@';
|
||||
my $systemctl = $smart_systemctl_path || '@SYSTEMCTL_EXECUTABLE@';
|
||||
my $query = defined($cc) ? $cc : '';
|
||||
my $action = '';
|
||||
|
||||
$query =~ s/^\?//;
|
||||
|
||||
if( $query =~ /^(start|stop|restart|status)$/ )
|
||||
{
|
||||
$action = $1;
|
||||
}
|
||||
elsif( $query =~ /(?:^|&)action=(start|stop|restart|status)(?:&|$)/ )
|
||||
{
|
||||
$action = $1;
|
||||
}
|
||||
elsif( defined($p{action}) && $p{action} =~ /^(start|stop|restart|status)$/ )
|
||||
{
|
||||
$action = $1;
|
||||
}
|
||||
|
||||
print <<EOF;
|
||||
HTTP/1.0 200 OK
|
||||
Content-Type: text/html
|
||||
$server_id
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>MARS_NWE service control</title>
|
||||
<link rel="icon" href="/static/favicon.ico" type="image/x-icon">
|
||||
<style>
|
||||
body{margin:0;padding:22px;background:#f6f1ea;color:#342a25;font-family:Arial,Helvetica,sans-serif}
|
||||
a{color:#9f1f1f;text-decoration:none;font-weight:bold}a:hover{text-decoration:underline}
|
||||
.box{max-width:900px;margin:0 auto;background:#fffdfa;border:1px solid #e5d6c6;border-radius:16px;padding:22px;box-shadow:0 10px 30px rgba(60,30,10,.10)}
|
||||
h1{margin-top:0;color:#9f1f1f}.meta{padding:12px 14px;background:#fbf6ef;border:1px solid #ecdcc8;border-radius:12px;margin-bottom:14px}
|
||||
pre{background:#2b241f;color:#f8eadc;padding:16px;border-radius:12px;overflow:auto;white-space:pre-wrap}.ok{color:#2f6f35;font-weight:bold}.bad{color:#9f1f1f;font-weight:bold}
|
||||
.actions a{display:inline-block;margin:5px 8px 5px 0;padding:9px 12px;border-radius:10px;background:#9f1f1f;color:#fff}.actions a.secondary{background:#6f5b4f}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="box">
|
||||
<h1>MARS_NWE service control</h1>
|
||||
EOF
|
||||
|
||||
if( $action eq '' )
|
||||
{
|
||||
print "<p class=\"bad\">Invalid action.</p>\n";
|
||||
print "<p>Allowed actions: start, stop, restart, status</p>\n";
|
||||
print "<p><a href=\"/static/start.html\">Back</a></p>\n";
|
||||
print "</div></body></html>\n";
|
||||
return;
|
||||
}
|
||||
|
||||
print '<div class="meta">Action: <b>' . html_escape($action) . '</b><br>' . "\n";
|
||||
print 'Service: <b>' . html_escape($service) . '</b><br>' . "\n";
|
||||
print 'systemctl: <b>' . html_escape($systemctl) . '</b></div>' . "\n";
|
||||
print "<pre>\n";
|
||||
|
||||
my @cmd = ( $systemctl, $action, $service );
|
||||
my $fh;
|
||||
if( ! open( $fh, '-|', @cmd ) )
|
||||
{
|
||||
print 'Could not execute systemctl: ' . html_escape($!) . "\n";
|
||||
print "</pre><p class=\"bad\">Failed.</p>\n";
|
||||
print "<p><a href=\"/static/start.html\">Back</a></p>\n";
|
||||
print "</div></body></html>\n";
|
||||
return;
|
||||
}
|
||||
|
||||
while( my $line = <$fh> )
|
||||
{
|
||||
print html_escape($line);
|
||||
}
|
||||
|
||||
close($fh);
|
||||
my $rc = $? >> 8;
|
||||
|
||||
if( $rc == 0 )
|
||||
{
|
||||
print "</pre><p class=\"ok\">Command completed successfully.</p>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "</pre><p class=\"bad\">Command failed with exit code $rc.</p>\n";
|
||||
}
|
||||
|
||||
print <<EOF;
|
||||
<div class="actions">
|
||||
<a href="/cgi-bin/control?status" class="secondary">Status</a>
|
||||
<a href="/cgi-bin/control?start">Start</a>
|
||||
<a href="/cgi-bin/control?stop" class="secondary">Stop</a>
|
||||
<a href="/cgi-bin/control?restart">Restart</a>
|
||||
</div>
|
||||
<p><a href="/static/start.html">Back</a></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
EOF
|
||||
}
|
||||
|
||||
1;
|
||||
26
mars-nwe-webui.service.cmake
Normal file
@@ -0,0 +1,26 @@
|
||||
[Unit]
|
||||
Description=MARS NWE Web UI
|
||||
After=network.target mars-nwe-serv.service
|
||||
Wants=network.target
|
||||
Documentation=man:systemd.service(5)
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
Group=root
|
||||
WorkingDirectory=/
|
||||
|
||||
ExecStartPre=/bin/mkdir -p @MARS_NWE_LOG_DIR@
|
||||
ExecStartPre=/bin/mkdir -p @MARS_NWE_PID_DIR@
|
||||
ExecStart=@CMAKE_INSTALL_FULL_SBINDIR@/nwwebui -c @MARS_NWE_INSTALL_FULL_CONFDIR@/smart.conf
|
||||
Restart=on-failure
|
||||
RestartSec=2
|
||||
|
||||
NoNewPrivileges=true
|
||||
PrivateTmp=true
|
||||
ProtectSystem=full
|
||||
ReadWritePaths=@MARS_NWE_INSTALL_FULL_CONFDIR@
|
||||
ProtectHome=true
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
BIN
opt/Lable.png
Normal file
|
After Width: | Height: | Size: 573 KiB |
BIN
opt/android-chrome-192x192.png
Normal file
|
After Width: | Height: | Size: 75 KiB |
BIN
opt/android-chrome-512x512.png
Normal file
|
After Width: | Height: | Size: 393 KiB |
BIN
opt/logo-small.png
Normal file
|
After Width: | Height: | Size: 456 KiB |
BIN
opt/logo.png
Normal file
|
After Width: | Height: | Size: 1.2 MiB |
335
readconfig.pl
@@ -1,28 +1,12 @@
|
||||
#
|
||||
# SMArT
|
||||
#
|
||||
#
|
||||
# Configuration file code
|
||||
#
|
||||
#
|
||||
# Copyright 2001 Wilmer van der Gaast (lintux@lintux.cx)
|
||||
#
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
#
|
||||
# Updated for marker-aware config writing.
|
||||
|
||||
my( @info, @conf, $l );
|
||||
my( @info, @conf, @rawconf, $l );
|
||||
|
||||
$info[1] = 'Volume';
|
||||
$info[2] = 'Server name';
|
||||
@@ -53,6 +37,7 @@ $info[47] = 'Trustee files';
|
||||
$info[50] = 'Conversion tables';
|
||||
$info[60] = 'MAX_CONNECTIONS';
|
||||
$info[61] = 'MAX_NW_VOLS';
|
||||
$info[62] = 'Reserved';
|
||||
$info[63] = 'MAX_DIR_BASE_ENTRIES';
|
||||
$info[68] = 'USE_MMAP';
|
||||
$info[69] = 'HANDLE_ALL_SAP_TYPS';
|
||||
@@ -79,19 +64,25 @@ $info[400] = 'nwserv.stations file';
|
||||
$info[401] = 'Reply to nearest server requests';
|
||||
$info[402] = 'Reply to connect requests';
|
||||
|
||||
open( CONF, '<' . $mars_config );
|
||||
open( CONF, '<' . $mars_config ) or die "Could not open $mars_config: $!";
|
||||
@conf = ();
|
||||
@rawconf = ();
|
||||
|
||||
while( $l = <CONF> )
|
||||
{
|
||||
$l =~ s/[\r\n]//g;
|
||||
$l =~ s/[\t ]+/ /g;
|
||||
$l =~ s/#.*//;
|
||||
$l =~ s/^[\t ]*//;
|
||||
$l =~ s/[\t ]*$//;
|
||||
if( $l ne '' )
|
||||
{
|
||||
unshift( @conf, $l );
|
||||
}
|
||||
push( @rawconf, $l );
|
||||
|
||||
my $x = $l;
|
||||
$x =~ s/[\r\n]//g;
|
||||
$x =~ s/[\t ]+/ /g;
|
||||
$x =~ s/#.*//;
|
||||
$x =~ s/^[\t ]*//;
|
||||
$x =~ s/[\t ]*$//;
|
||||
|
||||
if( $x ne '' )
|
||||
{
|
||||
push( @conf, $x );
|
||||
}
|
||||
}
|
||||
close( CONF );
|
||||
|
||||
@@ -99,53 +90,279 @@ sortconfig();
|
||||
|
||||
sub sortconfig()
|
||||
{
|
||||
@conf = sort( { $a cmp $b } @conf );
|
||||
@conf = sort( { ( split( ' ', $a ) )[0] <=> ( split( ' ', $b ) )[0] } @conf );
|
||||
@conf = sort( { $a cmp $b } @conf );
|
||||
@conf = sort( { ( split( ' ', $a ) )[0] <=> ( split( ' ', $b ) )[0] } @conf );
|
||||
}
|
||||
|
||||
sub getconfigline( $ )
|
||||
{
|
||||
my( @c, $c );
|
||||
|
||||
@c = getconfig( @_ );
|
||||
$c = $c[0];
|
||||
$c =~ s/^[0-9]* //;
|
||||
return( $c );
|
||||
my( @c, $c );
|
||||
|
||||
@c = getconfig( @_ );
|
||||
$c = $c[0];
|
||||
$c =~ s/^[0-9]* //;
|
||||
return( $c );
|
||||
}
|
||||
|
||||
sub getconfig( $ )
|
||||
{
|
||||
my( @c );
|
||||
|
||||
@c = grep( /^$_[0] /i, @conf );
|
||||
return( @c );
|
||||
my( @c );
|
||||
|
||||
@c = grep( /^$_[0] /i, @conf );
|
||||
return( @c );
|
||||
}
|
||||
|
||||
sub addconfigline( $ )
|
||||
{
|
||||
unshift( @conf, $_[0] );
|
||||
unshift( @conf, $_[0] );
|
||||
}
|
||||
|
||||
sub delconfigline( $ )
|
||||
{
|
||||
@conf = grep( !/^$_[0] /i, grep( !/^$_[0]$/i, @conf ) );
|
||||
@conf = grep( !/^$_[0] /i, grep( !/^$_[0]$/i, @conf ) );
|
||||
}
|
||||
|
||||
sub normalize_line( $ )
|
||||
{
|
||||
my $x = $_[0];
|
||||
|
||||
$x =~ s/[\r\n]//g;
|
||||
$x =~ s/[\t ]+/ /g;
|
||||
$x =~ s/#.*//;
|
||||
$x =~ s/^[\t ]*//;
|
||||
$x =~ s/[\t ]*$//;
|
||||
|
||||
return( $x );
|
||||
}
|
||||
|
||||
sub section_of_line( $ )
|
||||
{
|
||||
my $x = normalize_line( $_[0] );
|
||||
|
||||
if( $x =~ /^([0-9]+)\b/ )
|
||||
{
|
||||
return( $1 );
|
||||
}
|
||||
|
||||
return( '' );
|
||||
}
|
||||
|
||||
sub grouped_section_key( $ )
|
||||
{
|
||||
my $sec = $_[0];
|
||||
|
||||
if( $sec >= 100 && $sec <= 106 ) { return '100-106'; }
|
||||
if( $sec >= 200 && $sec <= 202 ) { return '200-202'; }
|
||||
if( $sec >= 210 && $sec <= 211 ) { return '210-211'; }
|
||||
if( $sec >= 300 && $sec <= 302 ) { return '300-302'; }
|
||||
|
||||
return $sec;
|
||||
}
|
||||
|
||||
sub build_marker_map()
|
||||
{
|
||||
my( %map, $line, $sec, $key );
|
||||
|
||||
foreach $line ( @conf )
|
||||
{
|
||||
$sec = section_of_line( $line );
|
||||
next if $sec eq '';
|
||||
|
||||
$key = grouped_section_key( $sec );
|
||||
push( @{ $map{$key} }, $line );
|
||||
}
|
||||
|
||||
# Keep SYS as first entry in section 1
|
||||
if( defined( $map{'1'} ) )
|
||||
{
|
||||
my @sys = grep( /^1 SYS /, @{ $map{'1'} } );
|
||||
my @rest = grep( !/^1 SYS /, @{ $map{'1'} } );
|
||||
$map{'1'} = [ @sys, @rest ];
|
||||
}
|
||||
|
||||
return %map;
|
||||
}
|
||||
|
||||
sub writeconfig_compact()
|
||||
{
|
||||
my( $i, $l );
|
||||
|
||||
sortconfig();
|
||||
|
||||
open( CONF, '>' . $mars_config ) or die "Could not write $mars_config: $!";
|
||||
|
||||
$l = ( getconfig( '1 SYS' ) )[0];
|
||||
delconfigline( '1 SYS' );
|
||||
addconfigline( $l );
|
||||
|
||||
foreach $i ( @conf )
|
||||
{
|
||||
$l = $i;
|
||||
$l =~ s/ .*//;
|
||||
printf( CONF "%-50s # %s\n", $i, $info[$l] );
|
||||
}
|
||||
|
||||
close( CONF );
|
||||
}
|
||||
|
||||
sub writeconfig_markers()
|
||||
{
|
||||
my( %secmap, %emitted );
|
||||
my( $line, $active_key, $inside_active );
|
||||
|
||||
%secmap = build_marker_map();
|
||||
$inside_active = '';
|
||||
|
||||
open( CONF, '>' . $mars_config ) or die "Could not write $mars_config: $!";
|
||||
|
||||
foreach $line ( @rawconf )
|
||||
{
|
||||
if( $line =~ /^\s*#\s*>>>\s*SMARTHOOK\s+SECTION\s+([0-9]+(?:-[0-9]+)?)\s+ACTIVE\s+BEGIN/i )
|
||||
{
|
||||
$active_key = $1;
|
||||
$inside_active = $active_key;
|
||||
|
||||
print CONF $line;
|
||||
|
||||
if( defined( $secmap{$active_key} ) )
|
||||
{
|
||||
foreach my $entry ( @{ $secmap{$active_key} } )
|
||||
{
|
||||
print CONF $entry . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
$emitted{$active_key} = 1;
|
||||
next;
|
||||
}
|
||||
|
||||
if( $line =~ /^\s*#\s*<<<\s*SMARTHOOK\s+SECTION\s+([0-9]+(?:-[0-9]+)?)\s+ACTIVE\s+END/i )
|
||||
{
|
||||
$inside_active = '';
|
||||
print CONF $line;
|
||||
next;
|
||||
}
|
||||
|
||||
if( $inside_active ne '' )
|
||||
{
|
||||
# Skip old content inside ACTIVE blocks completely.
|
||||
next;
|
||||
}
|
||||
|
||||
print CONF $line;
|
||||
}
|
||||
|
||||
close( CONF );
|
||||
}
|
||||
|
||||
sub writeconfig_preserve_layout()
|
||||
{
|
||||
my( %secmap, %written, @sections, $sec, $line, $sysline );
|
||||
my( $heading_sec );
|
||||
|
||||
sortconfig();
|
||||
|
||||
$sysline = ( grep( /^1 SYS /, @conf ) )[0];
|
||||
if( defined( $sysline ) )
|
||||
{
|
||||
@conf = grep( $_ ne $sysline, @conf );
|
||||
unshift( @conf, $sysline );
|
||||
}
|
||||
|
||||
foreach $line ( @conf )
|
||||
{
|
||||
$sec = section_of_line( $line );
|
||||
if( $sec ne '' )
|
||||
{
|
||||
push( @{ $secmap{$sec} }, $line );
|
||||
}
|
||||
}
|
||||
|
||||
open( CONF, '>' . $mars_config ) or die "Could not write $mars_config: $!";
|
||||
|
||||
foreach $line ( @rawconf )
|
||||
{
|
||||
if( $line =~ /^\s*#.*Section\s+([0-9]+)\b/i )
|
||||
{
|
||||
$heading_sec = $1;
|
||||
|
||||
foreach $sec ( sort { $a <=> $b } keys( %secmap ) )
|
||||
{
|
||||
next if $written{$sec};
|
||||
next if $sec > $heading_sec;
|
||||
|
||||
if( defined( $secmap{$sec} ) )
|
||||
{
|
||||
foreach my $entry ( @{ $secmap{$sec} } )
|
||||
{
|
||||
print CONF $entry . "\n";
|
||||
}
|
||||
}
|
||||
$written{$sec} = 1;
|
||||
}
|
||||
}
|
||||
|
||||
$sec = section_of_line( $line );
|
||||
|
||||
if( $sec eq '' )
|
||||
{
|
||||
print CONF $line;
|
||||
next;
|
||||
}
|
||||
|
||||
if( ! $written{$sec} )
|
||||
{
|
||||
if( defined( $secmap{$sec} ) )
|
||||
{
|
||||
foreach my $entry ( @{ $secmap{$sec} } )
|
||||
{
|
||||
print CONF $entry . "\n";
|
||||
}
|
||||
}
|
||||
$written{$sec} = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@sections = sort { $a <=> $b } keys( %secmap );
|
||||
foreach $sec ( @sections )
|
||||
{
|
||||
next if $written{$sec};
|
||||
|
||||
print CONF "\n";
|
||||
foreach my $entry ( @{ $secmap{$sec} } )
|
||||
{
|
||||
print CONF $entry . "\n";
|
||||
}
|
||||
$written{$sec} = 1;
|
||||
}
|
||||
|
||||
close( CONF );
|
||||
}
|
||||
|
||||
sub config_has_smart_markers()
|
||||
{
|
||||
foreach my $line ( @rawconf )
|
||||
{
|
||||
if( $line =~ /SMARTHOOK\s+SECTION/i )
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
sub writeconfig()
|
||||
{
|
||||
my( $i, $l );
|
||||
|
||||
sortconfig();
|
||||
|
||||
open( CONF, '>' . $mars_config );
|
||||
$l = ( getconfig( '1 SYS' ) )[0];
|
||||
delconfigline( '1 SYS' );
|
||||
addconfigline( $l );
|
||||
foreach $i ( @conf )
|
||||
{
|
||||
$l = $i;
|
||||
$l =~ s/ .*//;
|
||||
printf( CONF "%-50s # %s\n", $i, $info[$l] );
|
||||
}
|
||||
close( CONF );
|
||||
if( defined( $smart_compact_nwservconf ) && $smart_compact_nwservconf )
|
||||
{
|
||||
writeconfig_compact();
|
||||
}
|
||||
elsif( config_has_smart_markers() )
|
||||
{
|
||||
writeconfig_markers();
|
||||
}
|
||||
else
|
||||
{
|
||||
writeconfig_preserve_layout();
|
||||
}
|
||||
}
|
||||
|
||||
1031
settings.pl
53
smart → smart.cmake
Executable file → Normal file
@@ -25,22 +25,30 @@
|
||||
|
||||
$redirected = 0;
|
||||
|
||||
$server_id = 'Server: SMArT/Perl/0.99';
|
||||
$base = $0;
|
||||
$base =~ s/\/[^\/]*$//g;
|
||||
$base .= '/';
|
||||
$server_id = 'Server: SMArT/Perl/@MARS_NWE_VERSION@';
|
||||
|
||||
do( $base . 'smart.conf' );
|
||||
do( '@MARS_NWE_INSTALL_FULL_CONFDIR@/smart.conf' )
|
||||
or die "Could not load @MARS_NWE_INSTALL_FULL_CONFDIR@/smart.conf: $@ $!";
|
||||
|
||||
close( STDERR );
|
||||
open( STDERR, '>>' . $base . 'error.log' );
|
||||
$ENV{HOME} = $base;
|
||||
open( STDERR, '>>' . $smart_log_path )
|
||||
or die "Could not open $smart_log_path: $!";
|
||||
|
||||
$ENV{HOME} = '@MARS_NWE_INSTALL_FULL_CONFDIR@';
|
||||
$smart_libexec_dir = '@MARS_NWE_INSTALL_FULL_LIBEXECDIR@';
|
||||
$smart_libexec_dir =~ s#/*$##;
|
||||
|
||||
$smart_control_path = $smart_libexec_dir . '/control' unless defined $smart_control_path;
|
||||
$mars_nwe_service = '@MARS_NWE_SYSTEMD_SERVICE@' unless defined $mars_nwe_service;
|
||||
$smart_systemctl_path = '@SYSTEMCTL_EXECUTABLE@' unless defined $smart_systemctl_path;
|
||||
|
||||
$l = <STDIN>;
|
||||
$l =~ s/[\n\r]//g;
|
||||
$request_uri = "";
|
||||
@c = split( ' ', $l );
|
||||
if( scalar( @c ) > 2 )
|
||||
{
|
||||
$request_uri = $c[1];
|
||||
while( keys( %h ) < 15 ) # Who would ever want to send more headers???
|
||||
{
|
||||
$l = <STDIN>;
|
||||
@@ -75,7 +83,7 @@ else
|
||||
if( $l[0] ne 'root' )
|
||||
{ error( 401 ); }
|
||||
else
|
||||
{ if( $x = system( $base . 'check_login', @l ) )
|
||||
{ if( $x = system( $smart_check_login, @l ) )
|
||||
{ error( 401 ); } }
|
||||
}
|
||||
}
|
||||
@@ -102,16 +110,29 @@ foreach $p ( @p )
|
||||
}
|
||||
@c = split( '/', $c );
|
||||
|
||||
if( $c[0] eq 'apply' )
|
||||
if( ( $c[0] eq 'service' && $c[1] eq 'control' ) ||
|
||||
( $c[0] eq 'cgi-bin' && $c[1] eq 'control' ) )
|
||||
{
|
||||
do( $base . 'readconfig.pl' );
|
||||
do( $base . 'apply.pl' );
|
||||
# Service control must run before drop_root().
|
||||
# /service/control is the preferred path; /cgi-bin/control is kept as a legacy alias.
|
||||
my $rv = do( $smart_control_path );
|
||||
if( ! defined $rv )
|
||||
{
|
||||
error( 500 );
|
||||
}
|
||||
handle_request();
|
||||
exit;
|
||||
}
|
||||
elsif( $c[0] eq 'apply' )
|
||||
{
|
||||
do( $smart_libexec_dir . '/readconfig.pl' );
|
||||
do( $smart_libexec_dir . '/apply.pl' );
|
||||
handle_request();
|
||||
exit;
|
||||
}
|
||||
elsif( $c[0] eq 'settings' )
|
||||
{
|
||||
do( $base . 'readconfig.pl' );
|
||||
do( $smart_libexec_dir . '/readconfig.pl' );
|
||||
}
|
||||
|
||||
drop_root();
|
||||
@@ -137,11 +158,11 @@ EOF
|
||||
}
|
||||
elsif( $c[0] eq 'static' )
|
||||
{
|
||||
do( $base . 'static.pl' );
|
||||
do( $smart_libexec_dir . '/static.pl' );
|
||||
}
|
||||
elsif( $c[0] eq 'settings' )
|
||||
{
|
||||
do( $base . 'settings.pl' );
|
||||
do( $smart_libexec_dir . '/settings.pl' );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -239,7 +260,7 @@ EOF
|
||||
|
||||
sub get_server
|
||||
{
|
||||
open( SFILE, '<' . $base . '.nwclient' );
|
||||
open( SFILE, '<' . $smart_nwclient_path );
|
||||
chomp( $line = <SFILE> );
|
||||
close( SFILE );
|
||||
|
||||
@@ -249,7 +270,7 @@ sub get_server
|
||||
|
||||
sub get_bindery_password
|
||||
{
|
||||
open( SFILE, '<' . $base . '.nwclient' );
|
||||
open( SFILE, '<' . $smart_nwclient_path );
|
||||
chomp( $line = <SFILE> );
|
||||
close( SFILE );
|
||||
|
||||
11
smart.conf
@@ -1,11 +0,0 @@
|
||||
$COLOR_BACK = "#F0F0FF";
|
||||
$COLOR_HEAD_BACK = "#C0C0FF";
|
||||
$COLOR_HEAD_FORE = "#000000";
|
||||
$COLOR_SUBH_BACK = "#D0D0FF";
|
||||
$COLOR_SUBH_FORE = "#000000";
|
||||
$COLOR_TEXT_BACK = "#E0E0FF";
|
||||
$COLOR_TEXT_FORE = "#000000";
|
||||
|
||||
$mars_config = '/usr/local/etc/nwserv.conf';
|
||||
|
||||
$nonroot_user = 'nobody';
|
||||
131
smart.conf.cmake
Normal file
@@ -0,0 +1,131 @@
|
||||
# SMArT / nwwebui configuration file
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# UI colors
|
||||
# ------------------------------------------------------------
|
||||
|
||||
# Background color used for the main page body.
|
||||
$COLOR_BACK = "#F0F0FF";
|
||||
|
||||
# Background color used for section headers.
|
||||
$COLOR_HEAD_BACK = "#C0C0FF";
|
||||
|
||||
# Text color used for section headers.
|
||||
$COLOR_HEAD_FORE = "#000000";
|
||||
|
||||
# Background color used for subsection headers.
|
||||
$COLOR_SUBH_BACK = "#D0D0FF";
|
||||
|
||||
# Text color used for subsection headers.
|
||||
$COLOR_SUBH_FORE = "#000000";
|
||||
|
||||
# Background color used for normal content rows.
|
||||
$COLOR_TEXT_BACK = "#E0E0FF";
|
||||
|
||||
# Text color used for normal content rows.
|
||||
$COLOR_TEXT_FORE = "#000000";
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Main MARS NWE configuration
|
||||
# ------------------------------------------------------------
|
||||
|
||||
# Path to the main mars_nwe server configuration file.
|
||||
# This file is read and modified by the SMArT configuration pages.
|
||||
$mars_config = '@MARS_NWE_INSTALL_FULL_CONFDIR@/nwserv.conf';
|
||||
|
||||
# User name used when SMArT drops privileges for non-root operations.
|
||||
# Keep this set to an unprivileged local account.
|
||||
$nonroot_user = 'nobody';
|
||||
|
||||
# Write the mars_nwe configuration file in compact form.
|
||||
# 0 = preserve comments, blank lines and the original section layout
|
||||
# 1 = write a compact configuration file without the original long comments
|
||||
$smart_compact_nwservconf = 0;
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# SMArT internal file layout
|
||||
# ------------------------------------------------------------
|
||||
|
||||
# Absolute path to the SMArT configuration file itself.
|
||||
# Used when SMArT needs to append updated settings.
|
||||
$smart_conf_path = '@MARS_NWE_INSTALL_FULL_CONFDIR@/smart.conf';
|
||||
|
||||
# File used to store bindery login information for SMArT helper tools.
|
||||
# This file should remain readable only by the service user or root.
|
||||
$smart_nwclient_path = '@MARS_NWE_INSTALL_FULL_CONFDIR@/.nwclient';
|
||||
|
||||
# Directory containing static HTML and image files served by SMArT.
|
||||
$smart_static_dir = '@MARS_NWE_INSTALL_FULL_LIBEXECDIR@/static';
|
||||
|
||||
# Log file used by the Perl SMArT frontend.
|
||||
# Keep this separate from the nwwebui log file.
|
||||
$smart_log_path = '@MARS_NWE_LOG_DIR@/smart.log';
|
||||
|
||||
# Path to the PAM-based login helper used for root authentication.
|
||||
$smart_check_login = '@MARS_NWE_INSTALL_FULL_LIBEXECDIR@/check_login';
|
||||
|
||||
|
||||
# Path to the SMArT service-control helper.
|
||||
$smart_control_path = '@MARS_NWE_INSTALL_FULL_LIBEXECDIR@/control';
|
||||
|
||||
# systemd unit controlled by the SMArT service-control page.
|
||||
$mars_nwe_service = '@MARS_NWE_SYSTEMD_SERVICE@';
|
||||
|
||||
# systemctl executable used by the service-control helper.
|
||||
$smart_systemctl_path = '@SYSTEMCTL_EXECUTABLE@';
|
||||
|
||||
# Optional explicit path to the main SMArT Perl program.
|
||||
# This is normally not required, because nwwebui already has a built-in default.
|
||||
# Uncomment and adjust only if a non-standard location must be used.
|
||||
# $smart_perl_path = '@MARS_NWE_INSTALL_FULL_LIBEXECDIR@/smart';
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# nwwebui listener settings
|
||||
# ------------------------------------------------------------
|
||||
|
||||
# IP address used for the HTTP and HTTPS listeners.
|
||||
# Use 0.0.0.0 to listen on all IPv4 interfaces.
|
||||
# Use 127.0.0.1 for local-only testing.
|
||||
$nw_bind_ip = '0.0.0.0';
|
||||
|
||||
# Log level used by nwwebui.
|
||||
# 0 = errors only
|
||||
# 1 = informational messages
|
||||
# 2 = debug messages
|
||||
$nw_log_level = 1;
|
||||
|
||||
# Run nwwebui in daemon mode by default.
|
||||
# 0 = stay in foreground
|
||||
# 1 = detach into background
|
||||
$nw_daemonize = 0;
|
||||
|
||||
# PID file written by nwwebui.
|
||||
$nw_pid_file = '@MARS_NWE_PID_DIR@/nwwebui.pid';
|
||||
|
||||
# Log file written by nwwebui.
|
||||
$nw_log_file = '@MARS_NWE_LOG_DIR@/nwwebui.log';
|
||||
|
||||
# Enable or disable TLS/SSL support.
|
||||
# 1 = enable HTTPS listener
|
||||
# 0 = disable HTTPS listener
|
||||
#
|
||||
# When disabled, nwwebui can still serve plain HTTP if nw_http_port > 0.
|
||||
$nw_ssl_enable = 0;
|
||||
|
||||
# Plain HTTP listener port.
|
||||
# Set to 0 to disable plain HTTP completely.
|
||||
# This is useful for local or isolated-network testing.
|
||||
$nw_http_port = 9080;
|
||||
|
||||
# HTTPS listener port.
|
||||
# Used only when $nw_ssl_enable is set to 1.
|
||||
# Set to 0 to disable HTTPS listening.
|
||||
$nw_https_port = 9443;
|
||||
|
||||
# TLS certificate file in PEM format.
|
||||
# Required only when HTTPS is enabled.
|
||||
$nw_cert_file = '@MARS_NWE_INSTALL_FULL_CONFDIR@/server.crt';
|
||||
|
||||
# TLS private key file in PEM format.
|
||||
# Required only when HTTPS is enabled.
|
||||
$nw_key_file = '@MARS_NWE_INSTALL_FULL_CONFDIR@/server.key';
|
||||
4
smart.pamd
Normal file
@@ -0,0 +1,4 @@
|
||||
auth required pam_unix.so
|
||||
account required pam_unix.so
|
||||
password required pam_unix.so
|
||||
session required pam_unix.so
|
||||
55
static.pl
@@ -5,33 +5,20 @@
|
||||
#
|
||||
# Copyright 2001 Wilmer van der Gaast (lintux@lintux.cx)
|
||||
#
|
||||
# Updated with favicon and modern asset MIME type support.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
#
|
||||
|
||||
sub handle_request()
|
||||
{
|
||||
$f = $c[1];
|
||||
$f =~ s/[^-_\.A-Za-z0-9]//g;
|
||||
if( ! open( FILE, $base . 'static/' . $f ) )
|
||||
if( ! open( FILE, $smart_static_dir . '/' . $f ) )
|
||||
{
|
||||
error( 404 );
|
||||
}
|
||||
$e = $f;
|
||||
$e =~ s/^.*\.//;
|
||||
$e = lc( $e );
|
||||
if( $e eq 'html' )
|
||||
{
|
||||
$t = 'text/html';
|
||||
@@ -40,22 +27,48 @@ sub handle_request()
|
||||
{
|
||||
$t = 'image/gif';
|
||||
}
|
||||
elsif( $e eq 'jpg' )
|
||||
elsif( $e eq 'jpg' || $e eq 'jpeg' )
|
||||
{
|
||||
$t = 'image/jpeg';
|
||||
}
|
||||
elsif( $e eq 'png' )
|
||||
{
|
||||
$t = 'image/png';
|
||||
}
|
||||
elsif( $e eq 'ico' )
|
||||
{
|
||||
$t = 'image/x-icon';
|
||||
}
|
||||
elsif( $e eq 'svg' )
|
||||
{
|
||||
$t = 'image/svg+xml';
|
||||
}
|
||||
elsif( $e eq 'webp' )
|
||||
{
|
||||
$t = 'image/webp';
|
||||
}
|
||||
elsif( $e eq 'css' )
|
||||
{
|
||||
$t = 'text/css';
|
||||
}
|
||||
elsif( $e eq 'js' )
|
||||
{
|
||||
$t = 'application/javascript';
|
||||
}
|
||||
else
|
||||
{
|
||||
$t = 'application/octet-stream';
|
||||
}
|
||||
print <<EOF;
|
||||
print <<EOF2;
|
||||
HTTP/1.0 200 OK
|
||||
Content-Type: $t
|
||||
$server_id
|
||||
|
||||
EOF
|
||||
while( <FILE> )
|
||||
EOF2
|
||||
binmode( FILE );
|
||||
while( read( FILE, $buf, 8192 ) )
|
||||
{
|
||||
print;
|
||||
print $buf;
|
||||
}
|
||||
close( FILE );
|
||||
}
|
||||
|
||||
BIN
static/apple-touch-icon.png
Normal file
|
After Width: | Height: | Size: 67 KiB |
BIN
static/favicon-16x16.png
Normal file
|
After Width: | Height: | Size: 973 B |
BIN
static/favicon-32x32.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
static/favicon.ico
Normal file
|
After Width: | Height: | Size: 15 KiB |
725
static/menu.html
@@ -1,56 +1,71 @@
|
||||
<HTML>
|
||||
<BODY BGCOLOR=#F0F0FF>
|
||||
|
||||
<TABLE BORDER=0 CELLSPACING=0 WIDTH=100%>
|
||||
<TR BGCOLOR=#C0C0FF>
|
||||
<TD>
|
||||
<IMG SRC="/static/smart_icon.jpg"><BR>
|
||||
</TD>
|
||||
<TD ALIGN=RIGHT>
|
||||
<B><FONT SIZE=+2>Main menu</FONT></B><BR>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD HEIGHT=25>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR=#C0C0FF>
|
||||
<TD COLSPAN=2>
|
||||
<A HREF="/settings/general" TARGET="OPTS"><B><FONT SIZE=+2>General settings</FONT></B></A>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR=#D0D0FF>
|
||||
<TD COLSPAN=2>
|
||||
<B>Servername</B>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR=#E0E0FF>
|
||||
<TD COLSPAN=2>
|
||||
|
||||
The servername is the name under which this server will show up when using
|
||||
tools like <TT>SLIST</TT> (server-list).<BR>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>SMArT Main menu</title>
|
||||
<link rel="icon" href="/static/favicon.ico" type="image/x-icon">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/static/favicon-16x16.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/static/favicon-32x32.png">
|
||||
<link rel="apple-touch-icon" href="/static/apple-touch-icon.png">
|
||||
<style>
|
||||
:root{--bg:#f4f1ea;--panel:#faf8f4;--line:#dfd2bf;--soft:#efe6d7;--text:#3d342c;--muted:#6f6257;--accent:#ad1d1c;--accent2:#c96b3d;--gold:#b9813d;}
|
||||
*{box-sizing:border-box} html,body{margin:0;padding:0;background:var(--bg);color:var(--text);font:15px/1.55 Arial,Helvetica,sans-serif}
|
||||
body{padding:18px}
|
||||
a{color:inherit} code,tt{font-family:"DejaVu Sans Mono",monospace}
|
||||
.shell{max-width:1100px;margin:0 auto}
|
||||
.hero{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:22px 24px;border:1px solid var(--line);border-radius:18px;background:linear-gradient(135deg,#a80f18,#c44731 60%,#d79a54);color:#fff;box-shadow:0 12px 30px rgba(64,36,12,.08)}
|
||||
.hero img{height:42px;width:auto;display:block;background:#fff;border-radius:10px;padding:5px;box-shadow:0 8px 20px rgba(0,0,0,.12)}
|
||||
.hero h1{margin:0;font-size:28px;line-height:1.1}
|
||||
.hero p{margin:6px 0 0;font-size:15px;opacity:.95}
|
||||
.grid{margin-top:18px;display:grid;gap:16px}
|
||||
.card{display:block;text-decoration:none;background:var(--panel);border:1px solid var(--line);border-radius:16px;overflow:hidden;box-shadow:0 6px 18px rgba(64,36,12,.04)}
|
||||
.card-header{padding:16px 18px;background:linear-gradient(90deg,#efe7da,#e8dfcf);border-bottom:1px solid var(--line)}
|
||||
.card-title{margin:0;font-size:18px;color:var(--accent)}
|
||||
.card-sub{margin:6px 0 0;color:var(--gold);font-size:12px;text-transform:uppercase;letter-spacing:.12em}
|
||||
.card-body{padding:0}
|
||||
.info{padding:16px 18px;border-top:1px solid #eee5d7}
|
||||
.info:first-child{border-top:0}
|
||||
.info h3{margin:0 0 8px;font-size:15px;color:#8b4a1d}
|
||||
.info p,.info ul,.info ol{margin:0 0 10px;color:var(--muted)}
|
||||
.info p:last-child,.info ul:last-child,.info ol:last-child{margin-bottom:0}
|
||||
.info ul,.info ol{padding-left:22px}
|
||||
.note{color:#5f5349}
|
||||
@media (max-width:700px){body{padding:12px}.hero{padding:18px;align-items:flex-start;flex-direction:column}.hero img{height:36px}.card-header{padding:14px 16px}.info{padding:14px 16px}}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="shell">
|
||||
<div class="hero">
|
||||
<div>
|
||||
<h1>Main menu</h1>
|
||||
<p>SMArT configuration navigation with the original explanations preserved.</p>
|
||||
</div>
|
||||
<img src="/static/smart_icon.jpg" alt="SMArT logo">
|
||||
</div>
|
||||
<div class="grid">
|
||||
<a class="card" href="/settings/general" target="OPTS">
|
||||
<div class="card-header">
|
||||
<h2 class="card-title">General settings</h2>
|
||||
<div class="card-sub">Open settings</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="info">
|
||||
<h3>Servername</h3>
|
||||
<div class="note">The servername is the name under which this server will show up when using
|
||||
tools like <tt>SLIST</tt> (server-list).<br/>
|
||||
If you don't supply an entry for this section, the hostname of your
|
||||
Linux-machine will be converted to all-uppercase and used as the servername.
|
||||
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR=#D0D0FF>
|
||||
<TD COLSPAN=2>
|
||||
<B>Internal network number</B>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR=#E0E0FF>
|
||||
<TD COLSPAN=2>
|
||||
|
||||
If have dealt with the TCP/IP-configuration of your Linux-Box, the term
|
||||
<I>ip-address</I> may be familiar to you. It's a numer that uniquely
|
||||
identifies your machine in the internet.<BR>
|
||||
Linux-machine will be converted to all-uppercase and used as the servername.</div>
|
||||
</div>
|
||||
<div class="info">
|
||||
<h3>Internal network number</h3>
|
||||
<div class="note">If have dealt with the TCP/IP-configuration of your Linux-Box, the term
|
||||
<i>ip-address</i> may be familiar to you. It's a numer that uniquely
|
||||
identifies your machine in the internet.<br/>
|
||||
As you might already expect, even the IPX-people use a unique number to
|
||||
identify each other. Addresses in the IPX-world always consist of a
|
||||
4-byte network-number plus a 6-byte node-number (remember the
|
||||
ip-addresses also use 4-bytes).<BR>
|
||||
ip-addresses also use 4-bytes).<br/>
|
||||
The numbering-rule for ipx-clients is easy: their address is the
|
||||
external-network of the server they are connected to plus the
|
||||
hardware-address of their own ethernet-card (6 byte). As a result of this
|
||||
@@ -58,425 +73,301 @@ rule, the clients can determine their address automatically (by listening
|
||||
to the server and looking at their own ethernet-hardware) and no
|
||||
configuration-files on the clients-side have to be maintained. (It would
|
||||
really be a nasty thing if you think of very many DOS-clients [remember:
|
||||
DOS is an OS where ordinary users can screw up the configuration files].)<BR>
|
||||
For internal routing purposes, a NetWare-server has an <I>internal network</I><BR>
|
||||
DOS is an OS where ordinary users can screw up the configuration files].)<br/>
|
||||
For internal routing purposes, a NetWare-server has an <i>internal network</i><br/>
|
||||
As there is no organisation which regulates the use of network-numbers
|
||||
in the IPX-world, you have to run <TT>SLIST</TT> (under DOS or Linux) to
|
||||
in the IPX-world, you have to run <tt>SLIST</tt> (under DOS or Linux) to
|
||||
determine a number that isn't already used by another server on your
|
||||
net. You better double-check and ask the other network administrators
|
||||
before using a random value because not all servers might be on-line when
|
||||
you listen to the net.<BR>
|
||||
you listen to the net.<br/>
|
||||
A reasonable choice for the internal net-number of your MARS_NWE-server
|
||||
could be the ip-address of your Linux-Box. It is reasonable because
|
||||
ip-addresse are unique and if every nw-administrator uses only this uniqe
|
||||
value, potential conflicts will be minimized. Of course this choice is
|
||||
no guarantee and it only works if your Linux-Box IP is well configured.<BR>
|
||||
no guarantee and it only works if your Linux-Box IP is well configured.<br/>
|
||||
Please note that you have to specify the address of your internal
|
||||
IPX-network in hexadecimal format (the leading <TT>0x</TT> indicates it).<BR>
|
||||
<B>Most people who use FreeBSD want to set the network number of their IPX
|
||||
network here</B>
|
||||
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR=#D0D0FF>
|
||||
<TD COLSPAN=2>
|
||||
<B>Tests at startup</B>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR=#E0E0FF>
|
||||
<TD COLSPAN=2>
|
||||
|
||||
If you want some sanity checks at startup, set this flag, so
|
||||
MARS_NWE will try to create/change missing directories:<BR>
|
||||
<TT>SYS:LOGIN, SYS:MAIL, SYS:MAIL/XXX, SYS:PUBLIC, SYS:SYSTEM ...</TT>
|
||||
(with the right permissions, of course)<BR>
|
||||
This should also be enabled when you use a new MARS_NWE version.<BR>
|
||||
Disabling this test only spares little time when starting MARS_NWE.<BR>
|
||||
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR=#D0D0FF>
|
||||
<TD COLSPAN=2>
|
||||
<B>Server version</B>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR=#E0E0FF>
|
||||
<TD COLSPAN=2>
|
||||
|
||||
Some clients work better if the server tells that it is a 3.11 Server,
|
||||
IPX-network in hexadecimal format (the leading <tt>0x</tt> indicates it).<br/>
|
||||
<b>Most people who use FreeBSD want to set the network number of their IPX
|
||||
network here</b></div>
|
||||
</div>
|
||||
<div class="info">
|
||||
<h3>Tests at startup</h3>
|
||||
<div class="note">If you want some sanity checks at startup, set this flag, so
|
||||
MARS_NWE will try to create/change missing directories:<br/>
|
||||
<tt>SYS:LOGIN, SYS:MAIL, SYS:MAIL/XXX, SYS:PUBLIC, SYS:SYSTEM ...</tt>
|
||||
(with the right permissions, of course)<br/>
|
||||
This should also be enabled when you use a new MARS_NWE version.<br/>
|
||||
Disabling this test only spares little time when starting MARS_NWE.<br/></div>
|
||||
</div>
|
||||
<div class="info">
|
||||
<h3>Server version</h3>
|
||||
<div class="note">Some clients work better if the server tells that it is a 3.11 Server,
|
||||
although many calls (namespace services) of a real 3.11 Server are
|
||||
missing yet.<BR>
|
||||
missing yet.<br/>
|
||||
If you want to use longfilenamesupport and/or namespace routines
|
||||
you should set this section to '1' or '2'<BR>
|
||||
And you should read doc/FAQS.<BR>
|
||||
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR=#D0D0FF>
|
||||
<TD COLSPAN=2>
|
||||
<B>Burst mode</B>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR=#E0E0FF>
|
||||
<TD COLSPAN=2>
|
||||
|
||||
If you want to test Burst mode you can enable it here, and in config.h
|
||||
you must set <TT>ENABLE_BURSTMODE</TT> to 1. Also, you have to set the
|
||||
server version number to 3.12 .<BR>
|
||||
<B>MAX_BURST_READ/WRITE_BUF:</B><BR>
|
||||
you should set this section to '1' or '2'<br/>
|
||||
And you should read doc/FAQS.<br/></div>
|
||||
</div>
|
||||
<div class="info">
|
||||
<h3>Burst mode</h3>
|
||||
<div class="note">If you want to test Burst mode you can enable it here, and in config.h
|
||||
you must set <tt>ENABLE_BURSTMODE</tt> to 1. Also, you have to set the
|
||||
server version number to 3.12 .<br/>
|
||||
<b>MAX_BURST_READ/WRITE_BUF:</b><br/>
|
||||
Don't ask me what they mean, but they're hexadecimal, so don't forget to
|
||||
prepend <TT>0x</TT>.
|
||||
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD HEIGHT=25>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR=#C0C0FF>
|
||||
<TD COLSPAN=2>
|
||||
<A HREF="/settings/dirs" TARGET="OPTS"><B><FONT SIZE=+2>Directories</FONT></B></A>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR=#E0E0FF>
|
||||
<TD COLSPAN=2>
|
||||
|
||||
Some directories for MARS_NWE files.
|
||||
prepend <tt>0x</tt>.</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<a class="card" href="/settings/dirs" target="OPTS">
|
||||
<div class="card-header">
|
||||
<h2 class="card-title">Directories</h2>
|
||||
<div class="card-sub">Open settings</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="info">
|
||||
<div class="note">Some directories for MARS_NWE files.
|
||||
The path cache directory is needed for Client-32 and the namespace calls,
|
||||
the spool directory is used for internal print queue handling.
|
||||
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD HEIGHT=25>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR=#C0C0FF>
|
||||
<TD COLSPAN=2>
|
||||
<A HREF="/settings/configh" TARGET="OPTS"><B><FONT SIZE=+2>Precompiled settings</FONT></B></A>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR=#E0E0FF>
|
||||
<TD COLSPAN=2>
|
||||
|
||||
When you just leave these fields empty, the values in your <TT>config.h</TT>
|
||||
the spool directory is used for internal print queue handling.</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<a class="card" href="/settings/configh" target="OPTS">
|
||||
<div class="card-header">
|
||||
<h2 class="card-title">Precompiled settings</h2>
|
||||
<div class="card-sub">Open settings</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="info">
|
||||
<div class="note">When you just leave these fields empty, the values in your <tt>config.h</tt>
|
||||
file will be used. If you want to change those settings without recompiling
|
||||
<TT>MARS_NWE</TT>, you can change them here.
|
||||
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD HEIGHT=25>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR=#C0C0FF>
|
||||
<TD COLSPAN=2>
|
||||
<A HREF="/settings/security" TARGET="OPTS"><B><FONT SIZE=+2>Security</FONT></B></A>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR=#D0D0FF>
|
||||
<TD COLSPAN=2>
|
||||
<B>Modes</B>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR=#E0E0FF>
|
||||
<TD COLSPAN=2>
|
||||
|
||||
Here you can change the standard modes for new files and directories.
|
||||
You can enter <TT>0</TT> here to use the default value, and you can enter
|
||||
<TT>-1</TT> for the directory <TT>creat()</TT> mode to use the
|
||||
<TT>st_mode</TT> of the parent directory.
|
||||
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR=#D0D0FF>
|
||||
<TD COLSPAN=2>
|
||||
<B>Password handling of DOS-clients</B>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR=#E0E0FF>
|
||||
<TD COLSPAN=2>
|
||||
|
||||
When changing your MARS_NWE-password from a DOS-client, this client
|
||||
(think of "<TT>LOGIN.EXE</TT>", "<TT>SYSCON.EXE</TT>" or "<TT>SETPASS.EXE</TT>")
|
||||
<tt>MARS_NWE</tt>, you can change them here.</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<a class="card" href="/settings/security" target="OPTS">
|
||||
<div class="card-header">
|
||||
<h2 class="card-title">Security</h2>
|
||||
<div class="card-sub">Open settings</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="info">
|
||||
<h3>Modes</h3>
|
||||
<div class="note">Here you can change the standard modes for new files and directories.
|
||||
You can enter <tt>0</tt> here to use the default value, and you can enter
|
||||
<tt>-1</tt> for the directory <tt>creat()</tt> mode to use the
|
||||
<tt>st_mode</tt> of the parent directory.</div>
|
||||
</div>
|
||||
<div class="info">
|
||||
<h3>Password handling of DOS-clients</h3>
|
||||
<div class="note">When changing your MARS_NWE-password from a DOS-client, this client
|
||||
(think of "<tt>LOGIN.EXE</tt>", "<tt>SYSCON.EXE</tt>" or "<tt>SETPASS.EXE</tt>")
|
||||
can encrypt your password before sending it to the MARS_NWE-server
|
||||
(this improves security a little bit).<BR>
|
||||
(this improves security a little bit).<br/>
|
||||
In this section you can enforce encryption of user-passwords or allow
|
||||
not-encrypted sending of passwords over the net.<BR>
|
||||
On the Linux-side, passwords will only be stored in encrypted format.
|
||||
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD HEIGHT=25>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR=#C0C0FF>
|
||||
<TD COLSPAN=2>
|
||||
<A HREF="/settings/susers" TARGET="OPTS"><B><FONT SIZE=+2>User configuration</FONT></B></A>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR=#D0D0FF>
|
||||
<TD COLSPAN=2>
|
||||
<B>Guest user</B>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR=#E0E0FF>
|
||||
<TD COLSPAN=2>
|
||||
|
||||
Here you can set the UID a user will get before logging in.
|
||||
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR=#D0D0FF>
|
||||
<TD COLSPAN=2>
|
||||
<B>Supervisor user</B>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR=#E0E0FF>
|
||||
<TD COLSPAN=2>
|
||||
|
||||
The <TT>SUPERVISOR</TT> of a NetWare-server is much like <TT>root</TT> on the
|
||||
Linux-side.<BR>
|
||||
not-encrypted sending of passwords over the net.<br/>
|
||||
On the Linux-side, passwords will only be stored in encrypted format.</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<a class="card" href="/settings/susers" target="OPTS">
|
||||
<div class="card-header">
|
||||
<h2 class="card-title">User configuration</h2>
|
||||
<div class="card-sub">Open settings</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="info">
|
||||
<h3>Guest user</h3>
|
||||
<div class="note">Here you can set the UID a user will get before logging in.</div>
|
||||
</div>
|
||||
<div class="info">
|
||||
<h3>Supervisor user</h3>
|
||||
<div class="note">The <tt>SUPERVISOR</tt> of a NetWare-server is much like <tt>root</tt> on the
|
||||
Linux-side.<br/>
|
||||
Specify a Linux-user that should be mapped to the supervisor of this
|
||||
MARS_NWE-server.<BR>
|
||||
To improve security, don't use <TT>root</TT> for this purpose but create a
|
||||
seperate administrative account (under Linux) called <TT>nw-adm</TT> or similar.<BR>
|
||||
MARS_NWE-server.<br/>
|
||||
To improve security, don't use <tt>root</tt> for this purpose but create a
|
||||
seperate administrative account (under Linux) called <tt>nw-adm</tt> or similar.<br/>
|
||||
The nw-user defined in this section will have the MARS_NWE internal UID
|
||||
1 (remember even under Linux <TT>root</TT> must have the special UID 0), so
|
||||
1 (remember even under Linux <tt>root</tt> must have the special UID 0), so
|
||||
it is not possible to define a supervisor in section 13 (the users
|
||||
defined there will get random UIDs).<BR>
|
||||
You <I>can</I> define a user with name <TT>SUPERVISOR</TT> in section 13, but he
|
||||
won't really be the "local god" on the MARS_NWE-server.<BR>
|
||||
And of course you <I>can</I> define a supervisor with name <TT>GOD</TT> or <TT>ROOT</TT>
|
||||
in <I>this</I> section, which would only break the traditional naming-scheme
|
||||
of the NetWare-world.
|
||||
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR=#D0D0FF>
|
||||
<TD COLSPAN=2>
|
||||
<B>User mapping</B>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR=#E0E0FF>
|
||||
<TD COLSPAN=2>
|
||||
|
||||
If you have a large number of accounts on your Linux-machine, you may
|
||||
want to map all Linux-logins automatically to MARS_NWE-logins.<BR>
|
||||
defined there will get random UIDs).<br/>
|
||||
You <i>can</i> define a user with name <tt>SUPERVISOR</tt> in section 13, but he
|
||||
won't really be the "local god" on the MARS_NWE-server.<br/>
|
||||
And of course you <i>can</i> define a supervisor with name <tt>GOD</tt> or <tt>ROOT</tt>
|
||||
in <i>this</i> section, which would only break the traditional naming-scheme
|
||||
of the NetWare-world.</div>
|
||||
</div>
|
||||
<div class="info">
|
||||
<h3>User mapping</h3>
|
||||
<div class="note">If you have a large number of accounts on your Linux-machine, you may
|
||||
want to map all Linux-logins automatically to MARS_NWE-logins.<br/>
|
||||
At this stage this section is only a quick hack to make life a bit
|
||||
easier for the administrator.<BR>
|
||||
<B>WARNING:</B> As there is no algorithm to convert the encrypted
|
||||
easier for the administrator.<br/>
|
||||
<b>WARNING:</b> As there is no algorithm to convert the encrypted
|
||||
Linux-passwords into the encrypted format used by the DOS-clients (and
|
||||
therefore MARS_NWE), you have to supply a common password for all
|
||||
automatically mapped users. This is a big security concern and you
|
||||
should never make this common password public (and, of course you
|
||||
should choose a sufficient "secure" (read: difficult) password).<BR>
|
||||
should choose a sufficient "secure" (read: difficult) password).<br/>
|
||||
Type the common password to grant access to the users login and the
|
||||
command "setpass" instead of telling the password to the user.<BR>
|
||||
command "setpass" instead of telling the password to the user.<br/>
|
||||
Only those Linux-logins will handled automatically that don't have a
|
||||
x or asterisk as their encrypted password.
|
||||
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD HEIGHT=25>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR=#C0C0FF>
|
||||
<TD COLSPAN=2>
|
||||
<A HREF="/settings/volumes" TARGET="OPTS"><B><FONT SIZE=+2>Volumes</FONT></B></A>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR=#E0E0FF>
|
||||
<TD COLSPAN=2>
|
||||
|
||||
The OS/2 additional namespace can be used by Windows 9x too. The
|
||||
x or asterisk as their encrypted password.</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<a class="card" href="/settings/volumes" target="OPTS">
|
||||
<div class="card-header">
|
||||
<h2 class="card-title">Volumes</h2>
|
||||
<div class="card-sub">Open settings</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="info">
|
||||
<div class="note">The OS/2 additional namespace can be used by Windows 9x too. The
|
||||
'no fixed i-nodes' option is necessary when exporting DOS or CD-ROM
|
||||
file systems. The 'single filesystem' option can be used when the
|
||||
entire volume consists of only one mounted filesystem/device.
|
||||
For more information about pipe filesystems you can take a look at
|
||||
MARS_NWE's documentation directory.
|
||||
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD HEIGHT=25>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR=#C0C0FF>
|
||||
<TD COLSPAN=2>
|
||||
<A HREF="/settings/devices" TARGET="OPTS"><B><FONT SIZE=+2>Devices</FONT></B></A>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR=#E0E0FF>
|
||||
<TD COLSPAN=2>
|
||||
|
||||
This section contains information for the ipx-router built into mars_nwe
|
||||
and/or the external program <TT>nwrouted</TT>.<BR>
|
||||
MARS_NWE's documentation directory.</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<a class="card" href="/settings/devices" target="OPTS">
|
||||
<div class="card-header">
|
||||
<h2 class="card-title">Devices</h2>
|
||||
<div class="card-sub">Open settings</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="info">
|
||||
<div class="note">This section contains information for the ipx-router built into mars_nwe
|
||||
and/or the external program <tt>nwrouted</tt>.<br/>
|
||||
Both processes exchange the IPX-packets between your machine and the rest
|
||||
of the world (in other words: their functionallity is essential). Of
|
||||
course, to use one of both is already sufficient.<BR>
|
||||
<B>Note for people with other IPX/NCP servers on the net:</B><BR>
|
||||
<UL><LI>choose the same frame-type as the other servers use
|
||||
<LI>make sure your network-number is not already in use by another server
|
||||
(see the output of <TT>SLIST</TT> under Linux or DOS)</UL>
|
||||
course, to use one of both is already sufficient.<br/>
|
||||
<b>Note for people with other IPX/NCP servers on the net:</b><br/>
|
||||
<ul><li>choose the same frame-type as the other servers use
|
||||
<li>make sure your network-number is not already in use by another server
|
||||
(see the output of <tt>SLIST</tt> under Linux or DOS)</li></li></ul>
|
||||
Under Linux, it is possible to let the kernel creat all ipx-devices
|
||||
automatically for you. This is only possible (and only makes sense then)
|
||||
if there are other IPX/NCP servers on the same net which are setup
|
||||
correctly.<BR>
|
||||
<OL>
|
||||
<LI><B>Network number</B><BR>
|
||||
correctly.<br/>
|
||||
<ol>
|
||||
<li><b>Network number</b><br/>
|
||||
This number is determined by the router of the physical network you're
|
||||
attached to. Use "0x0" to use the entry for all network number match.
|
||||
<LI><B>Device</B><BR>
|
||||
The network-interface associated with the NET_NUMBER. (<TT>eth0</TT>,
|
||||
<TT>arc0</TT>, <TT>ppp0</TT>, etc.) Use an asterisk to use this entry for
|
||||
<li><b>Device</b><br/>
|
||||
The network-interface associated with the NET_NUMBER. (<tt>eth0</tt>,
|
||||
<tt>arc0</tt>, <tt>ppp0</tt>, etc.) Use an asterisk to use this entry for
|
||||
all devices match.
|
||||
<LI><B>Frame type</B><BR>
|
||||
The frame-type of the data-packets on your local network.<BR>
|
||||
<li><b>Frame type</b><br/>
|
||||
The frame-type of the data-packets on your local network.<br/>
|
||||
Possible values are:
|
||||
<UL><LI><TT>ethernet_ii</TT> (Best for mixed(ipx, ip) environments)
|
||||
<LI><TT>802.2</TT> (Novell uses this as default since 3.12)
|
||||
<LI><TT>802.3</TT> (Older frame typ, some boot-PROMs use it)
|
||||
<LI><TT>snap</TT> (Normally not used)
|
||||
<LI><TT>token</TT> (For token ring cards)
|
||||
<LI><TT>auto</TT> (Automatic detection of the frame-type used in your IPX-environment)
|
||||
</UL>
|
||||
<LI><B>Ticks</B><BR>
|
||||
<ul><li><tt>ethernet_ii</tt> (Best for mixed(ipx, ip) environments)
|
||||
<li><tt>802.2</tt> (Novell uses this as default since 3.12)
|
||||
<li><tt>802.3</tt> (Older frame typ, some boot-PROMs use it)
|
||||
<li><tt>snap</tt> (Normally not used)
|
||||
<li><tt>token</tt> (For token ring cards)
|
||||
<li><tt>auto</tt> (Automatic detection of the frame-type used in your IPX-environment)
|
||||
</li></li></li></li></li></li></ul>
|
||||
<li><b>Ticks</b><br/>
|
||||
The time data-packets need to get delivered over a
|
||||
certain interface. If your connection goes through several
|
||||
routers, the shortest path can be determined by summing up
|
||||
all ticks for every route and compare the results.<BR>
|
||||
(1 tick = 1/18th second), default=1<BR>
|
||||
<B>NOTE:</B> If ticks > 6 then the internal router handles
|
||||
all ticks for every route and compare the results.<br/>
|
||||
(1 tick = 1/18th second), default=1<br/>
|
||||
<b>NOTE:</b> If ticks > 6 then the internal router handles
|
||||
RIP/SAP specially. (RIP/SAP filtering)
|
||||
</OL>
|
||||
<B>NOTE:</B>
|
||||
</li></li></li></li></ol>
|
||||
<b>NOTE:</b>
|
||||
Automatic detection in this section means that ipx-interfaces which
|
||||
are created by other instances than the server/router,
|
||||
e.g. pppd, ipppd or ipx_interface, will be detected and inserted/removed
|
||||
in internal device/routing table at runtime.<BR>
|
||||
<B>You don't have to set this in FreeBSD!</B>
|
||||
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD HEIGHT=25>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR=#C0C0FF>
|
||||
<TD COLSPAN=2>
|
||||
<A HREF="/settings/logging" TARGET="OPTS"><B><FONT SIZE=+2>Logging</FONT></B></A>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR=#E0E0FF>
|
||||
<TD COLSPAN=2>
|
||||
|
||||
MARS_NWE can keep a log file with error messages, click here to set what
|
||||
kind of messages must be logged and where.<BR>
|
||||
You can set a logfile name to <TT>syslog</TT> if you want MARS_NWE to
|
||||
use <TT>syslogd</TT> for logging.<BR>
|
||||
According to <TT>nwserv.conf</TT>, the NWCLIENT tag must always be set
|
||||
to <I>No debugging</I>.
|
||||
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD HEIGHT=25>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR=#C0C0FF>
|
||||
<TD COLSPAN=2>
|
||||
<A HREF="/settings/smart" TARGET="OPTS"><B><FONT SIZE=+2>SMArT settings</FONT></B></A>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR=#E0E0FF>
|
||||
<TD COLSPAN=2>
|
||||
|
||||
Some things have to be configured here before you can use SMArT.
|
||||
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD HEIGHT=25>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR=#D0D0FF>
|
||||
<TD COLSPAN=2>
|
||||
<A HREF="/settings/users" TARGET="OPTS"><B><FONT SIZE=+2>Users</FONT></B></A>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR=#E0E0FF>
|
||||
<TD COLSPAN=2>
|
||||
|
||||
You can edit the userlist from the bindery files here. This option will not
|
||||
change anything to the <TT>nwserv.conf</TT> configuration file.
|
||||
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD HEIGHT=25>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR=#D0D0FF>
|
||||
<TD COLSPAN=2>
|
||||
<A HREF="/settings/groups" TARGET="OPTS"><B><FONT SIZE=+2>Groups</FONT></B></A>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR=#E0E0FF>
|
||||
<TD COLSPAN=2>
|
||||
|
||||
You can edit the group list from the bindery files here. This option will not
|
||||
change anything to the <TT>nwserv.conf</TT> configuration file.
|
||||
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD HEIGHT=25>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR=#D0D0FF>
|
||||
<TD COLSPAN=2>
|
||||
<A HREF="/settings/queues" TARGET="OPTS"><B><FONT SIZE=+2>Print queues</FONT></B></A>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR=#E0E0FF>
|
||||
<TD COLSPAN=2>
|
||||
|
||||
Here you can edit the list of print queues. The things you have to fill in are:
|
||||
<OL>
|
||||
<LI><B>Print queue name</B><BR>
|
||||
in internal device/routing table at runtime.<br/>
|
||||
<b>You don't have to set this in FreeBSD!</b></div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<a class="card" href="/settings/logging" target="OPTS">
|
||||
<div class="card-header">
|
||||
<h2 class="card-title">Logging</h2>
|
||||
<div class="card-sub">Open settings</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="info">
|
||||
<div class="note">MARS_NWE can keep a log file with error messages, click here to set what
|
||||
kind of messages must be logged and where.<br/>
|
||||
You can set a logfile name to <tt>syslog</tt> if you want MARS_NWE to
|
||||
use <tt>syslogd</tt> for logging.<br/>
|
||||
According to <tt>nwserv.conf</tt>, the NWCLIENT tag must always be set
|
||||
to <i>No debugging</i>.</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<a class="card" href="/settings/smart" target="OPTS">
|
||||
<div class="card-header">
|
||||
<h2 class="card-title">SMArT settings</h2>
|
||||
<div class="card-sub">Open settings</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="info">
|
||||
<div class="note">Some things have to be configured here before you can use SMArT.</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<a class="card" href="/settings/users" target="OPTS">
|
||||
<div class="card-header">
|
||||
<h2 class="card-title">Users</h2>
|
||||
<div class="card-sub">Open settings</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="info">
|
||||
<div class="note">You can edit the userlist from the bindery files here. This option will not
|
||||
change anything to the <tt>nwserv.conf</tt> configuration file.</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<a class="card" href="/settings/groups" target="OPTS">
|
||||
<div class="card-header">
|
||||
<h2 class="card-title">Groups</h2>
|
||||
<div class="card-sub">Open settings</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="info">
|
||||
<div class="note">You can edit the group list from the bindery files here. This option will not
|
||||
change anything to the <tt>nwserv.conf</tt> configuration file.</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<a class="card" href="/settings/queues" target="OPTS">
|
||||
<div class="card-header">
|
||||
<h2 class="card-title">Print queues</h2>
|
||||
<div class="card-sub">Open settings</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="info">
|
||||
<div class="note">Here you can edit the list of print queues. The things you have to fill in are:
|
||||
<ol>
|
||||
<li><b>Print queue name</b><br/>
|
||||
The name with which the print queue will show up in the printer lists, and
|
||||
the name you need when you want to print something from the client.
|
||||
<LI><B>Unix printing command</B><BR>
|
||||
<li><b>Unix printing command</b><br/>
|
||||
The command used to send a file to the printer, the text/etc. will come from
|
||||
the standard input.<BR>
|
||||
the standard input.<br/>
|
||||
There's a nasty bug in MARS_NWE that removes this property, well, I think
|
||||
it's a bug. It also happens when the startup tests are not set to maximum.
|
||||
<LI><B>Spool directory</B><BR>
|
||||
<li><b>Spool directory</b><br/>
|
||||
The directory used to keep the print spool for this print queue. Use the
|
||||
<TT>VOLUME:/directory</TT> form, you can leave this one empty to use a
|
||||
<tt>VOLUME:/directory</tt> form, you can leave this one empty to use a
|
||||
default directory.
|
||||
</UL>
|
||||
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</li></li></li></ol></div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
BIN
static/smart.jpg
|
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 4.6 KiB |
@@ -1,44 +0,0 @@
|
||||
<HTML>
|
||||
<BODY BGCOLOR=#F0F0FF>
|
||||
|
||||
<TABLE BORDER=0 CELLSPACING=0 WIDTH=100%>
|
||||
<TR BGCOLOR=#C0C0FF>
|
||||
<TD>
|
||||
<B><FONT SIZE=+2>SMArT v0.99 (Perl)</FONT></B>
|
||||
</TD>
|
||||
<TD ALIGN=RIGHT>
|
||||
<IMG SRC="/static/smart_icon.jpg"><BR>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR=#D0D0FF>
|
||||
<TD COLSPAN=2>
|
||||
Welcome to SMArT, the easy way to configure mars_nwe, <B>Mar</B>tin <B>S</B>tover's <B>N</B>et<B>W</B>are <B>e</B>mulator.
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR=#E0E0FF>
|
||||
<TD COLSPAN=2>
|
||||
To apply the changes you have made to the configuration, you have to restart <TT>MARS_NWE</TT>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR=#E0E0FF>
|
||||
<TH ALIGN=CENTER>
|
||||
<A HREF="/cgi-bin/control?start">Start <TT>MARS_NWE</TT>
|
||||
</TH>
|
||||
<TH ALIGN=CENTER>
|
||||
<A HREF="/cgi-bin/control?stop">Stop <TT>MARS_NWE</TT>
|
||||
</TH>
|
||||
</TR>
|
||||
<TR BGCOLOR=#E0E0FF>
|
||||
<TD COLSPAN=2 ALIGN=CENTER>
|
||||
<BR>The newest version of SMArT can be downloaded from <A HREF="http://www.lintux.cx/" TARGET="_parent">my website</A>.
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR=#E0E0FF>
|
||||
<TH COLSPAN=2>
|
||||
<BR>© Copyright 2001 <A HREF="mailto:lintux@lintux.cx">Wilmer van der Gaast</A>
|
||||
</TH>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
119
static/start.html.cmake
Normal file
@@ -0,0 +1,119 @@
|
||||
<!DOCTYPE html>
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>SMArT</TITLE>
|
||||
<META CHARSET="utf-8">
|
||||
<META NAME="viewport" CONTENT="width=device-width, initial-scale=1">
|
||||
<LINK REL="icon" HREF="/static/favicon.ico" TYPE="image/x-icon">
|
||||
<LINK REL="icon" TYPE="image/png" SIZES="32x32" HREF="/static/favicon-32x32.png">
|
||||
<LINK REL="icon" TYPE="image/png" SIZES="16x16" HREF="/static/favicon-16x16.png">
|
||||
<LINK REL="apple-touch-icon" HREF="/static/apple-touch-icon.png">
|
||||
<STYLE TYPE="text/css">
|
||||
BODY {
|
||||
margin: 0;
|
||||
padding: 22px;
|
||||
background: #f6f1ea;
|
||||
color: #342a25;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
}
|
||||
A { color: #9f1f1f; text-decoration: none; }
|
||||
A:hover { text-decoration: underline; }
|
||||
.wrapper {
|
||||
max-width: 900px;
|
||||
margin: 0 auto;
|
||||
background: #fffdfa;
|
||||
border: 1px solid #e5d6c6;
|
||||
border-radius: 16px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 10px 30px rgba(60, 30, 10, 0.10);
|
||||
}
|
||||
.hero {
|
||||
padding: 22px 24px;
|
||||
background: linear-gradient(135deg, #7d1018, #b82929 60%, #d7b169);
|
||||
color: #ffffff;
|
||||
}
|
||||
.hero TABLE { width: 100%; border-collapse: collapse; }
|
||||
.hero-title {
|
||||
font-size: 30px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.hero-sub {
|
||||
margin-top: 6px;
|
||||
color: #f8e6c8;
|
||||
font-size: 14px;
|
||||
}
|
||||
.hero IMG { max-height: 56px; }
|
||||
.body {
|
||||
padding: 22px;
|
||||
}
|
||||
.notice {
|
||||
padding: 14px 16px;
|
||||
margin-bottom: 14px;
|
||||
border: 1px solid #ecdcc8;
|
||||
border-radius: 12px;
|
||||
background: #fbf6ef;
|
||||
}
|
||||
.actions TABLE { width: 100%; border-collapse: separate; border-spacing: 12px; }
|
||||
.action {
|
||||
display: block;
|
||||
padding: 16px 18px;
|
||||
border-radius: 12px;
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
color: #ffffff;
|
||||
text-decoration: none;
|
||||
background: #9f1f1f;
|
||||
}
|
||||
.action.secondary {
|
||||
background: #6f5b4f;
|
||||
}
|
||||
.footer {
|
||||
padding-top: 8px;
|
||||
font-size: 13px;
|
||||
color: #6c5b52;
|
||||
}
|
||||
</STYLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<DIV CLASS="wrapper">
|
||||
<DIV CLASS="hero">
|
||||
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0">
|
||||
<TR>
|
||||
<TD>
|
||||
<DIV CLASS="hero-title">SMArT v@MARS_NWE_VERSION@</DIV>
|
||||
<DIV CLASS="hero-sub">Perl interface for configuring MARS_NWE</DIV>
|
||||
</TD>
|
||||
<TD ALIGN="RIGHT">
|
||||
<IMG SRC="/static/smart_icon.jpg" ALT="SMArT">
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</DIV>
|
||||
<DIV CLASS="body">
|
||||
<DIV CLASS="notice">
|
||||
Welcome to SMArT, the easy way to configure <B>MARS_NWE</B>.
|
||||
</DIV>
|
||||
<DIV CLASS="notice">
|
||||
To apply changes to the configuration, restart <TT>MARS_NWE</TT> after saving your settings.
|
||||
</DIV>
|
||||
<DIV CLASS="actions">
|
||||
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0">
|
||||
<TR>
|
||||
<TD WIDTH="50%"><A CLASS="action" HREF="/service/control?start">Start <TT>MARS_NWE</TT></A></TD>
|
||||
<TD WIDTH="50%"><A CLASS="action secondary" HREF="/service/control?stop">Stop <TT>MARS_NWE</TT></A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH="50%"><A CLASS="action secondary" HREF="/service/control?restart">Restart <TT>MARS_NWE</TT></A></TD>
|
||||
<TD WIDTH="50%"><A CLASS="action secondary" HREF="/service/control?status">Status <TT>MARS_NWE</TT></A></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</DIV>
|
||||
<DIV CLASS="footer">
|
||||
The newest version of SMArT can be downloaded from <A HREF="http://www.lintux.cx/" TARGET="_parent">the project website</A>.<BR><BR>
|
||||
© Copyright 2026 <A HREF="mailto:mario.fetka@disconnected-by-peer.at">Mario Fetka</A>
|
||||
</DIV>
|
||||
</DIV>
|
||||
</DIV>
|
||||
</BODY>
|
||||
</HTML>
|
||||