Commit Graph

4194 Commits (ce6fe2e749fd704467db368fbe08d99d9bcba545)
 

Author SHA1 Message Date
Ramón M. Gómez 506c6708cd #914: Installer and updater check HTTP and HTTPS connections to avoid proxy configuration errors. 2019-10-01 14:04:27 +02:00
OpenGnSys Support Team cb1fbed876 #915: adapt test to use id and profile fields
Update restore_image.json to use id and profile fields.
2019-10-01 12:59:50 +02:00
Roberto Hueso Gómez d233fdbaa8 #915: Adapt web to use new image/restore cmd in REST API
SocketHidra restaurar imagen has been replaced by POST image/restore.
2019-10-01 12:56:10 +02:00
Roberto Hueso Gómez fc15dd10ce #915: Add POST /image/restore command to REST API in ogAdmServer
This patch implements the command "image/create" that creates an image
in a client.

	Request:
		POST /image/restore
		{ "clients" : [ "192.168.56.11" ], "disk" : "1", "partition" : "1", "name" : "test", "repository" : "192.168.56.10", "type" : "UNICAST", "filesystem": "1", "image_id": "1"}
	Reply:
		200 OK
2019-10-01 12:56:10 +02:00
Roberto Hueso Gómez b636e61b6e #915: Adapt web to use new image/create cmd in REST API
SocketHidra crear imagen has been replaced by POST /imagen/create.
2019-10-01 12:56:10 +02:00
Roberto Hueso Gómez 70b1e58045 #915: add og_json_parse_string() and use it
This patch avoids repeating similar code by using just one json parser.
2019-10-01 12:56:10 +02:00
Roberto Hueso Gómez 7f2dd15e09 #915: Add POST /image/create command to REST API in ogAdmServer
This patch implements the command "image/create" that creates an image
in a client.

    Request:
            POST /image/create
	    { "clients" : [ "192.168.2.1" ], "disk" : "1", "partition" : "1", "code" : "1", "id" : "1", "name" : "test", "repository" : "192.168.2.2" }
    Reply:
            200 OK
2019-10-01 12:56:10 +02:00
Roberto Hueso Gómez fe0e6c493a #915: Removes braces for single statement if branch
Just a cleanup.
2019-10-01 12:56:10 +02:00
Ramón M. Gómez 74e671261b #802 #888: Fix bug when replacing PXE template names. 2019-09-27 12:30:26 +02:00
Irina Gomez b4d8d51e8d #802 #888 opengnsys_update.sh: The names of PXE templates for BIOS are changed for compatibility with UEFI computers. 2019-09-27 11:13:44 +02:00
Ramón M. Gómez 84954097c4 #925: settoken: new server script to generate service access tokens. 2019-09-26 11:37:49 +02:00
Irina Gomez 8645a4a385 #929 setsslkey: Script for configurate public key authentication in ogLive. 2019-09-25 13:51:52 +02:00
Ramón M. Gómez 3dff695541 #914: Removed code from unused functions: ogInstallLinuxClient and ogInstallWindowsClient. 2019-09-25 10:40:18 +02:00
Ramón M. Gómez 1c23e333b5 #914: Remove unused files: ogAdmLnxClient, ogAdmWinClient and Chinese Grub4Dos. 2019-09-25 10:30:58 +02:00
Ramón M. Gómez 45f36e23ac #914: Updated list of closed tickets. 2019-09-25 10:09:23 +02:00
Ramón M. Gómez e371a87cda #802 #888 setclientmode: fix web user detection. 2019-09-24 13:40:59 +02:00
Irina Gomez 4d5cafd674 #802 #888 setclientmode: User must be root or console. mention of the fourth parameter is removed 2019-09-24 09:39:15 +02:00
Ramón M. Gómez 0f21492780 #839: Reservation (power-on) operation is also sent to client repository (as in {{{e57b608}}} commit). 2019-09-23 13:38:47 +02:00
Irina Gomez c2871184ce #928 Multicast ports are allowed from 9000 to 9100. 2019-09-23 12:38:46 +02:00
Ramón M. Gómez 918688e6c7 #919: How to use new URLs in menus. 2019-09-23 10:36:36 +02:00
Ramón M. Gómez 8c64d10a7e #919: Browser binary and locales. 2019-09-23 10:21:46 +02:00
Ramón M. Gómez 34994c7242 #919: Fix Qt download URL to build the Browser. 2019-09-23 10:16:51 +02:00
Ramón M. Gómez f998ebd6e5 #914: Fix OGAgent installation instructions. 2019-09-20 13:48:45 +02:00
Ramón M. Gómez 2e1b900bd8 #914: Installed/Update newest ogLive version. 2019-09-20 09:29:03 +02:00
Irina Gomez 8b5283a81f #922 Fixing code cleanup: the^CgLiveAdapter.lib content is located in ogGrubInstall. 2019-09-20 09:03:39 +02:00
Roberto Hueso Gómez 438afb2316 #915: Fix file descriptor leak in og_socket_server_init() from exit path
Call close() to release the socket in the event of an error.

infer says:

sources/ogAdmServer.cpp:1244: error: RESOURCE_LEAK
  resource acquired by call to `socket()` at line 1236, column 6 is not released after line 1244, column 3.
  1242.   			 sizeof(on));
  1243.   	if (res < 0) {
  1244. > 		syslog(LOG_ERR, "cannot set broadcast socket\n");
  1245.   		return false;
  1246.   	}

