| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CC src/rest.o
src/rest.c: In function ‘og_cmd_post_modes.isra.27’:
src/rest.c:966:4: warning: ‘%s’ directive output may be truncated writing up to 4096 bytes into a region of size between 3018 and 4041 -Wformat-truncation=]
"MODE_FILE='%s'\nMAC='%s'\nDATA='%s'\n"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/rest.c:1085:7:
template_name, scope_name);
~~~~~~~~~~~~~
src/rest.c:967:33: note: format string is defined here
"MODE='PERM'\nTEMPLATE_NAME='%s'",
^~
src/rest.c:965:2: note: ‘snprintf’ output 57 or more bytes (assuming 5176) into a destination of size 4096
snprintf(cmd_params, sizeof(cmd_params),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"MODE_FILE='%s'\nMAC='%s'\nDATA='%s'\n"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"MODE='PERM'\nTEMPLATE_NAME='%s'",
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mode, mac, params, template_name);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
| |
Add syslog and use exit()
|
|
|
|
| |
ogserver process owner (author Roberto Hueso Gómez).
|
|
|
|
|
| |
This patch changes the URI since it is semantically more correct to use
the singular.
|
|
|
|
|
|
|
|
|
|
|
| |
Now POST /modes does not only write to the database, it also uses the
external bash script 'setclientmode' to generate configured PXE
templates for each machine.
NOTE: This fix requires that room and computer names are unique in the
OpenGnsys DB. This behaviour is inherited from the previous
'setclientmode' script but, eventually, it should be replaced for an
actual scope selector.
|
|
|
|
|
| |
Max port number is UINT16_MAX, so this checks whether this config
parameter is in the correct range.
|
|
|
|
|
| |
This patch provides functionality to select a database port. It also adds a
default IP for the database.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch implements HTTP GET /hardware request which returns a list of
the hardware associated with a particular computer.
Request: GET /hardware
{
"scope": {
"id": 6,
"type": "computer"
}
}
Response: 200 OK
{
"hardware": [
{
"type": "Microprocesadores",
"description": "CPU arch:x86 target:x86_64 cores:4"
},
{
"type": "Memorias",
"description": "QEMU 4096MiB"
},
{
"type": "Tarjetas gráficas",
"description": "Red Hat, Inc Virtio GPU"
},
{
"type": "Tarjetas de Red",
"description": "Intel Corporation 82540EM Gigabit Ethernet Controller
QEMU Virtual Machine"
},
{
"type": "Controladores IDE",
"description": "Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II]
Qemu virtual machine"
}
]
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch implements HTTP POST /modes request which can change the mode of any
particular scope.
Request: POST /modes
{
"scope": {"id": 1,
"type": "computer"},
"mode": "pxe"
}
Response: 200 OK
|
|
|
|
| |
Add wol.c and wol.h that implements WakeOnLan.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some universities have computers in a different subnet where the
ogServer is, but ogServer WoL functionality only supported to send
packet to its own subnets. This commit solves this.
Now ogServer sends two WoL packets per client, one with the broadcast
address of the interface indicated in the config file, the other with
the broadcast address calculated with the address and netmask of the
client.
To ensure that the second WoL works correctly you must configure
correctly the IP and netmask of the clients. Also, you have to configure
the network of your organization to route WoL packet to the correct
subnet.
|
|
|
|
|
|
|
|
|
| |
/usr/bin/ld: src/cfg.o:/home/opengnsys/ogServer/src/ogAdmServer.h:25: multiple definition of `servidoradm'; src/ogAdmServer.o:/home/javi/trabajo/soleta/opengnsys/ogServer/src/ogAdmServer.h:25: first defined here
/usr/bin/ld: src/cfg.o:/home/opengnsys/ogServer/src/ogAdmServer.h:26: multiple definition of `puerto'; src/ogAdmServer.o:/home/javi/trabajo/soleta/opengnsys/ogServer/src/ogAdmServer.h:26: first defined here
/usr/bin/ld: src/cfg.o:/home/opengnsys/ogServer/src/ogAdmServer.h:35: multiple definition of `tbsockets'; src/ogAdmServer.o:/home/javi/trabajo/soleta/opengnsys/ogServer/src/ogAdmServer.h:35: first defined here
/usr/bin/ld: src/cfg.o:/home/opengnsys/ogServer/src/ogAdmLib.h:81: multiple definition of `ndebug'; src/ogAdmServer.o:/home/javi/trabajo/soleta/opengnsys/ogServer/src/ogAdmLib.h:81: first defined here
/usr/bin/ld: src/cfg.o:/home/opengnsys/ogServer/src/ogAdmLib.h:80: multiple definition of `szPathFileLog'; src/ogAdmServer.o:/home/javi/trabajo/soleta/opengnsys/ogServer/src/ogAdmLib.h:80: first defined here
/usr/bin/ld: src/cfg.o:/home/opengnsys/ogServer/src/ogAdmLib.h:80: multiple definition of `szPathFileCfg'; src/ogAdmServer.o:/home/javi/trabajo/soleta/opengnsys/ogServer/src/ogAdmLib.h:80: first defined here
|
|
|
|
|
|
| |
This improves style and fixes some memleaks.
Co-authored-by: OpenGnSys Support Team <soporte-og@soleta.eu>
|
|
|
|
| |
Missing closedir() call.
|
|
|
|
|
| |
If either root or children_root fail to be created but the other one does not,
then reserved memory for the successful one would not be freed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch implements HTTP GET /modes request which returns all modes available
for clients:
Request: GET /modes HTTP/1.0
Response: 200 OK
{
"modes": [
"pxe",
"10",
"13",
"00unknown",
"11",
"19pxeADMIN",
"12"
]
}
|
|
|
|
| |
Use the same folder as in ogClient.
|
|
|
|
| |
if open() fails it returns a negative value.
|
|
|
|
| |
Check for ogserver.json file first, then fall back to legacy.
|
|
|
|
| |
New configuration file at /opt/opengnsys/cfg/ogserver.json
|
|
|
|
|
| |
Since version 1.2.0, OpenGnsys supports ogVDI hypervisor OS. This commit
a new status which indicates that clients are running ogVDI.
|
| |
|
| |
|
|
|
|
| |
Extract socket core and main from ogAdmServer file.
|
|
|
|
|
| |
* Curly braces after function definition
* use _dbi_ infix for function name
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch implements HTTP GET /scopes request which returns the scopes
hierarchy:
Request: HTTP GET /scopes
Response: 200 OK
{
"scope": [
{
"name": "Center 1",
"type": "center",
"id": 1,
"scope": [
{
"name": "Room 1",
"type": "room",
"id": 1,
"scope": [
{
"name": "Computer 1",
"type": "computer",
"id": 1,
"scope": []
},
{
"name": "Computer 3",
"type": "computer",
"id": 2,
"scope": []
}
]
}
]
}
]
}
|
|
|
|
|
| |
This parameter is actually a database related parameter so now it is renamed to
OG_DB_COMPUTER_NAME_MAXLEN.
|
|
|
|
| |
Step forward to rename all ogAdmServer references to ogServer
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Split ogAdmServer into several files:
* sources/rest.c that implements the server REST API.
* sources/client.c that implements the client REST API.
* sources/json.c that provides a few JSON helpers.
|
| |
|
| |
|
|
|
|
|
| |
This commit is a step in the direction to remove the old unit file. It
also allow us to move ogAdmServer to its own repo.
|
|
|
|
| |
Move remaining ogAdmLib code to ogAdmServer
|
|
|
|
| |
Add new utils.c file and replace old StrToUpper().
|
|
|
|
| |
ogAdmServer uses syslog for logging.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
These cases are different from a basic WoL command because they all use
the queue. The queue standard behaviour waits for the client to be ON
to send orders, but in WoL commands the client is going to be OFF. The
behaviour of WoL must be different.
This commit implements WoL for queued commands, procedures and tasks.
The queue now sends Wol commands without waiting to the client to be ON.
|
|
|
|
|
|
|
| |
Users can configure clients to execute a procedure at start.
This commit adapt this functionality to new functions and behaviour
of the ogAdmServer.
|
|
|
|
|
|
|
|
|
| |
New versions of ogAdmServer handle pending commands in a different way.
Instant procedures uses the old way, now unsupported, so we need to
adapt instant procedures.
This commit adapts instant procedures to work with the new pending
commands implementation.
|
| |
|
|
|
|
| |
Pass idcomando as task_id.
|
| |
|
|
|
|
| |
Moreover, add og_task_schedule_create() function.
|
| |
|
| |
|
| |
|