Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure every file specifies the proper license #260

Merged
merged 1 commit into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions scripts/source_header_check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

# Define the license headers to search for
gpl_license="it under the terms of the GNU General Public License as published by"
mpl_license="This Source Code Form is subject to the terms of the Mozilla Public"
mit_license="Permission is hereby granted, free of charge, to any person obtaining a copy"
murmurhash3_license="This file is based on the public domain MurmurHash3"

# Define the directories to exclude
exclude_dirs="./target"

# Find all source files while excluding certain directories
find . -type d \( -path "$exclude_dirs" \) -prune -o \
-type f \( -name "*.c" -o -name "*.cpp" -o -name "*.h" -o -name "*.py" -o -name "*.rs" \) -print | while read -r file; do

# Check if the file contains any of the license headers
if ! grep -q "$gpl_license" "$file" && \
! grep -q "$mpl_license" "$file" && \
! grep -q "$mit_license" "$file" && \
! grep -q "$murmurhash3_license" "$file"; then
echo "Missing license header: $file"
fi
done
17 changes: 17 additions & 0 deletions src/cli/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/*
Unix Azure Entra ID implementation
Copyright (C) David Mulder <dmulder@samba.org> 2024

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 3 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, see <http://www.gnu.org/licenses/>.
*/
#![deny(warnings)]
#![warn(unused_extern_crates)]
#![deny(clippy::todo)]
Expand Down
17 changes: 17 additions & 0 deletions src/cli/src/opt/tool.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/*
Unix Azure Entra ID implementation
Copyright (C) David Mulder <dmulder@samba.org> 2024

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 3 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, see <http://www.gnu.org/licenses/>.
*/
use clap::Subcommand;

#[derive(Debug, Subcommand)]
Expand Down
4 changes: 4 additions & 0 deletions src/common/src/client.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/*
* Unix Azure Entra ID implementation
* Copyright (C) William Brown <william@blackhats.net.au> and the Kanidm team 2018-2024
* Copyright (C) David Mulder <dmulder@samba.org> 2024
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
Expand Down
4 changes: 4 additions & 0 deletions src/common/src/client_sync.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/*
* Unix Azure Entra ID implementation
* Copyright (C) William Brown <william@blackhats.net.au> and the Kanidm team 2018-2024
* Copyright (C) David Mulder <dmulder@samba.org> 2024
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
Expand Down
17 changes: 17 additions & 0 deletions src/common/src/config.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/*
Unix Azure Entra ID implementation
Copyright (C) David Mulder <dmulder@samba.org> 2024

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 3 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, see <http://www.gnu.org/licenses/>.
*/
use configparser::ini::Ini;
use std::fmt;
use std::io::Error;
Expand Down
17 changes: 17 additions & 0 deletions src/common/src/constants.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/*
Unix Azure Entra ID implementation
Copyright (C) David Mulder <dmulder@samba.org> 2024

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 3 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, see <http://www.gnu.org/licenses/>.
*/
use crate::config::IdAttr;
use crate::unix_config::HomeAttr;