Not a real problem since OS releases process resources if the server
cannot bind to the port, but just to be correct here.
2019-09-19 16:06:07 +02:00
Roberto Hueso Gómez 391f9befcb #915: Return 400 status code in POST methods when no payload is attached
If no payload is attached to method that requires a payload, then the API
returns a 400 status code (following RFC 7231) instead of the previous 404.

test_0001_get_clients.py is also modified to fit the new status code.
2019-09-19 16:06:03 +02:00
Irina Gomez b96fd67544 bootOsCustom.template: supports several disk and one data partition. 2019-09-19 12:08:37 +02:00
Irina Gomez 4d6f8b6aa0 #873 opengnsys_import.sh: The names of PXE templates for BIOS are changed for compatibility with UEFI computers. 2019-09-19 10:36:37 +02:00
Roberto Hueso Gómez ad10ec16eb #915: Fix incorrect method and code in invalid GET requests
Some tests should perform GET requests however they incorrectly use POST.
Return codes for these tests have also been fixed.
2019-09-18 17:40:41 +02:00
Roberto Hueso Gómez 8bf6a89087 #915: Remove duplicated test
This test is already performed in test_0001_get_clients.py
2019-09-18 17:40:41 +02:00
Roberto Hueso Gómez f4e69d51ff #915: more descriptive function name in test
This test sends a POST with no body, which is illegal, use a function
name that describes this.
2019-09-18 17:40:41 +02:00
Irina Gomez 3283bc76f5 #858: The tip of the day is shown only when entering the web console. change in style: align image center and maximum width for text. 2019-09-18 11:07:07 +02:00
Ramón M. Gómez 2c1b0cf577 #914: Fix duplicates when detecting network parameters and get main nameserver with Systemd. 2019-09-17 11:19:52 +02:00
Ramón M. Gómez 2600001635 #914: Remove unused binary {{{ld-mac}}}. 2019-09-12 08:53:40 +02:00
Ramón M. Gómez 42205501f5 #914: Remove obsolete code from Vagrant file for development environment. 2019-09-11 19:10:33 +02:00
Ramón M. Gómez bf7643d23f #919: Show instructions to compile locale files in the Browser's Vagrant file. 2019-09-11 19:05:49 +02:00
Ramón M. Gómez 293234a05b #919: Updating Browser translation strings. 2019-09-11 19:01:36 +02:00
Ramón M. Gómez 993b77a7c3 #914: Avoiding external script calls and parsing input with stricter regular expressions in {{{sendFileMcast}}}. 2019-09-11 11:43:20 +02:00
Javier Sánchez Parra 7534054cb2 #915 add test for too large HTTP request fields
This test checks for wrong headers HTTP requests:

	1. POST /clients with a content length larger than a signed int.
	2. POST /clients with an auth token larger than 63 characters.
2019-09-10 11:10:34 +02:00
Javier Sánchez Parra 8793b71a31 #915 check HTTP Content-Length size
If Content-Length is too large ogAdmServer, close the connection..
2019-09-10 11:10:34 +02:00
Irina Gomez c1bee01aa1 #858 Messages and images for tip of the day are included. 2019-09-06 13:10:56 +02:00
Javier Sánchez Parra ba5651bcb9 #915 fix missing null-terminated string
This patch changes the number of characters stored in cli->auth_token
from 64 to 63. This way the array has the last position available to
store the null character.
2019-09-05 13:14:33 +02:00
Javier Sánchez Parra 83441d01cc #915 adds test for too large HTTP request
This test checks for too large HTTP requests, for example:

	POST /clients

with a body of 4096 bytes.
2019-09-04 20:13:11 +02:00
Ramón M. Gómez d6b5bebb75 #922: ogLive with Kernel 5.0 installs Grub on BIOS computers. 2019-09-04 13:41:53 +02:00
OpenGnSys Support Team 0deba63143 #915 do not bail out when failing to send message to stale clients
Clients might enter power saving mode, hence, closing the connection
with the server. When the server sends a request to refresh its state,
if they are gone, do not break the iteration over the list of clients.
2019-09-02 13:36:50 +02:00
Irina Gomez 7208cc929e #922 ogBootLoaderHidePartitions: Partition data will not hidden. Support several disk. Compatibility with grub.cfg create by ogLive 5.0. 2019-08-30 12:31:03 +02:00
Javier Sánchez Parra 0f1e5ad186 #559 fix out of bound array access
This patch change the size of the array ptrPar from 6 to 7.

cppcheck says:

[sources/ogAdmServer.cpp:598]: (error) Array 'ptrCfg[6]' accessed at index 6, which is out of bounds.
2019-08-28 18:39:33 +02:00
Javier Sánchez Parra 1b539a7252 #915 check ogAdmServer binary existence when running pythong tests
Currently, if you try to run the python test without the ogAdmServer
binary, it will throw an exception.

This patch adds a check to ensure the existence of the ogAdmServer binary
at the beginning of the script.

 # python3 run-tests.py
 You need to build the ogAdmServer binary to run these tests :-)
2019-08-28 17:54:57 +02:00
Javier Sánchez Parra 7af06a5f75 #915 add missing brackets to WOL API test json
Without the brackets the call works (200 response) but the ogAdmServer
does not send the WOL packets.
2019-08-28 17:53:19 +02:00