From 9c1a6f0cba275756ac423a0a1e35e012ac3156a1 Mon Sep 17 00:00:00 2001 From: tenox7 Date: Mon, 9 Jul 2018 21:17:58 -0700 Subject: added uname support --- dialogs.c | 16 +++++++++++----- wfm.h | 1 + 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/dialogs.c b/dialogs.c index 7c26cbd..5477a84 100644 --- a/dialogs.c +++ b/dialogs.c @@ -230,16 +230,20 @@ void error(char *msg, ...) { // About message // void about(void) { + struct utsname ut; + + memset(&ut, 0, sizeof(ut)); + uname(&ut); cgiHeaderContentType("text/html"); html_title("About"); fprintf(cgiOut, "\n" "\n" "
\n" - "\n" + "
\n" "\n" "\n" "\n" "\n" @@ -248,7 +252,6 @@ void about(void) { "\n" "\n" "
\n" - "\"wfm About:\n" + "\"wfm About: %s\n" "
\n" " 
\n" - "%s
\n" "WFM Implemented by Antoni Sawicki
\n" "CGIC Library by Thomas Boutell
\n" "Server Side RFC 1321 implementation by L. Peter Deutsch
\n" @@ -267,9 +270,10 @@ void about(void) { "WFM: %s (build %s / %s)
\n" "GCC: %s
\n" "Server: %s
\n" - "User Agent: %s
\n" + "OS: %s %s %s %s %s
\n" "NAME_MAX: %d
\n" "PATH_MAX: %d
\n" + "User Agent: %s
\n" "JavaScript Level: %d
\n" "Change Control: %s (%s)
\n" " 

\n" @@ -288,7 +292,9 @@ void about(void) { "

 
\n" "
\n\n", - rt.iconsurl, cfg.tagline, VERSION, __DATE__, __TIME__, __VERSION__, cgiServerSoftware, cgiUserAgent, NAME_MAX, PATH_MAX, rt.js, + rt.iconsurl, cfg.tagline, VERSION, __DATE__, __TIME__, __VERSION__, + cgiServerSoftware, ut.sysname, ut.nodename, ut.release, ut.version, ut.machine, + NAME_MAX, PATH_MAX, cgiUserAgent, rt.js, #ifdef WFMGIT "Git" #else diff --git a/wfm.h b/wfm.h index 7ac94fe..321040c 100644 --- a/wfm.h +++ b/wfm.h @@ -55,6 +55,7 @@ #include #include #include +#include #include "md5.h" #include "cgic.h" -- cgit v1.2.3