Expand Down
4 changes: 4 additions & 0 deletions src/common/src/db.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/*
* Unix Azure Entra ID implementation
* Copyright (C) William Brown <william@blackhats.net.au> and the Kanidm team 2018-2024
* Copyright (C) David Mulder <dmulder@samba.org> 2024
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
Expand Down
17 changes: 17 additions & 0 deletions src/common/src/idprovider/himmelblau.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/*
Unix Azure Entra ID implementation
Copyright (C) David Mulder <dmulder@samba.org> 2024

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 3 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, see <http://www.gnu.org/licenses/>.
*/
use super::interface::{
AuthCacheAction, AuthCredHandler, AuthRequest, AuthResult, GroupToken, Id, IdProvider,
IdpError, UserToken,
Expand Down
4 changes: 4 additions & 0 deletions src/common/src/idprovider/interface.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/*
* Unix Azure Entra ID implementation
* Copyright (C) William Brown <william@blackhats.net.au> and the Kanidm team 2018-2024
* Copyright (C) David Mulder <dmulder@samba.org> 2024
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
Expand Down
17 changes: 17 additions & 0 deletions src/common/src/idprovider/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/*
Unix Azure Entra ID implementation
Copyright (C) David Mulder <dmulder@samba.org> 2024

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 3 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, see <http://www.gnu.org/licenses/>.
*/
pub mod himmelblau;

pub mod interface;
9 changes: 9 additions & 0 deletions src/common/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* Unix Azure Entra ID implementation
* Copyright (C) William Brown <william@blackhats.net.au> and the Kanidm team 2018-2024
* Copyright (C) David Mulder <dmulder@samba.org> 2024
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
#![deny(warnings)]
#![warn(unused_extern_crates)]
#![deny(clippy::todo)]
Expand Down
4 changes: 4 additions & 0 deletions src/common/src/resolver.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/*
* Unix Azure Entra ID implementation
* Copyright (C) William Brown <william@blackhats.net.au> and the Kanidm team 2018-2024
* Copyright (C) David Mulder <dmulder@samba.org> 2024
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
Expand Down
9 changes: 9 additions & 0 deletions src/common/src/unix_config.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* Unix Azure Entra ID implementation
* Copyright (C) William Brown <william@blackhats.net.au> and the Kanidm team 2018-2024
* Copyright (C) David Mulder <dmulder@samba.org> 2024
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
use std::fmt::{Display, Formatter};

#[derive(Debug, Copy, Clone)]
Expand Down
4 changes: 4 additions & 0 deletions src/common/src/unix_passwd.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/*
* Unix Azure Entra ID implementation
* Copyright (C) William Brown <william@blackhats.net.au> and the Kanidm team 2018-2024
* Copyright (C) David Mulder <dmulder@samba.org> 2024
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
Expand Down
4 changes: 4 additions & 0 deletions src/common/src/unix_proto.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/*
* Unix Azure Entra ID implementation
* Copyright (C) William Brown <william@blackhats.net.au> and the Kanidm team 2018-2024
* Copyright (C) David Mulder <dmulder@samba.org> 2024
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
Expand Down
9 changes: 9 additions & 0 deletions src/crypto/build.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* Unix Azure Entra ID implementation
* Copyright (C) William Brown <william@blackhats.net.au> and the Kanidm team 2018-2024
* Copyright (C) David Mulder <dmulder@samba.org> 2024
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
use std::env;

fn main() {
Expand Down
17 changes: 17 additions & 0 deletions src/daemon/src/broker.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/*
Unix Azure Entra ID implementation
Copyright (C) David Mulder <dmulder@samba.org> 2024

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 3 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, see <http://www.gnu.org/licenses/>.
*/
use async_trait::async_trait;
use base64::engine::general_purpose::URL_SAFE_NO_PAD;
use base64::Engine;
Expand Down
9 changes: 9 additions & 0 deletions src/daemon/src/daemon.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* Unix Azure Entra ID implementation
* Copyright (C) William Brown <william@blackhats.net.au> and the Kanidm team 2018-2024
* Copyright (C) David Mulder <dmulder@samba.org> 2024
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
#![deny(warnings)]
#![warn(unused_extern_crates)]
#![deny(clippy::todo)]
Expand Down
9 changes: 9 additions & 0 deletions src/daemon/src/tasks_daemon.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* Unix Azure Entra ID implementation
* Copyright (C) William Brown <william@blackhats.net.au> and the Kanidm team 2018-2024
* Copyright (C) David Mulder <dmulder@samba.org> 2024
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
#![deny(warnings)]
#![warn(unused_extern_crates)]
#![deny(clippy::todo)]
Expand Down
17 changes: 17 additions & 0 deletions src/glue/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/*
Unix Azure Entra ID implementation
Copyright (C) David Mulder <dmulder@samba.org> 2024

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 3 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, see <http://www.gnu.org/licenses/>.
*/
#![deny(warnings)]
#![warn(unused_extern_crates)]
#![deny(clippy::todo)]
Expand Down
17 changes: 17 additions & 0 deletions src/glue/src/unix_config.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/*
Unix Azure Entra ID implementation
Copyright (C) David Mulder <dmulder@samba.org> 2024

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 3 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, see <http://www.gnu.org/licenses/>.
*/
use himmelblau_unix_common::config::HimmelblauConfig;
use himmelblau_unix_common::constants::{
DEFAULT_CONN_TIMEOUT, DEFAULT_HELLO_PIN_MIN_LEN, DEFAULT_SOCK_PATH,
Expand Down
17 changes: 17 additions & 0 deletions src/idmap/build.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/*
Unix Azure Entra ID implementation
Copyright (C) David Mulder <dmulder@samba.org> 2024

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 3 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, see <http://www.gnu.org/licenses/>.
*/
use std::env;
use std::path::PathBuf;

Expand Down
9 changes: 9 additions & 0 deletions src/nss/src/implementation.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* Unix Azure Entra ID implementation
* Copyright (C) William Brown <william@blackhats.net.au> and the Kanidm team 2018-2024
* Copyright (C) David Mulder <dmulder@samba.org> 2024
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
use himmelblau_unix_common::client_sync::DaemonClientBlocking;
use himmelblau_unix_common::constants::DEFAULT_CONFIG_PATH;
use himmelblau_unix_common::unix_proto::{ClientRequest, ClientResponse, NssGroup, NssUser};
Expand Down
9 changes: 9 additions & 0 deletions src/nss/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* Unix Azure Entra ID implementation
* Copyright (C) William Brown <william@blackhats.net.au> and the Kanidm team 2018-2024
* Copyright (C) David Mulder <dmulder@samba.org> 2024
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
#![deny(warnings)]
#![warn(unused_extern_crates)]
#![deny(clippy::todo)]
Expand Down
Loading
Loading