From 6449a415e4160d99b9e108f59c683bb60c63d439 Mon Sep 17 00:00:00 2001 From: David Durieux Date: Mon, 17 Jun 2024 22:08:19 +0200 Subject: [PATCH] Add license header in files and set config file for licensure tool + documentation --- .licensure.yml | 36 +++++++++++++++++++ doc/set_license_header.md | 17 +++++++++ src/common/config.rs | 12 +++++++ src/common/dmidecode.rs | 12 +++++++ src/common/mod.rs | 12 +++++++ src/common/webserver.rs | 12 +++++++ src/local_inventory_sender.rs | 12 +++++++ src/main.rs | 12 +++++++ src/module/common.rs | 12 +++++++ .../localinventory/data/chassis/dmidecode.rs | 12 +++++++ src/module/localinventory/data/chassis/mod.rs | 12 +++++++ .../localinventory/data/cpu/dmidecode.rs | 12 +++++++ src/module/localinventory/data/cpu/mod.rs | 12 +++++++ .../localinventory/data/filesystem/freebsd.rs | 12 +++++++ .../localinventory/data/filesystem/linux.rs | 12 +++++++ .../localinventory/data/filesystem/mod.rs | 12 +++++++ src/module/localinventory/data/mod.rs | 12 +++++++ .../data/operatingsystem/common.rs | 12 +++++++ .../data/operatingsystem/freebsd.rs | 12 +++++++ .../data/operatingsystem/linux.rs | 12 +++++++ .../data/operatingsystem/mod.rs | 12 +++++++ .../localinventory/data/partition/freebsd.rs | 12 +++++++ .../localinventory/data/partition/linux.rs | 12 +++++++ .../localinventory/data/partition/mod.rs | 12 +++++++ .../data/physicaldisk/freebsd.rs | 12 +++++++ .../localinventory/data/physicaldisk/linux.rs | 12 +++++++ .../localinventory/data/physicaldisk/mod.rs | 12 +++++++ .../data/physicaldisk/windows.rs | 12 +++++++ .../localinventory/data/software/freebsd.rs | 12 +++++++ .../localinventory/data/software/linux.rs | 12 +++++++ .../localinventory/data/software/mod.rs | 12 +++++++ .../localinventory/data/volume/freebsd.rs | 23 ++++++++++++ .../localinventory/data/volume/linux.rs | 12 +++++++ src/module/localinventory/data/volume/mod.rs | 12 +++++++ src/module/localinventory/mod.rs | 12 +++++++ src/module/localinventory/run_servers.rs | 12 +++++++ .../localinventory/structure/chassis.rs | 12 +++++++ src/module/localinventory/structure/cpu.rs | 12 +++++++ .../localinventory/structure/filesystem.rs | 12 +++++++ src/module/localinventory/structure/mod.rs | 12 +++++++ .../structure/operatingsystem.rs | 12 +++++++ .../localinventory/structure/partition.rs | 12 +++++++ .../localinventory/structure/physicaldisk.rs | 12 +++++++ .../localinventory/structure/software.rs | 12 +++++++ src/module/localinventory/structure/volume.rs | 12 +++++++ src/module/mod.rs | 12 +++++++ 46 files changed, 592 insertions(+) create mode 100644 .licensure.yml create mode 100644 doc/set_license_header.md diff --git a/.licensure.yml b/.licensure.yml new file mode 100644 index 0000000..9d39618 --- /dev/null +++ b/.licensure.yml @@ -0,0 +1,36 @@ +excludes: + - \.gitignore + - .*lock + - \.git/.* + - \.licensure\.yml + - README.* + - LICENSE.* + - .*\.(md|rst|txt) + +licenses: + - files: any + ident: AGPL-3.0 + authors: + - name: FusionSuite Team +# auto_template: true + template: | + Copyright (C) [year] [name of author] + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Affero General Public License as published by the Free Software Foundation, version 3. + + 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 Affero General Public License for more + details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see + . + + +comments: + - extensions: + - rs + commenter: + type: line + comment_char: "//" + trailing_lines: 1 + columns: 80 + diff --git a/doc/set_license_header.md b/doc/set_license_header.md new file mode 100644 index 0000000..382143c --- /dev/null +++ b/doc/set_license_header.md @@ -0,0 +1,17 @@ +# Set license header in files + +## Install licensure + +You need install the licensure tool: + +```sh +cargo install licensure +``` + +## Run licensure to add / update headers + +Run from root of repository: + +```sh +find ./ -name "*.rs" -exec ~/.cargo/bin/licensure --in-place --verbose {} \; +``` diff --git a/src/common/config.rs b/src/common/config.rs index 5ce9d38..d47ec34 100644 --- a/src/common/config.rs +++ b/src/common/config.rs @@ -1,3 +1,15 @@ +// Copyright (C) 2024 FusionSuite Team +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU Affero General Public License as published by the Free +// Software Foundation, version 3. +// +// 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 Affero General Public License for more +// details. You should have received a copy of the GNU Affero General Public +// License along with this program. If not, see . + // file used to read the configuration file use serde_derive::Deserialize; diff --git a/src/common/dmidecode.rs b/src/common/dmidecode.rs index 87cf7b0..e5b4bed 100644 --- a/src/common/dmidecode.rs +++ b/src/common/dmidecode.rs @@ -1,3 +1,15 @@ +// Copyright (C) 2024 FusionSuite Team +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU Affero General Public License as published by the Free +// Software Foundation, version 3. +// +// 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 Affero General Public License for more +// details. You should have received a copy of the GNU Affero General Public +// License along with this program. If not, see . + pub fn get_dmidecode_data(args: &[&str]) { let dmidecode_cmd: String = get_dmidecode_program(); diff --git a/src/common/mod.rs b/src/common/mod.rs index a93636c..025e68b 100644 --- a/src/common/mod.rs +++ b/src/common/mod.rs @@ -1,3 +1,15 @@ +// Copyright (C) 2024 FusionSuite Team +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU Affero General Public License as published by the Free +// Software Foundation, version 3. +// +// 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 Affero General Public License for more +// details. You should have received a copy of the GNU Affero General Public +// License along with this program. If not, see . + pub mod dmidecode; pub mod config; pub mod webserver; diff --git a/src/common/webserver.rs b/src/common/webserver.rs index a6b4276..8330e9b 100644 --- a/src/common/webserver.rs +++ b/src/common/webserver.rs @@ -1,3 +1,15 @@ +// Copyright (C) 2024 FusionSuite Team +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU Affero General Public License as published by the Free +// Software Foundation, version 3. +// +// 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 Affero General Public License for more +// details. You should have received a copy of the GNU Affero General Public +// License along with this program. If not, see . + use rocket::Rocket; use rocket::Build; use rocket::response::{content, Redirect}; diff --git a/src/local_inventory_sender.rs b/src/local_inventory_sender.rs index f01021c..402b641 100644 --- a/src/local_inventory_sender.rs +++ b/src/local_inventory_sender.rs @@ -1,3 +1,15 @@ +// Copyright (C) 2024 FusionSuite Team +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU Affero General Public License as published by the Free +// Software Foundation, version 3. +// +// 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 Affero General Public License for more +// details. You should have received a copy of the GNU Affero General Public +// License along with this program. If not, see . + use serde_json::json; use reqwest::header::USER_AGENT; use crate::CONFIG; diff --git a/src/main.rs b/src/main.rs index 030c74b..6bad43f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,15 @@ +// Copyright (C) 2024 FusionSuite Team +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU Affero General Public License as published by the Free +// Software Foundation, version 3. +// +// 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 Affero General Public License for more +// details. You should have received a copy of the GNU Affero General Public +// License along with this program. If not, see . + #[macro_use] extern crate rocket; use local_inventory_sender::send_inventory; diff --git a/src/module/common.rs b/src/module/common.rs index 5f56962..5cedccb 100644 --- a/src/module/common.rs +++ b/src/module/common.rs @@ -1,3 +1,15 @@ +// Copyright (C) 2024 FusionSuite Team +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU Affero General Public License as published by the Free +// Software Foundation, version 3. +// +// 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 Affero General Public License for more +// details. You should have received a copy of the GNU Affero General Public +// License along with this program. If not, see . + use std::thread; use std::time::{SystemTime, UNIX_EPOCH, Duration}; diff --git a/src/module/localinventory/data/chassis/dmidecode.rs b/src/module/localinventory/data/chassis/dmidecode.rs index 623fa13..a59d8a8 100644 --- a/src/module/localinventory/data/chassis/dmidecode.rs +++ b/src/module/localinventory/data/chassis/dmidecode.rs @@ -1,3 +1,15 @@ +// Copyright (C) 2024 FusionSuite Team +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU Affero General Public License as published by the Free +// Software Foundation, version 3. +// +// 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 Affero General Public License for more +// details. You should have received a copy of the GNU Affero General Public +// License along with this program. If not, see . + use std::{fs::File, io::Read}; use nparse::*; use std::process::{Command, Stdio}; diff --git a/src/module/localinventory/data/chassis/mod.rs b/src/module/localinventory/data/chassis/mod.rs index acd3293..c5c8ccd 100644 --- a/src/module/localinventory/data/chassis/mod.rs +++ b/src/module/localinventory/data/chassis/mod.rs @@ -1 +1,13 @@ +// Copyright (C) 2024 FusionSuite Team +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU Affero General Public License as published by the Free +// Software Foundation, version 3. +// +// 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 Affero General Public License for more +// details. You should have received a copy of the GNU Affero General Public +// License along with this program. If not, see . + pub mod dmidecode; \ No newline at end of file diff --git a/src/module/localinventory/data/cpu/dmidecode.rs b/src/module/localinventory/data/cpu/dmidecode.rs index ea54fef..4932cfc 100644 --- a/src/module/localinventory/data/cpu/dmidecode.rs +++ b/src/module/localinventory/data/cpu/dmidecode.rs @@ -1,3 +1,15 @@ +// Copyright (C) 2024 FusionSuite Team +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU Affero General Public License as published by the Free +// Software Foundation, version 3. +// +// 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 Affero General Public License for more +// details. You should have received a copy of the GNU Affero General Public +// License along with this program. If not, see . + use std::{fs::File, io::Read}; use nparse::*; use std::process::{Command, Stdio}; diff --git a/src/module/localinventory/data/cpu/mod.rs b/src/module/localinventory/data/cpu/mod.rs index acd3293..c5c8ccd 100644 --- a/src/module/localinventory/data/cpu/mod.rs +++ b/src/module/localinventory/data/cpu/mod.rs @@ -1 +1,13 @@ +// Copyright (C) 2024 FusionSuite Team +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU Affero General Public License as published by the Free +// Software Foundation, version 3. +// +// 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 Affero General Public License for more +// details. You should have received a copy of the GNU Affero General Public +// License along with this program. If not, see . + pub mod dmidecode; \ No newline at end of file diff --git a/src/module/localinventory/data/filesystem/freebsd.rs b/src/module/localinventory/data/filesystem/freebsd.rs index f527f38..4c09c50 100644 --- a/src/module/localinventory/data/filesystem/freebsd.rs +++ b/src/module/localinventory/data/filesystem/freebsd.rs @@ -1,4 +1,16 @@ #![cfg(target_os = "freebsd")] +// Copyright (C) 2024 FusionSuite Team +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU Affero General Public License as published by the Free +// Software Foundation, version 3. +// +// 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 Affero General Public License for more +// details. You should have received a copy of the GNU Affero General Public +// License along with this program. If not, see . + use std::process::{Command, Stdio}; use regex::Regex; diff --git a/src/module/localinventory/data/filesystem/linux.rs b/src/module/localinventory/data/filesystem/linux.rs index 39b779c..003cdfe 100644 --- a/src/module/localinventory/data/filesystem/linux.rs +++ b/src/module/localinventory/data/filesystem/linux.rs @@ -1,4 +1,16 @@ #![cfg(target_os = "linux")] +// Copyright (C) 2024 FusionSuite Team +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU Affero General Public License as published by the Free +// Software Foundation, version 3. +// +// 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 Affero General Public License for more +// details. You should have received a copy of the GNU Affero General Public +// License along with this program. If not, see . + use std::process::{Command, Stdio}; use regex::Regex; diff --git a/src/module/localinventory/data/filesystem/mod.rs b/src/module/localinventory/data/filesystem/mod.rs index a107213..709a7bc 100644 --- a/src/module/localinventory/data/filesystem/mod.rs +++ b/src/module/localinventory/data/filesystem/mod.rs @@ -1,2 +1,14 @@ +// Copyright (C) 2024 FusionSuite Team +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU Affero General Public License as published by the Free +// Software Foundation, version 3. +// +// 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 Affero General Public License for more +// details. You should have received a copy of the GNU Affero General Public +// License along with this program. If not, see . + pub mod freebsd; pub mod linux; diff --git a/src/module/localinventory/data/mod.rs b/src/module/localinventory/data/mod.rs index 88fc525..8dd13a8 100644 --- a/src/module/localinventory/data/mod.rs +++ b/src/module/localinventory/data/mod.rs @@ -1,3 +1,15 @@ +// Copyright (C) 2024 FusionSuite Team +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU Affero General Public License as published by the Free +// Software Foundation, version 3. +// +// 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 Affero General Public License for more +// details. You should have received a copy of the GNU Affero General Public +// License along with this program. If not, see . + pub mod chassis; pub mod cpu; pub mod physicaldisk; diff --git a/src/module/localinventory/data/operatingsystem/common.rs b/src/module/localinventory/data/operatingsystem/common.rs index 6d20563..edca9d4 100644 --- a/src/module/localinventory/data/operatingsystem/common.rs +++ b/src/module/localinventory/data/operatingsystem/common.rs @@ -1,3 +1,15 @@ +// Copyright (C) 2024 FusionSuite Team +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU Affero General Public License as published by the Free +// Software Foundation, version 3. +// +// 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 Affero General Public License for more +// details. You should have received a copy of the GNU Affero General Public +// License along with this program. If not, see . + use sysinfo::System; use chrono::Local; diff --git a/src/module/localinventory/data/operatingsystem/freebsd.rs b/src/module/localinventory/data/operatingsystem/freebsd.rs index 722c6de..ce3cab3 100644 --- a/src/module/localinventory/data/operatingsystem/freebsd.rs +++ b/src/module/localinventory/data/operatingsystem/freebsd.rs @@ -1,4 +1,16 @@ #![cfg(target_os = "freebsd")] +// Copyright (C) 2024 FusionSuite Team +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU Affero General Public License as published by the Free +// Software Foundation, version 3. +// +// 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 Affero General Public License for more +// details. You should have received a copy of the GNU Affero General Public +// License along with this program. If not, see . + use std::fs; use chrono::prelude::{DateTime, Utc}; // use std::process::Command; diff --git a/src/module/localinventory/data/operatingsystem/linux.rs b/src/module/localinventory/data/operatingsystem/linux.rs index 894363b..009f536 100644 --- a/src/module/localinventory/data/operatingsystem/linux.rs +++ b/src/module/localinventory/data/operatingsystem/linux.rs @@ -1,4 +1,16 @@ #![cfg(target_os = "linux")] +// Copyright (C) 2024 FusionSuite Team +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU Affero General Public License as published by the Free +// Software Foundation, version 3. +// +// 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 Affero General Public License for more +// details. You should have received a copy of the GNU Affero General Public +// License along with this program. If not, see . + use std::fs; use chrono::prelude::{DateTime, Utc}; // use std::process::Command; diff --git a/src/module/localinventory/data/operatingsystem/mod.rs b/src/module/localinventory/data/operatingsystem/mod.rs index 9812a9b..d9666e3 100644 --- a/src/module/localinventory/data/operatingsystem/mod.rs +++ b/src/module/localinventory/data/operatingsystem/mod.rs @@ -1,3 +1,15 @@ +// Copyright (C) 2024 FusionSuite Team +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU Affero General Public License as published by the Free +// Software Foundation, version 3. +// +// 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 Affero General Public License for more +// details. You should have received a copy of the GNU Affero General Public +// License along with this program. If not, see . + pub mod common; pub mod freebsd; pub mod linux; diff --git a/src/module/localinventory/data/partition/freebsd.rs b/src/module/localinventory/data/partition/freebsd.rs index 2a219dc..02ea254 100644 --- a/src/module/localinventory/data/partition/freebsd.rs +++ b/src/module/localinventory/data/partition/freebsd.rs @@ -1,4 +1,16 @@ #![cfg(target_os = "freebsd")] +// Copyright (C) 2024 FusionSuite Team +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU Affero General Public License as published by the Free +// Software Foundation, version 3. +// +// 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 Affero General Public License for more +// details. You should have received a copy of the GNU Affero General Public +// License along with this program. If not, see . + use sysctl::Sysctl; pub fn run_inventory(disk: serde_json::Value) -> Vec { diff --git a/src/module/localinventory/data/partition/linux.rs b/src/module/localinventory/data/partition/linux.rs index b4933b0..57620c2 100644 --- a/src/module/localinventory/data/partition/linux.rs +++ b/src/module/localinventory/data/partition/linux.rs @@ -1,4 +1,16 @@ #![cfg(target_os = "linux")] +// Copyright (C) 2024 FusionSuite Team +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU Affero General Public License as published by the Free +// Software Foundation, version 3. +// +// 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 Affero General Public License for more +// details. You should have received a copy of the GNU Affero General Public +// License along with this program. If not, see . + use std::process::{Command, Stdio}; // TODO diff --git a/src/module/localinventory/data/partition/mod.rs b/src/module/localinventory/data/partition/mod.rs index e85d159..0b69ea4 100644 --- a/src/module/localinventory/data/partition/mod.rs +++ b/src/module/localinventory/data/partition/mod.rs @@ -1,3 +1,15 @@ +// Copyright (C) 2024 FusionSuite Team +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU Affero General Public License as published by the Free +// Software Foundation, version 3. +// +// 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 Affero General Public License for more +// details. You should have received a copy of the GNU Affero General Public +// License along with this program. If not, see . + pub mod freebsd; pub mod linux; // pub mod windows; diff --git a/src/module/localinventory/data/physicaldisk/freebsd.rs b/src/module/localinventory/data/physicaldisk/freebsd.rs index 222aa50..0a7904a 100644 --- a/src/module/localinventory/data/physicaldisk/freebsd.rs +++ b/src/module/localinventory/data/physicaldisk/freebsd.rs @@ -1,4 +1,16 @@ #![cfg(target_os = "freebsd")] +// Copyright (C) 2024 FusionSuite Team +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU Affero General Public License as published by the Free +// Software Foundation, version 3. +// +// 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 Affero General Public License for more +// details. You should have received a copy of the GNU Affero General Public +// License along with this program. If not, see . + use sysctl::Sysctl; pub fn run_inventory() -> Vec { diff --git a/src/module/localinventory/data/physicaldisk/linux.rs b/src/module/localinventory/data/physicaldisk/linux.rs index 83fd013..7e196be 100644 --- a/src/module/localinventory/data/physicaldisk/linux.rs +++ b/src/module/localinventory/data/physicaldisk/linux.rs @@ -1,4 +1,16 @@ #![cfg(target_os = "linux")] +// Copyright (C) 2024 FusionSuite Team +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU Affero General Public License as published by the Free +// Software Foundation, version 3. +// +// 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 Affero General Public License for more +// details. You should have received a copy of the GNU Affero General Public +// License along with this program. If not, see . + use std::process::{Command, Stdio}; pub fn run_inventory() -> Vec { diff --git a/src/module/localinventory/data/physicaldisk/mod.rs b/src/module/localinventory/data/physicaldisk/mod.rs index 43c10be..bf5daa8 100644 --- a/src/module/localinventory/data/physicaldisk/mod.rs +++ b/src/module/localinventory/data/physicaldisk/mod.rs @@ -1,3 +1,15 @@ +// Copyright (C) 2024 FusionSuite Team +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU Affero General Public License as published by the Free +// Software Foundation, version 3. +// +// 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 Affero General Public License for more +// details. You should have received a copy of the GNU Affero General Public +// License along with this program. If not, see . + pub mod freebsd; pub mod linux; pub mod windows; diff --git a/src/module/localinventory/data/physicaldisk/windows.rs b/src/module/localinventory/data/physicaldisk/windows.rs index e69de29..daaf22b 100644 --- a/src/module/localinventory/data/physicaldisk/windows.rs +++ b/src/module/localinventory/data/physicaldisk/windows.rs @@ -0,0 +1,12 @@ +// Copyright (C) 2024 FusionSuite Team +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU Affero General Public License as published by the Free +// Software Foundation, version 3. +// +// 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 Affero General Public License for more +// details. You should have received a copy of the GNU Affero General Public +// License along with this program. If not, see . + diff --git a/src/module/localinventory/data/software/freebsd.rs b/src/module/localinventory/data/software/freebsd.rs index dcbabff..efc04f1 100644 --- a/src/module/localinventory/data/software/freebsd.rs +++ b/src/module/localinventory/data/software/freebsd.rs @@ -1,4 +1,16 @@ #![cfg(target_os = "freebsd")] +// Copyright (C) 2024 FusionSuite Team +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU Affero General Public License as published by the Free +// Software Foundation, version 3. +// +// 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 Affero General Public License for more +// details. You should have received a copy of the GNU Affero General Public +// License along with this program. If not, see . + use std::process::{Command, Stdio}; // use chrono::prelude::{DateTime, Utc}; diff --git a/src/module/localinventory/data/software/linux.rs b/src/module/localinventory/data/software/linux.rs index 1e6d5fa..7ccdcd1 100644 --- a/src/module/localinventory/data/software/linux.rs +++ b/src/module/localinventory/data/software/linux.rs @@ -1,4 +1,16 @@ #![cfg(target_os = "linux")] +// Copyright (C) 2024 FusionSuite Team +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU Affero General Public License as published by the Free +// Software Foundation, version 3. +// +// 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 Affero General Public License for more +// details. You should have received a copy of the GNU Affero General Public +// License along with this program. If not, see . + use std::process::{Command, Stdio}; use std::collections::HashMap; diff --git a/src/module/localinventory/data/software/mod.rs b/src/module/localinventory/data/software/mod.rs index a107213..709a7bc 100644 --- a/src/module/localinventory/data/software/mod.rs +++ b/src/module/localinventory/data/software/mod.rs @@ -1,2 +1,14 @@ +// Copyright (C) 2024 FusionSuite Team +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU Affero General Public License as published by the Free +// Software Foundation, version 3. +// +// 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 Affero General Public License for more +// details. You should have received a copy of the GNU Affero General Public +// License along with this program. If not, see . + pub mod freebsd; pub mod linux; diff --git a/src/module/localinventory/data/volume/freebsd.rs b/src/module/localinventory/data/volume/freebsd.rs index 1883bf3..b5ff5b9 100644 --- a/src/module/localinventory/data/volume/freebsd.rs +++ b/src/module/localinventory/data/volume/freebsd.rs @@ -1,4 +1,27 @@ #![cfg(target_os = "freebsd")] +// Copyright (C) 2024 FusionSuite Team +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU Affero General Public License as published by the Free +// Software Foundation, version 3. +// +// 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 Affero General Public License for more +// details. You should have received a copy of the GNU Affero General Public +// License along with this program. If not, see . + +// Copyright (C) 2024 FusionSuite Team +// +// This program is free software: you can redistribute it and/or modify it under the terms of the GNU +// Affero General Public License as published by the Free Software Foundation, version 3. +// +// 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 +// Affero General Public License for more details. You should have received a copy of the GNU Affero +// General Public License along with this program. If not, see . + + use std::process::{Command, Stdio}; use regex::Regex; diff --git a/src/module/localinventory/data/volume/linux.rs b/src/module/localinventory/data/volume/linux.rs index bd5afb7..5093214 100644 --- a/src/module/localinventory/data/volume/linux.rs +++ b/src/module/localinventory/data/volume/linux.rs @@ -1,4 +1,16 @@ #![cfg(target_os = "linux")] +// Copyright (C) 2024 FusionSuite Team +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU Affero General Public License as published by the Free +// Software Foundation, version 3. +// +// 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 Affero General Public License for more +// details. You should have received a copy of the GNU Affero General Public +// License along with this program. If not, see . + use std::process::{Command, Stdio}; use regex::Regex; use std::collections::HashMap; diff --git a/src/module/localinventory/data/volume/mod.rs b/src/module/localinventory/data/volume/mod.rs index a107213..709a7bc 100644 --- a/src/module/localinventory/data/volume/mod.rs +++ b/src/module/localinventory/data/volume/mod.rs @@ -1,2 +1,14 @@ +// Copyright (C) 2024 FusionSuite Team +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU Affero General Public License as published by the Free +// Software Foundation, version 3. +// +// 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 Affero General Public License for more +// details. You should have received a copy of the GNU Affero General Public +// License along with this program. If not, see . + pub mod freebsd; pub mod linux; diff --git a/src/module/localinventory/mod.rs b/src/module/localinventory/mod.rs index 14feded..0d5c06e 100644 --- a/src/module/localinventory/mod.rs +++ b/src/module/localinventory/mod.rs @@ -1,3 +1,15 @@ +// Copyright (C) 2024 FusionSuite Team +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU Affero General Public License as published by the Free +// Software Foundation, version 3. +// +// 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 Affero General Public License for more +// details. You should have received a copy of the GNU Affero General Public +// License along with this program. If not, see . + pub mod structure; pub mod data; pub mod run_servers; diff --git a/src/module/localinventory/run_servers.rs b/src/module/localinventory/run_servers.rs index 807e025..5c57162 100644 --- a/src/module/localinventory/run_servers.rs +++ b/src/module/localinventory/run_servers.rs @@ -1,3 +1,15 @@ +// Copyright (C) 2024 FusionSuite Team +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU Affero General Public License as published by the Free +// Software Foundation, version 3. +// +// 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 Affero General Public License for more +// details. You should have received a copy of the GNU Affero General Public +// License along with this program. If not, see . + use crate::CONFIG; use crate::module; use std::fs::File; diff --git a/src/module/localinventory/structure/chassis.rs b/src/module/localinventory/structure/chassis.rs index f93b344..7cb7701 100644 --- a/src/module/localinventory/structure/chassis.rs +++ b/src/module/localinventory/structure/chassis.rs @@ -1,3 +1,15 @@ +// Copyright (C) 2024 FusionSuite Team +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU Affero General Public License as published by the Free +// Software Foundation, version 3. +// +// 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 Affero General Public License for more +// details. You should have received a copy of the GNU Affero General Public +// License along with this program. If not, see . + use crate::module; // struct manufacturer { diff --git a/src/module/localinventory/structure/cpu.rs b/src/module/localinventory/structure/cpu.rs index f21c626..f0db042 100644 --- a/src/module/localinventory/structure/cpu.rs +++ b/src/module/localinventory/structure/cpu.rs @@ -1,3 +1,15 @@ +// Copyright (C) 2024 FusionSuite Team +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU Affero General Public License as published by the Free +// Software Foundation, version 3. +// +// 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 Affero General Public License for more +// details. You should have received a copy of the GNU Affero General Public +// License along with this program. If not, see . + use crate::module; pub fn run_inventory() -> serde_json::Value { diff --git a/src/module/localinventory/structure/filesystem.rs b/src/module/localinventory/structure/filesystem.rs index e012886..a09dcab 100644 --- a/src/module/localinventory/structure/filesystem.rs +++ b/src/module/localinventory/structure/filesystem.rs @@ -1,3 +1,15 @@ +// Copyright (C) 2024 FusionSuite Team +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU Affero General Public License as published by the Free +// Software Foundation, version 3. +// +// 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 Affero General Public License for more +// details. You should have received a copy of the GNU Affero General Public +// License along with this program. If not, see . + use crate::module; pub fn run_inventory(vol_type: String, vol_name: String) -> Vec { diff --git a/src/module/localinventory/structure/mod.rs b/src/module/localinventory/structure/mod.rs index 88fc525..8dd13a8 100644 --- a/src/module/localinventory/structure/mod.rs +++ b/src/module/localinventory/structure/mod.rs @@ -1,3 +1,15 @@ +// Copyright (C) 2024 FusionSuite Team +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU Affero General Public License as published by the Free +// Software Foundation, version 3. +// +// 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 Affero General Public License for more +// details. You should have received a copy of the GNU Affero General Public +// License along with this program. If not, see . + pub mod chassis; pub mod cpu; pub mod physicaldisk; diff --git a/src/module/localinventory/structure/operatingsystem.rs b/src/module/localinventory/structure/operatingsystem.rs index 60ff656..4143730 100644 --- a/src/module/localinventory/structure/operatingsystem.rs +++ b/src/module/localinventory/structure/operatingsystem.rs @@ -1,3 +1,15 @@ +// Copyright (C) 2024 FusionSuite Team +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU Affero General Public License as published by the Free +// Software Foundation, version 3. +// +// 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 Affero General Public License for more +// details. You should have received a copy of the GNU Affero General Public +// License along with this program. If not, see . + use crate::module; pub fn run_inventory() -> serde_json::Value { diff --git a/src/module/localinventory/structure/partition.rs b/src/module/localinventory/structure/partition.rs index 4339526..61f8a58 100644 --- a/src/module/localinventory/structure/partition.rs +++ b/src/module/localinventory/structure/partition.rs @@ -1,3 +1,15 @@ +// Copyright (C) 2024 FusionSuite Team +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU Affero General Public License as published by the Free +// Software Foundation, version 3. +// +// 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 Affero General Public License for more +// details. You should have received a copy of the GNU Affero General Public +// License along with this program. If not, see . + use crate::module; pub fn run_inventory(disk: serde_json::Value) -> Vec { diff --git a/src/module/localinventory/structure/physicaldisk.rs b/src/module/localinventory/structure/physicaldisk.rs index 7532e50..1bfb40a 100644 --- a/src/module/localinventory/structure/physicaldisk.rs +++ b/src/module/localinventory/structure/physicaldisk.rs @@ -1,3 +1,15 @@ +// Copyright (C) 2024 FusionSuite Team +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU Affero General Public License as published by the Free +// Software Foundation, version 3. +// +// 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 Affero General Public License for more +// details. You should have received a copy of the GNU Affero General Public +// License along with this program. If not, see . + use crate::module; pub fn run_inventory() -> Vec { diff --git a/src/module/localinventory/structure/software.rs b/src/module/localinventory/structure/software.rs index c251c4e..2a765b4 100644 --- a/src/module/localinventory/structure/software.rs +++ b/src/module/localinventory/structure/software.rs @@ -1,3 +1,15 @@ +// Copyright (C) 2024 FusionSuite Team +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU Affero General Public License as published by the Free +// Software Foundation, version 3. +// +// 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 Affero General Public License for more +// details. You should have received a copy of the GNU Affero General Public +// License along with this program. If not, see . + use crate::module; pub fn run_inventory() -> Vec { diff --git a/src/module/localinventory/structure/volume.rs b/src/module/localinventory/structure/volume.rs index 66dc133..1b02eba 100644 --- a/src/module/localinventory/structure/volume.rs +++ b/src/module/localinventory/structure/volume.rs @@ -1,3 +1,15 @@ +// Copyright (C) 2024 FusionSuite Team +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU Affero General Public License as published by the Free +// Software Foundation, version 3. +// +// 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 Affero General Public License for more +// details. You should have received a copy of the GNU Affero General Public +// License along with this program. If not, see . + use crate::module; pub fn run_inventory() -> Vec { diff --git a/src/module/mod.rs b/src/module/mod.rs index b6b53c3..819f440 100644 --- a/src/module/mod.rs +++ b/src/module/mod.rs @@ -1,2 +1,14 @@ +// Copyright (C) 2024 FusionSuite Team +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU Affero General Public License as published by the Free +// Software Foundation, version 3. +// +// 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 Affero General Public License for more +// details. You should have received a copy of the GNU Affero General Public +// License along with this program. If not, see . + pub mod localinventory; pub mod common;